1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

BUG#6034 - Error code 124: Wrong medium type.

Version for 5.0. Committed for merge.
If the result table is one of the select tables in INSERT SELECT,
we must not disable the result tables indexes before selecting.
Now the preparation is split into two prepare methods.
The first detects the situation and defers some preparations
until the second phase.
This commit is contained in:
ingo@mysql.com
2005-01-19 21:20:55 +01:00
parent e906e86121
commit ea8882be80
5 changed files with 75 additions and 5 deletions

View File

@ -1164,6 +1164,7 @@ JOIN::exec()
DBUG_VOID_RETURN;
}
}
(void) result->prepare2(); // Currently, this cannot fail.
if (!tables_list)
{ // Only test of functions
@ -13149,7 +13150,8 @@ bool JOIN::change_result(select_result *res)
{
DBUG_ENTER("JOIN::change_result");
result= res;
if (!procedure && result->prepare(fields_list, select_lex->master_unit()))
if (!procedure && (result->prepare(fields_list, select_lex->master_unit()) ||
result->prepare2()))
{
DBUG_RETURN(TRUE);
}