mirror of
https://github.com/MariaDB/server.git
synced 2026-04-29 11:45:32 +02: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. mysql-test/r/insert_select.result: BUG#6034 - Error code 124: Wrong medium type. The test results. mysql-test/t/insert_select.test: BUG#6034 - Error code 124: Wrong medium type. The test case. sql/sql_class.h: BUG#6034 - Error code 124: Wrong medium type. Added a new method for deferred preparation actions. sql/sql_insert.cc: BUG#6034 - Error code 124: Wrong medium type. If the insert table is one of the select tables, a part of the result table preparations like disabling indexes has to be done after the select phase. This is now done in the new method select_insert::prepare2(). sql/sql_select.cc: BUG#6034 - Error code 124: Wrong medium type. The result table preparation is now split into prepare() and prepare2(). Disabling indexes and other preparation stuff is deferred until after the selection phase.
This commit is contained in:
parent
09aa1e0763
commit
ab7f56e365
5 changed files with 75 additions and 5 deletions
|
|
@ -1280,6 +1280,7 @@ public:
|
|||
unit= u;
|
||||
return 0;
|
||||
}
|
||||
virtual int prepare2(void) { return 0; }
|
||||
/*
|
||||
Because of peculiarities of prepared statements protocol
|
||||
we need to know number of columns in the result set (if
|
||||
|
|
@ -1379,6 +1380,7 @@ class select_insert :public select_result_interceptor {
|
|||
enum_duplicates duplic, bool ignore);
|
||||
~select_insert();
|
||||
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
|
||||
int prepare2(void);
|
||||
bool send_data(List<Item> &items);
|
||||
virtual void store_values(List<Item> &values);
|
||||
void send_error(uint errcode,const char *err);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue