mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl
into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge mysql-test/t/func_misc.test: Auto merged sql/field.cc: Auto merged sql/item_create.cc: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged sql/mysqld.cc: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_update.cc: Auto merged sql/sql_view.cc: Auto merged strings/ctype-ujis.c: Auto merged
This commit is contained in:
@@ -1380,9 +1380,9 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
key_copy((byte*) key,table->record[0],table->key_info+key_nr,0);
|
||||
key_copy((uchar*) key,table->record[0],table->key_info+key_nr,0);
|
||||
if ((error=(table->file->index_read_idx(table->record[1],key_nr,
|
||||
(byte*) key, HA_WHOLE_KEY,
|
||||
(uchar*) key, HA_WHOLE_KEY,
|
||||
HA_READ_KEY_EXACT))))
|
||||
goto err;
|
||||
}
|
||||
@@ -1854,8 +1854,8 @@ bool delayed_get_table(THD *thd, TABLE_LIST *table_list)
|
||||
thd->proc_info="got old table";
|
||||
if (tmp->thd.killed)
|
||||
{
|
||||
if (tmp->thd.net.report_error)
|
||||
{
|
||||
if (tmp->thd.net.report_error)
|
||||
{
|
||||
/*
|
||||
Copy the error message. Note that we don't treat fatal
|
||||
errors in the delayed thread as fatal errors in the
|
||||
@@ -1871,7 +1871,7 @@ bool delayed_get_table(THD *thd, TABLE_LIST *table_list)
|
||||
if (thd->killed)
|
||||
{
|
||||
tmp->unlock();
|
||||
goto end_create;
|
||||
goto end_create;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&LOCK_delayed_create);
|
||||
@@ -1887,7 +1887,7 @@ bool delayed_get_table(THD *thd, TABLE_LIST *table_list)
|
||||
}
|
||||
/* Unlock the delayed insert object after its last access. */
|
||||
tmp->unlock();
|
||||
DBUG_RETURN(table_list->table == NULL);
|
||||
DBUG_RETURN((table_list->table == NULL));
|
||||
|
||||
end_create:
|
||||
pthread_mutex_unlock(&LOCK_delayed_create);
|
||||
@@ -1917,7 +1917,7 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
|
||||
Field **field,**org_field, *found_next_number_field;
|
||||
TABLE *copy;
|
||||
TABLE_SHARE *share= table->s;
|
||||
byte *bitmap;
|
||||
uchar *bitmap;
|
||||
DBUG_ENTER("Delayed_insert::get_local_table");
|
||||
|
||||
/* First request insert thread to get a lock */
|
||||
@@ -1961,7 +1961,7 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
|
||||
/* We don't need to change the file handler here */
|
||||
/* Assign the pointers for the field pointers array and the record. */
|
||||
field= copy->field= (Field**) (copy + 1);
|
||||
bitmap= (byte*) (field + share->fields + 1);
|
||||
bitmap= (uchar*) (field + share->fields + 1);
|
||||
copy->record[0]= (bitmap + share->column_bitmap_size * 2);
|
||||
memcpy((char*) copy->record[0], (char*) table->record[0], share->reclength);
|
||||
/*
|
||||
@@ -2030,7 +2030,8 @@ int write_delayed(THD *thd, TABLE *table, enum_duplicates duplic,
|
||||
Delayed_insert *di=thd->di;
|
||||
const Discrete_interval *forced_auto_inc;
|
||||
DBUG_ENTER("write_delayed");
|
||||
DBUG_PRINT("enter", ("query = '%s' length %u", query.str, query.length));
|
||||
DBUG_PRINT("enter", ("query = '%s' length %lu", query.str,
|
||||
(ulong) query.length));
|
||||
|
||||
thd->proc_info="waiting for handler insert";
|
||||
pthread_mutex_lock(&di->mutex);
|
||||
@@ -2417,7 +2418,7 @@ static void free_delayed_insert_blobs(register TABLE *table)
|
||||
{
|
||||
if ((*ptr)->flags & BLOB_FLAG)
|
||||
{
|
||||
char *str;
|
||||
uchar *str;
|
||||
((Field_blob *) (*ptr))->get_ptr(&str);
|
||||
my_free(str,MYF(MY_ALLOW_ZERO_PTR));
|
||||
((Field_blob *) (*ptr))->reset();
|
||||
@@ -2479,8 +2480,9 @@ bool Delayed_insert::handle_inserts(void)
|
||||
use values from the previous interval (of the previous rows).
|
||||
*/
|
||||
bool log_query= (row->log_query && row->query.str != NULL);
|
||||
DBUG_PRINT("delayed", ("query: '%s' length: %u", row->query.str ?
|
||||
row->query.str : "[NULL]", row->query.length));
|
||||
DBUG_PRINT("delayed", ("query: '%s' length: %lu", row->query.str ?
|
||||
row->query.str : "[NULL]",
|
||||
(ulong) row->query.length));
|
||||
if (log_query)
|
||||
{
|
||||
/*
|
||||
@@ -2812,7 +2814,7 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
while ((item= li++))
|
||||
{
|
||||
item->transform(&Item::update_value_transformer,
|
||||
(byte*)lex->current_select);
|
||||
(uchar*)lex->current_select);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3287,7 +3289,6 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
|
||||
create_info, alter_info, 0,
|
||||
select_field_count))
|
||||
{
|
||||
|
||||
if (create_info->table_existed &&
|
||||
!(create_info->options & HA_LEX_CREATE_TMP_TABLE))
|
||||
{
|
||||
@@ -3329,7 +3330,6 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
|
||||
close_temporary_table(thd, create_table);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
reenable_binlog(thd);
|
||||
if (!table) // open failed
|
||||
|
Reference in New Issue
Block a user