diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-06-03 20:24:51 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-06-03 20:24:51 +0200 |
commit | 7b05650c7d78e1ae446c982811a6bb2684ba9da2 (patch) | |
tree | f19d7dcbab5abf8822040335d0814f3af43f01da /storage | |
parent | e500c471d7c5289447281f97f29b44ecb98f9d2c (diff) | |
parent | b6089fb3cd930fcc71964dc8a1796365de52d0cc (diff) | |
download | mariadb-git-7b05650c7d78e1ae446c982811a6bb2684ba9da2.tar.gz |
Merge tag 'tokudb-engine/tokudb-7.5.7' into 5.5
Diffstat (limited to 'storage')
13 files changed, 105 insertions, 74 deletions
diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index 1f72e51b242..b4e2c1a311e 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -6207,6 +6207,12 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) { if (error) { goto cleanup; } thd_set_ha_data(thd, tokudb_hton, trx); } + + if (tokudb_debug & TOKUDB_DEBUG_TXN) { + TOKUDB_HANDLER_TRACE("trx %p %p %p %p %u %u", trx->all, trx->stmt, trx->sp_level, trx->sub_sp_level, + trx->tokudb_lock_count, trx->create_lock_count); + } + if (trx->all == NULL) { trx->sp_level = NULL; } @@ -6215,22 +6221,16 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) { if (lock_type == F_WRLCK) { use_write_locks = true; } - if (!trx->tokudb_lock_count++) { - if (trx->stmt) { - if (tokudb_debug & TOKUDB_DEBUG_TXN) { - TOKUDB_HANDLER_TRACE("stmt already set %p %p %p %p", trx->all, trx->stmt, trx->sp_level, trx->sub_sp_level); - } - } else { - assert(trx->stmt == 0); - transaction = NULL; // Safety - error = create_txn(thd, trx); - if (error) { - trx->tokudb_lock_count--; // We didn't get the lock - goto cleanup; - } + if (!trx->stmt) { + transaction = NULL; // Safety + error = create_txn(thd, trx); + if (error) { + goto cleanup; } + trx->create_lock_count = trx->tokudb_lock_count; } transaction = trx->sub_sp_level; + trx->tokudb_lock_count++; } else { tokudb_pthread_mutex_lock(&share->mutex); @@ -6245,21 +6245,24 @@ int ha_tokudb::external_lock(THD * thd, int lock_type) { added_rows = 0; deleted_rows = 0; share->rows_from_locked_table = 0; - if (trx->tokudb_lock_count > 0 && !--trx->tokudb_lock_count) { - if (trx->stmt) { - /* - F_UNLCK is done without a transaction commit / rollback. - This happens if the thread didn't update any rows - We must in this case commit the work to keep the row locks - */ - DBUG_PRINT("trans", ("commiting non-updating transaction")); - reset_stmt_progress(&trx->stmt_progress); - commit_txn(trx->stmt, 0); - trx->stmt = NULL; - trx->sub_sp_level = NULL; + if (trx->tokudb_lock_count > 0) { + if (--trx->tokudb_lock_count <= trx->create_lock_count) { + trx->create_lock_count = 0; + if (trx->stmt) { + /* + F_UNLCK is done without a transaction commit / rollback. + This happens if the thread didn't update any rows + We must in this case commit the work to keep the row locks + */ + DBUG_PRINT("trans", ("commiting non-updating transaction")); + reset_stmt_progress(&trx->stmt_progress); + commit_txn(trx->stmt, 0); + trx->stmt = NULL; + trx->sub_sp_level = NULL; + } } + transaction = NULL; } - transaction = NULL; } cleanup: if (tokudb_debug & TOKUDB_DEBUG_LOCK) @@ -6274,8 +6277,9 @@ cleanup: */ int ha_tokudb::start_stmt(THD * thd, thr_lock_type lock_type) { TOKUDB_HANDLER_DBUG_ENTER("cmd %d lock %d %s", thd_sql_command(thd), lock_type, share->table_name); - if (0) + if (tokudb_debug & TOKUDB_DEBUG_LOCK) { TOKUDB_HANDLER_TRACE("q %s", thd->query()); + } int error = 0; tokudb_trx_data *trx = (tokudb_trx_data *) thd_get_ha_data(thd, tokudb_hton); @@ -6285,6 +6289,11 @@ int ha_tokudb::start_stmt(THD * thd, thr_lock_type lock_type) { thd_set_ha_data(thd, tokudb_hton, trx); } + if (tokudb_debug & TOKUDB_DEBUG_TXN) { + TOKUDB_HANDLER_TRACE("trx %p %p %p %p %u %u", trx->all, trx->stmt, trx->sp_level, trx->sub_sp_level, + trx->tokudb_lock_count, trx->create_lock_count); + } + /* note that trx->stmt may have been already initialized as start_stmt() is called for *each table* not for each storage engine, @@ -6295,9 +6304,7 @@ int ha_tokudb::start_stmt(THD * thd, thr_lock_type lock_type) { if (error) { goto cleanup; } - if (tokudb_debug & TOKUDB_DEBUG_TXN) { - TOKUDB_HANDLER_TRACE("%p %p %p %p %u", trx->all, trx->stmt, trx->sp_level, trx->sub_sp_level, trx->tokudb_lock_count); - } + trx->create_lock_count = trx->tokudb_lock_count; } else { if (tokudb_debug & TOKUDB_DEBUG_TXN) { diff --git a/storage/tokudb/ha_tokudb_admin.cc b/storage/tokudb/ha_tokudb_admin.cc index b109cd1b976..42205c6d6be 100644 --- a/storage/tokudb/ha_tokudb_admin.cc +++ b/storage/tokudb/ha_tokudb_admin.cc @@ -121,9 +121,10 @@ static int analyze_progress(void *v_extra, uint64_t rows) { progress_time = (float) (t_now - t_start) / (float) t_limit; char *write_status_msg = extra->write_status_msg; TABLE_SHARE *table_share = extra->table_share; - sprintf(write_status_msg, "%s.%s.%s %u of %u %.lf%% rows %.lf%% time", - table_share->db.str, table_share->table_name.str, extra->key_name, - extra->key_i, table_share->keys, progress_rows * 100.0, progress_time * 100.0); + sprintf(write_status_msg, "%.*s.%.*s.%s %u of %u %.lf%% rows %.lf%% time", + (int) table_share->db.length, table_share->db.str, + (int) table_share->table_name.length, table_share->table_name.str, + extra->key_name, extra->key_i, table_share->keys, progress_rows * 100.0, progress_time * 100.0); thd_proc_info(thd, write_status_msg); return 0; } @@ -338,8 +339,10 @@ static int ha_tokudb_check_progress(void *extra, float progress) { static void ha_tokudb_check_info(THD *thd, TABLE *table, const char *msg) { if (thd->vio_ok()) { - char tablename[256]; - snprintf(tablename, sizeof tablename, "%s.%s", table->s->db.str, table->s->table_name.str); + char tablename[table->s->db.length + 1 + table->s->table_name.length + 1]; + snprintf(tablename, sizeof tablename, "%.*s.%.*s", + (int) table->s->db.length, table->s->db.str, + (int) table->s->table_name.length, table->s->table_name.str); thd->protocol->prepare_for_resend(); thd->protocol->store(tablename, strlen(tablename), system_charset_info); thd->protocol->store("check", 5, system_charset_info); @@ -388,6 +391,11 @@ int ha_tokudb::check(THD *thd, HA_CHECK_OPT *check_opt) { } struct check_context check_context = { thd }; r = db->verify_with_progress(db, ha_tokudb_check_progress, &check_context, (tokudb_debug & TOKUDB_DEBUG_CHECK) != 0, keep_going); + if (r != 0) { + char msg[32 + strlen(kname)]; + sprintf(msg, "Corrupt %s", kname); + ha_tokudb_check_info(thd, table, msg); + } snprintf(write_status_msg, sizeof write_status_msg, "%s key=%s %u result=%d", share->table_name, kname, i, r); thd_proc_info(thd, write_status_msg); if (tokudb_debug & TOKUDB_DEBUG_CHECK) { diff --git a/storage/tokudb/ha_tokudb_alter_56.cc b/storage/tokudb/ha_tokudb_alter_56.cc index cae50446fa0..213b58459bc 100644 --- a/storage/tokudb/ha_tokudb_alter_56.cc +++ b/storage/tokudb/ha_tokudb_alter_56.cc @@ -784,13 +784,16 @@ bool ha_tokudb::commit_inplace_alter_table(TABLE *altered_table, Alter_inplace_i assert(trx->tokudb_lock_count > 0); // for partitioned tables, we use a single transaction to do all of the partition changes. the tokudb_lock_count // is a reference count for each of the handlers to the same transaction. obviously, we want to only abort once. - if (!--trx->tokudb_lock_count) { - abort_txn(ctx->alter_txn); - ctx->alter_txn = NULL; - trx->stmt = NULL; - trx->sub_sp_level = NULL; + if (trx->tokudb_lock_count > 0) { + if (--trx->tokudb_lock_count <= trx->create_lock_count) { + trx->create_lock_count = 0; + abort_txn(ctx->alter_txn); + ctx->alter_txn = NULL; + trx->stmt = NULL; + trx->sub_sp_level = NULL; + } + transaction = NULL; } - transaction = NULL; if (ctx->add_index_changed) { restore_add_index(table, ha_alter_info->index_add_count, ctx->incremented_num_DBs, ctx->modified_DBs); diff --git a/storage/tokudb/hatoku_defines.h b/storage/tokudb/hatoku_defines.h index 1889b48224b..862c8f3cf23 100644 --- a/storage/tokudb/hatoku_defines.h +++ b/storage/tokudb/hatoku_defines.h @@ -355,6 +355,7 @@ typedef struct st_tokudb_trx_data { DB_TXN *sp_level; DB_TXN *sub_sp_level; uint tokudb_lock_count; + uint create_lock_count; tokudb_stmt_progress stmt_progress; bool checkpoint_lock_taken; LIST *handlers; diff --git a/storage/tokudb/hatoku_hton.cc b/storage/tokudb/hatoku_hton.cc index c268780dd2a..6c6794b05a0 100644 --- a/storage/tokudb/hatoku_hton.cc +++ b/storage/tokudb/hatoku_hton.cc @@ -1724,6 +1724,8 @@ static int tokudb_fractal_tree_info(TABLE *table, THD *thd) { error = tmp_cursor->c_get(tmp_cursor, &curr_key, &curr_val, DB_NEXT); if (!error) { error = tokudb_report_fractal_tree_info_for_db(&curr_key, &curr_val, table, thd); + if (error) + error = 0; // ignore read uncommitted errors } if (!error && thd_killed(thd)) error = ER_QUERY_INTERRUPTED; @@ -2002,7 +2004,9 @@ struct tokudb_search_txn_extra { uint64_t match_client_id; }; -static int tokudb_search_txn_callback(uint64_t txn_id, uint64_t client_id, iterate_row_locks_callback iterate_locks, void *locks_extra, void *extra) { +static int tokudb_search_txn_callback(DB_TXN *txn, iterate_row_locks_callback iterate_locks, void *locks_extra, void *extra) { + uint64_t txn_id = txn->id64(txn); + uint64_t client_id = txn->get_client_id(txn); struct tokudb_search_txn_extra *e = reinterpret_cast<struct tokudb_search_txn_extra *>(extra); if (e->match_txn_id == txn_id) { e->match_found = true; @@ -2134,6 +2138,7 @@ static struct st_mysql_information_schema tokudb_trx_information_schema = { MYSQ static ST_FIELD_INFO tokudb_trx_field_info[] = { {"trx_id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, {"trx_mysql_thread_id", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, + {"trx_time", 0, MYSQL_TYPE_LONGLONG, 0, 0, NULL, SKIP_OPEN_TABLE }, {NULL, 0, MYSQL_TYPE_NULL, 0, 0, NULL, SKIP_OPEN_TABLE} }; @@ -2142,12 +2147,17 @@ struct tokudb_trx_extra { TABLE *table; }; -static int tokudb_trx_callback(uint64_t txn_id, uint64_t client_id, iterate_row_locks_callback iterate_locks, void *locks_extra, void *extra) { +static int tokudb_trx_callback(DB_TXN *txn, iterate_row_locks_callback iterate_locks, void *locks_extra, void *extra) { + uint64_t txn_id = txn->id64(txn); + uint64_t client_id = txn->get_client_id(txn); + uint64_t start_time = txn->get_start_time(txn); struct tokudb_trx_extra *e = reinterpret_cast<struct tokudb_trx_extra *>(extra); THD *thd = e->thd; TABLE *table = e->table; table->field[0]->store(txn_id, false); table->field[1]->store(client_id, false); + uint64_t tnow = (uint64_t) time(NULL); + table->field[2]->store(tnow >= start_time ? tnow - start_time : 0, false); int error = schema_table_store_record(thd, table); if (!error && thd_killed(thd)) error = ER_QUERY_INTERRUPTED; @@ -2295,7 +2305,9 @@ struct tokudb_locks_extra { TABLE *table; }; -static int tokudb_locks_callback(uint64_t txn_id, uint64_t client_id, iterate_row_locks_callback iterate_locks, void *locks_extra, void *extra) { +static int tokudb_locks_callback(DB_TXN *txn, iterate_row_locks_callback iterate_locks, void *locks_extra, void *extra) { + uint64_t txn_id = txn->id64(txn); + uint64_t client_id = txn->get_client_id(txn); struct tokudb_locks_extra *e = reinterpret_cast<struct tokudb_locks_extra *>(extra); THD *thd = e->thd; TABLE *table = e->table; diff --git a/storage/tokudb/mysql-test/tokudb/r/i_s_tokudb_lock_waits_released.result b/storage/tokudb/mysql-test/tokudb/r/i_s_tokudb_lock_waits_released.result index 018900c7b98..190581eddae 100644 --- a/storage/tokudb/mysql-test/tokudb/r/i_s_tokudb_lock_waits_released.result +++ b/storage/tokudb/mysql-test/tokudb/r/i_s_tokudb_lock_waits_released.result @@ -2,7 +2,7 @@ set default_storage_engine='tokudb'; set tokudb_prelock_empty=false; drop table if exists t; create table t (id int primary key); -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; trx_id trx_mysql_thread_id select * from information_schema.tokudb_locks; locks_trx_id locks_mysql_thread_id locks_dname locks_key_left locks_key_right locks_table_schema locks_table_name locks_table_dictionary_name @@ -19,7 +19,7 @@ TRX_ID MYSQL_ID ./test/t-main 0001000000 0001000000 test t main select * from information_schema.tokudb_lock_waits; requesting_trx_id blocking_trx_id lock_waits_dname lock_waits_key_left lock_waits_key_right lock_waits_start_time lock_waits_table_schema lock_waits_table_name lock_waits_table_dictionary_name REQUEST_TRX_ID BLOCK_TRX_ID ./test/t-main 0001000000 0001000000 LOCK_WAITS_START_TIME test t main -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; trx_id trx_mysql_thread_id TRX_ID MYSQL_ID TRX_ID MYSQL_ID @@ -31,7 +31,7 @@ select * from information_schema.tokudb_lock_waits; requesting_trx_id blocking_trx_id lock_waits_dname lock_waits_key_left lock_waits_key_right lock_waits_start_time lock_waits_table_schema lock_waits_table_name lock_waits_table_dictionary_name ERROR 23000: Duplicate entry '1' for key 'PRIMARY' commit; -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; trx_id trx_mysql_thread_id select * from information_schema.tokudb_locks; locks_trx_id locks_mysql_thread_id locks_dname locks_key_left locks_key_right locks_table_schema locks_table_name locks_table_dictionary_name @@ -48,7 +48,7 @@ TRX_ID MYSQL_ID ./test/t-main 0001000000 0001000000 test t main select * from information_schema.tokudb_lock_waits; requesting_trx_id blocking_trx_id lock_waits_dname lock_waits_key_left lock_waits_key_right lock_waits_start_time lock_waits_table_schema lock_waits_table_name lock_waits_table_dictionary_name REQUEST_TRX_ID BLOCK_TRX_ID ./test/t-main 0001000000 0001000000 LOCK_WAITS_START_TIME test t main -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; trx_id trx_mysql_thread_id TRX_ID MYSQL_ID TRX_ID MYSQL_ID @@ -59,7 +59,7 @@ TRX_ID MYSQL_ID ./test/t-main 0001000000 0001000000 test t main select * from information_schema.tokudb_lock_waits; requesting_trx_id blocking_trx_id lock_waits_dname lock_waits_key_left lock_waits_key_right lock_waits_start_time lock_waits_table_schema lock_waits_table_name lock_waits_table_dictionary_name commit; -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; trx_id trx_mysql_thread_id select * from information_schema.tokudb_locks; locks_trx_id locks_mysql_thread_id locks_dname locks_key_left locks_key_right locks_table_schema locks_table_name locks_table_dictionary_name diff --git a/storage/tokudb/mysql-test/tokudb/r/i_s_tokudb_lock_waits_timeout.result b/storage/tokudb/mysql-test/tokudb/r/i_s_tokudb_lock_waits_timeout.result index b9fca50b507..13cdad7a438 100644 --- a/storage/tokudb/mysql-test/tokudb/r/i_s_tokudb_lock_waits_timeout.result +++ b/storage/tokudb/mysql-test/tokudb/r/i_s_tokudb_lock_waits_timeout.result @@ -2,7 +2,7 @@ set default_storage_engine='tokudb'; set tokudb_prelock_empty=false; drop table if exists t; create table t (id int primary key); -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; trx_id trx_mysql_thread_id select * from information_schema.tokudb_locks; locks_trx_id locks_mysql_thread_id locks_dname locks_key_left locks_key_right locks_table_schema locks_table_name locks_table_dictionary_name @@ -19,7 +19,7 @@ TRX_ID MYSQL_ID ./test/t-main 0001000000 0001000000 test t main select * from information_schema.tokudb_lock_waits; requesting_trx_id blocking_trx_id lock_waits_dname lock_waits_key_left lock_waits_key_right lock_waits_start_time lock_waits_table_schema lock_waits_table_name lock_waits_table_dictionary_name REQUEST_TRX_ID BLOCK_TRX_ID ./test/t-main 0001000000 0001000000 LOCK_WAITS_START_TIME test t main -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; trx_id trx_mysql_thread_id TRX_ID MYSQL_ID TRX_ID MYSQL_ID @@ -30,7 +30,7 @@ select * from information_schema.tokudb_lock_waits; requesting_trx_id blocking_trx_id lock_waits_dname lock_waits_key_left lock_waits_key_right lock_waits_start_time lock_waits_table_schema lock_waits_table_name lock_waits_table_dictionary_name ERROR HY000: Lock wait timeout exceeded; try restarting transaction commit; -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; trx_id trx_mysql_thread_id select * from information_schema.tokudb_locks; locks_trx_id locks_mysql_thread_id locks_dname locks_key_left locks_key_right locks_table_schema locks_table_name locks_table_dictionary_name diff --git a/storage/tokudb/mysql-test/tokudb/r/i_s_tokudb_trx.result b/storage/tokudb/mysql-test/tokudb/r/i_s_tokudb_trx.result index e4c1adcca19..63e4816e16e 100644 --- a/storage/tokudb/mysql-test/tokudb/r/i_s_tokudb_trx.result +++ b/storage/tokudb/mysql-test/tokudb/r/i_s_tokudb_trx.result @@ -1,23 +1,23 @@ set default_storage_engine='tokudb'; set tokudb_prelock_empty=false; drop table if exists t; -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; trx_id trx_mysql_thread_id set autocommit=0; create table t (id int primary key); insert into t values (1); -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; trx_id trx_mysql_thread_id TXN_ID_DEFAULT CLIENT_ID_DEFAULT commit; -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; trx_id trx_mysql_thread_id set autocommit=0; insert into t values (2); -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; trx_id trx_mysql_thread_id TXN_ID_A CLIENT_ID_A commit; -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; trx_id trx_mysql_thread_id drop table t; diff --git a/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_released.test b/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_released.test index c4f9ccefe5c..0f712000527 100644 --- a/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_released.test +++ b/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_released.test @@ -13,7 +13,7 @@ create table t (id int primary key); # verify that txn_a insert (1) blocks txn_b insert (1) and txn_b gets a duplicate key error # should be empty -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; select * from information_schema.tokudb_locks; select * from information_schema.tokudb_lock_waits; @@ -43,7 +43,7 @@ select * from information_schema.tokudb_lock_waits; # should find the presence of two transactions replace_column 1 TRX_ID 2 MYSQL_ID; -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; connection conn_a; commit; @@ -66,7 +66,7 @@ disconnect conn_b; # verify that the lock on the 2nd transaction has been released # should be be empty -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; select * from information_schema.tokudb_locks; select * from information_schema.tokudb_lock_waits; @@ -96,7 +96,7 @@ select * from information_schema.tokudb_lock_waits; # should find the presence of two transactions replace_column 1 TRX_ID 2 MYSQL_ID; -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; connection conn_a; commit; @@ -116,7 +116,7 @@ disconnect conn_b; # verify that the lock on the 2nd transaction has been released # should be be empty -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; select * from information_schema.tokudb_locks; select * from information_schema.tokudb_lock_waits; diff --git a/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_timeout.test b/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_timeout.test index 75929fa3b3d..3011443fa04 100644 --- a/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_timeout.test +++ b/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_timeout.test @@ -10,7 +10,7 @@ enable_warnings; create table t (id int primary key); # should be empty -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; select * from information_schema.tokudb_locks; select * from information_schema.tokudb_lock_waits; @@ -40,7 +40,7 @@ select * from information_schema.tokudb_lock_waits; # should find the presence of two transactions replace_column 1 TRX_ID 2 MYSQL_ID; -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; connection conn_a; sleep 5; # sleep longer than the lock timer to force a lock timeout on txn_b @@ -61,7 +61,7 @@ disconnect conn_a; disconnect conn_b; # should be be empty -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; select * from information_schema.tokudb_locks; select * from information_schema.tokudb_lock_waits; diff --git a/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_trx.test b/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_trx.test index b1d5c7e5009..d3c2636ba54 100644 --- a/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_trx.test +++ b/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_trx.test @@ -8,7 +8,7 @@ drop table if exists t; enable_warnings; # should be empty -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; # should have my txn let $default_id=`select connection_id()`; @@ -16,11 +16,11 @@ set autocommit=0; create table t (id int primary key); insert into t values (1); replace_column 1 TXN_ID_DEFAULT 2 CLIENT_ID_DEFAULT; -eval select * from information_schema.tokudb_trx; +eval select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; # should be empty commit; -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; connect(conn_a,localhost,root,,); let a_id=`select connection_id()`; @@ -29,13 +29,13 @@ insert into t values (2); connection default; replace_column 1 TXN_ID_A 2 CLIENT_ID_A; -eval select * from information_schema.tokudb_trx; +eval select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; connection conn_a; commit; connection default; # should be empty -select * from information_schema.tokudb_trx; +select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx; disconnect conn_a; diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/tokudb718.result b/storage/tokudb/mysql-test/tokudb_bugs/r/tokudb718.result index 8814f8ac8e7..0cf75d40847 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/r/tokudb718.result +++ b/storage/tokudb/mysql-test/tokudb_bugs/r/tokudb718.result @@ -3,7 +3,8 @@ drop table if exists t; create table t (id int primary key); begin; insert into t values (1),(2); -select * from information_schema.tokudb_fractal_tree_info; -ERROR HY000: Got error -30994 from storage engine +select dictionary_name from information_schema.tokudb_fractal_tree_info; +dictionary_name +./test/t-status commit; drop table t; diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/tokudb718.test b/storage/tokudb/mysql-test/tokudb_bugs/t/tokudb718.test index 415bb7a2332..735a88afed8 100644 --- a/storage/tokudb/mysql-test/tokudb_bugs/t/tokudb718.test +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/tokudb718.test @@ -7,7 +7,6 @@ enable_warnings; create table t (id int primary key); begin; insert into t values (1),(2); ---error 1030 -select * from information_schema.tokudb_fractal_tree_info; +select dictionary_name from information_schema.tokudb_fractal_tree_info; commit; drop table t; |