1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

After merge fixes

mysql-test/r/alter_table.result:
  Fixed results after merge
sql/handler.cc:
  Trivial optimzation
sql/sql_table.cc:
  Trvial optimization
sql/sql_yacc.yy:
  After merge fix
sql/unireg.cc:
  Removed argument 'null_fields' from make_empty_rec() as it was not needed
  Moved assert() to right place to take bit fields into account
This commit is contained in:
unknown
2005-05-16 15:21:35 +03:00
parent f8f714a2fb
commit d15f89c47a
5 changed files with 28 additions and 19 deletions

View File

@@ -1420,6 +1420,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");
/*
@@ -1427,13 +1428,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;
@@ -1449,7 +1451,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();