1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Re-run fix-fields on condition if table was reopened in HANDLERREAD

This commit is contained in:
monty@mysql.com
2006-01-10 19:13:12 +02:00
parent 3143daf8ac
commit 2970e71ce8
2 changed files with 24 additions and 7 deletions

View File

@ -437,9 +437,14 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
if (!lock)
goto err0; // mysql_lock_tables() printed error message already
if (cond && ((!cond->fixed &&
cond->fix_fields(thd, tables, &cond)) || cond->check_cols(1)))
goto err0;
if (cond)
{
if (table->query_id != thd->query_id)
cond->cleanup(); // File was reopened
if ((!cond->fixed &&
cond->fix_fields(thd, tables, &cond)) || cond->check_cols(1))
goto err0;
}
if (keyname)
{