mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Removed wrong warnings in test suite (This was because select_insert / select_create results was not freed.
Added thd to openfrm() for initialization of TABLE->in_use. This fixed a bug in BDB handling where table->in_use was used early mysql-test/r/key.result: Added new tests that shows a bug in warnings hat mysql-test/t/key.test: Added new tests that shows a bug in warnings hat sql/handler.cc: Added thd to openfrm() for initialization of TABLE->in_use sql/item.cc: New function to avoid warnings when giving field a value sql/item.h: New function to avoid warnings when giving field a value sql/mysql_priv.h: Added thd to openfrm() for initialization of TABLE->in_use sql/opt_range.cc: Don't give warnings in optimizer when internally storing a field value in a field. (Should be ok as we ar checking the feild in the WHERE clause later) sql/sql_base.cc: Give memroot explicitely to open_unireg_entry() and open_table() (Makes code simpler) Ensure that table->in_use is set early New arguments for openfrm() sql/sql_insert.cc: More debugging & comments sql/sql_parse.cc: Delete results for select_insert and select_create. This fixed a bug that generated warnings in test suite sql/sql_select.h: Don't give warnings in optimizer when internally storing a field value in a field. (Should be ok as we ar checking the feild in the WHERE clause later) sql/sql_table.cc: New arguments to open_table() and openfrm() sql/table.cc: Added thd to openfrm() for initialization of TABLE->in_use This fixes some bugs in BDB where table->in_use was used
This commit is contained in:
@@ -1387,7 +1387,7 @@ TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
|
||||
don't want to delete from it) 2) it would be written before the CREATE
|
||||
TABLE, which is a wrong order. So we keep binary logging disabled.
|
||||
*/
|
||||
if (!(table= open_table(thd, create_table, 0, (bool*) 0)))
|
||||
if (!(table= open_table(thd, create_table, &thd->mem_root, (bool*) 0)))
|
||||
{
|
||||
quick_rm_table(create_info->db_type, create_table->db,
|
||||
table_case_name(create_info, create_table->real_name));
|
||||
@@ -1629,7 +1629,7 @@ static int prepare_for_repair(THD* thd, TABLE_LIST *table_list,
|
||||
char name[FN_REFLEN];
|
||||
strxmov(name, mysql_data_home, "/", table_list->db, "/",
|
||||
table_list->real_name, NullS);
|
||||
if (openfrm(name, "", 0, 0, 0, &tmp_table))
|
||||
if (openfrm(thd, name, "", 0, 0, 0, &tmp_table))
|
||||
DBUG_RETURN(0); // Can't open frm file
|
||||
table= &tmp_table;
|
||||
}
|
||||
@@ -3026,7 +3026,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
||||
bzero((void*) &tbl, sizeof(tbl));
|
||||
tbl.db= new_db;
|
||||
tbl.real_name= tbl.alias= tmp_name;
|
||||
new_table= open_table(thd, &tbl, 0, 0);
|
||||
new_table= open_table(thd, &tbl, &thd->mem_root, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user