diff options
author | Igor Babaev <igor@askmonty.org> | 2012-12-12 23:16:54 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2012-12-12 23:16:54 -0800 |
commit | 65820439bdafeead66496b489c076012c334c710 (patch) | |
tree | ba5134a5674e237eb510a6b10a1a7cac28ec9f26 /mysql-test/r/stat_tables_par_innodb.result | |
parent | 109c104d07c6cce68ecae66c1a4dcdb83826954f (diff) | |
download | mariadb-git-65820439bdafeead66496b489c076012c334c710.tar.gz |
Fixed bug mdev-3891.
If a query referenced some system statistical tables, but not all of them,
then executing an ANALYZE command simultaneously with this query could
lead to a deadlock.
The fix prohibited reading statistics from system statistical tables
for such queries.
Removed the function unlock_tables_n_open_system_tables_for_write()
as not used anymore.
Performed some minor refactoring of the code in sql_statistics.cc.
Diffstat (limited to 'mysql-test/r/stat_tables_par_innodb.result')
-rw-r--r-- | mysql-test/r/stat_tables_par_innodb.result | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/r/stat_tables_par_innodb.result b/mysql-test/r/stat_tables_par_innodb.result index 9ef67245c8c..ff1a296e5af 100644 --- a/mysql-test/r/stat_tables_par_innodb.result +++ b/mysql-test/r/stat_tables_par_innodb.result @@ -211,6 +211,21 @@ dbt3_s001 lineitem i_l_shipdate 1 2.6496 dbt3_s001 lineitem i_l_suppkey 1 600.4000 dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0200 dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5771 +set @save_global_use_stat_tables=@@global.use_stat_tables; +set global use_stat_tables='preferably'; +set debug_sync='RESET'; +set debug_sync='statistics_update_start SIGNAL parker WAIT_FOR go1 EXECUTE 1'; +set debug_sync='thr_multi_lock_after_thr_lock SIGNAL go2 EXECUTE 2'; +use dbt3_s001; +analyze table lineitem persistent for all; +set debug_sync='open_and_process_table WAIT_FOR parker'; +set debug_sync='statistics_read_start SIGNAL go1 WAIT_FOR go2'; +use dbt3_s001; +select * from mysql.index_stats, lineitem where index_name= 'i_l_shipdate' and l_orderkey=1 and l_partkey=68; +db_name table_name index_name prefix_arity avg_frequency l_orderkey l_partkey l_suppkey l_linenumber l_quantity l_extendedprice l_discount l_tax l_returnflag l_linestatus l_shipDATE l_commitDATE l_receiptDATE l_shipinstruct l_shipmode l_comment +dbt3_s001 lineitem i_l_shipdate 1 2.6496 1 68 9 2 36 34850.16 0.09 0.06 N O 1996-04-12 1996-02-28 1996-04-20 TAKE BACK RETURN MAIL slyly bold pinto beans detect s +set debug_sync='RESET'; +set global use_stat_tables=@save_global_use_stat_tables; DROP DATABASE dbt3_s001; use test; set use_stat_tables=@save_use_stat_tables; |