mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
bug#22027: CREATE TABLE IF NOT EXISTS SELECT logged improperly with rbr binlog,
and #22762: create talbe if not exists like a-temp-table binlogged w/o "if not exists" These are rbr bugs. store_create_info, which generates the create statement e.g for binlogging, did not account a lex option HA_LEX_CREATE_IF_NOT_EXISTS. The fix makes the generated query to include the parent's statement option if that was supplied.
This commit is contained in:
parent
a8c9d45dfc
commit
5962886dce
@@ -1042,6 +1042,9 @@ int store_create_info(THD *thd, TABLE_LIST *table_list, String *packet,
|
||||
packet->append(STRING_WITH_LEN("CREATE TEMPORARY TABLE "));
|
||||
else
|
||||
packet->append(STRING_WITH_LEN("CREATE TABLE "));
|
||||
if (create_info_arg &&
|
||||
(create_info_arg->options & HA_LEX_CREATE_IF_NOT_EXISTS))
|
||||
packet->append(STRING_WITH_LEN("IF NOT EXISTS "));
|
||||
if (table_list->schema_table)
|
||||
alias= table_list->schema_table->table_name;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user