MDEV-13017 LOCK TABLE fails with irrelevant error while working with tables affected by ANSI_QUOTES
This commit is contained in:
parent
5cbbfe9f54
commit
c661b4d0fb
6
mysql-test/suite/parts/r/quoting.result
Normal file
6
mysql-test/suite/parts/r/quoting.result
Normal file
@ -0,0 +1,6 @@
|
||||
set sql_mode=ansi_quotes;
|
||||
create table t1 (i int) partition by range (i) (partition flush values less than maxvalue);
|
||||
set sql_mode=default;
|
||||
lock tables t1 read local;
|
||||
unlock tables;
|
||||
drop table t1;
|
10
mysql-test/suite/parts/t/quoting.test
Normal file
10
mysql-test/suite/parts/t/quoting.test
Normal file
@ -0,0 +1,10 @@
|
||||
#
|
||||
# MDEV-13017 LOCK TABLE fails with irrelevant error while working with tables affected by ANSI_QUOTES
|
||||
#
|
||||
--source include/have_partition.inc
|
||||
set sql_mode=ansi_quotes;
|
||||
create table t1 (i int) partition by range (i) (partition flush values less than maxvalue);
|
||||
set sql_mode=default;
|
||||
lock tables t1 read local;
|
||||
unlock tables;
|
||||
drop table t1;
|
@ -1918,9 +1918,12 @@ static int add_name_string(File fptr, const char *name)
|
||||
int err;
|
||||
String name_string("", 0, system_charset_info);
|
||||
THD *thd= current_thd;
|
||||
ulonglong save_sql_mode= thd->variables.sql_mode;
|
||||
thd->variables.sql_mode&= ~MODE_ANSI_QUOTES;
|
||||
ulonglong save_options= thd->variables.option_bits;
|
||||
thd->variables.option_bits&= ~OPTION_QUOTE_SHOW_CREATE;
|
||||
append_identifier(thd, &name_string, name, strlen(name));
|
||||
thd->variables.sql_mode= save_sql_mode;
|
||||
thd->variables.option_bits= save_options;
|
||||
err= add_string_object(fptr, &name_string);
|
||||
return err;
|
||||
|
Loading…
x
Reference in New Issue
Block a user