|
|||||||||||
|
bk commit into 5.0 tree (evgen:1.2549) BUG#30384
From: <eugene(at)mysql.com>
Date: Wed Oct 31 2007 - 20:26:12 EDT
ChangeSet@1.2549, 2007-11-01 00:26:10+00:00, evgen@moonbone.local +2 -0 Bug#30384: Having SQL_BUFFER_RESULT option in the CREATE .. KEY(..) .. SELECT led to creating corrupted index. Corrected fix. The call to the handler::start_bulk_insert function was removed from the select_insert::prepare2 function because of its redundancy. The is_bulk_insert_mode flag is removed as it is not needed anymore.
sql/sql_class.h@1.347, 2007-11-01 00:25:17+00:00, evgen@moonbone.local +0 -1
Bug#30384: Having SQL_BUFFER_RESULT option in the CREATE .. KEY(..) .. SELECT
led to creating corrupted index.
sql/sql_insert.cc@1.254, 2007-11-01 00:22:38+00:00, evgen@moonbone.local +1 -12
Bug#30384: Having SQL_BUFFER_RESULT option in the CREATE .. KEY(..) .. SELECT
led to creating corrupted index.
diff -Nrup a/sql/sql_class.h b/sql/sql_class.h --- a/sql/sql_class.h 2007-09-21 08:06:30 +00:00 +++ b/sql/sql_class.h 2007-11-01 00:25:17 +00:00 @@ -2029,7 +2029,6 @@ class select_insert :public select_resul
ulonglong last_insert_id;
select_insert(TABLE_LIST *table_list_par, TABLE *table_par, List:table_list(table_list_par), table(table_par), fields(fields_par), last_insert_id(0), - insert_into_view(table_list_par && table_list_par->view != 0), - is_bulk_insert_mode(FALSE) + insert_into_view(table_list_par && table_list_par->view != 0) { bzero((char*) &info,sizeof(info)); info.handle_duplicates= duplic; @@ -2830,12 +2829,6 @@ select_insert::prepare(List<Item> &value int select_insert::prepare2(void) { DBUG_ENTER("select_insert::prepare2");
- if (thd->lex->current_select->options & OPTION_BUFFER_RESULT &&
- !thd->prelocked_mode && !is_bulk_insert_mode)
- {
- table->file->start_bulk_insert((ha_rows) 0);
- is_bulk_insert_mode= TRUE;
- }
DBUG_RETURN(0);
@@ -2941,7 +2934,6 @@ bool select_insert::send_eof() DBUG_ENTER("select_insert::send_eof"); error= (!thd->prelocked_mode) ? table->file->end_bulk_insert():0; - is_bulk_insert_mode= FALSE; table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE); @@ -3277,10 +3269,7 @@ select_create::prepare(List<Item> &value
if (info.handle_duplicates == DUP_UPDATE)
table->file->extra(HA_EXTRA_INSERT_WITH_UPDATE);
if (!thd->prelocked_mode)
table->file->start_bulk_insert((ha_rows) 0);
- is_bulk_insert_mode= TRUE;
thd->abort_on_warning= (!info.ignore &&
(thd->variables.sql_mode &
(MODE_STRICT_TRANS_TABLES |
-- MySQL Code Commits Mailing List For list archives: http://lists.mysql.com/commits To unsubscribe: http://lists.mysql.com/commits?unsub=lists@pantek.comReceived on Wed Oct 31 16:34:53 2007 This archive was generated by hypermail 2.1.8 : Thu Jul 03 2008 - 11:14:37 EDT |
||||||||||
|
|||||||||||