mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
create table options bug:
parse_engine_table_options() was only called when there was at least option with a non-default value. otherwise it was not called and option structure was not allocated at all. NULL pointer dereference in ::open().
This commit is contained in:
@@ -367,6 +367,15 @@ int ha_example::open(const char *name, int mode, uint test_if_locked)
|
||||
DBUG_RETURN(1);
|
||||
thr_lock_data_init(&share->lock,&lock,NULL);
|
||||
|
||||
example_table_options_struct *options=
|
||||
(example_table_options_struct *)table->s->option_struct;
|
||||
|
||||
DBUG_ASSERT(options);
|
||||
DBUG_PRINT("info", ("strparam: '%-.64s' ullparam: %llu enumparam: %u "\
|
||||
"boolparam: %u",
|
||||
(options->strparam ? options->strparam : "<NULL>"),
|
||||
options->ullparam, options->enumparam, options->boolparam));
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user