diff options
author | Sergei Golubchik <serg@mariadb.org> | 2023-04-01 15:58:14 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2023-04-01 22:31:30 +0200 |
commit | 0a6343909fcf8b193a1b517b3a16eabd4ae89a83 (patch) | |
tree | d87ffa9751894f38b08629c8f3fc46100e49c957 /sql | |
parent | 6a10468ed35167cbc5dc57c1091f8d8dcb572f0a (diff) | |
download | mariadb-git-0a6343909fcf8b193a1b517b3a16eabd4ae89a83.tar.gz |
ensure that STRING_WITH_LEN is only used with string literals
This is allowed:
STRING_WITH_LEN("string literal")
This is not:
char *str = "pointer to string";
... STRING_WITH_LEN(str) ..
In C++ this is also allowed:
const char str[] = "string literal";
... STRING_WITH_LEN(str) ...
Diffstat (limited to 'sql')
-rw-r--r-- | sql/debug_sync.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/debug_sync.cc b/sql/debug_sync.cc index 16ff4abafe1..5cb8fb715bf 100644 --- a/sql/debug_sync.cc +++ b/sql/debug_sync.cc @@ -1292,7 +1292,7 @@ uchar *debug_sync_value_ptr(THD *thd) if (opt_debug_sync_timeout) { - static char on[]= "ON - current signal: '"; + static const char on[]= "ON - current signal: '"; // Ensure exclusive access to debug_sync_global.ds_signal mysql_mutex_lock(&debug_sync_global.ds_mutex); |