mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
In TRADITIONAL mode, don't allow a NOT NULL field with no default be set to
DEFAULT (with no argument) or to the field's type's default by not being listed in the list of fields being inserted. (Bug #5986)
This commit is contained in:
@ -311,7 +311,8 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
(MODE_STRICT_TRANS_TABLES |
|
||||
MODE_STRICT_ALL_TABLES)));
|
||||
|
||||
if (fields.elements && check_that_all_fields_are_given_values(thd, table))
|
||||
if ((fields.elements || !value_count) &&
|
||||
check_that_all_fields_are_given_values(thd, table))
|
||||
{
|
||||
/* thd->net.report_error is now set, which will abort the next loop */
|
||||
error= 1;
|
||||
|
Reference in New Issue
Block a user