mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
merge
BitKeeper/etc/logging_ok: auto-union configure.in: Auto merged libmysqld/Makefile.am: Auto merged mysql-test/mysql-test-run.sh: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/ha_ndbcluster.h: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/item.cc: Auto merged sql/mysqld.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_delete.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_update.cc: Auto merged sql/table.cc: Auto merged sql/unireg.cc: Auto merged storage/innobase/row/row0mysql.c: Auto merged storage/myisam/mi_create.c: Auto merged storage/myisam/mi_dynrec.c: Auto merged storage/myisam/mi_key.c: Auto merged storage/myisam/mi_locking.c: Auto merged storage/myisam/mi_static.c: Auto merged storage/myisam/mi_statrec.c: Auto merged storage/myisam/mi_write.c: Auto merged storage/myisam/myisamdef.h: Auto merged storage/ndb/src/cw/cpcd/APIService.cpp: Auto merged storage/ndb/src/cw/cpcd/APIService.hpp: Auto merged storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Auto merged storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp: Auto merged storage/ndb/src/kernel/blocks/dbdict/SchemaFile.hpp: Auto merged storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: Auto merged storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Auto merged storage/ndb/test/ndbapi/testNodeRestart.cpp: Auto merged storage/ndb/test/ndbapi/testScan.cpp: Auto merged storage/ndb/test/run-test/main.cpp: Auto merged storage/ndb/test/run-test/run-test.hpp: Auto merged
This commit is contained in:
@@ -1522,6 +1522,7 @@ void handler::update_auto_increment()
|
||||
ulonglong nr;
|
||||
THD *thd= table->in_use;
|
||||
struct system_variables *variables= &thd->variables;
|
||||
bool auto_increment_field_not_null;
|
||||
DBUG_ENTER("handler::update_auto_increment");
|
||||
|
||||
/*
|
||||
@@ -1529,13 +1530,14 @@ void handler::update_auto_increment()
|
||||
row was not inserted
|
||||
*/
|
||||
thd->prev_insert_id= thd->next_insert_id;
|
||||
auto_increment_field_not_null= table->auto_increment_field_not_null;
|
||||
table->auto_increment_field_not_null= FALSE;
|
||||
|
||||
if ((nr= table->next_number_field->val_int()) != 0 ||
|
||||
table->auto_increment_field_not_null &&
|
||||
auto_increment_field_not_null &&
|
||||
thd->variables.sql_mode & MODE_NO_AUTO_VALUE_ON_ZERO)
|
||||
{
|
||||
/* Clear flag for next row */
|
||||
table->auto_increment_field_not_null= FALSE;
|
||||
/* Mark that we didn't generate a new value **/
|
||||
auto_increment_column_changed=0;
|
||||
|
||||
@@ -1551,7 +1553,6 @@ void handler::update_auto_increment()
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
table->auto_increment_field_not_null= FALSE;
|
||||
if (!(nr= thd->next_insert_id))
|
||||
{
|
||||
nr= get_auto_increment();
|
||||
|
||||
Reference in New Issue
Block a user