1
0
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:
aelkin/elkin@dsl-hkigw8-feb9fb00-191.dhcp.inet.fi
2006-09-28 18:51:27 +03:00
parent a8c9d45dfc
commit 5962886dce
5 changed files with 65 additions and 1 deletions

View File

@@ -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