summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2021-11-28 11:03:02 +0100
committerVladislav Vaintroub <wlad@mariadb.com>2021-11-28 11:56:43 +0100
commitbf8735eb16068c0d2480948b365f7e39dc011be5 (patch)
treeeb1a1259f64c9806a3f68d8e3b231ad5a4c6a1a6
parente85089afcaacf94087fb071b0f88f0e44b6e5b5e (diff)
downloadmariadb-git-bf8735eb16068c0d2480948b365f7e39dc011be5.tar.gz
Fix MSVC warning C4819 when system codepage is set to UTF-8.
The warning message says the file contains a character which can not be represented in current codepage (not exactly accurate)
-rw-r--r--storage/innobase/handler/handler0alter.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 59cbf3f6bbb..80385c1c3f8 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -10313,9 +10313,9 @@ commit_try_norebuild(
dict_fs2utf8(ctx->new_table->name.m_name, db, sizeof db,
table, sizeof table);
-
+ tmp_name[0]= (char)0xff;
for (size_t i = 0; error == DB_SUCCESS && i < size; i++) {
- snprintf(tmp_name, sizeof tmp_name, "\xff%zu", i);
+ snprintf(tmp_name+1, sizeof(tmp_name)-1, "%zu", i);
error = dict_stats_rename_index(db, table,
ha_alter_info->
rename_keys[i].
@@ -10323,7 +10323,7 @@ commit_try_norebuild(
tmp_name, trx);
}
for (size_t i = 0; error == DB_SUCCESS && i < size; i++) {
- snprintf(tmp_name, sizeof tmp_name, "\xff%zu", i);
+ snprintf(tmp_name+1, sizeof(tmp_name)-1, "%zu", i);
error = dict_stats_rename_index(db, table, tmp_name,
ha_alter_info
->rename_keys[i].