diff options
author | Monty <monty@mariadb.org> | 2019-10-14 18:22:27 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2019-10-20 11:52:29 +0300 |
commit | 67687d06bf70bb832495ba4785f00e31afb0c647 (patch) | |
tree | a73f964fd0857678156ecb59b5204ee110c670f8 /sql/sql_insert.cc | |
parent | b62101f84be49013cf07f323c202606847dcc453 (diff) | |
download | mariadb-git-67687d06bf70bb832495ba4785f00e31afb0c647.tar.gz |
Simplify TABLE::decide_logging_format()
- Use local variables table and share to simplify code
- Use sql_command_flags to detect what kind of command was used
- Added CF_DELETES_DATA to simplify detecton of delete commands
- Removed duplicate error in create_table_from_items().
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index d928dfbc3ae..334b6b2d667 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -4357,8 +4357,11 @@ TABLE *select_create::create_table_from_items(THD *thd, /* This can happen in innodb when you get a deadlock when using same table in insert and select or when you run out of memory. + It can also happen if there was a conflict in + THD::decide_logging_format() */ - my_error(ER_CANT_LOCK, MYF(0), my_errno); + if (!thd->is_error()) + my_error(ER_CANT_LOCK, MYF(0), my_errno); if (*lock) { mysql_unlock_tables(thd, *lock); |