1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

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().
This commit is contained in:
Monty
2019-10-14 18:22:27 +03:00
parent b62101f84b
commit 67687d06bf
4 changed files with 47 additions and 36 deletions

View File

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