mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Add warnings for single line inserts. To do this I had to convert count_cuted_fields to an enum (to be able to detect setting a NOT NULL field to NULL)
mysql-test/r/ctype_mb.result: update results after adding more warnings mysql-test/r/null.result: update results after adding more warnings mysql-test/r/select_found.result: update results after adding more warnings mysql-test/r/warnings.result: update results after adding more warnings mysql-test/t/ctype_mb.test: Add missing drop table mysql-test/t/myisam.test: Disable some warnings mysql-test/t/select_found.test: update results after adding more warnings sql/field_conv.cc: Add warnings for single line inserts sql/item_func.cc: Remove compile warnings sql/sql_class.cc: Add warnings for single line inserts sql/sql_class.h: Add warnings for single line inserts sql/sql_insert.cc: Add warnings for single line inserts sql/sql_load.cc: Add warnings for single line inserts sql/sql_select.cc: Add warnings for single line inserts sql/sql_table.cc: Add warnings for single line inserts sql/sql_update.cc: Add warnings for single line inserts
This commit is contained in:
@@ -295,7 +295,7 @@ int mysql_update(THD *thd,
|
||||
init_read_record(&info,thd,table,select,0,1);
|
||||
|
||||
updated= found= 0;
|
||||
thd->count_cuted_fields=1; /* calc cuted fields */
|
||||
thd->count_cuted_fields= CHECK_FIELD_WARN; /* calc cuted fields */
|
||||
thd->cuted_fields=0L;
|
||||
thd->proc_info="Updating";
|
||||
query_id=thd->query_id;
|
||||
@@ -386,7 +386,7 @@ int mysql_update(THD *thd,
|
||||
thd->insert_id_used ? thd->insert_id() : 0L,buff);
|
||||
DBUG_PRINT("info",("%d records updated",updated));
|
||||
}
|
||||
thd->count_cuted_fields=0; /* calc cuted fields */
|
||||
thd->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */
|
||||
free_io_cache(table);
|
||||
DBUG_RETURN(0);
|
||||
|
||||
@@ -492,7 +492,7 @@ int multi_update::prepare(List<Item> ¬_used_values, SELECT_LEX_UNIT *unit)
|
||||
uint i, max_fields;
|
||||
DBUG_ENTER("multi_update::prepare");
|
||||
|
||||
thd->count_cuted_fields=1;
|
||||
thd->count_cuted_fields= CHECK_FIELD_WARN;
|
||||
thd->cuted_fields=0L;
|
||||
thd->proc_info="updating main table";
|
||||
|
||||
@@ -733,7 +733,7 @@ multi_update::~multi_update()
|
||||
}
|
||||
if (copy_field)
|
||||
delete [] copy_field;
|
||||
thd->count_cuted_fields=0; // Restore this setting
|
||||
thd->count_cuted_fields= CHECK_FIELD_IGNORE; // Restore this setting
|
||||
if (!trans_safe)
|
||||
thd->options|=OPTION_STATUS_NO_TRANS_UPDATE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user