diff options
Diffstat (limited to 'storage')
53 files changed, 1915 insertions, 90 deletions
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index 791939f32dd..60c1255e208 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -917,6 +917,15 @@ buf_flush_init_for_writing( case 1: reset_type = FIL_PAGE_IBUF_BITMAP; break; + case FSP_TRX_SYS_PAGE_NO: + if (block->page.id.page_no() + == TRX_SYS_PAGE_NO + && block->page.id.space() + == TRX_SYS_SPACE) { + reset_type = FIL_PAGE_TYPE_TRX_SYS; + break; + } + /* fall through */ default: switch (page_type) { case FIL_PAGE_INDEX: @@ -3124,12 +3133,6 @@ DECLARE_THREAD(buf_flush_page_cleaner_coordinator)( os_thread_create */ { my_thread_init(); - ulint next_loop_time = ut_time_ms() + 1000; - ulint n_flushed = 0; - ulint last_activity = srv_get_activity_count(); - ulint last_pages = 0; - - my_thread_init(); #ifdef UNIV_PFS_THREAD pfs_register_thread(page_cleaner_thread_key); #endif /* UNIV_PFS_THREAD */ @@ -3151,6 +3154,8 @@ DECLARE_THREAD(buf_flush_page_cleaner_coordinator)( " page cleaner thread priority can be changed." " See the man page of setpriority()."; } + /* Signal that setpriority() has been attempted. */ + os_event_set(recv_sys->flush_end); #endif /* UNIV_LINUX */ while (!srv_read_only_mode @@ -3194,12 +3199,16 @@ DECLARE_THREAD(buf_flush_page_cleaner_coordinator)( os_event_wait(buf_flush_event); - ulint ret_sleep = 0; - ulint n_evicted = 0; - ulint n_flushed_last = 0; - ulint warn_interval = 1; - ulint warn_count = 0; - int64_t sig_count = os_event_reset(buf_flush_event); + ulint ret_sleep = 0; + ulint n_evicted = 0; + ulint n_flushed_last = 0; + ulint warn_interval = 1; + ulint warn_count = 0; + int64_t sig_count = os_event_reset(buf_flush_event); + ulint next_loop_time = ut_time_ms() + 1000; + ulint n_flushed = 0; + ulint last_activity = srv_get_activity_count(); + ulint last_pages = 0; while (srv_shutdown_state == SRV_SHUTDOWN_NONE) { diff --git a/storage/innobase/dict/dict0crea.cc b/storage/innobase/dict/dict0crea.cc index 7cc1c876589..c0821d667ef 100644 --- a/storage/innobase/dict/dict0crea.cc +++ b/storage/innobase/dict/dict0crea.cc @@ -2505,6 +2505,7 @@ dict_create_or_check_sys_tablespace(void) << ". Dropping incompletely created tables."; ut_a(err == DB_OUT_OF_FILE_SPACE + || err == DB_DUPLICATE_KEY || err == DB_TOO_MANY_CONCURRENT_TRXS); row_drop_table_for_mysql("SYS_TABLESPACES", trx, TRUE, TRUE); @@ -2532,11 +2533,11 @@ dict_create_or_check_sys_tablespace(void) sys_tablespaces_err = dict_check_if_system_table_exists( "SYS_TABLESPACES", DICT_NUM_FIELDS__SYS_TABLESPACES + 1, 1); - ut_a(sys_tablespaces_err == DB_SUCCESS); + ut_a(sys_tablespaces_err == DB_SUCCESS || err != DB_SUCCESS); sys_datafiles_err = dict_check_if_system_table_exists( "SYS_DATAFILES", DICT_NUM_FIELDS__SYS_DATAFILES + 1, 1); - ut_a(sys_datafiles_err == DB_SUCCESS); + ut_a(sys_datafiles_err == DB_SUCCESS || err != DB_SUCCESS); return(err); } diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 4d1b40052dc..ebf8f38368b 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -2386,22 +2386,7 @@ innobase_get_stmt_safe( char* buf, size_t buflen) { - LEX_STRING* stmt; - size_t length=0; - - ut_ad(buflen > 1); - - stmt = thd ? thd_query_string(thd) : NULL; - - if (stmt && stmt->str) { - length = stmt->length >= buflen ? buflen - 1 : stmt->length; - memcpy(buf, stmt->str, length); - buf[length]='\0'; - } else { - buf[0]='\0'; - } - - return (length); + return thd_query_safe(thd, buf, buflen); } /**********************************************************************//** diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index 1eec22874d1..24bfb31b1fb 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -1011,6 +1011,7 @@ ha_innobase::check_if_supported_inplace_alter( constant DEFAULT expression. */ cf_it.rewind(); Field **af = altered_table->field; + while (Create_field* cf = cf_it++) { DBUG_ASSERT(cf->field || (ha_alter_info->handler_flags @@ -1018,49 +1019,71 @@ ha_innobase::check_if_supported_inplace_alter( if (const Field* f = cf->field) { /* This could be changing an existing column - from NULL to NOT NULL. For now, ensure that - the DEFAULT is a constant. */ - if (~ha_alter_info->handler_flags - & (Alter_inplace_info::ALTER_COLUMN_NOT_NULLABLE - | Alter_inplace_info::ALTER_COLUMN_DEFAULT) - || (*af)->real_maybe_null()) { - /* This ALTER TABLE is not both changing - a column to NOT NULL and changing the - DEFAULT value of a column, or this column - does allow NULL after the ALTER TABLE. */ - goto next_column; - } - - /* Find the matching column in the old table. */ - Field** fp; - for (fp = table->field; *fp; fp++) { - if (f != *fp) { - continue; + from NULL to NOT NULL. */ + switch ((*af)->type()) { + case MYSQL_TYPE_TIMESTAMP: + case MYSQL_TYPE_TIMESTAMP2: + /* Inserting NULL into a TIMESTAMP column + would cause the DEFAULT value to be + replaced. Ensure that the DEFAULT + expression is not changing during + ALTER TABLE. */ + if (!f->real_maybe_null() + || (*af)->real_maybe_null()) { + /* The column was NOT NULL, or it + will allow NULL after ALTER TABLE. */ + goto next_column; } - if (!f->real_maybe_null()) { - /* The column already is NOT NULL. */ + + if (!(*af)->default_value + && (*af)->is_real_null()) { + /* No DEFAULT value is + specified. We can report + errors for any NULL values for + the TIMESTAMP. + + FIXME: Allow any DEFAULT + expression whose value does + not change during ALTER TABLE. + This would require a fix in + row_merge_read_clustered_index() + to try to replace the DEFAULT + value before reporting + DB_INVALID_NULL. */ goto next_column; } break; + default: + /* For any other data type, NULL + values are not converted. + (An AUTO_INCREMENT attribute cannot + be introduced to a column with + ALGORITHM=INPLACE.) */ + ut_ad((MTYP_TYPENR((*af)->unireg_check) + == Field::NEXT_NUMBER) + == (MTYP_TYPENR(f->unireg_check) + == Field::NEXT_NUMBER)); + goto next_column; } - /* The column must be found in the old table. */ - DBUG_ASSERT(fp < &table->field[table->s->fields]); - } - - if (!(*af)->default_value - || (*af)->default_value->flags == 0) { - /* The NOT NULL column is not - carrying a non-constant DEFAULT. */ - goto next_column; - } - - /* TODO: Allow NULL column values to - be replaced with a non-constant DEFAULT. */ - if (cf->field) { ha_alter_info->unsupported_reason = innobase_get_err_msg( ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOT_NULL); + } else if (!(*af)->default_value + || !((*af)->default_value->flags + & ~(VCOL_SESSION_FUNC | VCOL_TIME_FUNC))) { + /* The added NOT NULL column lacks a DEFAULT value, + or the DEFAULT is the same for all rows. + (Time functions, such as CURRENT_TIMESTAMP(), + are evaluated from a timestamp that is assigned + at the start of the statement. Session + functions, such as USER(), always evaluate the + same within a statement.) */ + + /* Compute the DEFAULT values of non-constant columns + (VCOL_SESSION_FUNC | VCOL_TIME_FUNC). */ + (*af)->set_default(); + goto next_column; } DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); @@ -4471,11 +4494,13 @@ prepare_inplace_alter_table_dict( || !innobase_fulltext_exist(altered_table))) { /* InnoDB can perform an online operation (LOCK=NONE). */ } else { + size_t query_length; /* This should have been blocked in check_if_supported_inplace_alter(). */ ut_ad(0); my_error(ER_NOT_SUPPORTED_YET, MYF(0), - thd_query(ctx->prebuilt->trx->mysql_thd)); + innobase_get_stmt_unsafe(ctx->prebuilt->trx->mysql_thd, + &query_length)); goto error_handled; } diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc index 6d314f09bb0..061fc25a55e 100644 --- a/storage/innobase/row/row0mysql.cc +++ b/storage/innobase/row/row0mysql.cc @@ -70,11 +70,6 @@ Created 9/17/2000 Heikki Tuuri #include <deque> #include <vector> -static const char* MODIFICATIONS_NOT_ALLOWED_MSG_FORCE_RECOVERY = - "innodb_force_recovery is on. We do not allow database modifications" - " by the user. Shut down mysqld and edit my.cnf to set" - " innodb_force_recovery=0"; - /** Provide optional 4.x backwards compatibility for 5.0 and above */ ibool row_rollback_on_timeout = FALSE; @@ -1432,9 +1427,7 @@ row_insert_for_mysql( } else if (!prebuilt->table->is_readable()) { return(row_mysql_get_table_status(prebuilt->table, trx, true)); - } else if (srv_force_recovery) { - - ib::error() << MODIFICATIONS_NOT_ALLOWED_MSG_FORCE_RECOVERY; + } else if (high_level_read_only) { return(DB_READ_ONLY); } DBUG_EXECUTE_IF("mark_table_corrupted", { @@ -1850,9 +1843,8 @@ row_update_for_mysql_using_upd_graph( return(row_mysql_get_table_status(table, trx, true)); } - if(srv_force_recovery) { - ib::error() << MODIFICATIONS_NOT_ALLOWED_MSG_FORCE_RECOVERY; - DBUG_RETURN(DB_READ_ONLY); + if (high_level_read_only) { + return(DB_READ_ONLY); } DEBUG_SYNC_C("innodb_row_update_for_mysql_begin"); @@ -4474,10 +4466,8 @@ row_rename_table_for_mysql( ut_a(new_name != NULL); ut_ad(trx->state == TRX_STATE_ACTIVE); - if (srv_force_recovery) { - ib::info() << MODIFICATIONS_NOT_ALLOWED_MSG_FORCE_RECOVERY; - err = DB_READ_ONLY; - goto funct_exit; + if (high_level_read_only) { + return(DB_READ_ONLY); } else if (row_mysql_is_system_table(new_name)) { diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index 3fb54c1280b..7150fd2343e 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -1471,10 +1471,6 @@ innobase_start_or_create_for_mysql() srv_read_only_mode = true; } - if (srv_force_recovery == SRV_FORCE_NO_LOG_REDO) { - srv_read_only_mode = 1; - } - high_level_read_only = srv_read_only_mode || srv_force_recovery > SRV_FORCE_NO_TRX_UNDO; @@ -1865,6 +1861,10 @@ innobase_start_or_create_for_mysql() NULL, NULL); } +#ifdef UNIV_LINUX + /* Wait for the setpriority() call to finish. */ + os_event_wait(recv_sys->flush_end); +#endif /* UNIV_LINUX */ srv_start_state_set(SRV_START_STATE_IO); } @@ -2573,13 +2573,15 @@ files_checked: operations */ if (!srv_read_only_mode) { - thread_handles[1 + SRV_MAX_N_IO_THREADS] = os_thread_create( srv_master_thread, NULL, thread_ids + (1 + SRV_MAX_N_IO_THREADS)); thread_started[1 + SRV_MAX_N_IO_THREADS] = true; srv_start_state_set(SRV_START_STATE_MASTER); + } + if (!srv_read_only_mode + && srv_force_recovery < SRV_FORCE_NO_BACKGROUND) { srv_undo_sources = true; /* Create the dict stats gathering thread */ srv_dict_stats_thread_active = true; @@ -2588,10 +2590,6 @@ files_checked: /* Create the thread that will optimize the FTS sub-system. */ fts_optimize_init(); - } - - if (!srv_read_only_mode - && srv_force_recovery < SRV_FORCE_NO_BACKGROUND) { thread_handles[5 + SRV_MAX_N_IO_THREADS] = os_thread_create( srv_purge_coordinator_thread, diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc index e317a38815b..317087173c5 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -285,6 +285,12 @@ trx_purge_add_update_undo_to_history( purge have been started, recv_recovery_rollback_active() can start transactions in row_merge_drop_temp_indexes() and fts_drop_orphaned_tables(), and roll back recovered transactions. + + Arbitrary user transactions may be executed when all the undo log + related background processes (including purge) are disabled due to + innodb_force_recovery=2 or innodb_force_recovery=3. + DROP TABLE may be executed at any innodb_force_recovery level. + After the purge thread has been given permission to exit, in fast shutdown, we may roll back transactions (trx->undo_no==0) in THD::cleanup() invoked from unlink_thd(). */ @@ -292,6 +298,8 @@ trx_purge_add_update_undo_to_history( || ((srv_startup_is_before_trx_rollback_phase || trx_rollback_or_clean_is_active) && purge_sys->state == PURGE_STATE_INIT) + || (srv_force_recovery >= SRV_FORCE_NO_BACKGROUND + && purge_sys->state == PURGE_STATE_DISABLED) || (trx->undo_no == 0 && srv_fast_shutdown)); /* Add the log as the first in the history list */ diff --git a/storage/innobase/trx/trx0sys.cc b/storage/innobase/trx/trx0sys.cc index ff99900b5b9..e3f3ba81016 100644 --- a/storage/innobase/trx/trx0sys.cc +++ b/storage/innobase/trx/trx0sys.cc @@ -323,7 +323,6 @@ trx_sys_read_wsrep_checkpoint( long long seqno= -1; memcpy(xid->data + 24, &seqno, sizeof(long long)); xid->formatID = -1; - trx_sys_update_wsrep_checkpoint(xid, sys_header, &mtr); mtr_commit(&mtr); return; } diff --git a/storage/rocksdb/mysql-test/storage_engine/cache_index.rdiff b/storage/rocksdb/mysql-test/storage_engine/cache_index.rdiff new file mode 100644 index 00000000000..76e7705e377 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/cache_index.rdiff @@ -0,0 +1,71 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/cache_index.result 2017-06-22 00:33:46.419995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/cache_index.reject 2017-06-22 01:11:22.479981459 +0300 +@@ -12,31 +12,31 @@ + SET GLOBAL <CACHE_NAME>.key_buffer_size=128*1024; + CACHE INDEX t1 INDEX (a), t2 IN <CACHE_NAME>; + Table Op Msg_type Msg_text +-test.t1 assign_to_keycache status OK +-test.t2 assign_to_keycache status OK ++test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache ++test.t2 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache + LOAD INDEX INTO CACHE t1, t2; + Table Op Msg_type Msg_text +-test.t1 preload_keys status OK +-test.t2 preload_keys status OK ++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys ++test.t2 preload_keys note The storage engine for the table doesn't support preload_keys + INSERT INTO t1 (a,b) VALUES (3,'c'),(4,'d'); + SET GLOBAL <CACHE_NAME>.key_buffer_size=8*1024; + LOAD INDEX INTO CACHE t1, t2 IGNORE LEAVES; + Table Op Msg_type Msg_text +-test.t1 preload_keys status OK +-test.t2 preload_keys status OK ++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys ++test.t2 preload_keys note The storage engine for the table doesn't support preload_keys + SET GLOBAL <CACHE_NAME>.key_cache_age_threshold = 100, <CACHE_NAME>.key_cache_block_size = 512, <CACHE_NAME>.key_cache_division_limit = 1, <CACHE_NAME>.key_cache_segments=2; + INSERT INTO t1 (a,b) VALUES (5,'e'),(6,'f'); + LOAD INDEX INTO CACHE t1; + Table Op Msg_type Msg_text +-test.t1 preload_keys status OK ++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys + SET GLOBAL new_<CACHE_NAME>.key_buffer_size=128*1024; + CACHE INDEX t1 IN new_<CACHE_NAME>; + Table Op Msg_type Msg_text +-test.t1 assign_to_keycache status OK ++test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache + INSERT INTO t1 (a,b) VALUES (7,'g'),(8,'h'); + LOAD INDEX INTO CACHE t1 IGNORE LEAVES; + Table Op Msg_type Msg_text +-test.t1 preload_keys status OK ++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys + INSERT INTO t1 (a,b) VALUES (9,'i'); + DROP TABLE t2; + DROP TABLE t1; +@@ -47,11 +47,11 @@ + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + CACHE INDEX t1 IN <CACHE_NAME>; + Table Op Msg_type Msg_text +-test.t1 assign_to_keycache status OK ++test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache + INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); + LOAD INDEX INTO CACHE t1; + Table Op Msg_type Msg_text +-test.t1 preload_keys status OK ++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, + b <CHAR_COLUMN>, +@@ -59,11 +59,11 @@ + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + CACHE INDEX t1 IN <CACHE_NAME>; + Table Op Msg_type Msg_text +-test.t1 assign_to_keycache status OK ++test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache + INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); + LOAD INDEX INTO CACHE t1; + Table Op Msg_type Msg_text +-test.t1 preload_keys status OK ++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys + DROP TABLE t1; + SET GLOBAL <CACHE_NAME>.key_buffer_size=0; + SET GLOBAL new_<CACHE_NAME>.key_buffer_size=0; diff --git a/storage/rocksdb/mysql-test/storage_engine/checksum_table_live.rdiff b/storage/rocksdb/mysql-test/storage_engine/checksum_table_live.rdiff new file mode 100644 index 00000000000..094136ee926 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/checksum_table_live.rdiff @@ -0,0 +1,13 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/checksum_table_live.result 2017-06-22 00:33:46.419995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/checksum_table_live.reject 2017-06-22 01:12:38.695980980 +0300 +@@ -11,8 +11,8 @@ + test.t1 4272806499 + CHECKSUM TABLE t1, t2 QUICK; + Table Checksum +-test.t1 4272806499 +-test.t2 0 ++test.t1 NULL ++test.t2 NULL + CHECKSUM TABLE t1, t2 EXTENDED; + Table Checksum + test.t1 4272806499 diff --git a/storage/rocksdb/mysql-test/storage_engine/cleanup_engine.inc b/storage/rocksdb/mysql-test/storage_engine/cleanup_engine.inc new file mode 100644 index 00000000000..4f6c586172d --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/cleanup_engine.inc @@ -0,0 +1,25 @@ +########################################### +# +# This is a stub of the include file cleanup_engine.inc which +# should be placed in storage/<engine>/mysql-test/storage_engine folder. +# +################################ +# +# Here you can add whatever is needed to cleanup +# in case your define_engine.inc created any artefacts, +# e.g. an additional schema and/or tables. + +--let $datadir= `SELECT @@datadir` + +--error 0,1 +--file_exists $datadir/.rocksdb/* +if (!$mysql_errno) +{ + --enable_reconnect + --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect + --shutdown_server + --source include/wait_until_disconnected.inc + --rmdir $datadir/.rocksdb + --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect + --source include/wait_until_connected_again.inc +} diff --git a/storage/rocksdb/mysql-test/storage_engine/define_engine.inc b/storage/rocksdb/mysql-test/storage_engine/define_engine.inc new file mode 100644 index 00000000000..1c77a6b6bb6 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/define_engine.inc @@ -0,0 +1,45 @@ +########################################### +# +# This is a template of the include file define_engine.inc which +# should be placed in storage/<engine>/mysql-test/storage_engine folder. +# +################################ +# +# The name of the engine under test must be defined in $ENGINE variable. +# You can set it either here (uncomment and edit) or in your environment. +# +let $ENGINE = RocksDB; +# +################################ +# +# The following three variables define specific options for columns and tables. +# Normally there should be none needed, but for some engines it can be different. +# If the engine requires specific column option for all or indexed columns, +# set them inside the comment, e.g. /*!NOT NULL*/. +# Do the same for table options if needed, e.g. /*!INSERT_METHOD=LAST*/ + +let $default_col_opts = /*!*/; +let $default_col_indexed_opts = /*!*/; +let $default_tbl_opts = /*!*/; + +# INDEX, UNIQUE INDEX, PRIMARY KEY, special index type - choose the fist that the engine allows, +# or set it to /*!*/ if none is supported + +let $default_index = /*!INDEX*/; + +# If the engine does not support the following types, replace them with the closest possible + +let $default_int_type = INT(11); +let $default_char_type = CHAR(8); + +################################ + +--disable_query_log +--disable_result_log + +# Here you can place your custom MTR code which needs to be executed before each test, +# e.g. creation of an additional schema or table, etc. +# The cleanup part should be defined in cleanup_engine.inc + +--enable_query_log +--enable_result_log diff --git a/storage/rocksdb/mysql-test/storage_engine/disabled.def b/storage/rocksdb/mysql-test/storage_engine/disabled.def new file mode 100644 index 00000000000..0643b2052e2 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/disabled.def @@ -0,0 +1,25 @@ +alter_tablespace : Not supported +autoinc_secondary : Not supported +create_table : MDEV-12914 - Engine for temporary tables which are implicitly created as RocksDB is substituted silently +delete_low_prio : Not supported +foreign_keys : Not supported +fulltext_search : Not supported +handler : Not supported +index_enable_disable : Not supported +insert_delayed : Not supported +insert_high_prio : Not supported +insert_low_prio : Not supported +lock : MDEV-13148 - LOCK TABLE on RocksDB table fails with a bogus error message +lock_concurrent : MDEV-13148 - LOCK TABLE on RocksDB table fails with a bogus error message +optimize_table : MDEV-13148 - LOCK TABLE on RocksDB table fails with a bogus error message +repair_table : MDEV-13148 - LOCK TABLE on RocksDB table fails with a bogus error message +select_high_prio : Not supported +show_table_status : MDEV-13152 - Indeterministic row number in SHOW TABLE STATUS on RocksDB table +tbl_opt_data_dir : Not supported +tbl_opt_index_dir : Not supported +type_spatial : Not supported +type_spatial_indexes : Not supported +update_low_prio : Not supported +update_ignore : MDEV-13151 - Indeterministic results of multi-table update on RocksDB tables +update_multi : MDEV-13151 - Indeterministic results of multi-table update on RocksDB tables +vcol : Not supported diff --git a/storage/rocksdb/mysql-test/storage_engine/index.rdiff b/storage/rocksdb/mysql-test/storage_engine/index.rdiff new file mode 100644 index 00000000000..ed22a308726 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/index.rdiff @@ -0,0 +1,98 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/index.result 2017-06-22 00:33:46.419995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/index.reject 2017-06-22 13:55:28.615693291 +0300 +@@ -4,7 +4,7 @@ + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + SHOW KEYS IN t1; + Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 1 a 1 a # # NULL NULL # BTREE ++t1 1 a 1 a # # NULL NULL # LSMTREE + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, + b <CHAR_COLUMN>, +@@ -12,8 +12,8 @@ + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + SHOW KEYS IN t1; + Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 1 a_b 1 a # # NULL NULL # BTREE a_b index +-t1 1 a_b 2 b # # NULL NULL # BTREE a_b index ++t1 1 a_b 1 a # # NULL NULL # LSMTREE a_b index ++t1 1 a_b 2 b # # NULL NULL # LSMTREE a_b index + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, + b <CHAR_COLUMN>, +@@ -22,46 +22,48 @@ + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + SHOW KEYS IN t1; + Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 1 a 1 a # # NULL NULL # BTREE +-t1 1 b 1 b # # NULL NULL # BTREE ++t1 1 a 1 a # # NULL NULL # LSMTREE ++t1 1 b 1 b # # NULL NULL # LSMTREE + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, + b <CHAR_COLUMN>, + UNIQUE INDEX (a) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW KEYS IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 a 1 a # # NULL NULL # BTREE +-INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); +-INSERT INTO t1 (a,b) VALUES (1,'c'); +-ERROR 23000: Duplicate entry '1' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom indexed column options*/, ++b CHAR(8) /*!*/ /*Custom column options*/, ++UNIQUE INDEX (a) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Unique indexes or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + INSERT INTO t1 (a,b) VALUES (100,'z'); + ALTER TABLE t1 ADD <CUSTOM_INDEX> (a) COMMENT 'simple index on a'; + SHOW INDEX FROM t1; + Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 1 a 1 a # # NULL NULL # BTREE simple index on a ++t1 1 a 1 a # # NULL NULL # LSMTREE simple index on a + ALTER TABLE t1 DROP KEY a; + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, + b <CHAR_COLUMN>, + UNIQUE INDEX (a) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW KEYS IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 a 1 a # # NULL NULL # BTREE +-INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); +-INSERT INTO t1 (a,b) VALUES (1,'c'); +-ERROR 23000: Duplicate entry '1' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-ALTER TABLE t1 DROP INDEX a; +-INSERT INTO t1 (a,b) VALUES (1,'c'); +-ALTER TABLE t1 ADD UNIQUE INDEX a(a) ; +-ERROR 23000: Duplicate entry '1' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom indexed column options*/, ++b CHAR(8) /*!*/ /*Custom column options*/, ++UNIQUE INDEX (a) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Unique indexes or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- diff --git a/storage/rocksdb/mysql-test/storage_engine/index_key_block_size.rdiff b/storage/rocksdb/mysql-test/storage_engine/index_key_block_size.rdiff new file mode 100644 index 00000000000..5038a10b836 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/index_key_block_size.rdiff @@ -0,0 +1,26 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/index_key_block_size.result 2017-06-22 00:33:46.419995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/index_key_block_size.reject 2017-06-22 13:56:59.503692719 +0300 +@@ -19,10 +19,19 @@ + b <CHAR_COLUMN>, + UNIQUE INDEX ind2(b(1) DESC) KEY_BLOCK_SIZE=32768 COMMENT 'big key_block_size value' + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW INDEX IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 ind2 1 b # # 1 NULL # # big key_block_size value +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom column options*/, ++b CHAR(8) /*!*/ /*Custom indexed column options*/, ++UNIQUE INDEX ind2(b(1) DESC) KEY_BLOCK_SIZE=32768 COMMENT 'big key_block_size value' ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Unique keys on char columns or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (a <INT_COLUMN>, + b <CHAR_COLUMN>, + <CUSTOM_INDEX> a_b(a,b) KEY_BLOCK_SIZE=8192 diff --git a/storage/rocksdb/mysql-test/storage_engine/index_type_btree.rdiff b/storage/rocksdb/mysql-test/storage_engine/index_type_btree.rdiff new file mode 100644 index 00000000000..2f1ebe55537 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/index_type_btree.rdiff @@ -0,0 +1,98 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/index_type_btree.result 2017-06-22 00:33:46.419995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/index_type_btree.reject 2017-06-22 13:58:02.359692324 +0300 +@@ -4,7 +4,7 @@ + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + SHOW KEYS IN t1; + Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 1 a 1 a # # NULL NULL # BTREE ++t1 1 a 1 a # # NULL NULL # LSMTREE + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, + b <CHAR_COLUMN>, +@@ -12,8 +12,8 @@ + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + SHOW KEYS IN t1; + Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 1 a_b 1 a # # NULL NULL # BTREE a_b index +-t1 1 a_b 2 b # # NULL NULL # BTREE a_b index ++t1 1 a_b 1 a # # NULL NULL # LSMTREE a_b index ++t1 1 a_b 2 b # # NULL NULL # LSMTREE a_b index + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, + b <CHAR_COLUMN>, +@@ -22,46 +22,48 @@ + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + SHOW KEYS IN t1; + Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 1 a 1 a # # NULL NULL # BTREE +-t1 1 b 1 b # # NULL NULL # BTREE ++t1 1 a 1 a # # NULL NULL # LSMTREE ++t1 1 b 1 b # # NULL NULL # LSMTREE + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, + b <CHAR_COLUMN>, + UNIQUE INDEX USING BTREE (a) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW KEYS IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 a 1 a # # NULL NULL # BTREE +-INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); +-INSERT INTO t1 (a,b) VALUES (1,'c'); +-ERROR 23000: Duplicate entry '1' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom indexed column options*/, ++b CHAR(8) /*!*/ /*Custom column options*/, ++UNIQUE INDEX USING BTREE (a) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Unique indexes or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + INSERT INTO t1 (a,b) VALUES (100,'z'); + ALTER TABLE t1 ADD <CUSTOM_INDEX> (a) USING BTREE COMMENT 'simple index on a'; + SHOW INDEX FROM t1; + Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 1 a 1 a # # NULL NULL # BTREE simple index on a ++t1 1 a 1 a # # NULL NULL # LSMTREE simple index on a + ALTER TABLE t1 DROP KEY a; + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, + b <CHAR_COLUMN>, + UNIQUE INDEX USING BTREE (a) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW KEYS IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 a 1 a # # NULL NULL # BTREE +-INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); +-INSERT INTO t1 (a,b) VALUES (1,'c'); +-ERROR 23000: Duplicate entry '1' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-ALTER TABLE t1 DROP INDEX a; +-INSERT INTO t1 (a,b) VALUES (1,'c'); +-ALTER TABLE t1 ADD UNIQUE INDEX a(a) USING BTREE; +-ERROR 23000: Duplicate entry '1' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom indexed column options*/, ++b CHAR(8) /*!*/ /*Custom column options*/, ++UNIQUE INDEX USING BTREE (a) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Unique indexes or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- diff --git a/storage/rocksdb/mysql-test/storage_engine/index_type_hash.rdiff b/storage/rocksdb/mysql-test/storage_engine/index_type_hash.rdiff new file mode 100644 index 00000000000..7dad7b11deb --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/index_type_hash.rdiff @@ -0,0 +1,98 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/index_type_hash.result 2017-06-22 00:33:46.419995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/index_type_hash.reject 2017-06-22 14:00:42.867691315 +0300 +@@ -4,7 +4,7 @@ + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + SHOW KEYS IN t1; + Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 1 a 1 a # # NULL NULL # HASH ++t1 1 a 1 a # # NULL NULL # LSMTREE + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, + b <CHAR_COLUMN>, +@@ -12,8 +12,8 @@ + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + SHOW KEYS IN t1; + Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 1 a_b 1 a # # NULL NULL # HASH a_b index +-t1 1 a_b 2 b # # NULL NULL # HASH a_b index ++t1 1 a_b 1 a # # NULL NULL # LSMTREE a_b index ++t1 1 a_b 2 b # # NULL NULL # LSMTREE a_b index + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, + b <CHAR_COLUMN>, +@@ -22,46 +22,48 @@ + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + SHOW KEYS IN t1; + Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 1 a 1 a # # NULL NULL # HASH +-t1 1 b 1 b # # NULL NULL # HASH ++t1 1 a 1 a # # NULL NULL # LSMTREE ++t1 1 b 1 b # # NULL NULL # LSMTREE + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, + b <CHAR_COLUMN>, + UNIQUE INDEX USING HASH (a) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW KEYS IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 a 1 a # # NULL NULL # HASH +-INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); +-INSERT INTO t1 (a,b) VALUES (1,'c'); +-ERROR 23000: Duplicate entry '1' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom indexed column options*/, ++b CHAR(8) /*!*/ /*Custom column options*/, ++UNIQUE INDEX USING HASH (a) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Unique indexes or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + INSERT INTO t1 (a,b) VALUES (100,'z'); + ALTER TABLE t1 ADD <CUSTOM_INDEX> (a) USING HASH COMMENT 'simple index on a'; + SHOW INDEX FROM t1; + Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 1 a 1 a # # NULL NULL # HASH simple index on a ++t1 1 a 1 a # # NULL NULL # LSMTREE simple index on a + ALTER TABLE t1 DROP KEY a; + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, + b <CHAR_COLUMN>, + UNIQUE INDEX USING HASH (a) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW KEYS IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 a 1 a # # NULL NULL # HASH +-INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); +-INSERT INTO t1 (a,b) VALUES (1,'c'); +-ERROR 23000: Duplicate entry '1' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-ALTER TABLE t1 DROP INDEX a; +-INSERT INTO t1 (a,b) VALUES (1,'c'); +-ALTER TABLE t1 ADD UNIQUE INDEX a(a) USING HASH; +-ERROR 23000: Duplicate entry '1' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom indexed column options*/, ++b CHAR(8) /*!*/ /*Custom column options*/, ++UNIQUE INDEX USING HASH (a) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Unique indexes or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- diff --git a/storage/rocksdb/mysql-test/storage_engine/insert_with_keys.rdiff b/storage/rocksdb/mysql-test/storage_engine/insert_with_keys.rdiff new file mode 100644 index 00000000000..04313e11e7c --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/insert_with_keys.rdiff @@ -0,0 +1,148 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/insert_with_keys.result 2017-06-22 00:33:46.419995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/insert_with_keys.reject 2017-06-22 14:01:57.539690846 +0300 +@@ -22,93 +22,27 @@ + 6 f + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>, UNIQUE INDEX(a)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,'e'); +-INSERT INTO t1 (a,b) VALUES (100,'a'), (6,'f'); +-INSERT INTO t1 (a,b) VALUES (30,'m'),(29,'n'); +-INSERT INTO t1 (a,b) VALUES (1,'a'),(12345,'z'); +-ERROR 23000: Duplicate entry '1' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-INSERT INTO t1 (a,b) VALUES (3,'a'),(0,''); +-ERROR 23000: Duplicate entry '3' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-INSERT INTO t1 (a,b) VALUES (0,''); +-SELECT a,b FROM t1; +-a b +-0 +-1 a +-100 a +-2 b +-29 n +-3 c +-30 m +-4 d +-5 e +-6 f +-INSERT IGNORE INTO t1 (a,b) VALUES (1,'a'),(12345,'z'); +-Warnings: +-Warning 1062 Duplicate entry '1' for key 'a' +-INSERT INTO t1 (a,b) VALUES (3,'a'),(4,'d') ON DUPLICATE KEY UPDATE a = a+10; +-SELECT a,b FROM t1; +-a b +-0 +-1 a +-100 a +-12345 z +-13 c +-14 d +-2 b +-29 n +-30 m +-5 e +-6 f +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom indexed column options*/, b CHAR(8) /*!*/ /*Custom column options*/, UNIQUE INDEX(a)) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Unique indexes or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>, UNIQUE INDEX(a,b)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,'e'); +-INSERT INTO t1 (a,b) VALUES (100,'a'), (6,'f'); +-INSERT INTO t1 (a,b) VALUES (30,'m'),(29,'n'); +-INSERT INTO t1 (a,b) VALUES (100,'b'), (2,'c'); +-INSERT INTO t1 (a,b) VALUES (1,'a'),(12345,'z'); +-ERROR 23000: Duplicate entry '1-a' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-SELECT a,b FROM t1; +-a b +-1 a +-100 a +-100 b +-2 b +-2 c +-29 n +-3 c +-30 m +-4 d +-5 e +-6 f +-INSERT IGNORE INTO t1 (a,b) VALUES (1,'a'),(12345,'z'); +-Warnings: +-Warning 1062 Duplicate entry '1-a' for key 'a' +-INSERT INTO t1 (a,b) VALUES (1,'a'),(12345,'z') ON DUPLICATE KEY UPDATE a = a+VALUES(a); +-SELECT a,b FROM t1; +-a b +-100 a +-100 b +-2 a +-2 b +-2 c +-24690 z +-29 n +-3 c +-30 m +-4 d +-5 e +-6 f +-INSERT INTO t1 (a,b) VALUES (101,'x'),(101,'x'); +-ERROR 23000: Duplicate entry '101-x' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom indexed column options*/, b CHAR(8) /*!*/ /*Custom indexed column options*/, UNIQUE INDEX(a,b)) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Multi-part indexes or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (a <INT_COLUMN> PRIMARY KEY, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,'e'); + INSERT INTO t1 (a,b) VALUES (100,'a'), (6,'f'); +@@ -153,21 +87,13 @@ + 6 f + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN> UNIQUE KEY, b <INT_COLUMN> UNIQUE KEY, c <INT_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-INSERT INTO t1 VALUES(1,1,0); +-INSERT INTO t1 VALUES(2,3,0); +-INSERT INTO t1 VALUES(3,2,0); +-INSERT INTO t1 VALUES(1,1,0) ON DUPLICATE KEY UPDATE c=c+1; +-INSERT INTO t1 VALUES(2,3,0) ON DUPLICATE KEY UPDATE c=c+1; +-INSERT INTO t1 VALUES(3,2,0) ON DUPLICATE KEY UPDATE c=c+1; +-INSERT INTO t1 VALUES(2,5,0) ON DUPLICATE KEY UPDATE c=c+1; +-INSERT INTO t1 VALUES(3,5,0) ON DUPLICATE KEY UPDATE c=c+1; +-INSERT INTO t1 VALUES(5,3,0) ON DUPLICATE KEY UPDATE c=c+1; +-INSERT INTO t1 VALUES(6,2,0) ON DUPLICATE KEY UPDATE c=c+1; +-INSERT INTO t1 VALUES(1,3,0) ON DUPLICATE KEY UPDATE c=c+1; +-INSERT INTO t1 VALUES(2,2,0) ON DUPLICATE KEY UPDATE c=c+1; +-SELECT * FROM t1; +-a b c +-1 1 2 +-2 3 4 +-3 2 3 +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom indexed column options*/ UNIQUE KEY, b INT(11) /*!*/ /*Custom indexed column options*/ UNIQUE KEY, c INT(11) /*!*/ /*Custom column options*/) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Multiple unique keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- diff --git a/storage/rocksdb/mysql-test/storage_engine/mask_engine.inc b/storage/rocksdb/mysql-test/storage_engine/mask_engine.inc new file mode 100644 index 00000000000..fc6cd02e3ef --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/mask_engine.inc @@ -0,0 +1,15 @@ +# +# This include file just replaces the storage engine under test by the generic string <STORAGE_ENGINE> +# in the next statement. More masks can be added by defining $add_regex, e.g. +# let $add_regex = /$data_dir/<DATA_DIR>/ /$index_dir/<INDEX_DIR>/ +# + +--let $regex = /$storage_engine/<STORAGE_ENGINE>/i / COLLATE[= ]latin1_bin// +if ($add_regex) +{ + --let $regex = $regex $add_regex +} + +--let $add_regex = +--replace_regex $regex + diff --git a/storage/rocksdb/mysql-test/storage_engine/misc.rdiff b/storage/rocksdb/mysql-test/storage_engine/misc.rdiff new file mode 100644 index 00000000000..694f3f54815 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/misc.rdiff @@ -0,0 +1,25 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/misc.result 2017-06-22 00:33:46.419995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/misc.reject 2017-06-22 02:34:23.647950149 +0300 +@@ -28,6 +28,9 @@ + SELECT TABLE_NAME, COLUMN_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME + FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE ORDER BY TABLE_NAME; + TABLE_NAME COLUMN_NAME REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME ++Warning 1286 Unknown storage engine 'InnoDB' ++Warning 1286 Unknown storage engine 'InnoDB' ++Warnings: + column_stats column_name NULL NULL + column_stats db_name NULL NULL + column_stats table_name NULL NULL +@@ -58,12 +61,6 @@ + index_stats index_name NULL NULL + index_stats prefix_arity NULL NULL + index_stats table_name NULL NULL +-innodb_index_stats database_name NULL NULL +-innodb_index_stats index_name NULL NULL +-innodb_index_stats stat_name NULL NULL +-innodb_index_stats table_name NULL NULL +-innodb_table_stats database_name NULL NULL +-innodb_table_stats table_name NULL NULL + plugin name NULL NULL + proc db NULL NULL + proc name NULL NULL diff --git a/storage/rocksdb/mysql-test/storage_engine/parts/checksum_table.rdiff b/storage/rocksdb/mysql-test/storage_engine/parts/checksum_table.rdiff new file mode 100644 index 00000000000..bf3347a4341 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/parts/checksum_table.rdiff @@ -0,0 +1,13 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/parts/checksum_table.result 2017-06-22 00:33:46.419995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/parts/checksum_table.reject 2017-06-22 19:25:02.935568998 +0300 +@@ -31,8 +31,8 @@ + test.t1 4272806499 + CHECKSUM TABLE t1, t2 QUICK; + Table Checksum +-test.t1 4272806499 +-test.t2 0 ++test.t1 NULL ++test.t2 NULL + CHECKSUM TABLE t1, t2 EXTENDED; + Table Checksum + test.t1 4272806499 diff --git a/storage/rocksdb/mysql-test/storage_engine/parts/create_table.rdiff b/storage/rocksdb/mysql-test/storage_engine/parts/create_table.rdiff new file mode 100644 index 00000000000..b2cb47a0927 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/parts/create_table.rdiff @@ -0,0 +1,20 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/parts/create_table.result 2017-06-22 00:33:46.419995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/parts/create_table.reject 2017-06-22 19:25:05.335568983 +0300 +@@ -65,7 +65,7 @@ + 1 SIMPLE t1 abc,def # # # # # # # + EXPLAIN PARTITIONS SELECT a FROM t1 WHERE a = 100; + id select_type table partitions type possible_keys key key_len ref rows Extra +-1 SIMPLE NULL NULL # # # # # # # ++1 SIMPLE t1 def # # # # # # # + INSERT INTO t1 (a) VALUES (50); + ERROR HY000: Table has no partition for value 50 + DROP TABLE t1; +@@ -81,7 +81,7 @@ + 1 SIMPLE t1 abc_abcsp0,def_defsp0 # # # # # # # + EXPLAIN PARTITIONS SELECT a FROM t1 WHERE a = 100; + id select_type table partitions type possible_keys key key_len ref rows Extra +-1 SIMPLE NULL NULL # # # # # # # ++1 SIMPLE t1 def_defsp0 # # # # # # # + SELECT TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME, SUBPARTITION_NAME, PARTITION_METHOD, SUBPARTITION_METHOD + FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1'; + TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_METHOD SUBPARTITION_METHOD diff --git a/storage/rocksdb/mysql-test/storage_engine/parts/disabled.def b/storage/rocksdb/mysql-test/storage_engine/parts/disabled.def new file mode 100644 index 00000000000..ef8ad5b3c82 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/parts/disabled.def @@ -0,0 +1,3 @@ +alter_table : MDEV-13153 - Assertion `global_status_var.global_memory_used == 0' +optimize_table : MDEV-13148 - LOCK TABLE on RocksDB table fails with a bogus error message +repair_table : MDEV-13148 - LOCK TABLE on RocksDB table fails with a bogus error message diff --git a/storage/rocksdb/mysql-test/storage_engine/parts/suite.opt b/storage/rocksdb/mysql-test/storage_engine/parts/suite.opt new file mode 100644 index 00000000000..713e46dcddb --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/parts/suite.opt @@ -0,0 +1 @@ +--ignore-db-dirs=.rocksdb --plugin-load=$HA_ROCKSDB_SO --binlog_format=ROW diff --git a/storage/rocksdb/mysql-test/storage_engine/replace.rdiff b/storage/rocksdb/mysql-test/storage_engine/replace.rdiff new file mode 100644 index 00000000000..632c52f1504 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/replace.rdiff @@ -0,0 +1,31 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/replace.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/replace.reject 2017-06-22 14:03:14.971690359 +0300 +@@ -20,18 +20,16 @@ + 5 e + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>, UNIQUE INDEX (a)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-REPLACE INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'); +-INSERT INTO t1 (a,b) VALUES (2,'d'); +-ERROR 23000: Duplicate entry '2' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-REPLACE INTO t1 (a,b) VALUES (2,'d'); +-SELECT a,b FROM t1; +-a b +-1 a +-2 d +-3 c +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom indexed column options*/, b CHAR(8) /*!*/ /*Custom column options*/, UNIQUE INDEX (a)) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Unique keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>, PRIMARY KEY (b)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + REPLACE INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'); + INSERT INTO t1 (a,b) VALUES (4,'b'); diff --git a/storage/rocksdb/mysql-test/storage_engine/show_engine.rdiff b/storage/rocksdb/mysql-test/storage_engine/show_engine.rdiff new file mode 100644 index 00000000000..77cc8b0b05e --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/show_engine.rdiff @@ -0,0 +1,14 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/show_engine.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/show_engine.reject 2017-06-22 15:24:52.547659575 +0300 +@@ -4,7 +4,10 @@ + # volatile data (timestamps, memory info, etc.) + SHOW ENGINE <STORAGE_ENGINE> STATUS; + Type Name Status +-<STORAGE_ENGINE> ### Engine status, can be long and changeable ### ++DBSTATS <STORAGE_ENGINE> ### Engine status, can be long and changeable ### ++CF_COMPACTION __system__ ### Engine status, can be long and changeable ### ++CF_COMPACTION default ### Engine status, can be long and changeable ### ++Memory_Stats <STORAGE_ENGINE> ### Engine status, can be long and changeable ### + # For SHOW MUTEX even the number of lines is volatile, so the result logging is disabled, + # the test only checks that the command does not produce any errors + SHOW ENGINE <STORAGE_ENGINE> MUTEX; diff --git a/storage/rocksdb/mysql-test/storage_engine/show_table_status.rdiff b/storage/rocksdb/mysql-test/storage_engine/show_table_status.rdiff new file mode 100644 index 00000000000..d7252eb54ed --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/show_table_status.rdiff @@ -0,0 +1,20 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/show_table_status.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/show_table_status.reject 2017-06-22 14:04:10.723690009 +0300 +@@ -19,7 +19,7 @@ + Create_time ### + Update_time ### + Check_time NULL +-Collation latin1_swedish_ci ++Collation latin1_bin + Checksum NULL + Create_options + Comment +@@ -37,7 +37,7 @@ + Create_time ### + Update_time ### + Check_time NULL +-Collation latin1_swedish_ci ++Collation latin1_bin + Checksum NULL + Create_options + Comment diff --git a/storage/rocksdb/mysql-test/storage_engine/suite.opt b/storage/rocksdb/mysql-test/storage_engine/suite.opt new file mode 100644 index 00000000000..41beb675cc1 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/suite.opt @@ -0,0 +1 @@ +--ignore-db-dirs=.rocksdb --plugin-load=$HA_ROCKSDB_SO --binlog_format=ROW --collation-server=latin1_bin diff --git a/storage/rocksdb/mysql-test/storage_engine/tbl_opt_insert_method.rdiff b/storage/rocksdb/mysql-test/storage_engine/tbl_opt_insert_method.rdiff new file mode 100644 index 00000000000..20f594fbb40 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/tbl_opt_insert_method.rdiff @@ -0,0 +1,11 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/tbl_opt_insert_method.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/tbl_opt_insert_method.reject 2017-06-22 02:39:45.243948128 +0300 +@@ -5,7 +5,7 @@ + t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` char(8) DEFAULT NULL +-) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 INSERT_METHOD=FIRST ++) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 + ALTER TABLE t1 INSERT_METHOD=NO; + SHOW CREATE TABLE t1; + Table Create Table diff --git a/storage/rocksdb/mysql-test/storage_engine/tbl_opt_union.rdiff b/storage/rocksdb/mysql-test/storage_engine/tbl_opt_union.rdiff new file mode 100644 index 00000000000..0d65ad0744a --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/tbl_opt_union.rdiff @@ -0,0 +1,16 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/tbl_opt_union.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/tbl_opt_union.reject 2017-06-22 02:41:02.719947641 +0300 +@@ -4,11 +4,11 @@ + Table Create Table + t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +-) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 UNION=(`child1`) ++) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 + ALTER TABLE t1 UNION = (child1,child2); + SHOW CREATE TABLE t1; + Table Create Table + t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +-) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 UNION=(`child1`,`child2`) ++) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 + DROP TABLE t1, child1, child2; diff --git a/storage/rocksdb/mysql-test/storage_engine/tbl_temporary.rdiff b/storage/rocksdb/mysql-test/storage_engine/tbl_temporary.rdiff new file mode 100644 index 00000000000..d24806e7c9f --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/tbl_temporary.rdiff @@ -0,0 +1,24 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/tbl_temporary.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/tbl_temporary.reject 2017-06-22 15:27:50.643658456 +0300 +@@ -1,11 +1,14 @@ + DROP TABLE IF EXISTS t1; + CREATE TABLE t1 (c CHAR(1)) ENGINE=MyISAM; + CREATE TEMPORARY TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW CREATE TABLE t1; +-Table Create Table +-t1 CREATE TEMPORARY TABLE `t1` ( +- `a` int(11) DEFAULT NULL, +- `b` char(8) DEFAULT NULL +-) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 +-DROP TEMPORARY TABLE t1; ++ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY' ++# ERROR: Statement ended with errno 1478, errname ER_ILLEGAL_HA_CREATE_OPTION (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TEMPORARY TABLE t1 (a INT(11) /*!*/ /*Custom column options*/, b CHAR(8) /*!*/ /*Custom column options*/) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_ILLEGAL_HA_CREATE_OPTION. ++# Temporary tables or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/storage_engine/truncate_table.rdiff b/storage/rocksdb/mysql-test/storage_engine/truncate_table.rdiff new file mode 100644 index 00000000000..9ca7861d51e --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/truncate_table.rdiff @@ -0,0 +1,24 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/truncate_table.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/truncate_table.reject 2017-06-22 02:43:27.183946733 +0300 +@@ -29,13 +29,12 @@ + CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'); + HANDLER t1 OPEN AS h1; +-HANDLER h1 READ FIRST; +-a b +-1 a +-TRUNCATE TABLE t1; +-HANDLER h1 READ NEXT; +-ERROR 42S02: Unknown table 'h1' in HANDLER +-HANDLER t1 OPEN AS h2; +-HANDLER h2 READ FIRST; +-a b ++ERROR HY000: Storage engine ROCKSDB of the table `test`.`t1` doesn't have this option ++# ------------ UNEXPECTED RESULT ------------ ++# The statement|command finished with ER_ILLEGAL_HA. ++# HANDLER or the syntax or the mix could be unsupported. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/storage_engine/trx/delete.rdiff b/storage/rocksdb/mysql-test/storage_engine/trx/delete.rdiff new file mode 100644 index 00000000000..dac23b83579 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/trx/delete.rdiff @@ -0,0 +1,10 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/delete.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/delete.reject 2017-06-22 19:29:36.827567276 +0300 +@@ -68,5 +68,7 @@ + DELETE FROM t1; + INSERT INTO t1 (a,b) VALUES (1,'a'); + ROLLBACK TO SAVEPOINT spt1; ++ERROR HY000: MyRocks currently does not support ROLLBACK TO SAVEPOINT if modifying rows. + COMMIT; ++ERROR HY000: This transaction was rolled back and cannot be committed. Only supported operation is to roll it back, so all pending changes will be discarded. Please restart another transaction. + DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/storage_engine/trx/disabled.def b/storage/rocksdb/mysql-test/storage_engine/trx/disabled.def new file mode 100644 index 00000000000..4e227c10307 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/trx/disabled.def @@ -0,0 +1,4 @@ +cons_snapshot_serializable : Not supported +level_read_uncommitted : Not supported +level_serializable : Not supported +xa_recovery : MDEV-13155 - XA recovery not supported for RocksDB diff --git a/storage/rocksdb/mysql-test/storage_engine/trx/insert.rdiff b/storage/rocksdb/mysql-test/storage_engine/trx/insert.rdiff new file mode 100644 index 00000000000..36a71076a2b --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/trx/insert.rdiff @@ -0,0 +1,24 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/insert.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/insert.reject 2017-06-22 19:29:39.131567262 +0300 +@@ -37,18 +37,18 @@ + INSERT INTO t1 SET a = 11, b = 'f'; + INSERT t1 SET b = DEFAULT; + ROLLBACK TO SAVEPOINT spt1; ++ERROR HY000: MyRocks currently does not support ROLLBACK TO SAVEPOINT if modifying rows. + INSERT INTO t1 (b,a) VALUES ('test1',10); ++ERROR HY000: This transaction was rolled back and cannot be committed. Only supported operation is to roll it back, so all pending changes will be discarded. Please restart another transaction. + COMMIT; ++ERROR HY000: This transaction was rolled back and cannot be committed. Only supported operation is to roll it back, so all pending changes will be discarded. Please restart another transaction. + SELECT a,b FROM t1; + a b + 1 a +-10 NULL + 10 foo +-10 test1 + 100 foo + 11 abc + 2 b +-20 NULL + 3 c + 4 d + 5 e diff --git a/storage/rocksdb/mysql-test/storage_engine/trx/level_read_committed.rdiff b/storage/rocksdb/mysql-test/storage_engine/trx/level_read_committed.rdiff new file mode 100644 index 00000000000..6b9e4a3f4e9 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/trx/level_read_committed.rdiff @@ -0,0 +1,10 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/level_read_committed.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/level_read_committed.reject 2017-06-22 19:29:41.459567247 +0300 +@@ -77,6 +77,7 @@ + CREATE TABLE t1 (a <INT_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; + START TRANSACTION WITH CONSISTENT SNAPSHOT; ++ERROR HY000: Only REPEATABLE READ isolation level is supported for START TRANSACTION WITH CONSISTENT SNAPSHOT in RocksDB Storage Engine. + connection con2; + INSERT INTO t1 (a) VALUES (1); + connection con1; diff --git a/storage/rocksdb/mysql-test/storage_engine/trx/level_repeatable_read.rdiff b/storage/rocksdb/mysql-test/storage_engine/trx/level_repeatable_read.rdiff new file mode 100644 index 00000000000..cf770755243 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/trx/level_repeatable_read.rdiff @@ -0,0 +1,35 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/level_repeatable_read.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/level_repeatable_read.reject 2017-06-22 20:33:13.935543284 +0300 +@@ -24,8 +24,7 @@ + SELECT a FROM t1; + a + INSERT INTO t1 (a) SELECT a+100 FROM t1; +-ERROR HY000: Lock wait timeout exceeded; try restarting transaction +-# WARNING: Statement ended with errno 1205, errname 'ER_LOCK_WAIT_TIMEOUT'. ++# WARNING: Statement ended with errno 0, errname ''. + # If it differs from the result file, it might indicate a problem. + SELECT a FROM t1; + a +@@ -47,22 +46,16 @@ + # If it differs from the result file, it might indicate a problem. + SELECT a FROM t1; + a +-201 +-202 + COMMIT; + SELECT a FROM t1; + a + 1 + 2 +-201 +-202 + connection con2; + SELECT a FROM t1; + a + 1 + 2 +-201 +-202 + connection default; + disconnect con1; + disconnect con2; diff --git a/storage/rocksdb/mysql-test/storage_engine/trx/suite.opt b/storage/rocksdb/mysql-test/storage_engine/trx/suite.opt new file mode 100644 index 00000000000..713e46dcddb --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/trx/suite.opt @@ -0,0 +1 @@ +--ignore-db-dirs=.rocksdb --plugin-load=$HA_ROCKSDB_SO --binlog_format=ROW diff --git a/storage/rocksdb/mysql-test/storage_engine/trx/update.rdiff b/storage/rocksdb/mysql-test/storage_engine/trx/update.rdiff new file mode 100644 index 00000000000..ab181947733 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/trx/update.rdiff @@ -0,0 +1,38 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/update.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/update.reject 2017-06-22 19:29:57.267567148 +0300 +@@ -29,20 +29,23 @@ + SAVEPOINT spt1; + UPDATE t1 SET b = ''; + ROLLBACK TO SAVEPOINT spt1; ++ERROR HY000: MyRocks currently does not support ROLLBACK TO SAVEPOINT if modifying rows. + UPDATE t1 SET b = 'upd' WHERE a = 10050; ++ERROR HY000: This transaction was rolled back and cannot be committed. Only supported operation is to roll it back, so all pending changes will be discarded. Please restart another transaction. + COMMIT; ++ERROR HY000: This transaction was rolled back and cannot be committed. Only supported operation is to roll it back, so all pending changes will be discarded. Please restart another transaction. + SELECT a,b FROM t1; + a b +-10050 upd +-10050 upd +-51 update2 +-51 update2 +-52 update2 +-52 update2 +-53 update2 +-53 update2 +-54 update2 +-54 update2 +-55 update2 +-55 update2 ++10050 NULL ++10050 NULL ++51 NULL ++51 NULL ++52 NULL ++52 NULL ++53 NULL ++53 NULL ++54 NULL ++54 NULL ++55 NULL ++55 NULL + DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/storage_engine/type_binary_indexes.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_binary_indexes.rdiff new file mode 100644 index 00000000000..9ba195c8823 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/type_binary_indexes.rdiff @@ -0,0 +1,61 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_binary_indexes.result 2017-06-22 15:31:43.719656991 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_binary_indexes.reject 2017-06-22 15:32:27.007656719 +0300 +@@ -50,34 +50,21 @@ + v128 VARBINARY(128) <CUSTOM_COL_OPTIONS>, + UNIQUE INDEX b_v (b,v128) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW INDEX IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 b_v 1 b # # NULL NULL # # +-t1 0 b_v 2 v128 # # NULL NULL # # +-INSERT INTO t1 (b,b20,v16,v128) VALUES ('a','char1','varchar1a','varchar1b'),('a','char2','varchar2a','varchar2b'),('b','char3','varchar1a','varchar1b'),('c','char4','varchar3a','varchar3b'); +-EXPLAIN SELECT HEX(b), HEX(v128) FROM t1 WHERE b != 'a' AND v128 > 'varchar'; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # b_v # # # # +-SELECT HEX(b), HEX(v128) FROM t1 WHERE b != 'a' AND v128 > 'varchar'; +-HEX(b) HEX(v128) +-62 766172636861723162 +-63 766172636861723362 +-EXPLAIN SELECT HEX(b), HEX(v128) FROM t1 USE INDEX (b_v) WHERE b != 'a' AND v128 > 'varchar'; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # b_v # # # # +-SELECT HEX(b), HEX(v128) FROM t1 USE INDEX (b_v) WHERE b != 'a' AND v128 > 'varchar'; +-HEX(b) HEX(v128) +-62 766172636861723162 +-63 766172636861723362 +-EXPLAIN SELECT HEX(v128), COUNT(*) FROM t1 GROUP BY HEX(v128); +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # b_v # # # # +-SELECT HEX(v128), COUNT(*) FROM t1 GROUP BY HEX(v128); +-HEX(v128) COUNT(*) +-766172636861723162 2 +-766172636861723262 1 +-766172636861723362 1 +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (b BINARY /*!*/ /*Custom indexed column options*/, ++b20 BINARY(20) /*!*/ /*Custom column options*/, ++v16 VARBINARY(16) /*!*/ /*Custom column options*/, ++v128 VARBINARY(128) /*!*/ /*Custom indexed column options*/, ++UNIQUE INDEX b_v (b,v128) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# BINARY or VARBINARY types or unique keys or multi-part keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (b BINARY <CUSTOM_COL_OPTIONS>, + b20 BINARY(20) <CUSTOM_COL_OPTIONS>, + v16 VARBINARY(16) <CUSTOM_COL_OPTIONS>, +@@ -92,7 +79,7 @@ + ANALYZE TABLE t1; + EXPLAIN SELECT HEX(SUBSTRING(v16,0,3)) FROM t1 WHERE v16 LIKE 'varchar%'; + id select_type table type possible_keys key key_len ref rows Extra +-# # # # # NULL # # # # ++# # # # # v16 # # # # + SELECT HEX(SUBSTRING(v16,7,3)) FROM t1 WHERE v16 LIKE 'varchar%'; + HEX(SUBSTRING(v16,7,3)) + 723161 diff --git a/storage/rocksdb/mysql-test/storage_engine/type_bit_indexes.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_bit_indexes.rdiff new file mode 100644 index 00000000000..7ebba6f43a7 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/type_bit_indexes.rdiff @@ -0,0 +1,87 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_bit_indexes.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_bit_indexes.reject 2017-06-22 14:07:37.807688707 +0300 +@@ -59,30 +59,21 @@ + d BIT(64) <CUSTOM_COL_OPTIONS>, + UNIQUE INDEX b_c (b,c) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW INDEX IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 b_c 1 b # # NULL NULL # # +-t1 0 b_c 2 c # # NULL NULL # # +-INSERT INTO t1 (a,b,c,d) VALUES +-(0,0xFFFFF,0,1),(0,256,0xAAA,0x12345),(1,16,0,0xFFFFFFF),(0,11,12,13), +-(1,100,101,102),(0,12,13,14),(1,13,14,15),(0,101,201,202),(1,1000,1001,1002), +-(1,0xFFFF,0xFFFFFFFF,0xFFFFFFFFFFFFFFFF); +-EXPLAIN SELECT HEX(b+c) FROM t1 WHERE c > 1 OR HEX(b) < 0xFFFFFF; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # b_c # # # # +-SELECT HEX(b+c) FROM t1 WHERE c > 1 OR HEX(b) < 0xFFFFFF; +-HEX(b+c) +-10 +-10000FFFE +-12E +-17 +-19 +-1B +-7D1 +-BAA +-C9 +-FFFFF +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a BIT /*!*/ /*Custom column options*/, ++b BIT(20) /*!*/ /*Custom indexed column options*/, ++c BIT(32) /*!*/ /*Custom indexed column options*/, ++d BIT(64) /*!*/ /*Custom column options*/, ++UNIQUE INDEX b_c (b,c) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# BIT types or unique keys or multi-part keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (a BIT <CUSTOM_COL_OPTIONS>, + b BIT(20) <CUSTOM_COL_OPTIONS>, + c BIT(32) <CUSTOM_COL_OPTIONS>, +@@ -110,23 +101,18 @@ + d BIT(64) <CUSTOM_COL_OPTIONS>, + UNIQUE INDEX (d) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW INDEX IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 d 1 d # # NULL NULL # # +-INSERT INTO t1 (a,b,c,d) VALUES +-(0,0xFFFFF,0,1),(0,256,0xAAA,0x12345),(1,16,0,0xFFFFFFF),(0,11,12,13), +-(1,100,101,102),(0,12,13,14),(1,13,14,15),(0,101,201,202),(1,1000,1001,1002), +-(1,0xFFFF,0xFFFFFFFF,0xFFFFFFFFFFFFFFFF); +-EXPLAIN SELECT d FROM t1 WHERE d BETWEEN 1 AND 10000; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # d # # # # +-SELECT d+0 FROM t1 WHERE d BETWEEN 1 AND 10000; +-d+0 +-1 +-1002 +-102 +-13 +-14 +-15 +-202 +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a BIT /*!*/ /*Custom column options*/, ++b BIT(20) /*!*/ /*Custom column options*/, ++c BIT(32) /*!*/ /*Custom column options*/, ++d BIT(64) /*!*/ /*Custom indexed column options*/, ++UNIQUE INDEX (d) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# BIT types or unique keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- diff --git a/storage/rocksdb/mysql-test/storage_engine/type_blob_indexes.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_blob_indexes.rdiff new file mode 100644 index 00000000000..52c2587727f --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/type_blob_indexes.rdiff @@ -0,0 +1,71 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_blob_indexes.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_blob_indexes.reject 2017-06-22 14:09:07.227688145 +0300 +@@ -71,53 +71,21 @@ + l LONGBLOB <CUSTOM_COL_OPTIONS>, + UNIQUE INDEX l_t (l(256),t(64)) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW INDEX IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 l_t 1 l # # 256 NULL # # +-t1 0 l_t 2 t # # 64 NULL # # +-INSERT INTO t1 (b,t,m,l) VALUES +-('','','',''), +-('a','b','c','d'), +-('b','d','c','b'), +-('test1','test2','test3','test4'), +-(REPEAT('a',128),REPEAT('b',128),REPEAT('c',128),REPEAT('d',128)), +-(HEX('abcd'),HEX('def'),HEX('a'),HEX('abc')), +-('abc','def','ghi','jkl'), +-('test2','test3','test4','test5'), +-('test3','test4','test5','test6'), +-(REPEAT('b',128),REPEAT('f',128),REPEAT('e',128),REPEAT('d',128)), +-(REPEAT('c',128),REPEAT('b',128),REPEAT('c',128),REPEAT('e',128)); +-EXPLAIN SELECT SUBSTRING(t,64), SUBSTRING(l,256) FROM t1 WHERE t!=l AND l NOT IN ('test1') ORDER BY t, l DESC; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # l_t # # # # # +-SELECT SUBSTRING(t,64), SUBSTRING(l,256) FROM t1 WHERE t!=l AND l NOT IN ('test1') ORDER BY t, l DESC; +-SUBSTRING(t,64) SUBSTRING(l,256) +- +- +-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +- +- +-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +- +- +- +-EXPLAIN SELECT SUBSTRING(t,64), SUBSTRING(l,256) FROM t1 FORCE INDEX (l_t) WHERE t!=l AND l NOT IN ('test1') ORDER BY t, l DESC; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # l_t # # # # # +-SELECT SUBSTRING(t,64), SUBSTRING(l,256) FROM t1 FORCE INDEX (l_t) WHERE t!=l AND l NOT IN ('test1') ORDER BY t, l DESC; +-SUBSTRING(t,64) SUBSTRING(l,256) +- +- +-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +- +- +-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +- +- +- +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (b BLOB /*!*/ /*Custom column options*/, ++t TINYBLOB /*!*/ /*Custom indexed column options*/, ++m MEDIUMBLOB /*!*/ /*Custom column options*/, ++l LONGBLOB /*!*/ /*Custom indexed column options*/, ++UNIQUE INDEX l_t (l(256),t(64)) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# BLOB types or unique indexes or multi-part indexes or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (b BLOB <CUSTOM_COL_OPTIONS>, + t TINYBLOB <CUSTOM_COL_OPTIONS>, + m MEDIUMBLOB <CUSTOM_COL_OPTIONS>, diff --git a/storage/rocksdb/mysql-test/storage_engine/type_char_indexes.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_char_indexes.rdiff new file mode 100644 index 00000000000..b18d6b85c4d --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/type_char_indexes.rdiff @@ -0,0 +1,64 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_char_indexes.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_char_indexes.reject 2017-06-22 14:10:08.479687760 +0300 +@@ -67,46 +67,21 @@ + v128 VARCHAR(128) <CUSTOM_COL_OPTIONS>, + UNIQUE INDEX c_v (c,v128) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW INDEX IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 c_v 1 c # # NULL NULL # # +-t1 0 c_v 2 v128 # # NULL NULL # # +-INSERT INTO t1 (c,c20,v16,v128) VALUES ('a','char1','varchar1a','varchar1b'),('a','char2','varchar2a','varchar2b'),('b','char3','varchar1a','varchar1b'),('c','char4','varchar3a','varchar3b'); +-EXPLAIN SELECT c, v128 FROM t1 WHERE c != 'a' AND v128 > 'varchar'; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # c_v # # # # +-SELECT c, v128 FROM t1 WHERE c != 'a' AND v128 > 'varchar'; +-c v128 +-b varchar1b +-c varchar3b +-EXPLAIN SELECT v128, COUNT(*) FROM t1 GROUP BY v128; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # c_v # # # # +-SELECT v128, COUNT(*) FROM t1 GROUP BY v128; +-v128 COUNT(*) +-varchar1b 2 +-varchar2b 1 +-varchar3b 1 +-EXPLAIN SELECT v128, COUNT(*) FROM t1 USE INDEX FOR GROUP BY (c_v) GROUP BY v128; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # c_v # # # # +-SELECT v128, COUNT(*) FROM t1 USE INDEX FOR GROUP BY (c_v) GROUP BY v128; +-v128 COUNT(*) +-varchar1b 2 +-varchar2b 1 +-varchar3b 1 +-SET SESSION optimizer_switch = 'engine_condition_pushdown=on'; +-Warnings: +-Warning 1681 'engine_condition_pushdown=on' is deprecated and will be removed in a future release +-EXPLAIN SELECT c,c20,v16,v128 FROM t1 WHERE c > 'a'; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # range c_v c_v # # # Using index condition +-SELECT c,c20,v16,v128 FROM t1 WHERE c > 'a'; +-c c20 v16 v128 +-b char3 varchar1a varchar1b +-c char4 varchar3a varchar3b +-SET SESSION optimizer_switch = @@global.optimizer_switch; +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (c CHAR /*!*/ /*Custom indexed column options*/, ++c20 CHAR(20) /*!*/ /*Custom column options*/, ++v16 VARCHAR(16) /*!*/ /*Custom column options*/, ++v128 VARCHAR(128) /*!*/ /*Custom indexed column options*/, ++UNIQUE INDEX c_v (c,v128) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# CHAR or VARCHAR types or unique keys or multi-part keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (c CHAR <CUSTOM_COL_OPTIONS>, + c20 CHAR(20) <CUSTOM_COL_OPTIONS>, + v16 VARCHAR(16) <CUSTOM_COL_OPTIONS>, diff --git a/storage/rocksdb/mysql-test/storage_engine/type_date_time_indexes.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_date_time_indexes.rdiff new file mode 100644 index 00000000000..3aa333bb912 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/type_date_time_indexes.rdiff @@ -0,0 +1,65 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_date_time_indexes.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_date_time_indexes.reject 2017-06-22 15:05:44.883666789 +0300 +@@ -194,46 +194,22 @@ + y YEAR <CUSTOM_COL_OPTIONS>, + UNIQUE INDEX d_t (d,t) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW INDEX IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 d_t 1 d # # NULL NULL # # +-t1 0 d_t 2 t # # NULL NULL # # +-SET @tm = '2012-04-09 05:27:00'; +-INSERT INTO t1 (d,dt,ts,t,y) VALUES +-('2012-01-12', '2010-11-22 12:33:54', '2011-11-14 21:45:55', '00:12:33', '2000'), +-('2012-01-12', '2010-11-22 11:43:14', '2011-11-14 21:45:55', '00:12:32', '2001'), +-('2012-03-31', '2011-08-28 21:33:56', '1999-04-30 19:11:08', '12:00:00', '1999'), +-('2012-03-13', '2011-08-27 21:33:56', '1999-03-30 19:11:08', '12:10:00', '1998'), +-('2011-03-31', '2011-08-28 20:33:56', '1997-01-31 11:54:01', '22:04:10', '1994'), +-(DATE(@tm),@tm,TIMESTAMP(@tm),TIME(@tm),YEAR(@tm)); +-EXPLAIN SELECT d, t FROM t1 WHERE CONCAT(d,' ',t) != CURRENT_DATE(); +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # d_t # # # # +-SELECT d, t FROM t1 WHERE CONCAT(d,' ',t) != CURRENT_DATE(); +-d t +-2011-03-31 22:04:10 +-2012-01-12 00:12:32 +-2012-01-12 00:12:33 +-2012-03-13 12:10:00 +-2012-03-31 12:00:00 +-2012-04-09 05:27:00 +-EXPLAIN SELECT d, t FROM t1 IGNORE INDEX (d_t) WHERE CONCAT(d,' ',t) != CURRENT_DATE(); +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # NULL # # # # +-SELECT d, t FROM t1 IGNORE INDEX (d_t) WHERE CONCAT(d,' ',t) != CURRENT_DATE(); +-d t +-2011-03-31 22:04:10 +-2012-01-12 00:12:32 +-2012-01-12 00:12:33 +-2012-03-13 12:10:00 +-2012-03-31 12:00:00 +-2012-04-09 05:27:00 +-INSERT INTO t1 (d,dt,ts,t,y) VALUES +-('2012-01-12', '2010-11-22 12:33:53', '2011-11-14 21:45:55', '00:12:33', '2000'); +-ERROR 23000: Duplicate entry '2012-01-12-00:12:33' for key 'd_t' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (d DATE /*!*/ /*Custom indexed column options*/, ++dt DATETIME /*!*/ /*Custom column options*/, ++ts TIMESTAMP /*!*/ /*Custom column options*/, ++t TIME /*!*/ /*Custom indexed column options*/, ++y YEAR /*!*/ /*Custom column options*/, ++UNIQUE INDEX d_t (d,t) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Date and time types or unique keys or multi-part keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (d DATE <CUSTOM_COL_OPTIONS>, + dt DATETIME <CUSTOM_COL_OPTIONS>, + ts TIMESTAMP <CUSTOM_COL_OPTIONS>, diff --git a/storage/rocksdb/mysql-test/storage_engine/type_enum.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_enum.rdiff new file mode 100644 index 00000000000..a402e0fb418 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/type_enum.rdiff @@ -0,0 +1,20 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_enum.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_enum.reject 2017-06-22 02:55:49.599942066 +0300 +@@ -24,8 +24,6 @@ + test2 4 + test5 2 + ALTER TABLE t1 ADD COLUMN e ENUM('a','A') <CUSTOM_COL_OPTIONS>; +-Warnings: +-Note 1291 Column 'e' has duplicated value 'a' in ENUM + SHOW COLUMNS IN t1; + Field Type Null Key Default Extra + a enum('') # # # +@@ -37,7 +35,7 @@ + a b c e + NULL + test2 4 NULL +- test3 75 a ++ test3 75 A + test5 2 NULL + SELECT a,b,c,e FROM t1 WHERE b='test2' OR a != ''; + a b c e diff --git a/storage/rocksdb/mysql-test/storage_engine/type_enum_indexes.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_enum_indexes.rdiff new file mode 100644 index 00000000000..549b67b96ed --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/type_enum_indexes.rdiff @@ -0,0 +1,47 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_enum_indexes.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_enum_indexes.reject 2017-06-22 15:08:42.299665674 +0300 +@@ -21,30 +21,20 @@ + c ENUM('1a','1b','1d','1j','4a','4z','5a','5b','6v','6z') <CUSTOM_COL_OPTIONS>, + UNIQUE KEY a_b (a,b) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-INSERT INTO t1 (a,b,c) VALUES +-('N.America','test1','5a'),('Europe','test1','5b'),('Europe','test2','6v'), +-('Africa','test3','4z'),('Africa','test4','1j'),('Antarctica','test4','1d'); +-SHOW INDEX IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 a_b 1 a # # NULL NULL # # +-t1 0 a_b 2 b # # NULL NULL # # +-EXPLAIN SELECT a FROM t1 WHERE b > 'test2' ORDER BY a; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # a_b # # # # +-SELECT a FROM t1 WHERE b > 'test2' ORDER BY a; +-a +-Africa +-Africa +-Antarctica +-EXPLAIN SELECT a FROM t1 FORCE INDEX (a_b) WHERE b > 'test2' ORDER BY a; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # a_b # # # # +-SELECT a FROM t1 FORCE INDEX (a_b) WHERE b > 'test2' ORDER BY a; +-a +-Africa +-Africa +-Antarctica +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a ENUM('N.America','S.America','Africa','Europe','Australia','Asia','Antarctica') /*!*/ /*Custom indexed column options*/, ++b ENUM('test1','test2','test3','test4','test5') /*!*/ /*Custom indexed column options*/, ++c ENUM('1a','1b','1d','1j','4a','4z','5a','5b','6v','6z') /*!*/ /*Custom column options*/, ++UNIQUE KEY a_b (a,b) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# ENUM types or unique keys or multi-part keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (a ENUM('N.America','S.America','Africa','Europe','Australia','Asia','Antarctica') <CUSTOM_COL_OPTIONS>, + b ENUM('test1','test2','test3','test4','test5') <CUSTOM_COL_OPTIONS>, + c ENUM('1a','1b','1d','1j','4a','4z','5a','5b','6v','6z') <CUSTOM_COL_OPTIONS> PRIMARY KEY diff --git a/storage/rocksdb/mysql-test/storage_engine/type_fixed_indexes.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_fixed_indexes.rdiff new file mode 100644 index 00000000000..4c30b66f51f --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/type_fixed_indexes.rdiff @@ -0,0 +1,51 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_fixed_indexes.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_fixed_indexes.reject 2017-06-22 15:09:58.611665194 +0300 +@@ -77,33 +77,21 @@ + n2 NUMERIC(65,4) <CUSTOM_COL_OPTIONS>, + UNIQUE INDEX n1_n2 (n1,n2) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW INDEX IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 n1_n2 1 n1 # # NULL NULL # # +-t1 0 n1_n2 2 n2 # # NULL NULL # # +-INSERT INTO t1 (d1,d2,n1,n2) VALUES +-(10.22,60.12345,123456,14.3456), +-(10.0,60.12345,123456,14), +-(11.14,15,123456,13), +-(100,100,1,2), +-(0,0,0,0), +-(4540424564.23,3343303441.0,12,13), +-(15,17,23,100000); +-Warnings: +-Warning 1264 Out of range value for column 'd1' at row 6 +-EXPLAIN SELECT DISTINCT n1+n2 FROM t1; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # n1_n2 # # # # +-SELECT DISTINCT n1+n2 FROM t1; +-n1+n2 +-0.0000 +-100023.0000 +-123469.0000 +-123470.0000 +-123470.3456 +-25.0000 +-3.0000 +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (d1 DECIMAL(10,2) /*!*/ /*Custom column options*/, ++d2 DECIMAL(60,10) /*!*/ /*Custom column options*/, ++n1 NUMERIC /*!*/ /*Custom indexed column options*/, ++n2 NUMERIC(65,4) /*!*/ /*Custom indexed column options*/, ++UNIQUE INDEX n1_n2 (n1,n2) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Fixed point types or unique keys or multi-part keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (d1 DECIMAL(10,2) <CUSTOM_COL_OPTIONS>, + d2 DECIMAL(60,10) <CUSTOM_COL_OPTIONS>, + n1 NUMERIC <CUSTOM_COL_OPTIONS>, diff --git a/storage/rocksdb/mysql-test/storage_engine/type_float_indexes.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_float_indexes.rdiff new file mode 100644 index 00000000000..8674aa0f0bb --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/type_float_indexes.rdiff @@ -0,0 +1,97 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_float_indexes.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_float_indexes.reject 2017-06-22 15:11:12.543664729 +0300 +@@ -58,9 +58,11 @@ + 4644 + ALTER TABLE t1 DROP PRIMARY KEY; + ALTER TABLE t1 ADD UNIQUE KEY(d); ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) + EXPLAIN SELECT d FROM t1 WHERE r > 0 and d > 0 ORDER BY d; + id select_type table type possible_keys key key_len ref rows Extra +-# # # # # d # # # # ++# # # # # NULL # # # # + SELECT d FROM t1 WHERE r > 0 and d > 0 ORDER BY d; + d + 1.2345 +@@ -73,51 +75,42 @@ + dp DOUBLE PRECISION (64,10) <CUSTOM_COL_OPTIONS>, + UNIQUE KEY r_dp (r,dp) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW INDEX IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 r_dp 1 r # # NULL NULL # # +-t1 0 r_dp 2 dp # # NULL NULL # # +-INSERT INTO t1 (f,r,d,dp) VALUES +-(1.2345,1422.22,1.2345,1234567.89), +-(0,0,0,0), +-(-1,-1,-1,-1), +-(17.5843,4953453454.44,29229114.0,1111111.23), +-(4644,1422.22,466664.999,0.5); +-EXPLAIN SELECT r, dp FROM t1 WHERE r > 0 or dp > 0; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # r_dp # # # # +-SELECT r, dp FROM t1 WHERE r > 0 or dp > 0; +-r dp +-1422.220 0.5000000000 +-1422.220 1234567.8900000000 +-4953453454.440 1111111.2300000000 +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (f FLOAT /*!*/ /*Custom column options*/, ++r REAL(20,3) /*!*/ /*Custom indexed column options*/, ++d DOUBLE /*!*/ /*Custom column options*/, ++dp DOUBLE PRECISION (64,10) /*!*/ /*Custom indexed column options*/, ++UNIQUE KEY r_dp (r,dp) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Float point types or unique keys or multi-part keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (f FLOAT <CUSTOM_COL_OPTIONS>, + r REAL(20,3) <CUSTOM_COL_OPTIONS>, + d DOUBLE <CUSTOM_COL_OPTIONS>, + dp DOUBLE PRECISION (64,10) <CUSTOM_COL_OPTIONS>, + UNIQUE KEY(d) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW INDEX IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 d 1 d # # NULL NULL # # +-INSERT INTO t1 (f,r,d,dp) VALUES +-(1.2345,1422.22,1.2345,1234567.89), +-(0,0,0,0), +-(-1,-1,-1,-1), +-(17.5843,4953453454.44,29229114.0,1111111.23), +-(4644,1422.22,466664.999,0.5); +-EXPLAIN SELECT DISTINCT d FROM t1 ORDER BY d; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # d # # # # +-SELECT DISTINCT d FROM t1 ORDER BY d; +-d +--1 +-0 +-1.2345 +-466664.999 +-29229114 +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (f FLOAT /*!*/ /*Custom column options*/, ++r REAL(20,3) /*!*/ /*Custom column options*/, ++d DOUBLE /*!*/ /*Custom indexed column options*/, ++dp DOUBLE PRECISION (64,10) /*!*/ /*Custom column options*/, ++UNIQUE KEY(d) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Float point types or unique keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (f FLOAT <CUSTOM_COL_OPTIONS>, + r REAL(20,3) <CUSTOM_COL_OPTIONS>, + d DOUBLE <CUSTOM_COL_OPTIONS>, diff --git a/storage/rocksdb/mysql-test/storage_engine/type_int_indexes.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_int_indexes.rdiff new file mode 100644 index 00000000000..f306212c0ea --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/type_int_indexes.rdiff @@ -0,0 +1,57 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_int_indexes.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_int_indexes.reject 2017-06-22 15:12:14.199664342 +0300 +@@ -96,38 +96,19 @@ + b BIGINT <CUSTOM_COL_OPTIONS>, + UNIQUE KEY b_t (b,t) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-INSERT INTO t1 (i,t,s,m,b) VALUES (1,2,3,4,5),(1000,100,10000,1000000,1000000000000000000),(5,100,10000,1000000,100000000000000000),(2,3,4,5,6),(3,4,5,6,7),(101,102,103,104,105),(10001,103,10002,10003,10004),(10,11,12,13,14),(11,12,13,14,15),(12,13,14,15,16); +-SELECT b+t FROM t1 WHERE (b,t) IN ( SELECT b, t FROM t1 WHERE i>1 ) ORDER BY b+t; +-b+t +-9 +-11 +-25 +-27 +-29 +-207 +-10107 +-100000000000000100 +-1000000000000000100 +-SELECT b+t FROM t1 FORCE INDEX (b_t) WHERE (b,t) IN ( SELECT b, t FROM t1 WHERE i>1 ) ORDER BY b+t; +-b+t +-9 +-11 +-25 +-27 +-29 +-207 +-10107 +-100000000000000100 +-1000000000000000100 +-SELECT b+t FROM t1 IGNORE INDEX (b_t) WHERE (b,t) IN ( SELECT b, t FROM t1 WHERE i>1 ) ORDER BY b+t; +-b+t +-9 +-11 +-25 +-27 +-29 +-207 +-10107 +-100000000000000100 +-1000000000000000100 +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (i INT /*!*/ /*Custom column options*/, ++t TINYINT /*!*/ /*Custom indexed column options*/, ++s SMALLINT /*!*/ /*Custom column options*/, ++m MEDIUMINT /*!*/ /*Custom column options*/, ++b BIGINT /*!*/ /*Custom indexed column options*/, ++UNIQUE KEY b_t (b,t) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# INT types or unique keys or multi-part keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- diff --git a/storage/rocksdb/mysql-test/storage_engine/type_set.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_set.rdiff new file mode 100644 index 00000000000..c5cbeaedecf --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/type_set.rdiff @@ -0,0 +1,11 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_set.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_set.reject 2017-06-22 03:02:58.695939369 +0300 +@@ -30,8 +30,6 @@ + test2,test3 01,23,34,44 + test2,test4 + ALTER TABLE t1 ADD COLUMN e SET('a','A') <CUSTOM_COL_OPTIONS>; +-Warnings: +-Note 1291 Column 'e' has duplicated value 'a' in SET + SHOW COLUMNS IN t1; + Field Type Null Key Default Extra + a set('') # # # diff --git a/storage/rocksdb/mysql-test/storage_engine/type_set_indexes.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_set_indexes.rdiff new file mode 100644 index 00000000000..6296fcadec0 --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/type_set_indexes.rdiff @@ -0,0 +1,47 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_set_indexes.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_set_indexes.reject 2017-06-22 15:19:48.679661485 +0300 +@@ -108,30 +108,17 @@ + c SET('01','22','23','33','34','39','40','44','50','63','64') <CUSTOM_COL_OPTIONS>, + UNIQUE INDEX b_a (b,a) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW INDEX IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 b_a 1 b # # NULL NULL # # +-t1 0 b_a 2 a # # NULL NULL # # +-INSERT INTO t1 (a,b,c) VALUES +-('','test2,test3','01,34,44,23'), +-('',5,2), +-('N.America,Asia','test4,test2',''), +-('Africa,Europe,Asia','test2,test3','01'), +-('Antarctica','test3','34,44'), +-('Asia','test5','50'), +-('Europe,S.America','test1,','39'); +-Warnings: +-Warning 1265 Data truncated for column 'b' at row 7 +-EXPLAIN SELECT DISTINCT a, b FROM t1 ORDER BY b DESC, a; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # # b_a # # # # +-SELECT DISTINCT a, b FROM t1 ORDER BY b DESC, a; +-a b +- test1,test3 +- test2,test3 +-Africa,Europe,Asia test2,test3 +-Antarctica test3 +-Asia test5 +-N.America,Asia test2,test4 +-S.America,Europe test1 +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a SET('N.America','S.America','Africa','Antarctica','Australia','Europe','Asia') /*!*/ /*Custom indexed column options*/, ++b SET('test1','test2','test3','test4','test5') /*!*/ /*Custom indexed column options*/, ++c SET('01','22','23','33','34','39','40','44','50','63','64') /*!*/ /*Custom column options*/, ++UNIQUE INDEX b_a (b,a) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# SET types or unique keys or multi-part keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- diff --git a/storage/rocksdb/mysql-test/storage_engine/type_text_indexes.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_text_indexes.rdiff new file mode 100644 index 00000000000..6aba47d9bec --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/type_text_indexes.rdiff @@ -0,0 +1,68 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_text_indexes.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/type_text_indexes.reject 2017-06-22 15:20:42.963661144 +0300 +@@ -65,50 +65,21 @@ + l LONGTEXT <CUSTOM_COL_OPTIONS>, + UNIQUE INDEX l_tt (l(256),tt(64)) + ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-SHOW INDEX IN t1; +-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +-t1 0 l_tt 1 l # # 256 NULL # # +-t1 0 l_tt 2 tt # # 64 NULL # # +-INSERT INTO t1 (t,tt,m,l) VALUES +-('','','',''), +-('a','b','c','d'), +-('b','d','c','b'), +-('test1','test2','test3','test4'), +-(REPEAT('a',128),REPEAT('b',128),REPEAT('c',128),REPEAT('d',128)), +-('abc','def','ghi','jkl'), +-('test2','test3','test4','test5'), +-('test3','test4','test5','test6'), +-(REPEAT('b',128),REPEAT('f',128),REPEAT('e',128),REPEAT('d',128)), +-(REPEAT('c',128),REPEAT('b',128),REPEAT('c',128),REPEAT('e',128)); +-EXPLAIN SELECT SUBSTRING(tt,64), SUBSTRING(l,256) FROM t1 WHERE tt!=l AND l NOT IN ('test1') ORDER BY tt, l DESC; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # l_tt # # # # # +-SELECT SUBSTRING(tt,64), SUBSTRING(l,256) FROM t1 WHERE tt!=l AND l NOT IN ('test1') ORDER BY tt, l DESC; +-SUBSTRING(tt,64) SUBSTRING(l,256) +- +-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +- +- +-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +- +- +- +-EXPLAIN SELECT SUBSTRING(tt,64), SUBSTRING(l,256) FROM t1 FORCE INDEX (l_t) WHERE tt!=l AND l NOT IN ('test1') ORDER BY tt, l DESC; +-id select_type table type possible_keys key key_len ref rows Extra +-# # # # l_tt l_tt # # # # +-SELECT SUBSTRING(tt,64), SUBSTRING(l,256) FROM t1 FORCE INDEX (l_t) WHERE tt!=l AND l NOT IN ('test1') ORDER BY tt, l DESC; +-SUBSTRING(tt,64) SUBSTRING(l,256) +- +-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +- +- +-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +- +- +- +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (t TEXT /*!*/ /*Custom column options*/, ++tt TINYTEXT /*!*/ /*Custom indexed column options*/, ++m MEDIUMTEXT /*!*/ /*Custom column options*/, ++l LONGTEXT /*!*/ /*Custom indexed column options*/, ++UNIQUE INDEX l_tt (l(256),tt(64)) ++) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# TEXT types or unique keys or multi-part keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (t TEXT <CUSTOM_COL_OPTIONS>, + tt TINYTEXT <CUSTOM_COL_OPTIONS>, + m MEDIUMTEXT <CUSTOM_COL_OPTIONS>, diff --git a/storage/rocksdb/mysql-test/storage_engine/update_with_keys.rdiff b/storage/rocksdb/mysql-test/storage_engine/update_with_keys.rdiff new file mode 100644 index 00000000000..a59da32a10a --- /dev/null +++ b/storage/rocksdb/mysql-test/storage_engine/update_with_keys.rdiff @@ -0,0 +1,77 @@ +--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/update_with_keys.result 2017-06-22 00:33:46.423995639 +0300 ++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/update_with_keys.reject 2017-06-22 15:21:52.275660708 +0300 +@@ -17,54 +17,27 @@ + 8 + DROP TABLE t1; + CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>, UNIQUE INDEX(a)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,'e'),(0,'f'),(100,'a'); +-UPDATE t1 SET a=a+200; +-UPDATE t1 SET a=0 WHERE a > 250; +-UPDATE t1 SET a=205 WHERE a=200; +-ERROR 23000: Duplicate entry '205' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-UPDATE t1 SET a=12345 ORDER BY a, b LIMIT 1; +-SELECT a,b FROM t1; +-a b +-12345 a +-200 f +-201 a +-202 b +-203 c +-204 d +-205 e +-UPDATE t1 SET a=80 WHERE a IN (202,203); +-ERROR 23000: Duplicate entry '80' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom column options*/, b CHAR(8) /*!*/ /*Custom column options*/, UNIQUE INDEX(a)) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Unique keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>, UNIQUE INDEX(a,b)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; +-INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,'e'),(100,'a'),(6,'f'); +-UPDATE t1 SET a=6 WHERE a=3; +-UPDATE t1 SET a=100 WHERE a=1; +-ERROR 23000: Duplicate entry '100-a' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-UPDATE t1 SET a=4, b='d' WHERE b='f'; +-ERROR 23000: Duplicate entry '4-d' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-UPDATE t1 SET a=a+1; +-SELECT a,b FROM t1; +-a b +-101 a +-2 a +-3 b +-5 d +-6 e +-7 c +-7 f +-UPDATE t1 SET b='z'; +-ERROR 23000: Duplicate entry '7-z' for key 'a' +-# Statement ended with one of expected results (ER_DUP_ENTRY,ER_DUP_KEY). +-# If you got a difference in error message, just add it to rdiff file +-DROP TABLE t1; ++ERROR HY000: Unique index support is disabled when the table has no primary key. ++# ERROR: Statement ended with errno 1105, errname ER_UNKNOWN_ERROR (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ CREATE TABLE t1 (a INT(11) /*!*/ /*Custom column options*/, b CHAR(8) /*!*/ /*Custom column options*/, UNIQUE INDEX(a,b)) ENGINE=RocksDB /*!*/ /*Custom table options*/ ] ++# The statement|command finished with ER_UNKNOWN_ERROR. ++# Unique keys or multi-part keys or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + CREATE TABLE t1 (a <INT_COLUMN> PRIMARY KEY, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>; + INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,'e'),(0,'f'),(100,'a'); + UPDATE t1 SET a=a+200; |