Commit af0b26f9 authored by Rucha Deodhar's avatar Rucha Deodhar

MDEV-23786: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())'

failed for TokuDB engine CREATE TABLE

Analysis: Assertion failure happens because the database doesn't exist to
create the table but ha_tokudb::create() still returns false.
So error is not reported.
Fix: Store the error state and report the error.
parent f29b3d6d
......@@ -7260,7 +7260,7 @@ int ha_tokudb::create(
// in the database directory, so automatic filename-based
// discover_table_names() doesn't work either. So, it must force .frm
// file to disk.
form->s->write_frm_image();
error= form->s->write_frm_image();
#endif
#if defined(TOKU_INCLUDE_OPTION_STRUCTS) && TOKU_INCLUDE_OPTION_STRUCTS
......@@ -7292,8 +7292,8 @@ int ha_tokudb::create(
#endif // defined(TOKU_INCLUDE_OPTION_STRUCTS) && TOKU_INCLUDE_OPTION_STRUCTS
const toku_compression_method compression_method =
row_format_to_toku_compression_method(row_format);
bool create_from_engine = (create_info->table_options & HA_OPTION_CREATE_FROM_ENGINE);
if (error) { goto cleanup; }
if (create_from_engine) {
// table already exists, nothing to do
error = 0;
......
#
# 10.2 Test
#
# MDEV-23786: Assertion `!is_set() || (m_status == DA_OK_BULK &&
# is_bulk_op())'failed for TokuDB engine CREATE TABLE
#
set default_storage_engine='tokudb';
CREATE TABLE _uppercase.t (a INT) ENGINE=TokuDB;
ERROR 42000: Unknown database '_uppercase'
# End of 10.2 Test
source include/have_tokudb.inc;
--echo #
--echo # 10.2 Test
--echo #
--echo # MDEV-23786: Assertion `!is_set() || (m_status == DA_OK_BULK &&
--echo # is_bulk_op())'failed for TokuDB engine CREATE TABLE
--echo #
set default_storage_engine='tokudb';
--error ER_BAD_DB_ERROR
CREATE TABLE _uppercase.t (a INT) ENGINE=TokuDB;
--echo # End of 10.2 Test
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment