diff options
| author | fumingwei <[email protected]> | 2023-06-13 18:13:00 +0800 |
|---|---|---|
| committer | fumingwei <[email protected]> | 2023-06-14 16:20:31 +0800 |
| commit | 461d2891b97137fa4e0981f278a7ecbe04e6a8ed (patch) | |
| tree | f176fd8c1b5900e176641f16a272e91868c6a206 /src/fieldstat.cpp | |
| parent | 910c161f2b6414ef7387643efc8799976bece864 (diff) | |
feature:提供对table row所用值操作的接口,提高dynamic metric写的性能v3.0.8
Diffstat (limited to 'src/fieldstat.cpp')
| -rw-r--r-- | src/fieldstat.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/fieldstat.cpp b/src/fieldstat.cpp index 2126d82..df773dd 100644 --- a/src/fieldstat.cpp +++ b/src/fieldstat.cpp @@ -116,6 +116,29 @@ void escaping_special_chars(char* str) } +int escaping_special_chars_cpoy(char *dest, char *src, size_t n) +{ + size_t i; + int len = 0; + + for(i = 0; i < n - 1 && src[i] != '\0'; i++) + { + if (src[i] == '.') + { + dest[i] = '_'; + } + else + { + dest[i] = src[i]; + } + len ++; + } + for ( ; i < n; i++) + { + dest[i] = '\0'; + } + return len; +} void get_current_table_line_cnt(struct fieldstat_instance *instance, int n_table, int *tables_line_cnt) { |
