mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +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:
@@ -1652,12 +1652,14 @@ void select_insert::cleanup()
|
||||
|
||||
select_insert::~select_insert()
|
||||
{
|
||||
DBUG_ENTER("~select_insert");
|
||||
if (table)
|
||||
{
|
||||
table->next_number_field=0;
|
||||
table->file->reset();
|
||||
}
|
||||
thd->count_cuted_fields= CHECK_FIELD_IGNORE;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
@@ -1815,7 +1817,8 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
table->next_number_field=table->found_next_number_field;
|
||||
|
||||
restore_record(table,default_values); // Get empty record
|
||||
thd->count_cuted_fields= CHECK_FIELD_WARN; // count warnings
|
||||
/* Count warnings. This is reset in ~select_insert() */
|
||||
thd->count_cuted_fields= CHECK_FIELD_WARN;
|
||||
thd->cuted_fields=0;
|
||||
if (info.handle_duplicates == DUP_IGNORE ||
|
||||
info.handle_duplicates == DUP_REPLACE)
|
||||
|
Reference in New Issue
Block a user