1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Bug#23588 SHOW COLUMNS on a temporary table causes locking issues

skip lock_type update for temporary tables
This commit is contained in:
gluh@mysql.com/mgluh.(none)
2008-02-22 12:30:17 +04:00
parent 652b7099ca
commit 4f0873c04b
3 changed files with 28 additions and 2 deletions

View File

@ -2852,8 +2852,12 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags)
}
if (tables->lock_type != TL_UNLOCK && ! thd->locked_tables)
tables->table->reginfo.lock_type= tables->lock_type == TL_WRITE_DEFAULT ?
thd->update_lock_default : tables->lock_type;
{
if (tables->lock_type == TL_WRITE_DEFAULT)
tables->table->reginfo.lock_type= thd->update_lock_default;
else if (tables->table->s->tmp_table == NO_TMP_TABLE)
tables->table->reginfo.lock_type= tables->lock_type;
}
tables->table->grant= tables->grant;
process_view_routines: