1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug#30384: Having SQL_BUFFER_RESULT option in the CREATE .. KEY(..) .. SELECT

led to creating corrupted index.

Corrected fix. The new method called prepare2 is added to the select_create
class. As all preparations are done by the select_create::prepare function
it doesn't do anything. Slightly changed algorithm of calling the 
start_bulk_insert function. Now it's called from the select_insert::prepare2
function when the SQL_BUFFER_RESULT flags is set.
The is_bulk_insert_mode flag is removed as it is not needed anymore.


sql/sql_class.h:
  Bug#30384: Having SQL_BUFFER_RESULT option in the CREATE .. KEY(..) .. SELECT
  led to creating corrupted index.
  Corrected fix. The new method called prepare2 is added to the select_create
  class. As all preparetions are done by the select_create::prepare function
  it doesn't do anything.
  The is_bulk_insert_mode flag is removed as it is not needed anymore.
sql/sql_insert.cc:
  Bug#30384: Having SQL_BUFFER_RESULT option in the CREATE .. KEY(..) .. SELECT
  led to creating corrupted index. Slightly changed algorithm of calling the
  start_bulk_insert function. Now it's called from the select_insert::prepare2
  function when the SQL_BUFFER_RESULT flags is set.
  Corrected fix. The is_bulk_insert_mode flag is removed as it is not needed
  anymore.
This commit is contained in:
unknown
2007-11-19 21:05:17 +00:00
parent 6a8e10d2ce
commit 4addb6b717
2 changed files with 7 additions and 15 deletions

View File

@@ -2029,14 +2029,13 @@ class select_insert :public select_result_interceptor {
ulonglong last_insert_id;
COPY_INFO info;
bool insert_into_view;
bool is_bulk_insert_mode;
select_insert(TABLE_LIST *table_list_par,
TABLE *table_par, List<Item> *fields_par,
List<Item> *update_fields, List<Item> *update_values,
enum_duplicates duplic, bool ignore);
~select_insert();
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
int prepare2(void);
virtual int prepare2(void);
bool send_data(List<Item> &items);
virtual void store_values(List<Item> &values);
void send_error(uint errcode,const char *err);
@@ -2071,6 +2070,7 @@ public:
void send_error(uint errcode,const char *err);
bool send_eof();
void abort();
int prepare2(void) { return 0; }
};
#include <myisam.h>