fixed coredump in UDF

added Monty's patch for alter table and LAST_INSERT_ID()
added a test case for replication of ALTER TABLE on a table with auto_increment


sql/item_func.cc:
  fixed a coredump in UDF
sql/sql_table.cc:
  fixed LAST_INSERT_ID() problem after ALTER TABLE on a table with auto_increment
This commit is contained in:
unknown 2000-08-07 15:28:56 -06:00
commit 1d598de955
4 changed files with 27 additions and 7 deletions

View file

@ -1140,7 +1140,9 @@ udf_handler::fix_fields(THD *thd,TABLE_LIST *tables,Item_result_field *func,
break;
}
}
thd->net.last_error[0]=0;
if(thd)
thd->net.last_error[0]=0;
my_bool (*init)(UDF_INIT *, UDF_ARGS *, char *)=
(my_bool (*)(UDF_INIT *, UDF_ARGS *, char *))
u_d->func_init;