diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-05-17 15:48:50 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-05-17 15:48:50 +0200 |
commit | 15425767e8370725e4f80e26da05d93067cf534d (patch) | |
tree | ac683e95491dd721afaca31ce61ed851006def17 /storage | |
parent | 21eccff6250926a133bc8aa70002573c83393af5 (diff) | |
parent | 50d71c8b37631b40bcb368d8cad98899afa5bdfa (diff) | |
download | mariadb-git-15425767e8370725e4f80e26da05d93067cf534d.tar.gz |
Merge remote-tracking branch 'github/10.3' into 10.3
Diffstat (limited to 'storage')
24 files changed, 307 insertions, 226 deletions
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index a1622c0d13f..228e516551d 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -4904,6 +4904,15 @@ prepare_inplace_alter_table_dict( if (ha_alter_info->handler_flags & ALTER_ADD_NON_UNIQUE_NON_PRIM_INDEX) { + for (ulint i = 0; i < ctx->num_to_add_vcol; i++) { + /* Set mbminmax for newly added column */ + dict_col_t& col = ctx->add_vcol[i].m_col; + ulint mbminlen, mbmaxlen; + dtype_get_mblen(col.mtype, col.prtype, + &mbminlen, &mbmaxlen); + col.mbminlen = mbminlen; + col.mbmaxlen = mbmaxlen; + } add_v = static_cast<dict_add_v_col_t*>( mem_heap_alloc(ctx->heap, sizeof *add_v)); add_v->n_v_col = ctx->num_to_add_vcol; diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index 5b43469f48a..ffa4967b9de 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -41,7 +41,7 @@ Created 1/20/1994 Heikki Tuuri #define INNODB_VERSION_MAJOR 5 #define INNODB_VERSION_MINOR 7 -#define INNODB_VERSION_BUGFIX 21 +#define INNODB_VERSION_BUGFIX 22 /* The following is the InnoDB version as shown in SELECT plugin_version FROM information_schema.plugins; diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc index b057caf38fd..b099e50cd9e 100644 --- a/storage/innobase/log/log0log.cc +++ b/storage/innobase/log/log0log.cc @@ -675,9 +675,8 @@ void log_t::files::create(ulint n_files) lsn= LOG_START_LSN; lsn_offset= LOG_FILE_HDR_SIZE; - byte* ptr= static_cast<byte*>(ut_zalloc_nokey(LOG_FILE_HDR_SIZE - + OS_FILE_LOG_BLOCK_SIZE - * n_files)); + byte* ptr= static_cast<byte*>(ut_zalloc_nokey(LOG_FILE_HDR_SIZE * n_files + + OS_FILE_LOG_BLOCK_SIZE)); file_header_bufs_ptr= ptr; ptr= static_cast<byte*>(ut_align(ptr, OS_FILE_LOG_BLOCK_SIZE)); diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 2eec7d467ea..d902a60d5ea 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -2739,8 +2739,18 @@ DECLARE_THREAD(srv_purge_coordinator_thread)( #endif /* UNIV_DEBUG_THREAD_CREATION */ /* Ensure that all the worker threads quit. */ - if (srv_n_purge_threads > 1) { - srv_release_threads(SRV_WORKER, srv_n_purge_threads - 1); + if (ulint n_workers = srv_n_purge_threads - 1) { + const srv_slot_t* slot; + const srv_slot_t* const end = &srv_sys.sys_threads[ + srv_sys.n_sys_threads]; + + do { + srv_release_threads(SRV_WORKER, n_workers); + srv_sys_mutex_enter(); + for (slot = &srv_sys.sys_threads[2]; + !slot++->in_use && slot < end; ); + srv_sys_mutex_exit(); + } while (slot < end); } innobase_destroy_background_thd(thd); @@ -2795,6 +2805,7 @@ void srv_purge_wakeup() { ut_ad(!srv_read_only_mode); + ut_ad(!sync_check_iterate(sync_check())); if (srv_force_recovery >= SRV_FORCE_NO_BACKGROUND) { return; diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index edde18bd9f5..ab00077c43a 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -5088,6 +5088,12 @@ static ulonglong rdb_get_int_col_max_value(const Field *field) { case HA_KEYTYPE_LONGLONG: max_value = 0x7FFFFFFFFFFFFFFFULL; break; + case HA_KEYTYPE_FLOAT: + max_value = 0x1000000ULL; + break; + case HA_KEYTYPE_DOUBLE: + max_value = 0x20000000000000ULL; + break; default: abort(); } @@ -9296,8 +9302,16 @@ int ha_rocksdb::check_and_lock_sk(const uint &key_id, The bloom filter may need to be disabled for this lookup. */ + uchar min_bound_buf[MAX_KEY_LENGTH]; + uchar max_bound_buf[MAX_KEY_LENGTH]; + rocksdb::Slice min_bound_slice; + rocksdb::Slice max_bound_slice; const bool total_order_seek = !check_bloom_and_set_bounds( - ha_thd(), kd, new_slice, all_parts_used); + ha_thd(), kd, new_slice, all_parts_used, + min_bound_buf, + max_bound_buf, + &min_bound_slice, + &max_bound_slice); const bool fill_cache = !THDVAR(ha_thd(), skip_fill_cache); const rocksdb::Status s = @@ -9309,7 +9323,7 @@ int ha_rocksdb::check_and_lock_sk(const uint &key_id, rocksdb::Iterator *const iter = row_info.tx->get_iterator( kd.get_cf(), total_order_seek, fill_cache, - m_eq_cond_lower_bound_slice, m_eq_cond_upper_bound_slice, + min_bound_slice, max_bound_slice, true /* read current data */, false /* acquire snapshot */); /* @@ -9717,25 +9731,34 @@ int ha_rocksdb::update_write_row(const uchar *const old_data, If the index was reverse order, upper bound would be 0x0000b3eb003f65c5e78857, and lower bound would be 0x0000b3eb003f65c5e78859. These cover given eq condition range. + + @param lower_bound_buf IN Buffer for lower bound + @param upper_bound_buf IN Buffer for upper bound + + @param outer_u */ void ha_rocksdb::setup_iterator_bounds(const Rdb_key_def &kd, - const rocksdb::Slice &eq_cond) { + const rocksdb::Slice &eq_cond, + uchar *lower_bound_buf, + uchar *upper_bound_buf, + rocksdb::Slice *out_lower_bound, + rocksdb::Slice *out_upper_bound) { uint eq_cond_len = eq_cond.size(); - memcpy(m_eq_cond_upper_bound, eq_cond.data(), eq_cond_len); - kd.successor(m_eq_cond_upper_bound, eq_cond_len); - memcpy(m_eq_cond_lower_bound, eq_cond.data(), eq_cond_len); - kd.predecessor(m_eq_cond_lower_bound, eq_cond_len); + memcpy(upper_bound_buf, eq_cond.data(), eq_cond_len); + kd.successor(upper_bound_buf, eq_cond_len); + memcpy(lower_bound_buf, eq_cond.data(), eq_cond_len); + kd.predecessor(lower_bound_buf, eq_cond_len); if (kd.m_is_reverse_cf) { - m_eq_cond_upper_bound_slice = - rocksdb::Slice((const char *)m_eq_cond_lower_bound, eq_cond_len); - m_eq_cond_lower_bound_slice = - rocksdb::Slice((const char *)m_eq_cond_upper_bound, eq_cond_len); + *out_upper_bound = + rocksdb::Slice((const char *)lower_bound_buf, eq_cond_len); + *out_lower_bound = + rocksdb::Slice((const char *)upper_bound_buf, eq_cond_len); } else { - m_eq_cond_upper_bound_slice = - rocksdb::Slice((const char *)m_eq_cond_upper_bound, eq_cond_len); - m_eq_cond_lower_bound_slice = - rocksdb::Slice((const char *)m_eq_cond_lower_bound, eq_cond_len); + *out_upper_bound = + rocksdb::Slice((const char *)upper_bound_buf, eq_cond_len); + *out_lower_bound = + rocksdb::Slice((const char *)lower_bound_buf, eq_cond_len); } } @@ -9755,7 +9778,11 @@ void ha_rocksdb::setup_scan_iterator(const Rdb_key_def &kd, bool skip_bloom = true; const rocksdb::Slice eq_cond(slice->data(), eq_cond_len); - if (check_bloom_and_set_bounds(ha_thd(), kd, eq_cond, use_all_keys)) { + if (check_bloom_and_set_bounds(ha_thd(), kd, eq_cond, use_all_keys, + m_eq_cond_lower_bound, + m_eq_cond_upper_bound, + &m_eq_cond_lower_bound_slice, + &m_eq_cond_upper_bound_slice)) { skip_bloom = false; } @@ -10938,7 +10965,11 @@ int ha_rocksdb::remove_rows(Rdb_tbl_def *const tbl) { kd.get_infimum_key(reinterpret_cast<uchar *>(key_buf), &key_len); rocksdb::ColumnFamilyHandle *cf = kd.get_cf(); const rocksdb::Slice table_key(key_buf, key_len); - setup_iterator_bounds(kd, table_key); + setup_iterator_bounds(kd, table_key, + m_eq_cond_lower_bound, + m_eq_cond_upper_bound, + &m_eq_cond_lower_bound_slice, + &m_eq_cond_upper_bound_slice); opts.iterate_lower_bound = &m_eq_cond_lower_bound_slice; opts.iterate_upper_bound = &m_eq_cond_upper_bound_slice; std::unique_ptr<rocksdb::Iterator> it(rdb->NewIterator(opts, cf)); @@ -11734,7 +11765,9 @@ bool ha_rocksdb::prepare_inplace_alter_table( if (!new_tdef) { new_tdef = m_tbl_def; } - max_auto_incr = load_auto_incr_value_from_index(); + if (table->found_next_number_field) { + max_auto_incr = load_auto_incr_value_from_index(); + } } ha_alter_info->handler_ctx = new Rdb_inplace_alter_ctx( @@ -12714,10 +12747,16 @@ void Rdb_background_thread::run() { bool ha_rocksdb::check_bloom_and_set_bounds(THD *thd, const Rdb_key_def &kd, const rocksdb::Slice &eq_cond, - const bool use_all_keys) { + const bool use_all_keys, + uchar *lower_bound_buf, + uchar *upper_bound_buf, + rocksdb::Slice *out_lower_bound, + rocksdb::Slice *out_upper_bound) { bool can_use_bloom = can_use_bloom_filter(thd, kd, eq_cond, use_all_keys); if (!can_use_bloom) { - setup_iterator_bounds(kd, eq_cond); + setup_iterator_bounds(kd, eq_cond, + lower_bound_buf, upper_bound_buf, + out_lower_bound, out_upper_bound); } return can_use_bloom; } diff --git a/storage/rocksdb/ha_rocksdb.h b/storage/rocksdb/ha_rocksdb.h index 0f922c22bc7..171c303ac4a 100644 --- a/storage/rocksdb/ha_rocksdb.h +++ b/storage/rocksdb/ha_rocksdb.h @@ -653,13 +653,21 @@ class ha_rocksdb : public my_core::handler { enum ha_rkey_function find_flag) const MY_ATTRIBUTE((__nonnull__, __warn_unused_result__)); void setup_iterator_bounds(const Rdb_key_def &kd, - const rocksdb::Slice &eq_cond); + const rocksdb::Slice &eq_cond, + uchar *lower_bound_buf, + uchar *upper_bound_buf, + rocksdb::Slice *out_lower_bound, + rocksdb::Slice *out_upper_bound); bool can_use_bloom_filter(THD *thd, const Rdb_key_def &kd, const rocksdb::Slice &eq_cond, const bool use_all_keys); bool check_bloom_and_set_bounds(THD *thd, const Rdb_key_def &kd, const rocksdb::Slice &eq_cond, - const bool use_all_keys); + const bool use_all_keys, + uchar *lower_bound_buf, + uchar *upper_bound_buf, + rocksdb::Slice *out_lower_bound, + rocksdb::Slice *out_upper_bound); void setup_scan_iterator(const Rdb_key_def &kd, rocksdb::Slice *slice, const bool use_all_keys, const uint eq_cond_len) MY_ATTRIBUTE((__nonnull__)); diff --git a/storage/rocksdb/mysql-test/rocksdb/include/bulk_load.inc b/storage/rocksdb/mysql-test/rocksdb/include/bulk_load.inc index 6472b969ce6..8ec97510dbd 100644 --- a/storage/rocksdb/mysql-test/rocksdb/include/bulk_load.inc +++ b/storage/rocksdb/mysql-test/rocksdb/include/bulk_load.inc @@ -50,7 +50,7 @@ eval CREATE TABLE t3( perl; my $fn = $ENV{'ROCKSDB_INFILE'}; open(my $fh, '>', $fn) || die "perl open($fn): $!"; -my $max = 5000000; +my $max = 2500000; my $desc = $ENV{'MTR_DATA_ORDER_DESC'}; my @chars = ("A".."Z", "a".."z", "0".."9"); my @powers_of_26 = (26 * 26 * 26 * 26, 26 * 26 * 26, 26 * 26, 26, 1); @@ -118,15 +118,12 @@ ANALYZE TABLE t1, t2, t3; SHOW TABLE STATUS WHERE name LIKE 't%'; # Make sure all the data is there. -select count(pk) from t1; -select count(a) from t1; -select count(b) from t1; -select count(pk) from t2; -select count(a) from t2; -select count(b) from t2; -select count(pk) from t3; -select count(a) from t3; -select count(b) from t3; +select count(pk),count(a) from t1; +select count(b) from t1; +select count(pk),count(a) from t2; +select count(b) from t2; +select count(pk),count(a) from t3; +select count(b) from t3; # Create a dummy file with a bulk load extesion. It should be removed when # the server starts diff --git a/storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc b/storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc index 151ec0ccf14..5f808087e3e 100644 --- a/storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc +++ b/storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc @@ -84,7 +84,7 @@ perl; my $fn = $ENV{'ROCKSDB_INFILE'}; open(my $fh, '>', $fn) || die "perl open($fn): $!"; binmode $fh; -my $max = 5000000; +my $max = 2500000; my $sign = 1; for (my $ii = 0; $ii < $max; $ii++) { @@ -129,12 +129,9 @@ ANALYZE TABLE t1, t2, t3; SHOW TABLE STATUS WHERE name LIKE 't%'; # Make sure all the data is there. -select count(a) from t1; -select count(b) from t1; -select count(a) from t2; -select count(b) from t2; -select count(a) from t3; -select count(b) from t3; +select count(a),count(b) from t1; +select count(a),count(b) from t2; +select count(a),count(b) from t3; SELECT * FROM t1 FORCE INDEX (PRIMARY) LIMIT 3; SELECT * FROM t2 FORCE INDEX (PRIMARY) LIMIT 3; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace_sstfilewriter.result b/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace_sstfilewriter.result index 18365338d0c..08f2329f688 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace_sstfilewriter.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace_sstfilewriter.result @@ -14,11 +14,14 @@ select count(b) from t1; count(b) 300000 ALTER TABLE t1 ADD INDEX kb(b), ALGORITHM=INPLACE; +set @tmp= @@rocksdb_max_row_locks; +set session rocksdb_max_row_locks=1000; ALTER TABLE t1 ADD INDEX kb_copy(b), ALGORITHM=COPY; ERROR HY000: Status error 10 received from RocksDB: Operation aborted: Failed to acquire lock due to max_num_locks limit set session rocksdb_bulk_load=1; ALTER TABLE t1 ADD INDEX kb_copy(b), ALGORITHM=COPY; set session rocksdb_bulk_load=0; +set session rocksdb_max_row_locks=@tmp; SELECT COUNT(*) as c FROM (SELECT COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `b`, CONCAT(ISNULL(`b`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `t1` FORCE INDEX(`kb`) UNION DISTINCT diff --git a/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars.result b/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars.result index 5da9a7e7e1c..8cc9b070a70 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars.result @@ -140,3 +140,13 @@ SELECT * FROM t1; a b 18446744073709551613 a DROP TABLE t1; +#---------------------------------- +# Issue #792 Crash in autoincrement +#---------------------------------- +CREATE TABLE t1(C1 DOUBLE AUTO_INCREMENT KEY,C2 CHAR) ENGINE=ROCKSDB; +INSERT INTO t1 VALUES(2177,0); +DROP TABLE t1; +CREATE TABLE t0(c0 BLOB) ENGINE=ROCKSDB; +INSERT INTO t0 VALUES(0); +ALTER TABLE t0 AUTO_INCREMENT=0; +DROP TABLE t0; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter.result b/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter.result index 5f1083a1bb2..bc5d685f89b 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter.result @@ -43,6 +43,7 @@ insert t1 select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc" from seq_1_to_10000; insert t2 select * from t1; +set global rocksdb_force_flush_memtable_now=1; call bloom_start(); select count(*) from t1; count(*) @@ -443,6 +444,7 @@ insert t1 select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc" from seq_1_to_10000; insert t2 select * from t1; +set global rocksdb_force_flush_memtable_now=1; call bloom_start(); select count(*) from t1; count(*) @@ -843,6 +845,7 @@ insert t1 select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc" from seq_1_to_10000; insert t2 select * from t1; +set global rocksdb_force_flush_memtable_now=1; call bloom_start(); select count(*) from t1; count(*) @@ -1243,6 +1246,7 @@ insert t1 select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc" from seq_1_to_10000; insert t2 select * from t1; +set global rocksdb_force_flush_memtable_now=1; call bloom_start(); select count(*) from t1; count(*) @@ -1643,6 +1647,7 @@ insert t1 select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc" from seq_1_to_10000; insert t2 select * from t1; +set global rocksdb_force_flush_memtable_now=1; call bloom_start(); select count(*) from t1; count(*) diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter_skip.result b/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter_skip.result index 2496f349427..28475630564 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter_skip.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bloomfilter_skip.result @@ -43,6 +43,7 @@ insert t1 select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc" from seq_1_to_10000; insert t2 select * from t1; +set global rocksdb_force_flush_memtable_now=1; call bloom_start(); select count(*) from t1; count(*) @@ -443,6 +444,7 @@ insert t1 select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc" from seq_1_to_10000; insert t2 select * from t1; +set global rocksdb_force_flush_memtable_now=1; call bloom_start(); select count(*) from t1; count(*) @@ -843,6 +845,7 @@ insert t1 select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc" from seq_1_to_10000; insert t2 select * from t1; +set global rocksdb_force_flush_memtable_now=1; call bloom_start(); select count(*) from t1; count(*) @@ -1243,6 +1246,7 @@ insert t1 select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc" from seq_1_to_10000; insert t2 select * from t1; +set global rocksdb_force_flush_memtable_now=1; call bloom_start(); select count(*) from t1; count(*) @@ -1643,6 +1647,7 @@ insert t1 select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc" from seq_1_to_10000; insert t2 select * from t1; +set global rocksdb_force_flush_memtable_now=1; call bloom_start(); select count(*) from t1; count(*) diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result index d13ffa3ac24..21417caf760 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result @@ -38,9 +38,9 @@ LOAD DATA INFILE <input_file> INTO TABLE t3; set rocksdb_bulk_load=0; SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text test.t1 analyze status OK @@ -48,36 +48,27 @@ test.t2 analyze status OK test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N -select count(pk) from t1; -count(pk) -5000000 -select count(a) from t1; -count(a) -5000000 -select count(b) from t1; +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +select count(pk),count(a) from t1; +count(pk) count(a) +2500000 2500000 +select count(b) from t1; count(b) -5000000 -select count(pk) from t2; -count(pk) -5000000 -select count(a) from t2; -count(a) -5000000 -select count(b) from t2; +2500000 +select count(pk),count(a) from t2; +count(pk) count(a) +2500000 2500000 +select count(b) from t2; count(b) -5000000 -select count(pk) from t3; -count(pk) -5000000 -select count(a) from t3; -count(a) -5000000 -select count(b) from t3; +2500000 +select count(pk),count(a) from t3; +count(pk) count(a) +2500000 2500000 +select count(b) from t3; count(b) -5000000 +2500000 longfilenamethatvalidatesthatthiswillgetdeleted.bulk_load.tmp test.bulk_load.tmp disconnect other; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result index bb8097867c0..484c2a89c3a 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result @@ -38,9 +38,9 @@ LOAD DATA INFILE <input_file> INTO TABLE t3; set rocksdb_bulk_load=0; SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text test.t1 analyze status OK @@ -48,36 +48,27 @@ test.t2 analyze status OK test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N -select count(pk) from t1; -count(pk) -5000000 -select count(a) from t1; -count(a) -5000000 -select count(b) from t1; +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +select count(pk),count(a) from t1; +count(pk) count(a) +2500000 2500000 +select count(b) from t1; count(b) -5000000 -select count(pk) from t2; -count(pk) -5000000 -select count(a) from t2; -count(a) -5000000 -select count(b) from t2; +2500000 +select count(pk),count(a) from t2; +count(pk) count(a) +2500000 2500000 +select count(b) from t2; count(b) -5000000 -select count(pk) from t3; -count(pk) -5000000 -select count(a) from t3; -count(a) -5000000 -select count(b) from t3; +2500000 +select count(pk),count(a) from t3; +count(pk) count(a) +2500000 2500000 +select count(b) from t3; count(b) -5000000 +2500000 longfilenamethatvalidatesthatthiswillgetdeleted.bulk_load.tmp test.bulk_load.tmp disconnect other; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result index 7519796a64f..35a2845cb42 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result @@ -38,9 +38,9 @@ LOAD DATA INFILE <input_file> INTO TABLE t3; set rocksdb_bulk_load=0; SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text test.t1 analyze status OK @@ -48,36 +48,27 @@ test.t2 analyze status OK test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N -select count(pk) from t1; -count(pk) -5000000 -select count(a) from t1; -count(a) -5000000 -select count(b) from t1; +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +select count(pk),count(a) from t1; +count(pk) count(a) +2500000 2500000 +select count(b) from t1; count(b) -5000000 -select count(pk) from t2; -count(pk) -5000000 -select count(a) from t2; -count(a) -5000000 -select count(b) from t2; +2500000 +select count(pk),count(a) from t2; +count(pk) count(a) +2500000 2500000 +select count(b) from t2; count(b) -5000000 -select count(pk) from t3; -count(pk) -5000000 -select count(a) from t3; -count(a) -5000000 -select count(b) from t3; +2500000 +select count(pk),count(a) from t3; +count(pk) count(a) +2500000 2500000 +select count(b) from t3; count(b) -5000000 +2500000 longfilenamethatvalidatesthatthiswillgetdeleted.bulk_load.tmp test.bulk_load.tmp disconnect other; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result index ce6accbe664..12013539017 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result @@ -38,9 +38,9 @@ LOAD DATA INFILE <input_file> INTO TABLE t3; set rocksdb_bulk_load=0; SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text test.t1 analyze status OK @@ -48,36 +48,27 @@ test.t2 analyze status OK test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N -select count(pk) from t1; -count(pk) -5000000 -select count(a) from t1; -count(a) -5000000 -select count(b) from t1; +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +select count(pk),count(a) from t1; +count(pk) count(a) +2500000 2500000 +select count(b) from t1; count(b) -5000000 -select count(pk) from t2; -count(pk) -5000000 -select count(a) from t2; -count(a) -5000000 -select count(b) from t2; +2500000 +select count(pk),count(a) from t2; +count(pk) count(a) +2500000 2500000 +select count(b) from t2; count(b) -5000000 -select count(pk) from t3; -count(pk) -5000000 -select count(a) from t3; -count(a) -5000000 -select count(b) from t3; +2500000 +select count(pk),count(a) from t3; +count(pk) count(a) +2500000 2500000 +select count(b) from t3; count(b) -5000000 +2500000 longfilenamethatvalidatesthatthiswillgetdeleted.bulk_load.tmp test.bulk_load.tmp disconnect other; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result index 71b42a84338..444f997bf48 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result @@ -75,9 +75,9 @@ LOAD DATA INFILE <input_file> INTO TABLE t3; set rocksdb_bulk_load=0; SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t2 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t3 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text test.t1 analyze status OK @@ -85,36 +85,27 @@ test.t2 analyze status OK test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t2 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t3 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N -select count(a) from t1; -count(a) -5000000 -select count(b) from t1; -count(b) -5000000 -select count(a) from t2; -count(a) -5000000 -select count(b) from t2; -count(b) -5000000 -select count(a) from t3; -count(a) -5000000 -select count(b) from t3; -count(b) -5000000 +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N +select count(a),count(b) from t1; +count(a) count(b) +2500000 2500000 +select count(a),count(b) from t2; +count(a) count(b) +2500000 2500000 +select count(a),count(b) from t3; +count(a) count(b) +2500000 2500000 SELECT * FROM t1 FORCE INDEX (PRIMARY) LIMIT 3; a b --4999998 5000000 --4999996 4999998 --4999994 4999996 +-2499998 2500000 +-2499996 2499998 +-2499994 2499996 SELECT * FROM t2 FORCE INDEX (PRIMARY) LIMIT 3; a b -4999999 -4999997 -4999997 -4999995 -4999995 -4999993 +2499999 -2499997 +2499997 -2499995 +2499995 -2499993 disconnect other; DROP TABLE t1, t2, t3; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result index 5d224de51a6..dea69b3b089 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result @@ -75,9 +75,9 @@ LOAD DATA INFILE <input_file> INTO TABLE t3; set rocksdb_bulk_load=0; SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t2 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t3 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text test.t1 analyze status OK @@ -85,36 +85,27 @@ test.t2 analyze status OK test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t2 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t3 ROCKSDB 10 Fixed 5000000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N -select count(a) from t1; -count(a) -5000000 -select count(b) from t1; -count(b) -5000000 -select count(a) from t2; -count(a) -5000000 -select count(b) from t2; -count(b) -5000000 -select count(a) from t3; -count(a) -5000000 -select count(b) from t3; -count(b) -5000000 +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N +select count(a),count(b) from t1; +count(a) count(b) +2500000 2500000 +select count(a),count(b) from t2; +count(a) count(b) +2500000 2500000 +select count(a),count(b) from t3; +count(a) count(b) +2500000 2500000 SELECT * FROM t1 FORCE INDEX (PRIMARY) LIMIT 3; a b -4999999 -4999997 -4999997 -4999995 -4999995 -4999993 +2499999 -2499997 +2499997 -2499995 +2499995 -2499993 SELECT * FROM t2 FORCE INDEX (PRIMARY) LIMIT 3; a b --4999998 5000000 --4999996 4999998 --4999994 4999996 +-2499998 2500000 +-2499996 2499998 +-2499994 2499996 disconnect other; DROP TABLE t1, t2, t3; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/mariadb_port_fixes.result b/storage/rocksdb/mysql-test/rocksdb/r/mariadb_port_fixes.result index 98c5ebe9f4c..e9fe026120a 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/mariadb_port_fixes.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/mariadb_port_fixes.result @@ -89,3 +89,21 @@ CREATE TABLE t1 (i INT) ENGINE=RocksDB; FLUSH TABLE t1 FOR EXPORT; ERROR HY000: Storage engine ROCKSDB of the table `test`.`t1` doesn't have this option DROP TABLE t1; +# +# MDEV-16154 Server crashes in in myrocks::ha_rocksdb::load_auto_incr_value_from_inde +# +CREATE TABLE t1 (a INT) ENGINE=RocksDB; +INSERT INTO t1 VALUES (1); +ALTER TABLE t1 AUTO_INCREMENT 10; +DROP TABLE t1; +# +# MDEV-16155: UPDATE on RocksDB table with unique constraint does not work +# +CREATE TABLE t1 (a INT, b CHAR(8), UNIQUE INDEX(a)) ENGINE=RocksDB; +INSERT INTO t1 (a,b) VALUES (1,'foo'),(2,'bar'); +UPDATE t1 SET a=a+100; +SELECT * FROM t1; +a b +101 foo +102 bar +DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/add_index_inplace_sstfilewriter.test b/storage/rocksdb/mysql-test/rocksdb/t/add_index_inplace_sstfilewriter.test index 3977b38d725..5eac8595f7b 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/add_index_inplace_sstfilewriter.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/add_index_inplace_sstfilewriter.test @@ -66,12 +66,15 @@ ALTER TABLE t1 ADD INDEX kb(b), ALGORITHM=INPLACE; --disable_warnings # now do same index using copy algorithm # hitting max row locks (1M) +set @tmp= @@rocksdb_max_row_locks; +set session rocksdb_max_row_locks=1000; --error ER_RDB_STATUS_GENERAL ALTER TABLE t1 ADD INDEX kb_copy(b), ALGORITHM=COPY; set session rocksdb_bulk_load=1; ALTER TABLE t1 ADD INDEX kb_copy(b), ALGORITHM=COPY; set session rocksdb_bulk_load=0; --enable_warnings +set session rocksdb_max_row_locks=@tmp; # checksum testing SELECT COUNT(*) as c FROM diff --git a/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars.test b/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars.test index b8968590155..9d7f0365d07 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars.test @@ -103,3 +103,16 @@ SHOW CREATE TABLE t1; INSERT INTO t1 VALUES (NULL, 'c'); SELECT * FROM t1; DROP TABLE t1; + +--echo #---------------------------------- +--echo # Issue #792 Crash in autoincrement +--echo #---------------------------------- + +CREATE TABLE t1(C1 DOUBLE AUTO_INCREMENT KEY,C2 CHAR) ENGINE=ROCKSDB; +INSERT INTO t1 VALUES(2177,0); +DROP TABLE t1; + +CREATE TABLE t0(c0 BLOB) ENGINE=ROCKSDB; +INSERT INTO t0 VALUES(0); +ALTER TABLE t0 AUTO_INCREMENT=0; +DROP TABLE t0; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/bloomfilter_load_select.inc b/storage/rocksdb/mysql-test/rocksdb/t/bloomfilter_load_select.inc index 5c122d6bd19..cf8b26847f0 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/bloomfilter_load_select.inc +++ b/storage/rocksdb/mysql-test/rocksdb/t/bloomfilter_load_select.inc @@ -5,6 +5,7 @@ insert t1 select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc" from seq_1_to_10000; insert t2 select * from t1; +set global rocksdb_force_flush_memtable_now=1; # BF conditions (prefix short(4B)|medium(20B)|long(240B)) #0 no eq condition (o, x, x) diff --git a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def index 47005c1baff..3b9726986f0 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def +++ b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def @@ -70,7 +70,6 @@ blind_delete_without_tx_api: MDEV-12286: rocksdb.blind_delete_without_tx_api tes unique_check: wrong error number autoinc_vars_thread: debug sync point wait timed out information_schema: MDEV-14372: unstable testcase -bloomfilter: MDEV-14562 ## ## Tests that fail for some other reason diff --git a/storage/rocksdb/mysql-test/rocksdb/t/mariadb_port_fixes.test b/storage/rocksdb/mysql-test/rocksdb/t/mariadb_port_fixes.test index 681e3d2d63f..7282ec237c2 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/mariadb_port_fixes.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/mariadb_port_fixes.test @@ -83,3 +83,21 @@ CREATE TABLE t1 (i INT) ENGINE=RocksDB; FLUSH TABLE t1 FOR EXPORT; DROP TABLE t1; +--echo # +--echo # MDEV-16154 Server crashes in in myrocks::ha_rocksdb::load_auto_incr_value_from_inde +--echo # +CREATE TABLE t1 (a INT) ENGINE=RocksDB; +INSERT INTO t1 VALUES (1); +ALTER TABLE t1 AUTO_INCREMENT 10; + +DROP TABLE t1; + +--echo # +--echo # MDEV-16155: UPDATE on RocksDB table with unique constraint does not work +--echo # +CREATE TABLE t1 (a INT, b CHAR(8), UNIQUE INDEX(a)) ENGINE=RocksDB; +INSERT INTO t1 (a,b) VALUES (1,'foo'),(2,'bar'); +UPDATE t1 SET a=a+100; +SELECT * FROM t1; +DROP TABLE t1; + |