mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge with 4.0.3
Some simple optimzations, more comments and indentation changes. Add ` around database in 'use database' in binary log. Moved max_error_count and max_warning_count to variables struct. Removed SHOW_WARNS_COUNT and SHOW_ERRORS_COUNT calls. Changed string functions to use character set of first string argument as default return characterset (Each string function can change the above assumption if needed)
This commit is contained in:
@ -380,9 +380,10 @@ multi_update::multi_update(THD *thd_arg, TABLE_LIST *ut, List<Item> &fs,
|
||||
}
|
||||
|
||||
int
|
||||
multi_update::prepare(List<Item> &values)
|
||||
multi_update::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
{
|
||||
DBUG_ENTER("multi_update::prepare");
|
||||
unit= u;
|
||||
do_update = true;
|
||||
thd->count_cuted_fields=1;
|
||||
thd->cuted_fields=0L;
|
||||
@ -480,9 +481,12 @@ multi_update::prepare(List<Item> &values)
|
||||
}
|
||||
if (counter)
|
||||
{
|
||||
Field_string offset(table_ref->table->file->ref_length,false,"offset",table_ref->table,true);
|
||||
Field_string offset(table_ref->table->file->ref_length, false,
|
||||
"offset", table_ref->table, true,
|
||||
default_charset_info);
|
||||
temp_fields->push_front(new Item_field(((Field *)&offset)));
|
||||
// Here I make tmp tables
|
||||
|
||||
// Make a temporary table
|
||||
int cnt=counter-1;
|
||||
TMP_TABLE_PARAM tmp_table_param;
|
||||
bzero((char*) &tmp_table_param,sizeof(tmp_table_param));
|
||||
@ -490,7 +494,8 @@ multi_update::prepare(List<Item> &values)
|
||||
if (!(tmp_tables[cnt]=create_tmp_table(thd, &tmp_table_param,
|
||||
*temp_fields,
|
||||
(ORDER*) 0, 1, 0, 0,
|
||||
TMP_TABLE_ALL_COLUMNS)))
|
||||
TMP_TABLE_ALL_COLUMNS,
|
||||
unit)))
|
||||
{
|
||||
error = 1; // A proper error message is due here
|
||||
DBUG_RETURN(1);
|
||||
@ -638,7 +643,8 @@ bool multi_update::send_data(List<Item> &values)
|
||||
{
|
||||
// Here we insert into each temporary table
|
||||
values_by_table.push_front(new Item_string((char*) table->file->ref,
|
||||
table->file->ref_length));
|
||||
table->file->ref_length,
|
||||
system_charset_info));
|
||||
fill_record(tmp_tables[secure_counter]->field,values_by_table);
|
||||
error= write_record(tmp_tables[secure_counter],
|
||||
&(infos[secure_counter]));
|
||||
|
Reference in New Issue
Block a user