mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel BitKeeper/etc/ignore: auto-union client/mysql.cc: Auto merged client/mysqldump.c: Auto merged client/mysqltest.c: Auto merged extra/comp_err.c: Auto merged include/decimal.h: Auto merged include/my_getopt.h: Auto merged include/my_global.h: Auto merged include/my_sys.h: Auto merged include/mysql.h: Auto merged mysys/array.c: Auto merged mysys/hash.c: Auto merged mysys/typelib.c: Auto merged sql/derror.cc: Auto merged sql/event_data_objects.cc: Auto merged sql/event_queue.cc: Auto merged sql/field.cc: Auto merged sql/filesort.cc: Auto merged sql/ha_ndbcluster.h: Auto merged sql/ha_ndbcluster_binlog.cc: Auto merged sql/ha_partition.cc: Auto merged sql/ha_partition.h: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/item_subselect.cc: Auto merged sql/item_sum.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/item_timefunc.h: Auto merged sql/log.cc: Auto merged sql/log_event.cc: Auto merged sql/my_decimal.cc: Auto merged sql/my_decimal.h: Auto merged sql/mysql_priv.h: Auto merged sql/opt_range.cc: Auto merged sql/opt_range.h: Auto merged sql/opt_sum.cc: Auto merged sql/protocol.cc: Auto merged sql/protocol.h: Auto merged sql/rpl_utility.h: Auto merged sql/slave.cc: Auto merged sql/sp.cc: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_connect.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_load.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_partition.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_select.h: Auto merged sql/sql_show.cc: Auto merged sql/sql_trigger.cc: Auto merged sql/sql_union.cc: Auto merged sql/sql_update.cc: Auto merged sql/sql_view.cc: Auto merged sql/structs.h: Auto merged sql/table.h: Auto merged sql/tztime.cc: Auto merged sql/unireg.cc: Auto merged storage/example/ha_example.cc: Auto merged storage/federated/ha_federated.cc: Auto merged storage/heap/ha_heap.cc: Auto merged storage/innobase/handler/ha_innodb.h: Auto merged storage/myisam/ha_myisam.cc: Auto merged storage/myisam/sort.c: Auto merged storage/myisammrg/ha_myisammrg.cc: Auto merged storage/ndb/tools/restore/consumer_restore.cpp: Auto merged strings/decimal.c: Auto merged strings/strtod.c: Auto merged include/hash.h: Manual merge with 5.1 main tree. mysys/my_getopt.c: Manual merge with 5.1 main tree. sql/field.h: Manual merge with 5.1 main tree. sql/ha_ndbcluster.cc: Manual merge with 5.1 main tree. sql/item_cmpfunc.h: Manual merge with 5.1 main tree. sql/item_create.cc: Manual merge with 5.1 main tree. sql/item_func.h: Manual merge with 5.1 main tree. sql/key.cc: Manual merge with 5.1 main tree. sql/lock.cc: Manual merge with 5.1 main tree. sql/mysqld.cc: Manual merge with 5.1 main tree. sql/set_var.cc: Manual merge with 5.1 main tree. sql/set_var.h: Manual merge with 5.1 main tree. sql/sql_base.cc: Manual merge with 5.1 main tree. sql/sql_handler.cc: Manual merge with 5.1 main tree. sql/sql_insert.cc: Manual merge with 5.1 main tree. sql/sql_plugin.cc: Manual merge with 5.1 main tree. sql/sql_table.cc: Manual merge with 5.1 main tree. sql/sql_yacc.yy: Manual merge with 5.1 main tree. sql/table.cc: Manual merge with 5.1 main tree. storage/innobase/handler/ha_innodb.cc: Manual merge with 5.1 main tree. storage/ndb/src/mgmsrv/InitConfigFileParser.cpp: Manual merge with 5.1 main tree. storage/ndb/tools/restore/restore_main.cpp: Manual merge with 5.1 main tree.
This commit is contained in:
@ -92,7 +92,7 @@ static int mysql_ha_flush_table(THD *thd, TABLE **table_ptr, uint mode_flags);
|
||||
Pointer to the TABLE_LIST struct.
|
||||
*/
|
||||
|
||||
static char *mysql_ha_hash_get_key(TABLE_LIST *tables, uint *key_len_p,
|
||||
static char *mysql_ha_hash_get_key(TABLE_LIST *tables, size_t *key_len_p,
|
||||
my_bool first __attribute__((unused)))
|
||||
{
|
||||
*key_len_p= strlen(tables->alias) + 1 ; /* include '\0' in comparisons */
|
||||
@ -167,7 +167,7 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen)
|
||||
}
|
||||
else if (! reopen) /* Otherwise we have 'tables' already. */
|
||||
{
|
||||
if (hash_search(&thd->handler_tables_hash, (byte*) tables->alias,
|
||||
if (hash_search(&thd->handler_tables_hash, (uchar*) tables->alias,
|
||||
strlen(tables->alias) + 1))
|
||||
{
|
||||
DBUG_PRINT("info",("duplicate '%s'", tables->alias));
|
||||
@ -208,10 +208,10 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen)
|
||||
namelen= strlen(tables->table_name) + 1;
|
||||
aliaslen= strlen(tables->alias) + 1;
|
||||
if (!(my_multi_malloc(MYF(MY_WME),
|
||||
&hash_tables, sizeof(*hash_tables),
|
||||
&db, dblen,
|
||||
&name, namelen,
|
||||
&alias, aliaslen,
|
||||
&hash_tables, (uint) sizeof(*hash_tables),
|
||||
&db, (uint) dblen,
|
||||
&name, (uint) namelen,
|
||||
&alias, (uint) aliaslen,
|
||||
NullS)))
|
||||
goto err;
|
||||
/* structure copy */
|
||||
@ -224,7 +224,7 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen)
|
||||
memcpy(hash_tables->alias, tables->alias, aliaslen);
|
||||
|
||||
/* add to hash */
|
||||
if (my_hash_insert(&thd->handler_tables_hash, (byte*) hash_tables))
|
||||
if (my_hash_insert(&thd->handler_tables_hash, (uchar*) hash_tables))
|
||||
{
|
||||
my_free((char*) hash_tables, MYF(0));
|
||||
mysql_ha_close(thd, tables);
|
||||
@ -270,7 +270,7 @@ bool mysql_ha_close(THD *thd, TABLE_LIST *tables)
|
||||
tables->db, tables->table_name, tables->alias));
|
||||
|
||||
if ((hash_tables= (TABLE_LIST*) hash_search(&thd->handler_tables_hash,
|
||||
(byte*) tables->alias,
|
||||
(uchar*) tables->alias,
|
||||
strlen(tables->alias) + 1)))
|
||||
{
|
||||
/*
|
||||
@ -295,7 +295,7 @@ bool mysql_ha_close(THD *thd, TABLE_LIST *tables)
|
||||
}
|
||||
VOID(pthread_mutex_unlock(&LOCK_open));
|
||||
}
|
||||
hash_delete(&thd->handler_tables_hash, (byte*) hash_tables);
|
||||
hash_delete(&thd->handler_tables_hash, (uchar*) hash_tables);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -345,7 +345,7 @@ bool mysql_ha_read(THD *thd, TABLE_LIST *tables,
|
||||
String buffer(buff, sizeof(buff), system_charset_info);
|
||||
int error, keyno= -1;
|
||||
uint num_rows;
|
||||
byte *key;
|
||||
uchar *key;
|
||||
uint key_len;
|
||||
bool not_used;
|
||||
DBUG_ENTER("mysql_ha_read");
|
||||
@ -362,7 +362,7 @@ bool mysql_ha_read(THD *thd, TABLE_LIST *tables,
|
||||
it++;
|
||||
|
||||
if ((hash_tables= (TABLE_LIST*) hash_search(&thd->handler_tables_hash,
|
||||
(byte*) tables->alias,
|
||||
(uchar*) tables->alias,
|
||||
strlen(tables->alias) + 1)))
|
||||
{
|
||||
table= hash_tables->table;
|
||||
@ -536,7 +536,7 @@ bool mysql_ha_read(THD *thd, TABLE_LIST *tables,
|
||||
keypart_map= (keypart_map << 1) | 1;
|
||||
}
|
||||
|
||||
if (!(key= (byte*) thd->calloc(ALIGN_SIZE(key_len))))
|
||||
if (!(key= (uchar*) thd->calloc(ALIGN_SIZE(key_len))))
|
||||
goto err;
|
||||
table->file->ha_index_or_rnd_end();
|
||||
table->file->ha_index_init(keyno, 1);
|
||||
@ -732,13 +732,13 @@ static int mysql_ha_flush_table(THD *thd, TABLE **table_ptr, uint mode_flags)
|
||||
table->alias, mode_flags));
|
||||
|
||||
if ((hash_tables= (TABLE_LIST*) hash_search(&thd->handler_tables_hash,
|
||||
(byte*) table->alias,
|
||||
(uchar*) table->alias,
|
||||
strlen(table->alias) + 1)))
|
||||
{
|
||||
if (! (mode_flags & MYSQL_HA_REOPEN_ON_USAGE))
|
||||
{
|
||||
/* This is a final close. Remove from hash. */
|
||||
hash_delete(&thd->handler_tables_hash, (byte*) hash_tables);
|
||||
hash_delete(&thd->handler_tables_hash, (uchar*) hash_tables);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -791,7 +791,7 @@ void mysql_ha_mark_tables_for_reopen(THD *thd, TABLE *table)
|
||||
{
|
||||
TABLE_LIST *hash_tables;
|
||||
if ((hash_tables= (TABLE_LIST*) hash_search(&thd->handler_tables_hash,
|
||||
(byte*) table->alias,
|
||||
(uchar*) table->alias,
|
||||
strlen(table->alias) + 1)))
|
||||
{
|
||||
/* Mark table as ready for reopen. */
|
||||
|
Reference in New Issue
Block a user