Linux ip-172-26-2-223 5.4.0-1018-aws #18-Ubuntu SMP Wed Jun 24 01:15:00 UTC 2020 x86_64
Apache
: 172.26.2.223 | : 3.147.8.67
Cant Read [ /etc/named.conf ]
8.1.13
www
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
www /
server /
mysql /
mysql-test /
r /
[ HOME SHELL ]
Name
Size
Permission
Action
1st.result
597
B
-rw-r--r--
acl_tables_errors_debug.result
8.93
KB
-rw-r--r--
alias.result
13.58
KB
-rw-r--r--
almost_full.result
1.11
KB
-rw-r--r--
alter_table-big.result
5.45
KB
-rw-r--r--
alter_table.result
154.41
KB
-rw-r--r--
analyze.result
3.69
KB
-rw-r--r--
ansi.result
1.92
KB
-rw-r--r--
archive-big.result
616
B
-rw-r--r--
archive.result
525.18
KB
-rw-r--r--
archive_bitfield.result
4.26
KB
-rw-r--r--
archive_debug.result
355
B
-rw-r--r--
archive_gis.result
25.98
KB
-rw-r--r--
archive_no_symlink.result
882
B
-rw-r--r--
archive_plugin.result
531
B
-rw-r--r--
archive_symlink.result
2.3
KB
-rw-r--r--
auth_rpl.result
1.85
KB
-rw-r--r--
auto_increment.result
12.11
KB
-rw-r--r--
backup.result
4.29
KB
-rw-r--r--
bench_count_distinct.result
557
B
-rw-r--r--
big_test.require
17
B
-rw-r--r--
bigint.result
23.33
KB
-rw-r--r--
binary.result
6.09
KB
-rw-r--r--
binary_to_hex.result
5.87
KB
-rw-r--r--
binlog_tx_isolation.result
1.71
KB
-rw-r--r--
blackhole.result
613
B
-rw-r--r--
blackhole_plugin.result
565
B
-rw-r--r--
bool.result
2.67
KB
-rw-r--r--
bootstrap.result
525
B
-rw-r--r--
bug12368203.result
2.77
KB
-rw-r--r--
bug12427262.result
1.86
KB
-rw-r--r--
bug12969156.result
952
B
-rw-r--r--
bug17076131.result
322
B
-rw-r--r--
bug33509.result
2.31
KB
-rw-r--r--
bug39022.result
1.2
KB
-rw-r--r--
bug46080.result
669
B
-rw-r--r--
bug46261.result
353
B
-rw-r--r--
bug46760.result
1.26
KB
-rw-r--r--
bug47671.result
287
B
-rw-r--r--
bug58669.result
480
B
-rw-r--r--
bulk_replace.result
281
B
-rw-r--r--
cache_innodb.result
6.96
KB
-rw-r--r--
case.result
10.63
KB
-rw-r--r--
case_insensitive_file_system.r...
46
B
-rw-r--r--
case_sensitive_file_system.req...
47
B
-rw-r--r--
cast.result
16.27
KB
-rw-r--r--
change_user.result
2.82
KB
-rw-r--r--
charset.result
2.14
KB
-rw-r--r--
check.result
2.05
KB
-rw-r--r--
check_auto_permission.result
261
B
-rw-r--r--
check_var_limit.require
8
B
-rw-r--r--
client_xml.result
2.38
KB
-rw-r--r--
comment_column.result
141.21
KB
-rw-r--r--
comment_column2.result
355.68
KB
-rw-r--r--
comment_index.result
173.32
KB
-rw-r--r--
comment_table.result
28.95
KB
-rw-r--r--
comments.result
2.34
KB
-rw-r--r--
commit.result
14.83
KB
-rw-r--r--
commit_1innodb.result
19.59
KB
-rw-r--r--
compare.result
5.07
KB
-rw-r--r--
compress.result
66.24
KB
-rw-r--r--
concurrent_innodb_safelog.resu...
32.01
KB
-rw-r--r--
concurrent_innodb_unsafelog.re...
31.74
KB
-rw-r--r--
condition_filter.result
2.17
KB
-rw-r--r--
connect.result
11.02
KB
-rw-r--r--
connect_debug.result
1.46
KB
-rw-r--r--
consistent_snapshot.result
1.14
KB
-rw-r--r--
constraints.result
2.56
KB
-rw-r--r--
count_distinct.result
8.04
KB
-rw-r--r--
count_distinct2.result
2.21
KB
-rw-r--r--
count_distinct3.result
278
B
-rw-r--r--
create-big.result
7.6
KB
-rw-r--r--
create.result
71.42
KB
-rw-r--r--
create_not_windows.result
961
B
-rw-r--r--
create_select_tmp.result
846
B
-rw-r--r--
create_w_max_indexes_64.result
84.46
KB
-rw-r--r--
csv.result
59.08
KB
-rw-r--r--
csv_alter_table.result
1.17
KB
-rw-r--r--
csv_not_null.result
1.93
KB
-rw-r--r--
ctype_ascii.result
2.5
KB
-rw-r--r--
ctype_big5.result
34.28
KB
-rw-r--r--
ctype_binary.result
82.78
KB
-rw-r--r--
ctype_collate.result
18.3
KB
-rw-r--r--
ctype_cp1250_ch.result
22.29
KB
-rw-r--r--
ctype_cp1251.result
96.48
KB
-rw-r--r--
ctype_cp932.result
996
B
-rw-r--r--
ctype_cp932_binlog_row.result
734
B
-rw-r--r--
ctype_cp932_binlog_stm.result
251.36
KB
-rw-r--r--
ctype_create.result
3.12
KB
-rw-r--r--
ctype_errors.result
1.66
KB
-rw-r--r--
ctype_eucjpms.result
400.48
KB
-rw-r--r--
ctype_euckr.result
435.54
KB
-rw-r--r--
ctype_filename.result
324
B
-rw-r--r--
ctype_filesystem.result
341
B
-rw-r--r--
ctype_gb18030.result
69.33
KB
-rw-r--r--
ctype_gb18030_binlog.result
909
B
-rw-r--r--
ctype_gb18030_conversion.resul...
1.17
MB
-rw-r--r--
ctype_gb18030_encoding_cn.resu...
41.39
KB
-rw-r--r--
ctype_gb18030_encoding_utf8.re...
40.64
KB
-rw-r--r--
ctype_gb18030_ligatures.result
24.81
KB
-rw-r--r--
ctype_gb2312.result
33.73
KB
-rw-r--r--
ctype_gbk.result
50.07
KB
-rw-r--r--
ctype_gbk_binlog.result
633
B
-rw-r--r--
ctype_hebrew.result
254
B
-rw-r--r--
ctype_latin1.result
119.29
KB
-rw-r--r--
ctype_latin1_de.result
15.74
KB
-rw-r--r--
ctype_latin2.result
13.71
KB
-rw-r--r--
ctype_latin2_ch.result
25.11
KB
-rw-r--r--
ctype_ldml.result
28.13
KB
-rw-r--r--
ctype_like_range.result
80.89
KB
-rw-r--r--
ctype_many.result
41.87
KB
-rw-r--r--
ctype_mb.result
2.13
KB
-rw-r--r--
ctype_recoding.result
9.6
KB
-rw-r--r--
ctype_sjis.result
195.81
KB
-rw-r--r--
ctype_tis620.result
101.02
KB
-rw-r--r--
ctype_uca.result
155.4
KB
-rw-r--r--
ctype_ucs.result
143.96
KB
-rw-r--r--
ctype_ucs2_def.result
1.05
KB
-rw-r--r--
ctype_ujis.result
365.3
KB
-rw-r--r--
ctype_ujis_ucs2.result
548.6
KB
-rw-r--r--
ctype_utf16.result
47.3
KB
-rw-r--r--
ctype_utf16_def.result
273
B
-rw-r--r--
ctype_utf16_uca.result
72.47
KB
-rw-r--r--
ctype_utf16le.result
52.96
KB
-rw-r--r--
ctype_utf32.result
50.55
KB
-rw-r--r--
ctype_utf32_uca.result
75.29
KB
-rw-r--r--
ctype_utf8.result
169.69
KB
-rw-r--r--
ctype_utf8mb4.result
83.57
KB
-rw-r--r--
ctype_utf8mb4_heap.result
75.01
KB
-rw-r--r--
ctype_utf8mb4_innodb.result
77.85
KB
-rw-r--r--
ctype_utf8mb4_myisam.result
77.43
KB
-rw-r--r--
ctype_utf8mb4_uca.result
38.82
KB
-rw-r--r--
daemonize_opt.result
14
B
-rw-r--r--
datadir_permission.result
1.09
KB
-rw-r--r--
date_formats.result
28.69
KB
-rw-r--r--
ddl_i18n_koi8r.result
123.56
KB
-rw-r--r--
ddl_i18n_utf8.result
126.58
KB
-rw-r--r--
deadlock_innodb.result
2.35
KB
-rw-r--r--
debug_sync.result
12.18
KB
-rw-r--r--
debug_sync2.result
1.15
KB
-rw-r--r--
default.result
8.17
KB
-rw-r--r--
delete.result
22.7
KB
-rw-r--r--
delete_all_rows.result
2.26
KB
-rw-r--r--
deprecate_eof.result
8
KB
-rw-r--r--
deprecated_features.result
2.03
KB
-rw-r--r--
derived.result
172.18
KB
-rw-r--r--
dirty_close.result
345
B
-rw-r--r--
disabled_replication.result
4.82
KB
-rw-r--r--
disabled_storage_engines.resul...
3.28
KB
-rw-r--r--
disconnect_on_expired_password...
1.42
KB
-rw-r--r--
disconnect_on_expired_password...
1.49
KB
-rw-r--r--
distinct.result
80.43
KB
-rw-r--r--
drop-no_root.result
454
B
-rw-r--r--
drop.result
6.71
KB
-rw-r--r--
drop_debug.result
485
B
-rw-r--r--
ds_mrr-big.result
2.93
KB
-rw-r--r--
dynamic_tracing.result
813
B
-rw-r--r--
empty_table.result
229
B
-rw-r--r--
enable_cleartext_plugin.result
1.4
KB
-rw-r--r--
endspace.result
7.25
KB
-rw-r--r--
eq_range_idx_stat.result
6.56
KB
-rw-r--r--
error_simulation.result
3.17
KB
-rw-r--r--
errors.result
6.11
KB
-rw-r--r--
events_1.result
28.3
KB
-rw-r--r--
events_2.result
17.79
KB
-rw-r--r--
events_and_binlog.result
297
B
-rw-r--r--
events_bugs.result
40.94
KB
-rw-r--r--
events_embedded.result
86
B
-rw-r--r--
events_grant.result
10.33
KB
-rw-r--r--
events_logs_tests.result
2.37
KB
-rw-r--r--
events_microsec.result
810
B
-rw-r--r--
events_restart.result
4.36
KB
-rw-r--r--
events_scheduling.result
3.11
KB
-rw-r--r--
events_stress.result
2.39
KB
-rw-r--r--
events_time_zone.result
5.4
KB
-rw-r--r--
events_trans.result
3.61
KB
-rw-r--r--
events_trans_notembedded.resul...
1.88
KB
-rw-r--r--
examined_rows.result
6.73
KB
-rw-r--r--
execution_constants.result
1.03
KB
-rw-r--r--
explain.result
39.39
KB
-rw-r--r--
explain_for_connection_crash.r...
1004
B
-rw-r--r--
explain_for_connection_rqg_jso...
87.48
KB
-rw-r--r--
explain_for_connection_rqg_tra...
35.98
KB
-rw-r--r--
explain_for_connection_small_j...
25.46
KB
-rw-r--r--
explain_for_connection_small_t...
10.3
KB
-rw-r--r--
explain_json_all.result
98.36
KB
-rw-r--r--
explain_json_none.result
102.18
KB
-rw-r--r--
explain_other.result
42.23
KB
-rw-r--r--
file_contents.result
181
B
-rw-r--r--
filesort_debug.result
4.59
KB
-rw-r--r--
filesort_merge.result
2.02
KB
-rw-r--r--
filesort_pack.result
675
B
-rw-r--r--
filter_single_col_idx_big.resu...
38.05
KB
-rw-r--r--
filter_single_col_idx_small.re...
42.99
KB
-rw-r--r--
fix_priv_tables.result
1.96
KB
-rw-r--r--
flush.result
13.78
KB
-rw-r--r--
flush2.result
1.06
KB
-rw-r--r--
flush_block_commit.result
1.47
KB
-rw-r--r--
flush_block_commit_notembedded...
872
B
-rw-r--r--
flush_read_lock.result
73.94
KB
-rw-r--r--
flush_read_lock_kill.result
1.12
KB
-rw-r--r--
flush_table.result
12.33
KB
-rw-r--r--
foreign_key.result
4.84
KB
-rw-r--r--
fulltext.result
32.93
KB
-rw-r--r--
fulltext2.result
7.54
KB
-rw-r--r--
fulltext3.result
815
B
-rw-r--r--
fulltext_cache.result
2.67
KB
-rw-r--r--
fulltext_distinct.result
1.45
KB
-rw-r--r--
fulltext_left_join.result
4
KB
-rw-r--r--
fulltext_multi.result
766
B
-rw-r--r--
fulltext_order_by.result
6.05
KB
-rw-r--r--
fulltext_plugin.result
229
B
-rw-r--r--
fulltext_update.result
1.11
KB
-rw-r--r--
fulltext_var.result
1.3
KB
-rw-r--r--
func_aes.result
12.97
KB
-rw-r--r--
func_aes_cfb1.result
4.5
KB
-rw-r--r--
func_aes_cfb128.result
4.57
KB
-rw-r--r--
func_aes_cfb8.result
4.5
KB
-rw-r--r--
func_aes_kdf_hkdf.result
3.94
KB
-rw-r--r--
func_aes_kdf_pbkdf2_hmac.resul...
6.79
KB
-rw-r--r--
func_aes_misc.result
8.46
KB
-rw-r--r--
func_aes_ofb.result
4.47
KB
-rw-r--r--
func_analyse.result
23.09
KB
-rw-r--r--
func_bitwise_ops.result
80.6
KB
-rw-r--r--
func_compress.result
5.46
KB
-rw-r--r--
func_concat.result
4.37
KB
-rw-r--r--
func_crypt.result
2.05
KB
-rw-r--r--
func_date_add.result
3.74
KB
-rw-r--r--
func_default.result
1.45
KB
-rw-r--r--
func_des_encrypt.result
2.68
KB
-rw-r--r--
func_digest.result
122.35
KB
-rw-r--r--
func_encrypt.result
19.82
KB
-rw-r--r--
func_encrypt_nossl.result
7.75
KB
-rw-r--r--
func_encrypt_ucs2.result
1.21
KB
-rw-r--r--
func_equal.result
1.27
KB
-rw-r--r--
func_found_rows.result
285
B
-rw-r--r--
func_gconcat.result
49.9
KB
-rw-r--r--
func_group.result
66.46
KB
-rw-r--r--
func_group_innodb.result
6.07
KB
-rw-r--r--
func_group_innodb_16k.result
693
B
-rw-r--r--
func_if.result
6.29
KB
-rw-r--r--
func_in_all.result
49.27
KB
-rw-r--r--
func_in_icp.result
48.91
KB
-rw-r--r--
func_in_icp_mrr.result
49.21
KB
-rw-r--r--
func_in_mrr.result
48.93
KB
-rw-r--r--
func_in_mrr_cost.result
48.65
KB
-rw-r--r--
func_in_none.result
48.6
KB
-rw-r--r--
func_isnull.result
827
B
-rw-r--r--
func_like.result
7.78
KB
-rw-r--r--
func_math.result
42.22
KB
-rw-r--r--
func_misc.result
36.8
KB
-rw-r--r--
func_op.result
2.12
KB
-rw-r--r--
func_regexp.result
4.47
KB
-rw-r--r--
func_rollback.result
13.02
KB
-rw-r--r--
func_sapdb.result
12.49
KB
-rw-r--r--
func_set.result
8.9
KB
-rw-r--r--
func_str.result
174.94
KB
-rw-r--r--
func_str_debug.result
349
B
-rw-r--r--
func_str_no_ps.result
1.3
KB
-rw-r--r--
func_system.result
2.9
KB
-rw-r--r--
func_test.result
14.47
KB
-rw-r--r--
func_time.result
71.47
KB
-rw-r--r--
func_timestamp.result
518
B
-rw-r--r--
func_weight_string.result
11.56
KB
-rw-r--r--
function_defaults.result
109.58
KB
-rw-r--r--
gcc296.result
528
B
-rw-r--r--
get_diagnostics.result
28.42
KB
-rw-r--r--
get_table_share.result
20.56
KB
-rw-r--r--
gis-debug.result
10.1
KB
-rw-r--r--
gis-precise.result
162.17
KB
-rw-r--r--
gis-rt-precise.result
2.42
KB
-rw-r--r--
gis-rtree.result
102.08
KB
-rw-r--r--
gis.result
131.8
KB
-rw-r--r--
grant.result
121.17
KB
-rw-r--r--
grant2.result
36.52
KB
-rw-r--r--
grant3.result
8.41
KB
-rw-r--r--
grant4.result
9.36
KB
-rw-r--r--
grant_alter_user.result
40.96
KB
-rw-r--r--
grant_alter_user_qa.result
98.38
KB
-rw-r--r--
grant_cache.result
6.71
KB
-rw-r--r--
grant_debug.result
8.5
KB
-rw-r--r--
grant_explain_non_select.resul...
10.27
KB
-rw-r--r--
grant_lowercase_fs.result
1.2
KB
-rw-r--r--
grant_user_lock.result
16.9
KB
-rw-r--r--
grant_user_lock_qa.result
41.4
KB
-rw-r--r--
greedy_optimizer.result
632.59
KB
-rw-r--r--
greedy_search.result
31.05
KB
-rw-r--r--
group_by.result
120.07
KB
-rw-r--r--
group_by_fd_no_prot.result
81.15
KB
-rw-r--r--
group_by_fd_ps_prot.result
61.28
KB
-rw-r--r--
group_min_max.result
189.52
KB
-rw-r--r--
group_min_max_innodb.result
25.09
KB
-rw-r--r--
gtid_next_xa_binlog_off.result
30.9
KB
-rw-r--r--
gtids_anonymous_trxs_violation...
687
B
-rw-r--r--
handler_innodb.result
41.58
KB
-rw-r--r--
handler_myisam.result
45.48
KB
-rw-r--r--
handler_read_last.result
1.15
KB
-rw-r--r--
have_big5.require
79
B
-rw-r--r--
have_binlog_format_mixed.requi...
40
B
-rw-r--r--
have_binlog_format_row.require
38
B
-rw-r--r--
have_binlog_format_statement.r...
44
B
-rw-r--r--
have_compress.require
38
B
-rw-r--r--
have_cp1250_ch.require
79
B
-rw-r--r--
have_cp1251.require
84
B
-rw-r--r--
have_cp866.require
82
B
-rw-r--r--
have_cp932.require
83
B
-rw-r--r--
have_crypt.require
35
B
-rw-r--r--
have_debug.require
8
B
-rw-r--r--
have_debug_sync.require
13
B
-rw-r--r--
have_eucjpms.require
87
B
-rw-r--r--
have_euckr.require
81
B
-rw-r--r--
have_gb18030.require
87
B
-rw-r--r--
have_gb2312.require
84
B
-rw-r--r--
have_gbk.require
78
B
-rw-r--r--
have_geometry.require
38
B
-rw-r--r--
have_koi8r.require
81
B
-rw-r--r--
have_latin2_ch.require
78
B
-rw-r--r--
have_local_infile.require
36
B
-rw-r--r--
have_log_bin.require
31
B
-rw-r--r--
have_met_timezone.require
43
B
-rw-r--r--
have_moscow_leap_timezone.requ...
46
B
-rw-r--r--
have_mysql_upgrade.result
21
B
-rw-r--r--
have_ndb_debug.require
17
B
-rw-r--r--
have_ndb_extra.require
14
B
-rw-r--r--
have_ndbapi_examples.require
19
B
-rw-r--r--
have_nodebug.require
8
B
-rw-r--r--
have_optimizer_switch.require
19
B
-rw-r--r--
have_outfile.require
55
B
-rw-r--r--
have_partition.require
42
B
-rw-r--r--
have_perror.require
14
B
-rw-r--r--
have_profiling.require
39
B
-rw-r--r--
have_query_cache.require
41
B
-rw-r--r--
have_sjis.require
81
B
-rw-r--r--
have_ssl.require
33
B
-rw-r--r--
have_ssl_is_yes_or_disabled_on...
43
B
-rw-r--r--
have_statement_timeout.require
47
B
-rw-r--r--
have_symlink.require
37
B
-rw-r--r--
have_tis620.require
81
B
-rw-r--r--
have_ucs2.require
80
B
-rw-r--r--
have_ujis.require
81
B
-rw-r--r--
have_utf16.require
82
B
-rw-r--r--
have_utf32.require
82
B
-rw-r--r--
have_utf8.require
80
B
-rw-r--r--
have_utf8mb4.require
86
B
-rw-r--r--
having.result
24.34
KB
-rw-r--r--
heap.result
24.75
KB
-rw-r--r--
heap_auto_increment.result
894
B
-rw-r--r--
heap_btree.result
11.76
KB
-rw-r--r--
heap_hash.result
20.83
KB
-rw-r--r--
help.result
6.64
KB
-rw-r--r--
help_verbose.result
326
B
-rw-r--r--
host_cache_size_functionality....
3.32
KB
-rw-r--r--
ignore_strict.result
30.82
KB
-rw-r--r--
implicit_char_to_num_conversio...
6.44
KB
-rw-r--r--
implicit_commit.result
18.33
KB
-rw-r--r--
import_schema_mismatch.result
478
B
-rw-r--r--
index_merge_delete.result
25.04
KB
-rw-r--r--
index_merge_innodb.result
124.56
KB
-rw-r--r--
index_merge_insert-and-replace...
14.54
KB
-rw-r--r--
index_merge_intersect_dml.resu...
5.85
KB
-rw-r--r--
index_merge_myisam.result
144.52
KB
-rw-r--r--
index_merge_update.result
17.22
KB
-rw-r--r--
information_schema-big.result
2.81
KB
-rw-r--r--
information_schema.result
107.92
KB
-rw-r--r--
information_schema_chmod.resul...
182
B
-rw-r--r--
information_schema_db.result
9.98
KB
-rw-r--r--
information_schema_inno.result
4.33
KB
-rw-r--r--
information_schema_parameters....
22.49
KB
-rw-r--r--
information_schema_part.result
11.97
KB
-rw-r--r--
information_schema_routines.re...
30.81
KB
-rw-r--r--
init_connect.result
3.57
KB
-rw-r--r--
init_file.result
323
B
-rw-r--r--
initialize-bug20350099.result
1.04
KB
-rw-r--r--
initialize-bug20504142.result
1.17
KB
-rw-r--r--
initialize-bug21335821.result
895
B
-rw-r--r--
initialize-errors.result
578
B
-rw-r--r--
initialize-ignore-db.result
742
B
-rw-r--r--
initialize-init-acls.result
1.12
KB
-rw-r--r--
initialize-sha256.result
1.09
KB
-rw-r--r--
initialize.result
3.89
KB
-rw-r--r--
initialize_gtid.result
465
B
-rw-r--r--
innodb_deadlock.result
1.25
KB
-rw-r--r--
innodb_disabled.result
208
B
-rw-r--r--
innodb_explain_json_non_select...
293.06
KB
-rw-r--r--
innodb_explain_json_non_select...
299.29
KB
-rw-r--r--
innodb_explain_non_select_all....
136.52
KB
-rw-r--r--
innodb_explain_non_select_none...
136.37
KB
-rw-r--r--
innodb_icp.result
32.81
KB
-rw-r--r--
innodb_icp_all.result
32.88
KB
-rw-r--r--
innodb_icp_none.result
32.72
KB
-rw-r--r--
innodb_ignore_builtin.result
354
B
-rw-r--r--
innodb_log_file_size_functiona...
2.79
KB
-rw-r--r--
innodb_mrr.result
25.74
KB
-rw-r--r--
innodb_mrr_all.result
25.88
KB
-rw-r--r--
innodb_mrr_cost.result
25.71
KB
-rw-r--r--
innodb_mrr_cost_all.result
25.85
KB
-rw-r--r--
innodb_mrr_cost_icp.result
25.82
KB
-rw-r--r--
innodb_mrr_icp.result
25.85
KB
-rw-r--r--
innodb_mrr_none.result
25.66
KB
-rw-r--r--
innodb_mysql_lock.result
4.05
KB
-rw-r--r--
innodb_mysql_lock2.result
21.4
KB
-rw-r--r--
innodb_mysql_sync.result
25.87
KB
-rw-r--r--
innodb_pk_extension_off.result
20.33
KB
-rw-r--r--
innodb_pk_extension_on.result
20.58
KB
-rw-r--r--
innodb_recovery_with_upper_cas...
1.21
KB
-rw-r--r--
insert.result
30.75
KB
-rw-r--r--
insert_debug.result
1.29
KB
-rw-r--r--
insert_notembedded.result
5.58
KB
-rw-r--r--
insert_select.result
15.34
KB
-rw-r--r--
insert_update.result
18.89
KB
-rw-r--r--
installdb-bad-cipher.result
128
B
-rw-r--r--
internal_tmp_disk_storage_engi...
146.97
KB
-rw-r--r--
ipv4_as_ipv6.result
23.83
KB
-rw-r--r--
ipv6.result
13.89
KB
-rw-r--r--
is_debug_build.require
32
B
-rw-r--r--
is_deprecation.result
558
B
-rw-r--r--
is_embedded.require
16
B
-rw-r--r--
isam.result
15.65
KB
-rw-r--r--
join.result
55.68
KB
-rw-r--r--
join_cache_bka.result
108.89
KB
-rw-r--r--
join_cache_bka_nixbnl.result
108.17
KB
-rw-r--r--
join_cache_bkaunique.result
109.32
KB
-rw-r--r--
join_cache_bnl.result
107.23
KB
-rw-r--r--
join_cache_nojb.result
106.25
KB
-rw-r--r--
join_crash.result
4.53
KB
-rw-r--r--
join_file_handler.result
1.04
KB
-rw-r--r--
join_nested.result
86.66
KB
-rw-r--r--
join_nested_bka.result
92.75
KB
-rw-r--r--
join_nested_bka_nixbnl.result
89.71
KB
-rw-r--r--
join_optimizer.result
2.54
KB
-rw-r--r--
join_outer.result
96.52
KB
-rw-r--r--
join_outer_bka.result
96.89
KB
-rw-r--r--
join_outer_bka_nixbnl.result
94.69
KB
-rw-r--r--
join_outer_innodb.result
3.27
KB
-rw-r--r--
key.result
22.58
KB
-rw-r--r--
key_cache.result
11.88
KB
-rw-r--r--
key_diff.result
1.15
KB
-rw-r--r--
key_primary.result
890
B
-rw-r--r--
keywords.result
6.63
KB
-rw-r--r--
kill.result
8.88
KB
-rw-r--r--
kill_debug.result
1.58
KB
-rw-r--r--
limit.result
8.31
KB
-rw-r--r--
loaddata.result
20.8
KB
-rw-r--r--
loaddata_autocom_innodb.result
651
B
-rw-r--r--
loadxml.result
2.7
KB
-rw-r--r--
locale.result
5.59
KB
-rw-r--r--
lock.result
14.09
KB
-rw-r--r--
lock_multi.result
63.2
KB
-rw-r--r--
lock_multi_bug38499.result
964
B
-rw-r--r--
lock_multi_bug38691.result
812
B
-rw-r--r--
lock_sync.result
27.44
KB
-rw-r--r--
lock_tables_lost_commit.result
150
B
-rw-r--r--
locking_service.result
31.09
KB
-rw-r--r--
log_errchk.result
663
B
-rw-r--r--
log_state.result
9.66
KB
-rw-r--r--
log_state_bug33693.result
111
B
-rw-r--r--
log_tables-big.result
996
B
-rw-r--r--
log_tables.result
41.81
KB
-rw-r--r--
log_tables_debug.result
770
B
-rw-r--r--
log_tables_upgrade.result
2.35
KB
-rw-r--r--
log_timestamps.result
71
B
-rw-r--r--
long_tmpdir.result
99
B
-rw-r--r--
lowercase0.require
45
B
-rw-r--r--
lowercase1.require
45
B
-rw-r--r--
lowercase2.require
45
B
-rw-r--r--
lowercase_fs_off.result
3.46
KB
-rw-r--r--
lowercase_fs_on.result
75
B
-rw-r--r--
lowercase_mixed_tmpdir.result
162
B
-rw-r--r--
lowercase_mixed_tmpdir_innodb....
190
B
-rw-r--r--
lowercase_table.result
3.24
KB
-rw-r--r--
lowercase_table2.result
8.66
KB
-rw-r--r--
lowercase_table4.result
4.63
KB
-rw-r--r--
lowercase_table5.result
673
B
-rw-r--r--
lowercase_table_grant.result
2.01
KB
-rw-r--r--
lowercase_table_qcache.result
847
B
-rw-r--r--
lowercase_utf8.result
173
B
-rw-r--r--
lowercase_view.result
10.21
KB
-rw-r--r--
m_i_db.result
15.5
KB
-rw-r--r--
max_statement_time.result
12.81
KB
-rw-r--r--
mdl_sync.result
113.92
KB
-rw-r--r--
mdl_tablespace.result
34.72
KB
-rw-r--r--
merge-big.result
728
B
-rw-r--r--
merge.result
100.14
KB
-rw-r--r--
merge_innodb.result
1.31
KB
-rw-r--r--
merge_mmap.result
3.33
KB
-rw-r--r--
metadata.result
17.03
KB
-rw-r--r--
mix2_myisam.result
66.36
KB
-rw-r--r--
mix2_myisam_ucs2.result
15.35
KB
-rw-r--r--
multi_plugin_load.result
347
B
-rw-r--r--
multi_plugin_load_add.result
455
B
-rw-r--r--
multi_plugin_load_add2.result
455
B
-rw-r--r--
multi_statement.result
563
B
-rw-r--r--
multi_update.result
26.47
KB
-rw-r--r--
multi_update2.result
1016
B
-rw-r--r--
multi_update_innodb.result
4.52
KB
-rw-r--r--
multi_update_tiny_hash.result
1.5
KB
-rw-r--r--
myisam-blob.result
1.41
KB
-rw-r--r--
myisam-system.result
394
B
-rw-r--r--
myisam.result
96.84
KB
-rw-r--r--
myisam_crash_before_flush_keys...
1.15
KB
-rw-r--r--
myisam_debug.result
1.21
KB
-rw-r--r--
myisam_explain_json_non_select...
287.97
KB
-rw-r--r--
myisam_explain_json_non_select...
294.08
KB
-rw-r--r--
myisam_explain_non_select_all....
133.64
KB
-rw-r--r--
myisam_explain_non_select_none...
133.36
KB
-rw-r--r--
myisam_icp.result
31.96
KB
-rw-r--r--
myisam_icp_all.result
32.02
KB
-rw-r--r--
myisam_icp_none.result
31.84
KB
-rw-r--r--
myisam_mrr.result
24.26
KB
-rw-r--r--
myisam_mrr_all.result
24.43
KB
-rw-r--r--
myisam_mrr_cost.result
24.21
KB
-rw-r--r--
myisam_mrr_cost_all.result
24.38
KB
-rw-r--r--
myisam_mrr_cost_icp.result
24.35
KB
-rw-r--r--
myisam_mrr_icp.result
24.4
KB
-rw-r--r--
myisam_mrr_none.result
24.16
KB
-rw-r--r--
myisam_recover.result
4.57
KB
-rw-r--r--
myisam_row_rpl.result
2.04
KB
-rw-r--r--
myisampack.result
7.56
KB
-rw-r--r--
mysql-bug41486.result
465
B
-rw-r--r--
mysql-bug45236.result
329
B
-rw-r--r--
mysql.result
9.77
KB
-rw-r--r--
mysql_batch_mode.result
84
B
-rw-r--r--
mysql_binary_mode.result
1.52
KB
-rw-r--r--
mysql_client_test.result
8.92
KB
-rw-r--r--
mysql_client_test_embedded.res...
111
B
-rw-r--r--
mysql_client_test_qcache.resul...
500
B
-rw-r--r--
mysql_comments.result
6.68
KB
-rw-r--r--
mysql_config_editor.result
8.01
KB
-rw-r--r--
mysql_cp932.result
37
B
-rw-r--r--
mysql_embedded.result
181
B
-rw-r--r--
mysql_embedded_client_test.res...
153
B
-rw-r--r--
mysql_locale_posix.result
973
B
-rw-r--r--
mysql_not_windows.result
477
B
-rw-r--r--
mysql_plugin.result
4.92
KB
-rw-r--r--
mysql_protocols.result
208
B
-rw-r--r--
mysql_ssl.result
152
B
-rw-r--r--
mysql_ssl_default.result
889
B
-rw-r--r--
mysql_tzinfo_to_sql.result
22.11
KB
-rw-r--r--
mysql_tzinfo_to_sql_sys.result
1.28
KB
-rw-r--r--
mysql_upgrade.result
136.32
KB
-rw-r--r--
mysql_upgrade_slave_master_inf...
5
KB
-rw-r--r--
mysql_upgrade_ssl.result
5.65
KB
-rw-r--r--
mysql_upgrade_with_session_use...
2.77
KB
-rw-r--r--
mysqladmin.result
1.22
KB
-rw-r--r--
mysqladmin_shutdown.result
170
B
-rw-r--r--
mysqlbinlog.result
31.28
KB
-rw-r--r--
mysqlbinlog_base64_flag.result
3.89
KB
-rw-r--r--
mysqlbinlog_debug.result
235
B
-rw-r--r--
mysqlbinlog_hexdump.result
6.5
KB
-rw-r--r--
mysqlbinlog_mixed_or_statment....
855
B
-rw-r--r--
mysqlbinlog_raw_mode.result
8.32
KB
-rw-r--r--
mysqlbinlog_raw_mode_win.resul...
8.08
KB
-rw-r--r--
mysqlbinlog_row_big.result
2.42
KB
-rw-r--r--
mysqlcheck.result
19.17
KB
-rw-r--r--
mysqld--defaults-file.result
908
B
-rw-r--r--
mysqld--help-notwin.result
67.99
KB
-rw-r--r--
mysqld--help-win.result
68.06
KB
-rw-r--r--
mysqld_daemon.result
66
B
-rw-r--r--
mysqld_safe.result
142
B
-rw-r--r--
mysqldump-binary.result
3.51
KB
-rw-r--r--
mysqldump-compat.result
111
B
-rw-r--r--
mysqldump-max.result
11.33
KB
-rw-r--r--
mysqldump-no-binlog.result
50
B
-rw-r--r--
mysqldump.result
295.21
KB
-rw-r--r--
mysqldump_bug29998457.result
3.47
KB
-rw-r--r--
mysqldump_bug30042589.result
3.05
KB
-rw-r--r--
mysqldump_bugs.result
5.04
KB
-rw-r--r--
mysqldump_gtid_state.result
2.69
KB
-rw-r--r--
mysqldump_restore.result
4.01
KB
-rw-r--r--
mysqldumpslow.result
1.13
KB
-rw-r--r--
mysqlimport.result
833
B
-rw-r--r--
mysqlpump.result
16.38
KB
-rw-r--r--
mysqlpump_basic.result
23.91
KB
-rw-r--r--
mysqlpump_bugs.result
850
B
-rw-r--r--
mysqlpump_charset.result
15.54
KB
-rw-r--r--
mysqlpump_concurrency.result
11.41
KB
-rw-r--r--
mysqlpump_extended.result
13.01
KB
-rw-r--r--
mysqlpump_filters.result
11.34
KB
-rw-r--r--
mysqlpump_multi_thread.result
11.53
KB
-rw-r--r--
mysqlpump_partial_bkp.result
797
B
-rw-r--r--
mysqlshow.result
9.96
KB
-rw-r--r--
mysqlslap.result
7.53
KB
-rw-r--r--
mysqltest.result
33.29
KB
-rw-r--r--
named_pipe.result
65.98
KB
-rw-r--r--
negation_elimination.result
13
KB
-rw-r--r--
no-threads.result
329
B
-rw-r--r--
no_binlog.result
64
B
-rw-r--r--
no_binlog_gtid_empty_statement...
675
B
-rw-r--r--
no_binlog_gtid_empty_transacti...
683
B
-rw-r--r--
no_binlog_gtid_mode_on.result
4.75
KB
-rw-r--r--
no_binlog_gtid_mode_on_explici...
3.84
KB
-rw-r--r--
no_binlog_gtid_next_begin_caus...
1.4
KB
-rw-r--r--
no_binlog_gtid_next_partially_...
11.91
KB
-rw-r--r--
no_binlog_gtid_next_partially_...
1.13
KB
-rw-r--r--
no_binlog_gtid_next_partially_...
2.3
KB
-rw-r--r--
no_binlog_gtid_next_single_stm...
9.6
KB
-rw-r--r--
no_binlog_gtid_next_temporary_...
1.1
KB
-rw-r--r--
no_engine_substitution.result
6.01
KB
-rw-r--r--
not_asan.require
7
B
-rw-r--r--
not_embedded.require
16
B
-rw-r--r--
not_embedded_server.result
5.86
KB
-rw-r--r--
not_ndb.require
39
B
-rw-r--r--
not_openssl.require
36
B
-rw-r--r--
not_partition.result
5.75
KB
-rw-r--r--
not_ssl.require
32
B
-rw-r--r--
not_true.require
10
B
-rw-r--r--
not_valgrind.require
17
B
-rw-r--r--
not_windows.require
7
B
-rw-r--r--
null.result
16.17
KB
-rw-r--r--
null_key_all.result
27.81
KB
-rw-r--r--
null_key_icp.result
27.74
KB
-rw-r--r--
null_key_none.result
27.68
KB
-rw-r--r--
odbc.result
1.41
KB
-rw-r--r--
olap.result
20.44
KB
-rw-r--r--
one_thread_per_connection.requ...
44
B
-rw-r--r--
openssl.require
37
B
-rw-r--r--
openssl_1.result
9.65
KB
-rw-r--r--
opt_costmodel.result
11.47
KB
-rw-r--r--
opt_costmodel_downgrade.result
2.55
KB
-rw-r--r--
opt_costmodel_flush.result
27.03
KB
-rw-r--r--
opt_costmodel_pfs.result
296
B
-rw-r--r--
opt_costmodel_restart.result
7.52
KB
-rw-r--r--
opt_costmodel_tables.result
5.59
KB
-rw-r--r--
opt_costmodel_warnings.result
2.52
KB
-rw-r--r--
opt_hint_timeout.result
3.21
KB
-rw-r--r--
opt_hints.result
110.61
KB
-rw-r--r--
opt_hints_lowercase.result
1.95
KB
-rw-r--r--
opt_hints_pfs.result
1.93
KB
-rw-r--r--
opt_hints_subquery.result
135.37
KB
-rw-r--r--
optimizer_bug12837084.result
13.97
KB
-rw-r--r--
optimizer_debug_sync.result
1.32
KB
-rw-r--r--
optimizer_switch.result
30.14
KB
-rw-r--r--
order_by_all.result
78.98
KB
-rw-r--r--
order_by_icp_mrr.result
78.93
KB
-rw-r--r--
order_by_limit.result
18.46
KB
-rw-r--r--
order_by_none.result
78.59
KB
-rw-r--r--
order_by_sortkey.result
3.19
KB
-rw-r--r--
order_fill_sortbuf.result
262
B
-rw-r--r--
outfile.result
2.2
KB
-rw-r--r--
outfile_loaddata.result
11.02
KB
-rw-r--r--
overflow.result
235
B
-rw-r--r--
packet.result
9.48
KB
-rw-r--r--
parser-big-32bit.result
1.35
KB
-rw-r--r--
parser-big-64bit.result
1.35
KB
-rw-r--r--
parser.result
60.1
KB
-rw-r--r--
parser_bug21114_innodb.result
25.39
KB
-rw-r--r--
parser_not_embedded.result
4.42
KB
-rw-r--r--
parser_precedence.result
23.96
KB
-rw-r--r--
parser_stack.result
9.54
KB
-rw-r--r--
partition.result
124.74
KB
-rw-r--r--
partition_archive.result
7.74
KB
-rw-r--r--
partition_binlog.result
2.41
KB
-rw-r--r--
partition_binlog_stmt.result
955
B
-rw-r--r--
partition_blackhole.result
531
B
-rw-r--r--
partition_bug18198.result
8.07
KB
-rw-r--r--
partition_cache.result
7.16
KB
-rw-r--r--
partition_charset.result
434
B
-rw-r--r--
partition_column.result
25.2
KB
-rw-r--r--
partition_column_prune.result
4.39
KB
-rw-r--r--
partition_csv.result
2.69
KB
-rw-r--r--
partition_datatype.result
47.14
KB
-rw-r--r--
partition_debug.result
985
B
-rw-r--r--
partition_debug_sync.result
6.26
KB
-rw-r--r--
partition_debug_sync_stmt.resu...
3.65
KB
-rw-r--r--
partition_deprecation.result
4.88
KB
-rw-r--r--
partition_error.result
84.03
KB
-rw-r--r--
partition_exchange.result
65.43
KB
-rw-r--r--
partition_explicit_prune.resul...
57.97
KB
-rw-r--r--
partition_federated.result
271
B
-rw-r--r--
partition_grant.result
1.67
KB
-rw-r--r--
partition_hash.result
11.15
KB
-rw-r--r--
partition_index_innodb.result
6.16
KB
-rw-r--r--
partition_index_myisam.result
5.35
KB
-rw-r--r--
partition_innodb.result
50.73
KB
-rw-r--r--
partition_innodb_plugin.result
3.11
KB
-rw-r--r--
partition_innodb_semi_consiste...
2.92
KB
-rw-r--r--
partition_innodb_stmt.result
1.12
KB
-rw-r--r--
partition_innodb_tablespace.re...
35.12
KB
-rw-r--r--
partition_key_cache.result
22.78
KB
-rw-r--r--
partition_list.result
13.93
KB
-rw-r--r--
partition_locking.result
246.59
KB
-rw-r--r--
partition_locking_4.result
1.7
KB
-rw-r--r--
partition_mgm.result
9.83
KB
-rw-r--r--
partition_mgm_err.result
7.48
KB
-rw-r--r--
partition_mgm_err2.result
373
B
-rw-r--r--
partition_myisam.result
10.25
KB
-rw-r--r--
partition_not_blackhole.result
456
B
-rw-r--r--
partition_not_windows.result
4.27
KB
-rw-r--r--
partition_order.result
16.29
KB
-rw-r--r--
partition_plugin.result
4.48
KB
-rw-r--r--
partition_pruning.result
290.58
KB
-rw-r--r--
partition_range.result
46.69
KB
-rw-r--r--
partition_rename_longfilename....
1.91
KB
-rw-r--r--
partition_symlink.result
6.25
KB
-rw-r--r--
partition_sync.result
1.35
KB
-rw-r--r--
partition_truncate.result
675
B
-rw-r--r--
partition_utf8.result
2.01
KB
-rw-r--r--
partition_windows.result
3.3
KB
-rw-r--r--
per_thread_connection_handler....
1.45
KB
-rw-r--r--
perror-win.result
453
B
-rw-r--r--
perror.result
471
B
-rw-r--r--
plugin.result
8.52
KB
-rw-r--r--
plugin_auth.result
33.72
KB
-rw-r--r--
plugin_auth_expire.result
644
B
-rw-r--r--
plugin_auth_qa.result
24.47
KB
-rw-r--r--
plugin_auth_qa_1.result
16.11
KB
-rw-r--r--
plugin_auth_qa_2.result
11.17
KB
-rw-r--r--
plugin_auth_qa_3.result
1.29
KB
-rw-r--r--
plugin_auth_sha256.result
5.52
KB
-rw-r--r--
plugin_auth_sha256_2.result
1.96
KB
-rw-r--r--
plugin_auth_sha256_server_defa...
3.7
KB
-rw-r--r--
plugin_auth_sha256_server_defa...
4.02
KB
-rw-r--r--
plugin_auth_sha256_tls.result
2.53
KB
-rw-r--r--
plugin_auth_user_lock.result
1
KB
-rw-r--r--
plugin_load.result
76
B
-rw-r--r--
plugin_load_option.result
321
B
-rw-r--r--
plugin_not_embedded.result
995
B
-rw-r--r--
preload.result
3.84
KB
-rw-r--r--
profiling.result
16.4
KB
-rw-r--r--
ps.result
125.1
KB
-rw-r--r--
ps_10nestset.result
2.08
KB
-rw-r--r--
ps_11bugs.result
6.01
KB
-rw-r--r--
ps_1general.result
35.8
KB
-rw-r--r--
ps_2myisam.result
103.52
KB
-rw-r--r--
ps_3innodb.result
103.06
KB
-rw-r--r--
ps_4heap.result
102.98
KB
-rw-r--r--
ps_5merge.result
201.74
KB
-rw-r--r--
ps_ddl.result
53.74
KB
-rw-r--r--
ps_ddl1.result
11.06
KB
-rw-r--r--
ps_grant.result
3.99
KB
-rw-r--r--
ps_not_windows.result
516
B
-rw-r--r--
ps_w_max_indexes_64.result
189.58
KB
-rw-r--r--
python_with_json.require
27
B
-rw-r--r--
query_cache.result
89.5
KB
-rw-r--r--
query_cache_28249.result
3.58
KB
-rw-r--r--
query_cache_debug.result
11.1
KB
-rw-r--r--
query_cache_disabled.result
1.96
KB
-rw-r--r--
query_cache_merge.result
32.8
KB
-rw-r--r--
query_cache_notembedded.result
11.37
KB
-rw-r--r--
query_cache_ps_no_prot.result
12.26
KB
-rw-r--r--
query_cache_ps_ps_prot.result
11.09
KB
-rw-r--r--
query_cache_size_functionality...
7.69
KB
-rw-r--r--
query_cache_type_functionality...
9.19
KB
-rw-r--r--
query_cache_with_views.result
6.02
KB
-rw-r--r--
range_all.result
145.86
KB
-rw-r--r--
range_icp.result
145.41
KB
-rw-r--r--
range_icp_mrr.result
145.8
KB
-rw-r--r--
range_mrr.result
145.32
KB
-rw-r--r--
range_mrr_cost.result
144.95
KB
-rw-r--r--
range_none.result
144.9
KB
-rw-r--r--
range_with_memory_limit.result
190.38
KB
-rw-r--r--
read_many_rows_innodb.result
2.83
KB
-rw-r--r--
read_only.result
23.09
KB
-rw-r--r--
read_only_innodb.result
5.42
KB
-rw-r--r--
relay_log_index_variables.resu...
469
B
-rw-r--r--
relay_log_variables.result
475
B
-rw-r--r--
rename.result
1.58
KB
-rw-r--r--
renamedb.result
880
B
-rw-r--r--
repair.result
6.43
KB
-rw-r--r--
replace.result
1.27
KB
-rw-r--r--
reset_connection.result
6.46
KB
-rw-r--r--
rewrite_general_log.result
6.48
KB
-rw-r--r--
rewrite_slow_log.result
3.75
KB
-rw-r--r--
rollback.result
574
B
-rw-r--r--
round.result
6.92
KB
-rw-r--r--
row.result
23.11
KB
-rw-r--r--
rowid_order_innodb.result
3.6
KB
-rw-r--r--
rpl_colSize.result
4.39
KB
-rw-r--r--
rpl_connect_attr.result
1.21
KB
-rw-r--r--
rpl_extraColmaster_innodb.resu...
23.85
KB
-rw-r--r--
rpl_extraColmaster_myisam.resu...
23.85
KB
-rw-r--r--
rpl_multi_source_mysqldump_sla...
1.5
KB
-rw-r--r--
rpl_mysqldump_slave.result
867
B
-rw-r--r--
schema.result
2.34
KB
-rw-r--r--
secure_file_priv_win.result
1.43
KB
-rw-r--r--
select_all.result
180.1
KB
-rw-r--r--
select_all_bka.result
180.83
KB
-rw-r--r--
select_all_bka_nixbnl.result
180.1
KB
-rw-r--r--
select_for_update.result
755
B
-rw-r--r--
select_found.result
6.96
KB
-rw-r--r--
select_icp_mrr.result
180.04
KB
-rw-r--r--
select_icp_mrr_bka.result
180.77
KB
-rw-r--r--
select_icp_mrr_bka_nixbnl.resu...
180.04
KB
-rw-r--r--
select_none.result
179.38
KB
-rw-r--r--
select_none_bka.result
179.47
KB
-rw-r--r--
select_none_bka_nixbnl.result
178.64
KB
-rw-r--r--
select_safe.result
9.97
KB
-rw-r--r--
server_id.require
32
B
-rw-r--r--
server_id1.require
34
B
-rw-r--r--
server_offline_1.result
2.03
KB
-rw-r--r--
server_offline_2.result
1.28
KB
-rw-r--r--
server_offline_3.result
1.31
KB
-rw-r--r--
server_offline_4.result
958
B
-rw-r--r--
server_offline_5.result
7.23
KB
-rw-r--r--
server_offline_6.result
1.2
KB
-rw-r--r--
server_uuid.result
785
B
-rw-r--r--
server_uuid_embedded.result
325
B
-rw-r--r--
session_tracker.result
23.61
KB
-rw-r--r--
session_tracker_trx_state.resu...
38.38
KB
-rw-r--r--
shm.result
66.48
KB
-rw-r--r--
shm_server_restart.result
20
B
-rw-r--r--
show_check.result
78.63
KB
-rw-r--r--
show_processlist_state.result
150
B
-rw-r--r--
show_profile.result
491
B
-rw-r--r--
show_variables.result
372
B
-rw-r--r--
shutdown.result
325
B
-rw-r--r--
signal.result
71.01
KB
-rw-r--r--
signal_code.result
1020
B
-rw-r--r--
signal_demo1.result
6.25
KB
-rw-r--r--
signal_demo2.result
3.86
KB
-rw-r--r--
signal_demo3.result
3.33
KB
-rw-r--r--
signal_sqlmode.result
2.63
KB
-rw-r--r--
single_delete_update.result
24.5
KB
-rw-r--r--
skip_grants.result
2.7
KB
-rw-r--r--
skip_grants_flush.result
352
B
-rw-r--r--
skip_log_bin.result
167
B
-rw-r--r--
skip_name_resolve.result
2.51
KB
-rw-r--r--
slave-running.result
71
B
-rw-r--r--
slave-stopped.result
72
B
-rw-r--r--
slow_log.result
2.57
KB
-rw-r--r--
sort_buffer_size_functionality...
6.61
KB
-rw-r--r--
sp-big.result
1.47
KB
-rw-r--r--
sp-bugs.result
11.46
KB
-rw-r--r--
sp-code.result
29.86
KB
-rw-r--r--
sp-destruct.result
7.02
KB
-rw-r--r--
sp-dynamic.result
9.73
KB
-rw-r--r--
sp-error.result
84.05
KB
-rw-r--r--
sp-fib.result
656
B
-rw-r--r--
sp-lock.result
21.56
KB
-rw-r--r--
sp-no-code.result
307
B
-rw-r--r--
sp-prelocking.result
7
KB
-rw-r--r--
sp-security.result
26.42
KB
-rw-r--r--
sp-threads.result
2.01
KB
-rw-r--r--
sp-ucs2.result
5.45
KB
-rw-r--r--
sp-vars.result
30.01
KB
-rw-r--r--
sp.result
192.98
KB
-rw-r--r--
sp_debug.result
735
B
-rw-r--r--
sp_gis.result
853
B
-rw-r--r--
sp_notembedded.result
14.61
KB
-rw-r--r--
sp_stress_case.result
2.53
KB
-rw-r--r--
sp_sync.result
3.17
KB
-rw-r--r--
sp_trans.result
14.83
KB
-rw-r--r--
sp_trans_log.result
891
B
-rw-r--r--
sp_validation.result
34.85
KB
-rw-r--r--
sql_mode.result
23.42
KB
-rw-r--r--
sql_mode_default.result
3.39
KB
-rw-r--r--
ssl-big.result
69
B
-rw-r--r--
ssl-crl-revoked-crl.result
76
B
-rw-r--r--
ssl-sha512.result
636
B
-rw-r--r--
ssl.result
66.63
KB
-rw-r--r--
ssl_8k_key.result
42
B
-rw-r--r--
ssl_and_innodb.result
306
B
-rw-r--r--
ssl_auto_detect_openssl.result
361
B
-rw-r--r--
ssl_ca.result
857
B
-rw-r--r--
ssl_cipher.result
295
B
-rw-r--r--
ssl_compress.result
66.25
KB
-rw-r--r--
ssl_connect.result
10
B
-rw-r--r--
ssl_crl.result
1.21
KB
-rw-r--r--
ssl_crl_clients-valid.result
1.01
KB
-rw-r--r--
ssl_crl_clients.result
427
B
-rw-r--r--
ssl_crl_clients_valid.result
673
B
-rw-r--r--
ssl_crl_crlpath.result
808
B
-rw-r--r--
ssl_deprecated_tls_versions.re...
334
B
-rw-r--r--
ssl_verify_identity.result
1.35
KB
-rw-r--r--
status.result
11.15
KB
-rw-r--r--
status2.result
1.35
KB
-rw-r--r--
status_bug17954.result
582
B
-rw-r--r--
status_debug.result
3.48
KB
-rw-r--r--
strict.result
78.07
KB
-rw-r--r--
strict_autoinc_1myisam.result
1.05
KB
-rw-r--r--
strict_autoinc_2innodb.result
1.05
KB
-rw-r--r--
strict_autoinc_3heap.result
1.05
KB
-rw-r--r--
subquery_all.result
298.58
KB
-rw-r--r--
subquery_all_bka.result
298.82
KB
-rw-r--r--
subquery_all_bka_nixbnl.result
298.37
KB
-rw-r--r--
subquery_bugs.result
4.36
KB
-rw-r--r--
subquery_mat.result
133.51
KB
-rw-r--r--
subquery_mat_all.result
123.66
KB
-rw-r--r--
subquery_mat_none.result
122.3
KB
-rw-r--r--
subquery_nomat_nosj.result
297.96
KB
-rw-r--r--
subquery_nomat_nosj_bka.result
298.16
KB
-rw-r--r--
subquery_nomat_nosj_bka_nixbnl...
297.81
KB
-rw-r--r--
subquery_none.result
297.84
KB
-rw-r--r--
subquery_none_bka.result
297.94
KB
-rw-r--r--
subquery_none_bka_nixbnl.resul...
297.58
KB
-rw-r--r--
subquery_sj_all.result
500.49
KB
-rw-r--r--
subquery_sj_all_bka.result
502.11
KB
-rw-r--r--
subquery_sj_all_bka_nixbnl.res...
490.45
KB
-rw-r--r--
subquery_sj_all_bkaunique.resu...
498.68
KB
-rw-r--r--
subquery_sj_dupsweed.result
502.87
KB
-rw-r--r--
subquery_sj_dupsweed_bka.resul...
502.97
KB
-rw-r--r--
subquery_sj_dupsweed_bka_nixbn...
484.75
KB
-rw-r--r--
subquery_sj_dupsweed_bkaunique...
503
KB
-rw-r--r--
subquery_sj_firstmatch.result
487.96
KB
-rw-r--r--
subquery_sj_firstmatch_bka.res...
488.05
KB
-rw-r--r--
subquery_sj_firstmatch_bka_nix...
480.97
KB
-rw-r--r--
subquery_sj_firstmatch_bkauniq...
488.09
KB
-rw-r--r--
subquery_sj_innodb_all.result
6.38
KB
-rw-r--r--
subquery_sj_innodb_all_bka.res...
6.57
KB
-rw-r--r--
subquery_sj_innodb_all_bka_nix...
6.6
KB
-rw-r--r--
subquery_sj_innodb_all_bkauniq...
6.63
KB
-rw-r--r--
subquery_sj_innodb_none.result
6.66
KB
-rw-r--r--
subquery_sj_innodb_none_bka.re...
6.75
KB
-rw-r--r--
subquery_sj_innodb_none_bka_ni...
6.74
KB
-rw-r--r--
subquery_sj_innodb_none_bkauni...
6.79
KB
-rw-r--r--
subquery_sj_loosescan.result
502.69
KB
-rw-r--r--
subquery_sj_loosescan_bka.resu...
502.79
KB
-rw-r--r--
subquery_sj_loosescan_bka_nixb...
484.38
KB
-rw-r--r--
subquery_sj_loosescan_bkauniqu...
502.82
KB
-rw-r--r--
subquery_sj_mat.result
522.25
KB
-rw-r--r--
subquery_sj_mat_bka.result
522.34
KB
-rw-r--r--
subquery_sj_mat_bka_nixbnl.res...
505.5
KB
-rw-r--r--
subquery_sj_mat_bkaunique.resu...
522.38
KB
-rw-r--r--
subquery_sj_mat_nosj.result
549.88
KB
-rw-r--r--
subquery_sj_none.result
516.26
KB
-rw-r--r--
subquery_sj_none_bka.result
516.35
KB
-rw-r--r--
subquery_sj_none_bka_nixbnl.re...
509.41
KB
-rw-r--r--
subquery_sj_none_bkaunique.res...
516.38
KB
-rw-r--r--
subselect_debug.result
662
B
-rw-r--r--
subselect_gis.result
320
B
-rw-r--r--
subselect_innodb.result
28.76
KB
-rw-r--r--
subselect_notembedded.result
752
B
-rw-r--r--
sum_distinct-big.result
2
KB
-rw-r--r--
sum_distinct.result
3.14
KB
-rw-r--r--
symlink.result
8.12
KB
-rw-r--r--
synchronization.result
4.05
KB
-rw-r--r--
sysdate_is_now.result
76
B
-rw-r--r--
system_mysql_db.result
13.71
KB
-rw-r--r--
system_mysql_db_refs.result
3.14
KB
-rw-r--r--
table_definition_cache_functio...
6.9
KB
-rw-r--r--
table_open_cache_functionality...
12.92
KB
-rw-r--r--
tablelock.result
1.5
KB
-rw-r--r--
tablespace.result
10.57
KB
-rw-r--r--
temp_pool.result
646
B
-rw-r--r--
temp_table.result
8.18
KB
-rw-r--r--
temporal_literal.result
13.62
KB
-rw-r--r--
test_security_context.result
1.06
KB
-rw-r--r--
testdb_only.require
45
B
-rw-r--r--
timezone.result
2.58
KB
-rw-r--r--
timezone2.result
13.21
KB
-rw-r--r--
timezone3.result
2.21
KB
-rw-r--r--
timezone4.result
148
B
-rw-r--r--
timezone_debug.result
926
B
-rw-r--r--
timezone_grant.result
4.42
KB
-rw-r--r--
trans_read_only.result
1.38
KB
-rw-r--r--
transaction_isolation.result
4.3
KB
-rw-r--r--
transaction_read_only.result
5.39
KB
-rw-r--r--
trigger-compat.result
7.98
KB
-rw-r--r--
trigger-trans.result
6.45
KB
-rw-r--r--
trigger.result
87.73
KB
-rw-r--r--
trigger_debug.result
627
B
-rw-r--r--
trigger_notembedded.result
19.95
KB
-rw-r--r--
trigger_wl3253.result
26.27
KB
-rw-r--r--
trigger_wl6030.result
53.61
KB
-rw-r--r--
true.require
7
B
-rw-r--r--
truncate.result
3.7
KB
-rw-r--r--
truncate_coverage.result
2.4
KB
-rw-r--r--
type_binary.result
9.62
KB
-rw-r--r--
type_bit.result
18.23
KB
-rw-r--r--
type_bit_innodb.result
8.2
KB
-rw-r--r--
type_blob.result
40.47
KB
-rw-r--r--
type_date.result
21.96
KB
-rw-r--r--
type_datetime.result
34.39
KB
-rw-r--r--
type_decimal.result
36.16
KB
-rw-r--r--
type_enum.result
101.64
KB
-rw-r--r--
type_float.result
12.43
KB
-rw-r--r--
type_nchar.result
1.44
KB
-rw-r--r--
type_newdecimal-big.result
678
B
-rw-r--r--
type_newdecimal.result
68.9
KB
-rw-r--r--
type_ranges.result
17.61
KB
-rw-r--r--
type_set.result
4.58
KB
-rw-r--r--
type_string.result
139
B
-rw-r--r--
type_temporal_fractional.resul...
645.37
KB
-rw-r--r--
type_temporal_upgrade.result
13.45
KB
-rw-r--r--
type_time.result
120.35
KB
-rw-r--r--
type_timestamp.result
25.71
KB
-rw-r--r--
type_timestamp_explicit.result
31.6
KB
-rw-r--r--
type_uint.result
380
B
-rw-r--r--
type_varchar.result
22.85
KB
-rw-r--r--
type_year.result
7.16
KB
-rw-r--r--
udf.result
17.31
KB
-rw-r--r--
udf_services.result
499
B
-rw-r--r--
udf_skip_grants.result
223
B
-rw-r--r--
union.result
87.33
KB
-rw-r--r--
unsafe_binlog_innodb.result
4.36
KB
-rw-r--r--
update.result
24.32
KB
-rw-r--r--
upgrade.result
5.28
KB
-rw-r--r--
user_if_exists.result
9.13
KB
-rw-r--r--
user_limits.result
5.82
KB
-rw-r--r--
user_lock.result
23.14
KB
-rw-r--r--
user_var-binlog.result
2.21
KB
-rw-r--r--
user_var.result
18.95
KB
-rw-r--r--
utility_warnings.result
7
KB
-rw-r--r--
validate_password_plugin.resul...
12.25
KB
-rw-r--r--
validate_password_plugin_check...
3.69
KB
-rw-r--r--
varbinary.result
58
KB
-rw-r--r--
variables-big.result
972
B
-rw-r--r--
variables-notembedded.result
5.97
KB
-rw-r--r--
variables-win.result
347
B
-rw-r--r--
variables.result
63.66
KB
-rw-r--r--
variables_community.result
182
B
-rw-r--r--
variables_debug.result
2.13
KB
-rw-r--r--
version_token.result
11.29
KB
-rw-r--r--
version_token_bug21280801.resu...
2.72
KB
-rw-r--r--
version_token_errors.result
2.21
KB
-rw-r--r--
view.result
258
KB
-rw-r--r--
view_alias.result
6.19
KB
-rw-r--r--
view_grant.result
126.95
KB
-rw-r--r--
view_gtid_mode_on_debug.result
1.37
KB
-rw-r--r--
wait_timeout.result
1.07
KB
-rw-r--r--
warnings.result
11.89
KB
-rw-r--r--
warnings_engine_disabled.resul...
475
B
-rw-r--r--
windows.require
7
B
-rw-r--r--
windows.result
1.98
KB
-rw-r--r--
wl3836.result
2.71
KB
-rw-r--r--
wl5928.result
15.47
KB
-rw-r--r--
wl6219-csv.result
5.16
KB
-rw-r--r--
wl6219-innodb.result
5.18
KB
-rw-r--r--
wl6219-memory.result
5.18
KB
-rw-r--r--
wl6219-merge.result
3.87
KB
-rw-r--r--
wl6219-myisam.result
5.18
KB
-rw-r--r--
wl6219-upgrade.result
10.52
KB
-rw-r--r--
wl6301_1_not_windows.result
44
B
-rw-r--r--
wl6301_2_not_windows.result
46
B
-rw-r--r--
wl6301_3.result
89
B
-rw-r--r--
wl6443_deprecation.result
10.81
KB
-rw-r--r--
wl6661.result
6.33
KB
-rw-r--r--
wl6711_heap_to_disk.result
6.07
KB
-rw-r--r--
wl6978.result
214
B
-rw-r--r--
xa.result
13.51
KB
-rw-r--r--
xa_deadlock_binlog.result
3.08
KB
-rw-r--r--
xa_debug.result
3.18
KB
-rw-r--r--
xa_gtid.result
878
B
-rw-r--r--
xa_prepared_binlog_off.result
19.77
KB
-rw-r--r--
xml.result
41.94
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : mdl_sync.result
SET DEBUG_SYNC= 'RESET'; drop table if exists t1,t2,t3; create table t1 (i int); create table t2 (i int); connection: default lock tables t2 read; connection: con1 set debug_sync='mdl_upgrade_lock SIGNAL parked WAIT_FOR go'; alter table t1 rename t3; connection: default set debug_sync= 'now WAIT_FOR parked'; connection: con2 set debug_sync='mdl_acquire_lock_wait SIGNAL go'; drop table t1,t2; connection: con1 connection: default unlock tables; connection: con2 ERROR 42S02: Unknown table 'test.t1' drop table t3; SET DEBUG_SYNC= 'RESET'; # # Basic test coverage for type-of-operation aware metadata locks. # drop table if exists t1, t2, t3; set debug_sync= 'RESET'; create table t1 (c1 int); # # A) First let us check compatibility rules between differend kinds of # type-of-operation aware metadata locks. # Of course, these rules are already covered by the tests scattered # across the test suite. But it still makes sense to have one place # which covers all of them. # # 1) Acquire S (simple shared) lock on the table (by using HANDLER): # handler t1 open; # # Switching to connection 'mdl_con1'. # Check that S, SH, SR, SW and SWLP locks are compatible with it. handler t1 open t; handler t close; select column_name from information_schema.columns where table_schema='test' and table_name='t1'; column_name c1 select count(*) from t1; count(*) 0 insert into t1 values (1); insert low_priority into t1 values (1); # Check that SU lock is compatible with it. To do this use ALTER TABLE # which will fail when constructing .frm and thus obtaining SU metadata # lock. alter table t1 add index (not_exist); ERROR 42000: Key column 'not_exist' doesn't exist in table # Check that SRO lock is compatible with S lock. lock table t1 read; select count(*) from t1; count(*) 2 unlock tables; # Check that SNW lock is compatible with it. To do this use ALTER TABLE # which will fail during copying the table and thus obtaining SNW metadata # lock. alter table t1 add primary key (c1); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # Check that SNRW lock is compatible with S lock. lock table t1 write; insert into t1 values (1); unlock tables; # Check that X lock is incompatible with S lock. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con2'. # Check that the above RENAME is blocked because of S lock. # # Switching to connection 'default'. # Unblock RENAME TABLE. handler t1 close; # # Switching to connection 'mdl_con1'. # Reaping RENAME TABLE. # Restore the original state of the things. rename table t2 to t1; # # Switching to connection 'default'. handler t1 open; # # Switching to connection 'mdl_con1'. # Check that upgrade from SNW to X is blocked by presence of S lock. # Sending: alter table t1 add column c2 int;; # # Switching to connection 'mdl_con2'. # Check that the above ALTER TABLE is blocked because of S lock. # # Switching to connection 'default'. # Unblock ALTER TABLE. handler t1 close; # # Switching to connection 'mdl_con1'. # Reaping ALTER TABLE. # Restore the original state of the things. alter table t1 drop column c2; # # Switching to connection 'default'. handler t1 open; # # Switching to connection 'mdl_con1'. # Check that upgrade from SNRW to X is blocked by presence of S lock. lock table t1 write; # Sending: alter table t1 add column c2 int;; # # Switching to connection 'mdl_con2'. # Check that the above upgrade of SNRW to X in ALTER TABLE is blocked # because of S lock. # # Switching to connection 'default'. # Unblock ALTER TABLE. handler t1 close; # # Switching to connection 'mdl_con1'. # Reaping ALTER TABLE. # Restore the original state of the things. alter table t1 drop column c2; unlock tables; # # Switching to connection 'default'. # # 2) Acquire SH (shared high-priority) lock on the table. # We have to involve DEBUG_SYNC facility for this as usually # such kind of locks are short-lived. # set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish'; # Sending: select table_name, table_type, auto_increment, table_comment from information_schema.tables where table_schema='test' and table_name='t1';; # # Switching to connection 'mdl_con1'. set debug_sync= 'now WAIT_FOR locked'; # Check that S, SH, SR, SW and SWLP locks are compatible with it. handler t1 open; handler t1 close; select column_name from information_schema.columns where table_schema='test' and table_name='t1'; column_name c1 select count(*) from t1; count(*) 3 insert into t1 values (1), (1); delete low_priority from t1 limit 1; # Check that SU lock is compatible with it. To do this use ALTER TABLE # which will fail when constructing .frm and thus obtaining SU metadata # lock. alter table t1 add index (not_exist); ERROR 42000: Key column 'not_exist' doesn't exist in table # Check that SRO lock is compatible with SH lock. lock table t1 read; select count(*) from t1; count(*) 4 unlock tables; # Check that SNW lock is compatible with it. To do this use ALTER TABLE # which will fail during copying the table and thus obtaining SNW metadata # lock. alter table t1 add primary key (c1); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # Check that SNRW lock is compatible with SH lock. lock table t1 write; delete from t1 limit 1; unlock tables; # Check that X lock is incompatible with SH lock. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con2'. # Check that the above RENAME is blocked because of SH lock. # Unblock RENAME TABLE. set debug_sync= 'now SIGNAL finish'; # # Switching to connection 'default'. # Reaping SELECT ... FROM I_S. table_name table_type auto_increment table_comment t1 BASE TABLE NULL # # Switching to connection 'mdl_con1'. # Reaping RENAME TABLE. # Restore the original state of the things. rename table t2 to t1; # # Switching to connection 'default'. set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish'; # Sending: select table_name, table_type, auto_increment, table_comment from information_schema.tables where table_schema='test' and table_name='t1';; # # Switching to connection 'mdl_con1'. set debug_sync= 'now WAIT_FOR locked'; # Check that upgrade from SNW to X is blocked by presence of SH lock. # Sending: alter table t1 add column c2 int;; # # Switching to connection 'mdl_con2'. # Check that the above ALTER TABLE is blocked because of SH lock. # Unblock RENAME TABLE. set debug_sync= 'now SIGNAL finish'; # # Switching to connection 'default'. # Reaping SELECT ... FROM I_S. table_name table_type auto_increment table_comment t1 BASE TABLE NULL # # Switching to connection 'mdl_con1'. # Reaping ALTER TABLE. # Restore the original state of the things. alter table t1 drop column c2; # # Switching to connection 'default'. set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish'; select table_name, table_type, auto_increment, table_comment from information_schema.tables where table_schema='test' and table_name='t1';; # # Switching to connection 'mdl_con1'. set debug_sync= 'now WAIT_FOR locked'; # Check that upgrade from SNRW to X is blocked by presence of S lock. lock table t1 write; # Sending: alter table t1 add column c2 int;; # # Switching to connection 'mdl_con2'. # Check that the above upgrade of SNRW to X in ALTER TABLE is blocked # because of S lock. # Unblock RENAME TABLE. set debug_sync= 'now SIGNAL finish'; # # Switching to connection 'default'. # Reaping SELECT ... FROM I_S. table_name table_type auto_increment table_comment t1 BASE TABLE NULL # # Switching to connection 'mdl_con1'. # Reaping ALTER TABLE. # Restore the original state of the things. alter table t1 drop column c2; unlock tables; # # Switching to connection 'default'. # # # 3) Acquire SR lock on the table. # # begin; select count(*) from t1; count(*) 3 # # Switching to connection 'mdl_con1'. # Check that S, SH, SR, SW and SWLP locks are compatible with it. handler t1 open; handler t1 close; select column_name from information_schema.columns where table_schema='test' and table_name='t1'; column_name c1 select count(*) from t1; count(*) 3 insert into t1 values (1), (1); delete low_priority from t1 limit 1; # Check that SU lock is compatible with it. To do this use ALTER TABLE # which will fail when constructing .frm and thus obtaining SU metadata # lock. alter table t1 add index (not_exist); ERROR 42000: Key column 'not_exist' doesn't exist in table # Check that SRO lock is compatible with SR lock. lock table t1 read; select count(*) from t1; count(*) 4 unlock tables; # Check that SNW lock is compatible with it. To do this use ALTER TABLE # which will fail during copying the table and thus obtaining SNW metadata # lock. alter table t1 add primary key (c1); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # Check that SNRW lock is not compatible with SR lock. # Sending: lock table t1 write;; # # Switching to connection 'default'. # Check that the above LOCK TABLES is blocked because of SR lock. # Unblock LOCK TABLES. commit; # # Switching to connection 'mdl_con1'. # Reaping LOCK TABLES. delete from t1 limit 1; unlock tables; # # Switching to connection 'default'. begin; select count(*) from t1; count(*) 3 # # Switching to connection 'mdl_con1'. # Check that X lock is incompatible with SR lock. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con2'. # Check that the above RENAME is blocked because of SR lock. # # Switching to connection 'default'. # Unblock RENAME TABLE. commit; # # Switching to connection 'mdl_con1'. # Reaping RENAME TABLE. # Restore the original state of the things. rename table t2 to t1; # # Switching to connection 'default'. begin; select count(*) from t1; count(*) 3 # # Switching to connection 'mdl_con1'. # Check that upgrade from SNW to X is blocked by presence of SR lock. # Sending: alter table t1 add column c2 int;; # # Switching to connection 'mdl_con2'. # Check that the above ALTER TABLE is blocked because of SR lock. # # Switching to connection 'default'. # Unblock ALTER TABLE. commit; # # Switching to connection 'mdl_con1'. # Reaping ALTER TABLE. # Restore the original state of the things. alter table t1 drop column c2; # # There is no need to check that upgrade from SNRW to X is blocked # by presence of SR lock because SNRW is incompatible with SR anyway. # # # Switching to connection 'default'. # # # 4) Acquire SW lock on the table. # # begin; insert into t1 values (1); # # Switching to connection 'mdl_con1'. # Check that S, SH, SR, SW and SWLP locks are compatible with it. handler t1 open; handler t1 close; select column_name from information_schema.columns where table_schema='test' and table_name='t1'; column_name c1 # Disable result log to make test robust against # effects of concurrent insert. select * from t1; insert into t1 values (1); delete low_priority from t1 limit 1; # Check that SU lock is compatible with it. To do this use ALTER TABLE # which will fail when constructing .frm and thus obtaining SU metadata # lock. alter table t1 add index (not_exist); ERROR 42000: Key column 'not_exist' doesn't exist in table # Check that SRO lock is not compatible with SW lock; # Sending: lock table t1 read;; # Switching to connection 'default'. # Check that the above LOCK TABLE READ is blocked because of SW lock. # Unblock LOCK TABLE READ. commit; # # Switching to connection 'mdl_con1'. # Reaping LOCK TABLE READ. unlock tables; # # Switching to connection 'default'. begin; insert into t1 values (1); # # Switching to connection 'mdl_con1'. # Check that SNW lock is not compatible with SW lock. # Again we use ALTER TABLE which fails during copying # the table to avoid upgrade of SNW -> X. # Sending: alter table t1 add primary key (c1);; # # Switching to connection 'default'. # Check that the above ALTER TABLE is blocked because of SW lock. # Unblock ALTER TABLE. commit; # # Switching to connection 'mdl_con1'. # Reaping ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'default'. begin; insert into t1 values (1); # # Switching to connection 'mdl_con1'. # Check that SNRW lock is not compatible with SW lock. # Sending: lock table t1 write;; # # Switching to connection 'default'. # Check that the above LOCK TABLES is blocked because of SW lock. # Unblock LOCK TABLES. commit; # # Switching to connection 'mdl_con1'. # Reaping LOCK TABLES. delete from t1 limit 2; unlock tables; # # Switching to connection 'default'. begin; insert into t1 values (1); # # Switching to connection 'mdl_con1'. # Check that X lock is incompatible with SW lock. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con2'. # Check that the above RENAME is blocked because of SW lock. # # Switching to connection 'default'. # Unblock RENAME TABLE. commit; # # Switching to connection 'mdl_con1'. # Reaping RENAME TABLE. # Restore the original state of the things. rename table t2 to t1; # # There is no need to check that upgrade from SNW/SNRW to X is # blocked by presence of SW lock because SNW/SNRW is incompatible # with SW anyway. # # # Switching to connection 'default'. # # # 5) Acquire SWLP lock on the table. # # begin; insert low_priority into t1 values (1), (1); # # Switching to connection 'mdl_con1'. # Check that S, SH, SR, SW and SWLP locks are compatible with it. handler t1 open; handler t1 close; select column_name from information_schema.columns where table_schema='test' and table_name='t1'; column_name c1 # Disable result log to make test robust against # effects of concurrent insert. select * from t1; delete from t1 limit 1; delete low_priority from t1 limit 1; # Check that SU lock is compatible with it. To do this use ALTER TABLE # which will fail when constructing .frm and thus obtaining SU metadata # lock. alter table t1 add index (not_exist); ERROR 42000: Key column 'not_exist' doesn't exist in table # Check that SRO lock is not compatible with SWLP lock; # Sending: lock table t1 read;; # Switching to connection 'default'. # Check that the above LOCK TABLE READ is blocked because of SWLP lock. # Unblock LOCK TABLE READ. commit; # # Switching to connection 'mdl_con1'. # Reaping LOCK TABLE READ. unlock tables; # # Switching to connection 'default'. begin; insert low_priority into t1 values (1); # # Switching to connection 'mdl_con1'. # Check that SNW lock is not compatible with SWLP lock. # Again we use ALTER TABLE which fails during copying # the table to avoid upgrade of SNW -> X. # Sending: alter table t1 add primary key (c1);; # # Switching to connection 'default'. # Check that the above ALTER TABLE is blocked because of SWLP lock. # Unblock ALTER TABLE. commit; # # Switching to connection 'mdl_con1'. # Reaping ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'default'. begin; delete low_priority from t1 limit 2; # # Switching to connection 'mdl_con1'. # Check that SNRW lock is not compatible with SWLP lock. # Sending: lock table t1 write;; # # Switching to connection 'default'. # Check that the above LOCK TABLES is blocked because of SWLP lock. # Unblock LOCK TABLES. commit; # # Switching to connection 'mdl_con1'. # Reaping LOCK TABLES. unlock tables; # # Switching to connection 'default'. begin; insert low_priority into t1 values (1); # # Switching to connection 'mdl_con1'. # Check that X lock is incompatible with SWLP lock. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con2'. # Check that the above RENAME is blocked because of SW lock. # # Switching to connection 'default'. # Unblock RENAME TABLE. commit; # # Switching to connection 'mdl_con1'. # Reaping RENAME TABLE. # Restore the original state of the things. rename table t2 to t1; # # There is no need to check that upgrade from SNW/SNRW to X is # blocked by presence of SWLP lock because SNW/SNRW is incompatible # with SWLP anyway. # # # Switching to connection 'default'. # # # 6) Acquire SU lock on the table. We have to use DEBUG_SYNC for # this, to prevent SU from being immediately upgraded to X. # set debug_sync= 'alter_opened_table SIGNAL locked WAIT_FOR finish'; # Sending: alter table t1 add primary key (c1);; # # Switching to connection 'mdl_con1'. set debug_sync= 'now WAIT_FOR locked'; # Check that S, SH, SR, SW and SWLP locks are compatible with it. handler t1 open; handler t1 close; select column_name from information_schema.columns where table_schema='test' and table_name='t1'; column_name c1 select count(*) from t1; count(*) 5 insert into t1 values (1); delete low_priority from t1 limit 2; # Check that SU lock is incompatible with SU lock. # Sending: alter table t1 add primary key (c1);; # # Switching to connection 'mdl_con2'. # Check that the above ALTER is blocked because of SU lock. # Unblock ALTERs. set debug_sync= 'now SIGNAL finish'; # # Switching to connection 'default'. # Reaping first ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'mdl_con1'. # Reaping another ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'default'. set debug_sync= 'alter_opened_table SIGNAL locked WAIT_FOR finish'; # Sending: alter table t1 add primary key (c1);; # # Switching to connection 'mdl_con1'. set debug_sync= 'now WAIT_FOR locked'; # Check that SRO lock is compatible with SU lock. lock tables t1 read; unlock tables; # Check that SNRW lock is incompatible with SU lock. # Sending: lock table t1 write;; # # Switching to connection 'mdl_con2'. # Check that the above LOCK TABLES is blocked because of SU lock. # Unblock ALTER and thus LOCK TABLES. set debug_sync= 'now SIGNAL finish'; # # Switching to connection 'default'. # Reaping ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'mdl_con1'. # Reaping LOCK TABLES insert into t1 values (1); unlock tables; # # Switching to connection 'default'. set debug_sync= 'alter_opened_table SIGNAL locked WAIT_FOR finish'; # Sending: alter table t1 add primary key (c1);; # # Switching to connection 'mdl_con1'. set debug_sync= 'now WAIT_FOR locked'; # Check that X lock is incompatible with SU lock. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con2'. # Check that the above RENAME is blocked because of SU lock. # Unblock ALTER and thus RENAME TABLE. set debug_sync= 'now SIGNAL finish'; # # Switching to connection 'default'. # Now we have ALTER TABLE with SU->SNW and RENAME TABLE with pending # X-lock. In this case ALTER TABLE should be chosen as victim. # Reaping ALTER TABLE. ERROR 40001: Deadlock found when trying to get lock; try restarting transaction # # Switching to connection 'mdl_con1'. # Reaping RENAME TABLE # Revert back to original state of things. rename table t2 to t1; # # There is no need to check that upgrade from SNW/SNRW to X is # blocked by presence of another SU lock because SNW/SNRW is # incompatible with SU anyway. # # Switching to connection 'default'. # # # 7) Acquire SRO lock on the table. # # lock table t1 read; # # Switching to connection 'mdl_con1'. # Check that S, SH and SR locks are compatible with it. handler t1 open; handler t1 close; select column_name from information_schema.columns where table_schema='test' and table_name='t1'; column_name c1 select count(*) from t1; count(*) 5 # Check that SW lock is incompatible with SRO lock. # Sending: delete from t1 limit 2;; # # Switching to connection 'default'. # Check that the above DELETE is blocked because of SRO lock. # Unblock DELETE. unlock tables; # # Switching to connection 'mdl_con1'. # Reaping DELETE. # # Switching to connection 'default'. lock table t1 read; # # Switching to connection 'mdl_con1'. # Check that SWLP lock is incompatible with SRO lock. # Sending: insert low_priority into t1 values (1);; # # Switching to connection 'default'. # Check that the above INSERT is blocked because of SRO lock. # Unblock INSERT. unlock tables; # # Switching to connection 'mdl_con1'. # Reaping INSERT. # # Switching to connection 'default'. lock table t1 read; # # Switching to connection 'mdl_con1'. # Check that SU lock is compatible with SRO lock. alter table t1 add index (not_exist); ERROR 42000: Key column 'not_exist' doesn't exist in table # Check that SRO lock is compatible with SRO lock. lock table t1 read; unlock tables; # Check that SNW lock is compatible with SRO lock. # Again we use ALTER TABLE which fails during copying # the table to avoid upgrade of SNW -> X. alter table t1 add primary key (c1); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # Check that SNRW lock is incompatible with SRO lock. # Sending: lock table t1 write;; # # Switching to connection 'default'. # Check that the above LOCK TABLES is blocked because of SRO lock. # Unblock waiting LOCK TABLES. unlock tables; # # Switching to connection 'mdl_con1'. # Reaping LOCK TABLES insert into t1 values (1); unlock tables; # # Switching to connection 'default'. lock table t1 read; # # Switching to connection 'mdl_con1'. # Check that X lock is incompatible with SRO lock. # Sending: rename table t1 to t2;; # # Switching to connection 'default'. # Check that the above RENAME is blocked because of SRO lock. # Unblock RENAME TABLE unlock tables; # # Switching to connection 'mdl_con1'. # Reaping RENAME TABLE # Revert back to original state of things. rename table t2 to t1; # # Switching to connection 'default'. lock table t1 read; # # Switching to connection 'mdl_con1'. # Check that upgrade from SNW to X is blocked by presence of SRO lock. # Sending: alter table t1 add column c2 int;; # # Switching to connection 'mdl_con2'. # Check that the above ALTER TABLE is blocked because of SRO lock. # # Switching to connection 'default'. # Unblock ALTER TABLE. unlock tables; # # Switching to connection 'mdl_con1'. # Reaping ALTER TABLE. # Restore the original state of the things. alter table t1 drop column c2; # # There is no need to check that upgrade from SNRW to X is # blocked by presence of SRO lock because SNRW is incompatible # with SRO anyway. # # Switching to connection 'default'. # # # 8) Acquire SNW lock on the table. We have to use DEBUG_SYNC for # this, to prevent SNW from being immediately upgraded to X. # set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish'; # Sending: alter table t1 add primary key (c1), lock=shared, algorithm=copy;; # # Switching to connection 'mdl_con1'. set debug_sync= 'now WAIT_FOR locked'; # Check that S, SH and SR locks are compatible with it. handler t1 open; handler t1 close; select column_name from information_schema.columns where table_schema='test' and table_name='t1'; column_name c1 select count(*) from t1; count(*) 5 # Check that SW lock is incompatible with SNW lock. # Sending: delete from t1 limit 1;; # # Switching to connection 'mdl_con2'. # Check that the above DELETE is blocked because of SNW lock. # Unblock ALTER and thus DELETE. set debug_sync= 'now SIGNAL finish'; # # Switching to connection 'default'. # Reaping ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'mdl_con1'. # Reaping DELETE. # # Switching to connection 'default'. set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish'; # Sending: alter table t1 add primary key (c1), lock=shared, algorithm=copy;; # # Switching to connection 'mdl_con1'. set debug_sync= 'now WAIT_FOR locked'; # Check that SWLP lock is incompatible with SNW lock. # Sending: delete low_priority from t1 limit 1;; # # Switching to connection 'mdl_con2'. # Check that the above DELETE is blocked because of SNW lock. # Unblock ALTER. set debug_sync= 'now SIGNAL finish'; # # Switching to connection 'default'. # Reaping ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'mdl_con1'. # Reaping DELETE. # # Switching to connection 'default'. set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish'; # Sending: alter table t1 add primary key (c1), lock=shared, algorithm=copy;; # # Switching to connection 'mdl_con1'. set debug_sync= 'now WAIT_FOR locked'; # Check that SU lock is incompatible with SNW lock. # Sending: alter table t1 add primary key (c1);; # # Switching to connection 'mdl_con2'. # Check that the above ALTER is blocked because of SNW lock. # Unblock ALTERs. set debug_sync= 'now SIGNAL finish'; # # Switching to connection 'default'. # Reaping first ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'mdl_con1'. # Reaping another ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # Switching to connection 'default'. set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish'; # Sending: alter table t1 add primary key (c1), lock=shared, algorithm=copy;; # # Switching to connection 'mdl_con1'. set debug_sync= 'now WAIT_FOR locked'; # Check that SRO lock is compatible with SNW lock. lock tables t1 read; unlock tables; # # Note that we can't easily check SNW vs SNW locks since # SNW is only used by ALTER TABLE after upgrading from SU # and SU is also incompatible with SNW. # # Check that SNRW lock is incompatible with SNW lock. # Sending: lock table t1 write;; # # Switching to connection 'mdl_con2'. # Check that the above LOCK TABLES is blocked because of SNW lock. # Unblock ALTER and thus LOCK TABLES. set debug_sync= 'now SIGNAL finish'; # # Switching to connection 'default'. # Reaping ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'mdl_con1'. # Reaping LOCK TABLES insert into t1 values (1); unlock tables; # # Switching to connection 'default'. set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish'; # Sending: alter table t1 add primary key (c1), algorithm=copy, lock=shared;; # # Switching to connection 'mdl_con1'. set debug_sync= 'now WAIT_FOR locked'; # Check that X lock is incompatible with SNW lock. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con2'. # Check that the above RENAME is blocked because of SNW lock. # Unblock ALTER and thus RENAME TABLE. set debug_sync= 'now SIGNAL finish'; # # Switching to connection 'default'. # Reaping ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'mdl_con1'. # Reaping RENAME TABLE # Revert back to original state of things. rename table t2 to t1; # # There is no need to check that upgrade from SNW/SNRW to X is # blocked by presence of another SNW lock because SNW/SNRW is # incompatible with SNW anyway. # # Switching to connection 'default'. # # # 9) Acquire SNRW lock on the table. # # lock table t1 write; # # Switching to connection 'mdl_con1'. # Check that S and SH locks are compatible with it. handler t1 open; handler t1 close; select column_name from information_schema.columns where table_schema='test' and table_name='t1'; column_name c1 # Check that SR lock is incompatible with SNRW lock. # Sending: select count(*) from t1;; # # Switching to connection 'default'. # Check that the above SELECT is blocked because of SNRW lock. # Unblock SELECT. unlock tables; # # Switching to connection 'mdl_con1'. # Reaping SELECT. count(*) 4 # # Switching to connection 'default'. lock table t1 write; # # Switching to connection 'mdl_con1'. # Check that SW lock is incompatible with SNRW lock. # Sending: delete from t1 limit 2;; # # Switching to connection 'default'. # Check that the above DELETE is blocked because of SNRW lock. # Unblock DELETE. unlock tables; # # Switching to connection 'mdl_con1'. # Reaping DELETE. # # Switching to connection 'default'. lock table t1 write; # # Switching to connection 'mdl_con1'. # Check that SWLP lock is incompatible with SNRW lock. # Sending: insert low_priority into t1 values (1);; # # Switching to connection 'default'. # Check that the above INSERT is blocked because of SNRW lock. # Unblock INSERT. unlock tables; # # Switching to connection 'mdl_con1'. # Reaping INSERT. # # Switching to connection 'default'. lock table t1 write; # # Switching to connection 'mdl_con1'. # Check that SU lock is incompatible with SNRW lock. # Sending: alter table t1 add primary key (c1);; # # Switching to connection 'default'. # Check that the above ALTER is blocked because of SNRW lock. # Unblock ALTER. unlock tables; # # Switching to connection 'mdl_con1'. # Reaping ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'default'. lock table t1 write; # # Switching to connection 'mdl_con1'. # Check that SRO lock is incompatible with SNRW lock. # Sending: lock table t1 read;; # # Switching to connection 'default'. # Check that the above LOCK TABLE READ is blocked because of SNRW lock. # Unblock LOCK TABLE READ. unlock tables; # # Switching to connection 'mdl_con1'. # Reaping LOCK TABLE READ. unlock tables; # # Note that we can't easily check SNW vs SNRW locks since # SNW is only used by ALTER TABLE after upgrading from SU # and SU is also incompatible with SNRW. # # Switching to connection 'default'. lock table t1 write; # # Switching to connection 'mdl_con1'. # Check that SNRW lock is incompatible with SNRW lock. # Sending: lock table t1 write;; # # Switching to connection 'default'. # Check that the above LOCK TABLES is blocked because of SNRW lock. # Unblock waiting LOCK TABLES. unlock tables; # # Switching to connection 'mdl_con1'. # Reaping LOCK TABLES insert into t1 values (1); unlock tables; # # Switching to connection 'default'. lock table t1 write; # # Switching to connection 'mdl_con1'. # Check that X lock is incompatible with SNRW lock. # Sending: rename table t1 to t2;; # # Switching to connection 'default'. # Check that the above RENAME is blocked because of SNRW lock. # Unblock RENAME TABLE unlock tables; # # Switching to connection 'mdl_con1'. # Reaping RENAME TABLE # Revert back to original state of things. rename table t2 to t1; # # There is no need to check that upgrade from SNW/SNRW to X is # blocked by presence of another SNRW lock because SNW/SNRW is # incompatible with SNRW anyway. # # Switching to connection 'default'. # # # 10) Now do the same round of tests for X lock. We use additional # table to get long-lived lock of this type. # create table t2 (c1 int); # # Switching to connection 'mdl_con2'. # Take a lock on t2, so RENAME TABLE t1 TO t2 will get blocked # after acquiring X lock on t1. lock tables t2 read; # # Switching to connection 'default'. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME has acquired X lock on t1 and is waiting for t2. # Check that S lock in incompatible with X lock. # Sending: handler t1 open;; # # Switching to connection 'mdl_con2'. # Check that the above HANDLER statement is blocked because of X lock. # Unblock RENAME TABLE unlock tables; # # Switching to connection 'default'. # Reaping RENAME TABLE. ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping HANDLER. handler t1 close; # # Switching to connection 'mdl_con2'. # Prepare for blocking RENAME TABLE. lock tables t2 read; # # Switching to connection 'default'. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME has acquired X lock on t1 and is waiting for t2. # Check that SH lock in incompatible with X lock. # Sending: select column_name from information_schema.columns where table_schema='test' and table_name='t1';; # # Switching to connection 'mdl_con2'. # Check that the above SELECT ... FROM I_S ... statement is blocked # because of X lock. # Unblock RENAME TABLE unlock tables; # # Switching to connection 'default'. # Reaping RENAME TABLE. ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping SELECT ... FROM I_S. column_name c1 # # Switching to connection 'mdl_con2'. # Prepare for blocking RENAME TABLE. lock tables t2 read; # # Switching to connection 'default'. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME has acquired X lock on t1 and is waiting for t2. # Check that SR lock in incompatible with X lock. # Sending: select count(*) from t1;; # # Switching to connection 'mdl_con2'. # Check that the above SELECT statement is blocked # because of X lock. # Unblock RENAME TABLE unlock tables; # # Switching to connection 'default'. # Reaping RENAME TABLE. ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping SELECT. count(*) 4 # # Switching to connection 'mdl_con2'. # Prepare for blocking RENAME TABLE. lock tables t2 read; # # Switching to connection 'default'. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME has acquired X lock on t1 and is waiting for t2. # Check that SW lock in incompatible with X lock. # Sending: delete from t1 limit 2;; # # Switching to connection 'mdl_con2'. # Check that the above DELETE statement is blocked # because of X lock. # Unblock RENAME TABLE unlock tables; # # Switching to connection 'default'. # Reaping RENAME TABLE. ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping DELETE. # # Switching to connection 'mdl_con2'. # Prepare for blocking RENAME TABLE. lock tables t2 read; # # Switching to connection 'default'. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME has acquired X lock on t1 and is waiting for t2. # Check that SWLP lock in incompatible with X lock. # Sending: insert low_priority into t1 values (1);; # # Switching to connection 'mdl_con2'. # Check that the above INSERT statement is blocked # because of X lock. # Unblock RENAME TABLE unlock tables; # # Switching to connection 'default'. # Reaping RENAME TABLE. ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping INSERT. # # Switching to connection 'mdl_con2'. # Prepare for blocking RENAME TABLE. lock tables t2 read; # # Switching to connection 'default'. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME has acquired X lock on t1 and is waiting for t2. # Check that SU lock is incompatible with X lock. # Sending: alter table t1 add primary key (c1);; # # Switching to connection 'mdl_con2'. # Check that the above ALTER statement is blocked # because of X lock. # Unblock RENAME TABLE unlock tables; # # Switching to connection 'default'. # Reaping RENAME TABLE ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping ALTER. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'mdl_con2'. # Prepare for blocking RENAME TABLE. lock tables t2 read; # # Switching to connection 'default'. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME has acquired X lock on t1 and is waiting for t2. # Check that SRO lock is incompatible with X lock. # Sending: lock table t1 read;; # # Switching to connection 'mdl_con2'. # Check that the above LOCK TABLE READ statement is blocked # because of X lock. # Unblock RENAME TABLE unlock tables; # # Switching to connection 'default'. # Reaping RENAME TABLE ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping LOCK TABLE READ. unlock tables; # # Note that we can't easily check SNW vs X locks since # SNW is only used by ALTER TABLE after upgrading from SU # and SU is also incompatible with X. # # Switching to connection 'mdl_con2'. # Prepare for blocking RENAME TABLE. lock tables t2 read; # # Switching to connection 'default'. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME has acquired X lock on t1 and is waiting for t2. # Check that SNRW lock is incompatible with X lock. # Sending: lock table t1 write;; # # Switching to connection 'mdl_con2'. # Check that the above LOCK TABLE statement is blocked # because of X lock. # Unblock RENAME TABLE unlock tables; # # Switching to connection 'default'. # Reaping RENAME TABLE ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping LOCK TABLE. unlock tables; # # Switching to connection 'mdl_con2'. # Prepare for blocking RENAME TABLE. lock tables t2 read; # # Switching to connection 'default'. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME has acquired X lock on t1 and is waiting for t2. # Check that X lock is incompatible with X lock. # Sending: rename table t1 to t3;; # # Switching to connection 'mdl_con2'. # Check that the above RENAME statement is blocked # because of X lock. # Unblock RENAME TABLE unlock tables; # # Switching to connection 'default'. # Reaping RENAME TABLE ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping RENAME. rename table t3 to t1; # # B) Now let us test compatibility in cases when both locks # are pending. I.e. let us test rules for priorities between # different types of metadata locks. # # Note: No tests for pending SU lock as this lock requires # even stronger active or pending lock. # # # Switching to connection 'mdl_con2'. # # 1) Check compatibility for pending SW lock. # # Acquire SRO lock in order to create pending SW lock later. lock table t1 read; # # Switching to connection 'default'. # Add pending SW lock. # Sending: insert into t1 values (1);; # # Switching to connection 'mdl_con1'. # Check that INSERT is waiting with pending SW lock. # Check that S, SH, SR locks are compatible with pending SW handler t1 open t; handler t close; select column_name from information_schema.columns where table_schema='test' and table_name='t1'; column_name c1 select count(*) from t1; count(*) 3 # Can't check if SW and SWLP are compatible with pending SW # as they are not compatible with active SRO. # # Check that SU lock is compatible with pending SW lock alter table t1 add index (not_exist); ERROR 42000: Key column 'not_exist' doesn't exist in table # Check that SRO lock is not compatible with pending SW lock # Sending: lock table t1 read;; # # Switching to connection 'mdl_con2'. # Check that LOCK TABLE is waiting due to pending SW lock. unlock tables; # # Switching to connection 'default'. # Reaping INSERT # # Switching to connection 'mdl_con1'. # Reaping 2nd LOCK TABLE READ unlock tables; # # Switching to connection 'mdl_con2'. # # Acquire SRO lock in order to create pending SW lock later. lock table t1 read; # # Switching to connection 'default'. # Add pending SW lock. # Sending: delete from t1 limit 2;; # # Switching to connection 'mdl_con1'. # Check that DELETE is waiting with pending SW lock. # Check that SNW lock is compatible with pending SW lock alter table t1 add primary key (c1); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # We can't do similar check for SNRW and X locks because # they will also be blocked by active SRO lock. # # # Switching to connection 'mdl_con2'. unlock tables; # # Switching to connection 'default'. # Reaping DELETE. # # Switching to connection 'mdl_con2'. # # 2) Check compatibility for pending SWLP lock. # # Acquire SRO lock in order to create pending SWLP lock later. lock table t1 read; # # Switching to connection 'default'. # Add pending SWLP lock. # Sending: insert low_priority into t1 values (1);; # # Switching to connection 'mdl_con1'. # Check that INSERT is waiting with pending SWLP lock. # Check that S, SH, SR locks are compatible with pending SWLP handler t1 open t; handler t close; select column_name from information_schema.columns where table_schema='test' and table_name='t1'; column_name c1 select count(*) from t1; count(*) 2 # Can't check if SW and SWLP are compatible with pending SWLP # as they are not compatible with active SRO. # # Check that SU lock is compatible with pending SWLP lock alter table t1 add index (not_exist); ERROR 42000: Key column 'not_exist' doesn't exist in table # Check that SRO lock is compatible with pending SWLP lock lock table t1 read; unlock tables; # Check that SNW lock is compatible with pending SWLP lock alter table t1 add primary key (c1); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # We can't do similar check for SNRW and X locks because # they will also be blocked by active SRO lock. # # # Switching to connection 'mdl_con2'. unlock tables; # # Switching to connection 'default'. # Reaping INSERT. # # Switching to connection 'mdl_con2'. # # 3) Check compatibility for pending SRO lock. # # Acquire SW lock in order to create pending SRO lock later. begin; insert into t1 values (1); # # Switching to connection 'default'. # Add pending SRO lock. # Sending: lock table t1 read;; # # Switching to connection 'mdl_con1'. # Check that LOCK TABLE READ is waiting with pending SRO lock. # Check that S, SH, SR, SW locks are compatible with pending SRO handler t1 open t; handler t close; select column_name from information_schema.columns where table_schema='test' and table_name='t1'; column_name c1 select count(*) from t1; count(*) 4 delete from t1 limit 1; # Check that SWLP is incompatible with pending SRO # Sending: delete low_priority from t1 limit 1;; # # Switching to connection 'mdl_con2'. # Check that DELETE is waiting with pending SRO lock. # Unblock LOCK TABLE READ commit; # # Switching to connection 'default'. # Reaping LOCK TABLE READ unlock tables; # # Switching to connection 'mdl_con1'. # Reaping DELETE # # Switching to connection 'mdl_con2'. begin; insert into t1 values (1); # # Switching to connection 'default'. # Add pending SRO lock. # Sending: lock table t1 read;; # # Switching to connection 'mdl_con1'. # Check that LOCK TABLE READ is waiting with pending SRO lock. # Check that SU lock is compatible with pending SRO lock alter table t1 add index (not_exist); ERROR 42000: Key column 'not_exist' doesn't exist in table # # We can't do similar check for SRO, SNW, SNRW and X locks because # they will also be blocked by active SW lock. # # # Switching to connection 'mdl_con2'. # Unblock LOCK TABLE READ. commit; # # Switching to connection 'default'. # Reaping LOCK TABLE READ. unlock tables; # # Switching to connection 'mdl_con2'. # # 4) Check compatibility for pending SNW lock. # # Acquire SW lock in order to create pending SNW lock later. begin; insert into t1 values (1); # # Switching to connection 'default'. # Add pending SNW lock. # Sending: alter table t1 add primary key (c1);; # # Switching to connection 'mdl_con1'. # Check that ALTER TABLE is waiting with pending SNW lock. # Check that S, SH and SR locks are compatible with pending SNW handler t1 open t; handler t close; select column_name from information_schema.columns where table_schema='test' and table_name='t1'; column_name c1 select count(*) from t1; count(*) 4 # Check that SW is incompatible with pending SNW # Sending: delete from t1 limit 1;; # # Switching to connection 'mdl_con2'. # Check that the above DELETE is blocked because of pending SNW lock. # Unblock ALTER TABLE. commit; # # Switching to connection 'default'. # Reaping ALTER. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'mdl_con1'. # Reaping DELETE. # # Switching to connection 'mdl_con2'. # Acquire SW lock in order to create pending SNW lock later. begin; insert into t1 values (1); # # Switching to connection 'default'. # Add pending SNW lock. # Sending: alter table t1 add primary key (c1);; # # Switching to connection 'mdl_con1'. # Check that ALTER TABLE is waiting with pending SNW lock. # Check that SWLP is incompatible with pending SNW # Sending: delete low_priority from t1 limit 1;; # # Switching to connection 'mdl_con2'. # Check that the above DELETE is blocked because of pending SNW lock. # Unblock ALTER TABLE. commit; # # Switching to connection 'default'. # Reaping ALTER. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'mdl_con1'. # Reaping DELETE. # # We can't do similar check for SU as ALTER first acquire SU # before upgrade to SNW. # We can't do similar check for SRO, SNW, SNRW and X locks because # they will also be blocked by active SW lock. # # # Switching to connection 'mdl_con2'. # # 5) Check compatibility for pending SNRW lock. # # Acquire SR lock in order to create pending SNRW lock. begin; select count(*) from t1; count(*) 3 # # Switching to connection 'default'. # Add pending SNRW lock. # Sending: lock table t1 write;; # # Switching to connection 'mdl_con1'. # Check that LOCK TABLE is waiting with pending SNRW lock. # Check that S and SH locks are compatible with pending SNRW handler t1 open t; handler t close; select column_name from information_schema.columns where table_schema='test' and table_name='t1'; column_name c1 # Check that SR is incompatible with pending SNRW # Sending: select count(*) from t1;; # # Switching to connection 'mdl_con2'. # Check that the above SELECT is blocked because of pending SNRW lock. # Unblock LOCK TABLE. commit; # # Switching to connection 'default'. # Reaping LOCK TABLE. unlock tables; # # Switching to connection 'mdl_con1'. # Reaping SELECT. count(*) 3 # Restore pending SNRW lock. # # Switching to connection 'mdl_con2'. begin; select count(*) from t1; count(*) 3 # # Switching to connection 'default'. # Sending: lock table t1 write;; # # Switching to connection 'mdl_con1'. # Check that LOCK TABLE is waiting with pending SNRW lock. # Check that SW is incompatible with pending SNRW # Sending: insert into t1 values (1),(1);; # # Switching to connection 'mdl_con2'. # Check that the above INSERT is blocked because of pending SNRW lock. # Unblock LOCK TABLE. commit; # # Switching to connection 'default'. # Reaping LOCK TABLE. unlock tables; # # Switching to connection 'mdl_con1'. # Reaping INSERT. # Restore pending SNRW lock. # # Switching to connection 'mdl_con2'. begin; select count(*) from t1; count(*) 5 # # Switching to connection 'default'. # Sending: lock table t1 write;; # # Switching to connection 'mdl_con1'. # Check that LOCK TABLE is waiting with pending SNRW lock. # Check that SWLP is incompatible with pending SNRW # Sending: delete low_priority from t1 limit 1;; # # Switching to connection 'mdl_con2'. # Check that the above DELETE is blocked because of pending SNRW lock. # Unblock LOCK TABLE. commit; # # Switching to connection 'default'. # Reaping LOCK TABLE. unlock tables; # # Switching to connection 'mdl_con1'. # Reaping DELETE. # Restore pending SNRW lock. # # Switching to connection 'mdl_con2'. begin; select count(*) from t1; count(*) 4 # # Switching to connection 'default'. # Sending: lock table t1 write;; # # Switching to connection 'mdl_con1'. # Check that LOCK TABLE is waiting with pending SNRW lock. # Check that SU lock is compatible with pending SNRW lock alter table t1 add index (not_exist); ERROR 42000: Key column 'not_exist' doesn't exist in table # Check that SRO is incompatible with pending SNRW # Sending: lock table t1 read;; # # Switching to connection 'mdl_con2'. # Check that the above LOCK TABLE READ is blocked because # of pending SNRW lock. # Unblock LOCK TABLE. commit; # # Switching to connection 'default'. # Reaping LOCK TABLE. unlock tables; # # Switching to connection 'mdl_con1'. # Reaping LOCK TABLE READ. unlock tables; # Restore pending SNRW lock. # # Switching to connection 'mdl_con2'. begin; select count(*) from t1; count(*) 4 # # Switching to connection 'default'. # Sending: lock table t1 write;; # # Switching to connection 'mdl_con1'. # Check that LOCK TABLE is waiting with pending SNRW lock. # Check that SNW is compatible with pending SNRW # So ALTER TABLE statements are not starved by LOCK TABLEs. alter table t1 add primary key (c1); ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'mdl_con2'. # Unblock LOCK TABLE. commit; # # Switching to connection 'default'. # Reaping LOCK TABLE. unlock tables; # # We can't do similar check for SNRW and X locks because # they will also be blocked by active SR lock. # # # Switching to connection 'mdl_con2'. # # 6) Check compatibility for pending X lock. # # Acquire SR lock in order to create pending X lock. begin; select count(*) from t1; count(*) 4 # # Switching to connection 'default'. # Add pending X lock. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME TABLE is waiting with pending X lock. # Check that SH locks are compatible with pending X select column_name from information_schema.columns where table_schema='test' and table_name='t1'; column_name c1 # Check that S is incompatible with pending X # Sending: handler t1 open;; # # Switching to connection 'mdl_con2'. # Check that the above HANDLER OPEN is blocked because of pending X lock. # Unblock RENAME TABLE. commit; # # Switching to connection 'default'. # Reaping RENAME TABLE. ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping HANDLER t1 OPEN. handler t1 close; # Restore pending X lock. # # Switching to connection 'mdl_con2'. begin; select count(*) from t1; count(*) 4 # # Switching to connection 'default'. # Add pending X lock. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME TABLE is waiting with pending X lock. # Check that SR is incompatible with pending X # Sending: select count(*) from t1;; # # Switching to connection 'mdl_con2'. # Check that the above SELECT is blocked because of pending X lock. # Unblock RENAME TABLE. commit; # # Switching to connection 'default'. # Reaping RENAME TABLE. ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping SELECT. count(*) 4 # Restore pending X lock. # # Switching to connection 'mdl_con2'. begin; select count(*) from t1; count(*) 4 # # Switching to connection 'default'. # Add pending X lock. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME TABLE is waiting with pending X lock. # Check that SW is incompatible with pending X # Sending: delete from t1 limit 2;; # # Switching to connection 'mdl_con2'. # Check that the above DELETE is blocked because of pending X lock. # Unblock RENAME TABLE. commit; # # Switching to connection 'default'. # Reaping RENAME TABLE. ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping DELETE. # Restore pending X lock. # # Switching to connection 'mdl_con2'. begin; select count(*) from t1; count(*) 2 # # Switching to connection 'default'. # Add pending X lock. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME TABLE is waiting with pending X lock. # Check that SWLP is incompatible with pending X # Sending: insert low_priority into t1 values (1);; # # Switching to connection 'mdl_con2'. # Check that the above INSERT is blocked because of pending X lock. # Unblock RENAME TABLE. commit; # # Switching to connection 'default'. # Reaping RENAME TABLE. ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping INSERT. # Restore pending X lock. # # Switching to connection 'mdl_con2'. begin; select count(*) from t1; count(*) 3 # # Switching to connection 'default'. # Add pending X lock. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME TABLE is waiting with pending X lock. # Check that SU is incompatible with pending X # Sending: alter table t1 add index (not_exist);; # # Switching to connection 'mdl_con2'. # Check that the above ALTER TABLE is blocked # because of pending X lock. # Unblock RENAME TABLE. commit; # # Switching to connection 'default'. # Reaping RENAME TABLE. ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping ALTER TABLE. ERROR 42000: Key column 'not_exist' doesn't exist in table # Restore pending X lock. # # Switching to connection 'mdl_con2'. begin; select count(*) from t1; count(*) 3 # # Switching to connection 'default'. # Add pending X lock. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME TABLE is waiting with pending X lock. # Check that SRO is incompatible with pending X # Sending: lock table t1 read;; # # Switching to connection 'mdl_con2'. # Check that the above LOCK TABLE READ is blocked # because of pending X lock. # Unblock RENAME TABLE. commit; # # Switching to connection 'default'. # Reaping RENAME TABLE. ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping LOCK TABLE READ. unlock tables; # Restore pending X lock. # # Switching to connection 'mdl_con2'. begin; select count(*) from t1; count(*) 3 # # Switching to connection 'default'. # Add pending X lock. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME TABLE is waiting with pending X lock. # Check that SNW is incompatible with pending X # Sending: alter table t1 add primary key (c1);; # # Switching to connection 'mdl_con2'. # Check that the above ALTER TABLE is blocked because of pending X lock. # Unblock RENAME TABLE. commit; # # Switching to connection 'default'. # Reaping RENAME TABLE. ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # Restore pending X lock. # # Switching to connection 'mdl_con2'. handler t1 open; # # Switching to connection 'default'. # Add pending X lock. # Sending: rename table t1 to t2;; # # Switching to connection 'mdl_con1'. # Check that RENAME TABLE is waiting with pending X lock. # Check that SNRW is incompatible with pending X # Sending: lock table t1 write;; # # Switching to connection 'mdl_con3'. # Check that the above LOCK TABLES is blocked because of pending X lock. # # Switching to connection 'mdl_con2'. # Unblock RENAME TABLE. handler t1 close; # # Switching to connection 'default'. # Reaping RENAME TABLE. ERROR 42S01: Table 't2' already exists # # Switching to connection 'mdl_con1'. # Reaping LOCK TABLES. unlock tables; # # Switching to connection 'default'. # # # C) Now let us test how type-of-operation locks are handled in # transactional context. Obviously we are mostly interested # in conflicting types of locks. # # Note: No tests for active/pending SU lock since # ALTER TABLE is in its own transaction. # No tests for active/pending SRO lock since # it is pretty similar to SNW lock in this # respect. # # # 1) Let us check how various locks used within transactional # context interact with active/pending SNW lock. # # We start with case when we are acquiring lock on the table # which was not used in the transaction before. begin; select count(*) from t1; count(*) 3 # # Switching to connection 'mdl_con1'. # Create an active SNW lock on t2. # We have to use DEBUG_SYNC facility as otherwise SNW lock # will be immediately released (or upgraded to X lock). insert into t2 values (1), (1); set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish'; # Sending: alter table t2 add primary key (c1), algorithm=copy, lock=shared;; # # Switching to connection 'default'. set debug_sync= 'now WAIT_FOR locked'; # SR lock should be acquired without any waiting. select count(*) from t2; count(*) 2 commit; # Now let us check that we will wait in case of SW lock. begin; select count(*) from t1; count(*) 3 # Sending: insert into t2 values (1);; # # Switching to connection 'mdl_con2'. # Check that the above INSERT is blocked. # Unblock ALTER TABLE and thus INSERT. set debug_sync= 'now SIGNAL finish'; # # Switching to connection 'mdl_con1'. # Reap ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'default'. # Reap INSERT. commit; # # Now let us see what happens when we are acquiring lock on the table # which is already used in transaction. # # *) First, case when transaction which has SR lock on the table also # locked in SNW mode acquires yet another SR lock and then tries # to acquire SW lock. begin; select count(*) from t1; count(*) 3 # # Switching to connection 'mdl_con1'. # Create an active SNW lock on t1. set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish'; # Sending: alter table t1 add primary key (c1), algorithm=copy, lock=shared;; # # Switching to connection 'default'. set debug_sync= 'now WAIT_FOR locked'; # We should still be able to get SR lock without waiting. select count(*) from t1; count(*) 3 # Since the above ALTER TABLE is not upgrading SNW lock to X by waiting # for SW lock we won't create deadlock. # So the below INSERT should not end-up with ER_LOCK_DEADLOCK error. # Sending: insert into t1 values (1);; # # Switching to connection 'mdl_con2'. # Check that the above INSERT is blocked. # Unblock ALTER TABLE and thus INSERT. set debug_sync= 'now SIGNAL finish'; # # Switching to connection 'mdl_con1'. # Reap ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'default'. # Reap INSERT. commit; # # **) Now test in which transaction that has SW lock on the table # against which there is pending SNW lock acquires SR and SW # locks on this table. # begin; insert into t1 values (1); # # Switching to connection 'mdl_con1'. # Create pending SNW lock on t1. # Sending: alter table t1 add primary key (c1);; # # Switching to connection 'default'. # Wait until ALTER TABLE starts waiting for SNW lock. # We should still be able to get both SW and SR locks without waiting. select count(*) from t1; count(*) 5 delete from t1 limit 1; # Unblock ALTER TABLE. commit; # # Switching to connection 'mdl_con1'. # Reap ALTER TABLE. ERROR 23000: Duplicate entry '1' for key 'PRIMARY' # # Switching to connection 'default'. # # 2) Now similar tests for active SNW lock which is being upgraded # to X lock. # # Again we start with case when we are acquiring lock on the # table which was not used in the transaction before. begin; select count(*) from t1; count(*) 4 # # Switching to connection 'mdl_con2'. # Start transaction which will prevent SNW -> X upgrade from # completing immediately. begin; select count(*) from t2; count(*) 3 # # Switching to connection 'mdl_con1'. # Create SNW lock pending upgrade to X on t2. # Sending: alter table t2 add column c2 int;; # # Switching to connection 'default'. # Wait until ALTER TABLE starts waiting X lock. # Check that attempt to acquire SR lock on t2 causes waiting. # Sending: select count(*) from t2;; # # Switching to connection 'mdl_con2'. # Check that the above SELECT is blocked. # Unblock ALTER TABLE. commit; # # Switching to connection 'mdl_con1'. # Reap ALTER TABLE. # # Switching to connection 'default'. # Reap SELECT. count(*) 3 commit; # Do similar check for SW lock. begin; select count(*) from t1; count(*) 4 # # Switching to connection 'mdl_con2'. # Start transaction which will prevent SNW -> X upgrade from # completing immediately. begin; select count(*) from t2; count(*) 3 # # Switching to connection 'mdl_con1'. # Create SNW lock pending upgrade to X on t2. # Sending: alter table t2 drop column c2;; # # Switching to connection 'default'. # Wait until ALTER TABLE starts waiting X lock. # Check that attempt to acquire SW lock on t2 causes waiting. # Sending: insert into t2 values (1);; # # Switching to connection 'mdl_con2'. # Check that the above INSERT is blocked. # Unblock ALTER TABLE. commit; # # Switching to connection 'mdl_con1'. # Reap ALTER TABLE. # # Switching to connection 'default'. # Reap INSERT. commit; # # Test for the case in which we are acquiring lock on the table # which is already used in transaction. # begin; select count(*) from t1; count(*) 4 # # Switching to connection 'mdl_con1'. # Create SNW lock pending upgrade to X. # Sending: alter table t1 add column c2 int;; # # Switching to connection 'default'. # Wait until ALTER TABLE starts waiting X lock. # Check that transaction is still able to acquire SR lock. select count(*) from t1; count(*) 4 # Waiting trying to acquire SW lock will cause deadlock and # therefore should cause an error. delete from t1 limit 1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction # Unblock ALTER TABLE. commit; # # Switching to connection 'mdl_con1'. # Reap ALTER TABLE. # # Switching to connection 'default'. # # 3) Check how various locks used within transactional context # interact with active/pending SNRW lock. # # Once again we start with case when we are acquiring lock on # the table which was not used in the transaction before. begin; select count(*) from t1; count(*) 4 # # Switching to connection 'mdl_con1'. lock table t2 write; # # Switching to connection 'default'. # Attempt to acquire SR should be blocked. It should # not cause errors as it does not creates deadlock. # Sending: select count(*) from t2;; # # Switching to connection 'mdl_con1'. # Check that the above SELECT is blocked # Unblock SELECT. unlock tables; # # Switching to connection 'default'. # Reap SELECT. count(*) 4 commit; # Repeat the same test for SW lock. begin; select count(*) from t1; count(*) 4 # # Switching to connection 'mdl_con1'. lock table t2 write; # # Switching to connection 'default'. # Again attempt to acquire SW should be blocked and should # not cause any errors. # Sending: delete from t2 limit 1;; # # Switching to connection 'mdl_con1'. # Check that the above DELETE is blocked # Unblock DELETE. unlock tables; # # Switching to connection 'default'. # Reap DELETE. commit; # # Now coverage for the case in which we are acquiring lock on # the table which is already used in transaction and against # which there is a pending SNRW lock request. # # *) Let us start with case when transaction has only a SR lock. # begin; select count(*) from t1; count(*) 4 # # Switching to connection 'mdl_con1'. # Sending: lock table t1 write;; # # Switching to connection 'default'. # Wait until LOCK TABLE is blocked creating pending request for X lock. # Check that another instance of SR lock is granted without waiting. select count(*) from t1; count(*) 4 # Attempt to wait for SW lock will lead to deadlock, thus # the below statement should end with ER_LOCK_DEADLOCK error. delete from t1 limit 1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction # Unblock LOCK TABLES. commit; # # Switching to connection 'mdl_con1'. # Reap LOCK TABLES. unlock tables; # # Switching to connection 'default'. # # **) Now case when transaction has a SW lock. # begin; delete from t1 limit 1; # # Switching to connection 'mdl_con1'. # Sending: lock table t1 write;; # # Switching to connection 'default'. # Wait until LOCK TABLE is blocked creating pending request for X lock. # Check that both SR and SW locks are granted without waiting # and errors. select count(*) from t1; count(*) 3 insert into t1 values (1, 1); # Unblock LOCK TABLES. commit; # # Switching to connection 'mdl_con1'. # Reap LOCK TABLES. unlock tables; # # Switching to connection 'default'. # # 4) Check how various locks used within transactional context # interact with active/pending X lock. # # As usual we start with case when we are acquiring lock on # the table which was not used in the transaction before. begin; select count(*) from t1; count(*) 4 # # Switching to connection 'mdl_con2'. # Start transaction which will prevent X lock from going away # immediately. begin; select count(*) from t2; count(*) 3 # # Switching to connection 'mdl_con1'. # Create pending X lock on t2. # Sending: rename table t2 to t3;; # # Switching to connection 'default'. # Wait until RENAME TABLE starts waiting with pending X lock. # Check that attempt to acquire SR lock on t2 causes waiting. # Sending: select count(*) from t2;; # # Switching to connection 'mdl_con2'. # Check that the above SELECT is blocked. # Unblock RENAME TABLE. commit; # # Switching to connection 'mdl_con1'. # Reap RENAME TABLE. # # Switching to connection 'default'. # Reap SELECT. ERROR 42S02: Table 'test.t2' doesn't exist commit; rename table t3 to t2; # The same test for SW lock. begin; select count(*) from t1; count(*) 4 # # Switching to connection 'mdl_con2'. # Start transaction which will prevent X lock from going away # immediately. begin; select count(*) from t2; count(*) 3 # # Switching to connection 'mdl_con1'. # Create pending X lock on t2. # Sending: rename table t2 to t3;; # # Switching to connection 'default'. # Wait until RENAME TABLE starts waiting with pending X lock. # Check that attempt to acquire SW lock on t2 causes waiting. # Sending: delete from t2 limit 1;; # # Switching to connection 'mdl_con2'. # Check that the above DELETE is blocked. # Unblock RENAME TABLE. commit; # # Switching to connection 'mdl_con1'. # Reap RENAME TABLE. # # Switching to connection 'default'. # Reap DELETE. ERROR 42S02: Table 'test.t2' doesn't exist commit; rename table t3 to t2; # # Coverage for the case in which we are acquiring lock on # the table which is already used in transaction and against # which there is a pending X lock request. # # *) The first case is when transaction has only a SR lock. # begin; select count(*) from t1; count(*) 4 # # Switching to connection 'mdl_con1'. # Sending: rename table t1 to t2;; # # Switching to connection 'default'. # Wait until RENAME TABLE is blocked creating pending request for X lock. # Check that another instance of SR lock is granted without waiting. select count(*) from t1; count(*) 4 # Attempt to wait for SW lock will lead to deadlock, thus # the below statement should end with ER_LOCK_DEADLOCK error. delete from t1 limit 1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction # Unblock RENAME TABLE. commit; # # Switching to connection 'mdl_con1'. # Reap RENAME TABLE. ERROR 42S01: Table 't2' already exists # # Switching to connection 'default'. # # **) The second case is when transaction has a SW lock. # begin; delete from t1 limit 1; # # Switching to connection 'mdl_con1'. # Sending: rename table t1 to t2;; # # Switching to connection 'default'. # Wait until RENAME TABLE is blocked creating pending request for X lock. # Check that both SR and SW locks are granted without waiting # and errors. select count(*) from t1; count(*) 3 insert into t1 values (1, 1); # Unblock RENAME TABLE. commit; # # Switching to connection 'mdl_con1'. # Reap RENAME TABLE. ERROR 42S01: Table 't2' already exists # # Switching to connection 'default'. # Clean-up. set debug_sync= 'RESET'; drop table t1, t2; # # Additional coverage for some scenarios in which use of S and SR # metadata locks by HANDLER statement might have caused deadlocks. # drop table if exists t1, t2; create table t1 (i int); create table t2 (j int); insert into t1 values (1); # # First, check scenario in which we upgrade SNRW lock to X lock # on a table while having HANDLER READ trying to acquire SR # on the same table. # handler t1 open; # # Switching to connection 'handler_con1'. lock table t1 write; # Upgrade SNRW to X lock. # Sending: alter table t1 add column j int;; # # Switching to connection 'handler_con2'. # Wait until ALTER is blocked during upgrade. # # Switching to connection 'default'. # The below statement should not cause deadlock. handler t1 read first;; # # Switching to connection 'handler_con1'. # Reap ALTER TABLE. unlock tables; # # Switching to connection 'default'. # Reap HANDLER READ. i j 1 NULL handler t1 close; # # Now, check scenario in which upgrade of SNRW lock to X lock # can be blocked by HANDLER which is open in connection currently # waiting to get SW lock owned by connection doing upgrade. # handler t1 open; # # Switching to connection 'handler_con1'. lock table t1 write, t2 read; # # Switching to connection 'default'. # Execute statement which will be blocked on SRO lock # owned by connection 'handler_con1'. # Sending: insert into t2 values (1);; # # Switching to connection 'handler_con1'. # Wait until INSERT is blocked due to SRO lock. # Sending 'alter table t1 drop column j'. It should not cause # deadlock. alter table t1 drop column j; # Switching to connection 'handler_con2'. # Wait until ALTER is blocked during upgrade. # # Switching to connection 'default'. # Reap INSERT. ERROR 40001: Deadlock found when trying to get lock; try restarting transaction handler t1 close; # # Switching to connection 'handler_con1'. # Reaping 'alter table t1 drop column j' unlock tables; # Switching to connection 'default'. # Then, check the scenario in which upgrade of SNRW lock to X # lock is blocked by HANDLER which is open in connection currently # waiting to get SW lock on the same table. # handler t1 open; # # Switching to connection 'handler_con1'. lock table t1 write; # # Switching to connection 'default'. # The below insert should be blocked because active SNRW lock on 't1'. # Sending: insert into t1 values (1);; # # Switching to connection 'handler_con1'. # Wait until INSERT is blocked because of SNRW lock. # The below ALTER TABLE will be blocked because of presence of HANDLER. # Sending: alter table t1 add column j int;; # # Switching to connection 'default'. # INSERT should be chosen as victim for resolving deadlock. # Reaping INSERT. ERROR 40001: Deadlock found when trying to get lock; try restarting transaction # Close HANDLER to unblock ALTER TABLE. handler t1 close; # # Switching to connection 'handler_con1'. # Reaping ALTER TABLE. unlock tables; # # Switching to connection 'default'. # # Then, test in which upgrade of SNRW lock to X lock is blocked # by HANDLER which is open in connection currently waiting to get # SR lock on the table on which lock is upgraded. # handler t1 open; # # Switching to connection 'handler_con1'. lock table t1 write, t2 write; # # Switching to connection 'default'. # The below insert should be blocked because active SNRW lock on 't1'. # Sending: insert into t2 values (1);; # # Switching to connection 'handler_con1'. # Wait until INSERT is blocked because of SNRW lock. # The below ALTER TABLE will be blocked because of presence of HANDLER. # Sending: alter table t1 drop column j;; # # Switching to connection 'default'. # INSERT should be chosen as victim for resolving deadlock. # Reaping INSERT. ERROR 40001: Deadlock found when trying to get lock; try restarting transaction # Close HANDLER to unblock ALTER TABLE. handler t1 close; # # Switching to connection 'handler_con1'. # Reaping ALTER TABLE. unlock tables; # # Switching to connection 'default'. # # Finally, check scenario in which upgrade of SNRW lock to X lock # can be blocked by HANDLER which is open in connection currently # waiting to get thr_lock.c lock owned by connection doing upgrade. # handler t1 open; # # Switching to connection 'handler_con1'. lock table t1 write, t2 read local; # # Switching to connection 'default'. # Execute statement which will be blocked on thr_lock.c lock # owned by connection 'handler_con1'. # Sending: update t2 set j=3;; # # Switching to connection 'handler_con1'. # Wait until UPDATE is blocked due to thr_lock.c lock. # Sending 'alter table t1 add column j'. It should not cause # deadlock. alter table t1 add column j int; # Switching to connection 'handler_con2'. # Wait until ALTER is blocked during upgrade. # # Switching to connection 'default'. # Reap UPDATE. ERROR HY000: Wait on a lock was aborted due to a pending exclusive lock handler t1 close; # # Switching to connection 'handler_con1'. # Reaping 'alter table t1 drop column j' unlock tables; # # Also cover situation when HANDLER READ is aborted while waiting on # thr_lock.c lock in order to avoid deadlock due to another connection # performing DDL on another table open by HANDLER in the first one. # # Switching to connection 'handler_con1'. handler t1 open; handler t2 open; # # Switching to connection 'default'. lock table t1 write, t2 read local; # # Switching to connection 'handler_con2'. # Execute statement which will be blocked on thr_lock.c lock # owned by connection 'default' and will block further attempts # to read from 't2. # Sending: update t2 set j=3;; # # Switching to connection 'default'. # Wait until UPDATE is blocked due to thr_lock.c lock. # # Switching to connection 'handler_con1'. # Sending handler t2 read first;; # # Switching to connection 'default'. # Wait until HANDLER READ is blocked due to pending thr_lock.c lock. # ALTER TABLE t1 should not block. HANDLER t2 READ should get aborted # from its wait on thr_lock.c lock and 'handler_con1' should re-open # tables opened by HANDLER statemets. alter table t1 drop column j; unlock tables; # # Switching to connection 'handler_con2'. # Reap UPDATE # # Switching to connection 'handler_con1'. # Reap HANDLER READ j handler t1 close; handler t2 close; # Switching to connection 'default'. # Clean-up. drop tables t1, t2; # # Test coverage for basic deadlock detection in metadata # locking subsystem. # drop tables if exists t0, t1, t2, t3, t4, t5; set debug_sync= 'RESET'; create table t1 (i int); create table t2 (j int); create table t3 (k int); create table t4 (k int); # # Test for the case in which no deadlock occurs. # # # Switching to connection 'deadlock_con1'. begin; insert into t1 values (1); # # Switching to connection 'deadlock_con2'. begin; insert into t2 values (1); # # Switching to connection 'default'. # Send: rename table t2 to t0, t3 to t2, t0 to t3;; # # Switching to connection 'deadlock_con1'. # Wait until the above RENAME TABLE is blocked because it has to wait # for 'deadlock_con2' which holds shared metadata lock on 't2'. # The below statement should wait for exclusive metadata lock # on 't2' to go away and should not produce ER_LOCK_DEADLOCK # as no deadlock is possible in this situation. # Send: select * from t2;; # # Switching to connection 'deadlock_con2'. # Wait until the above SELECT * FROM t2 is starts waiting # for an exclusive metadata lock to go away. # # Unblock RENAME TABLE by releasing shared metadata lock on t2. commit; # # Switching to connection 'default'. # Reap RENAME TABLE. # # Switching to connection 'deadlock_con1'. # Reap SELECT. k # # Switching to connection 'default'. # # Let us check that in the process of waiting for conflicting lock # on table 't2' to go away transaction in connection 'deadlock_con1' # has not released metadata lock on table 't1'. # Send: rename table t1 to t0, t3 to t1, t0 to t3;; # # Switching to connection 'deadlock_con1'. # Wait until the above RENAME TABLE is blocked because it has to wait # for 'deadlock_con1' which should still hold shared metadata lock on # table 't1'. # Commit transaction to unblock RENAME TABLE. commit; # # Switching to connection 'default'. # Reap RENAME TABLE. # # Test for case when deadlock occurs and should be detected immediately. # # # Switching to connection 'deadlock_con1'. begin; insert into t2 values (2); # # Switching to connection 'default'. # Send: rename table t2 to t0, t1 to t2, t0 to t1;; # # Switching to connection 'deadlock_con1'. # Wait until the above RENAME TABLE is blocked because it has to wait # for 'deadlock_con1' which holds shared metadata lock on 't2'. # # The below statement should not wait as doing so will cause deadlock. # Instead it should fail and emit ER_LOCK_DEADLOCK statement and # transaction should be rolled back. select * from t1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction # # Switching to connection 'default'. # Reap RENAME TABLE. # # Test for the case in which deadlock also occurs but not immediately. # # # Switching to connection 'deadlock_con1'. begin; insert into t2 values (1); # # Switching to connection 'default'. lock table t1 write; # # Switching to connection 'deadlock_con1'. # The below SELECT statement should wait for metadata lock # on table 't1' and should not produce ER_LOCK_DEADLOCK # immediately as no deadlock is possible at the moment. select * from t1;; # # Switching to connection 'deadlock_con2'. # Wait until the above SELECT * FROM t1 is starts waiting # for an UNRW metadata lock to go away. # Send RENAME TABLE statement that will deadlock with the # SELECT statement and thus should abort the latter. rename table t1 to t0, t2 to t1, t0 to t2;; # # Switching to connection 'default'. # Wait till above RENAME TABLE is blocked while holding # pending X lock on t1. # Allow the above RENAME TABLE to acquire lock on t1 and # create pending lock on t2 thus creating deadlock. unlock tables; # # Switching to connection 'deadlock_con1'. # Since the latest RENAME TABLE entered in deadlock with SELECT # statement the latter should be aborted and emit ER_LOCK_DEADLOCK # error and transaction should be rolled back. # Reap SELECT * FROM t1. ERROR 40001: Deadlock found when trying to get lock; try restarting transaction # # Switching to connection 'deadlock_con2'. # Reap RENAME TABLE ... . # # Switching to connection 'default'. drop tables t1, t2, t3, t4; # # Now, test case which shows that deadlock detection empiric # also takes into account requests for metadata lock upgrade. # create table t1 (i int); insert into t1 values (1); # Avoid race which occurs when SELECT in 'deadlock_con1' connection # accesses table before the above INSERT unlocks the table and thus # its result becomes visible to other connections. select * from t1; i 1 # # Switching to connection 'deadlock_con1'. begin; select * from t1; i 1 # # Switching to connection 'default'. # Send: alter table t1 add column j int, rename to t2;; # # Switching to connection 'deadlock_con1'. # Wait until the above ALTER TABLE ... RENAME acquires exclusive # metadata lock on 't2' and starts waiting for connection # 'deadlock_con1' which holds shared lock on 't1'. # The below statement should not wait as it will cause deadlock. # An appropriate error should be reported instead and transaction # should be rolled back. select * from t2; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction # # Switching to connection 'default'. # Reap ALTER TABLE ... RENAME. drop table t2; # # Test that in situation when MDL subsystem detects a deadlock # but it turns out that it can be resolved by backing-off locks # acquired by one of participating transactions (which is # possible when one of transactions consists only of currently # executed statement, e.g. in autocommit mode) no error is # reported. # create table t1 (i int); create table t2 (j int); # Ensure that the below SELECT stops once it has acquired metadata # lock on table 't2'. set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish'; # Sending: select * from t2, t1; # # Switching to connection 'deadlock_con1'. # Wait till SELECT acquires MDL on 't2' and starts waiting for signal. set debug_sync= 'now WAIT_FOR locked'; # Sending: lock tables t1 write, t2 write; # # Switching to connection 'deadlock_con2'. # Wait until LOCK TABLES acquires SNRW lock on 't1' and is blocked # while trying to acquire SNRW lock on 't1'. # Resume SELECT execution, this should eventually unblock LOCK TABLES. set debug_sync= 'now SIGNAL finish'; # # Switching to connection 'deadlock_con1'. # Reaping LOCK TABLES. unlock tables; # # Switching to connection 'default'. # Reaping SELECT. It succeed and not report ER_LOCK_DEADLOCK error. j i drop tables t1, t2; # # Test coverage for situation in which a race has happened # during deadlock detection process which led to unwarranted # ER_LOCK_DEADLOCK error. # create table t1 (i int); # Ensure that ALTER waits once it has acquired SNW lock. set debug_sync='alter_table_copy_after_lock_upgrade SIGNAL parked1 WAIT_FOR go1'; # Sending: alter table t1 add column j int; # # Switching to connection 'deadlock_con1'. # Wait till ALTER acquires SNW lock and stops. set debug_sync='now WAIT_FOR parked1'; # Ensure that INSERT is paused once it detects that there is # a conflicting metadata lock so it has to wait, but before # deadlock detection is run. set debug_sync='mdl_acquire_lock_wait SIGNAL parked2 WAIT_FOR go2'; # Sending: insert into t1 values (); # # Switching to connection 'deadlock_con2'. # Wait till INSERT is paused. set debug_sync='now WAIT_FOR parked2'; # Resume ALTER execution. Eventually it will release its # metadata lock and INSERT's request for SW lock will be # satisified. set debug_sync='now SIGNAL go1'; # # Switching to connection 'default'. # Reaping ALTER TABLE. # Add a new request for SNW lock to waiting graph. # Sending: alter table t1 drop column j; # # Switching to connection 'deadlock_con2'. # Wait until ALTER is blocked. # Resume INSERT so it can start deadlock detection. # # At this point there is a discrepancy between the fact that INSERT's # SW lock is already satisfied, but INSERT's connection is still # marked as waiting for it. Looking for a loop in waiters graph # without additional checks has detected a deadlock (INSERT waits # for SW lock; which is not granted because of pending SNW lock from # ALTER; which waits for active SW lock from INSERT). Since requests # for SW and SNW locks have same weight ALTER was selected as a victim # and ended with ER_LOCK_DEADLOCK error. set debug_sync='now SIGNAL go2'; # # Switching to connection 'deadlock_con1'. # Reaping INSERT. # # Switching to connection 'default'. # Reaping ALTER. It should succeed and not produce ER_LOCK_DEADLOCK. drop table t1; # # Now, test for a situation in which deadlock involves waiting not # only in MDL subsystem but also for TDC. Such deadlocks should be # successfully detected. If possible, they should be resolved without # resorting to ER_LOCK_DEADLOCK error. # create table t1(i int); create table t2(j int); # # First, let us check how we handle a simple scenario involving # waits in MDL and TDC. # set debug_sync= 'RESET'; # Switching to connection 'deadlock_con1'. # Start a statement, which will acquire SR metadata lock on t1, open it # and then stop, before trying to acquire SW lock on t2 and opening it. set debug_sync='open_tables_after_open_and_process_table SIGNAL parked WAIT_FOR go'; # Sending: select * from t1 where i in (select j from t2 for update); # Switching to connection 'deadlock_con2'. # Wait till the above SELECT stops. set debug_sync='now WAIT_FOR parked'; # The below FLUSH TABLES WITH READ LOCK should acquire # SNW locks on t1 and t2 and wait till SELECT closes t1. # Sending: flush tables t1, t2 with read lock; # Switching to connection 'deadlock_con3'. # Wait until FLUSH TABLES WITH t1, t2 READ LOCK starts waiting # for SELECT to close t1. # Resume SELECT, so it tries to acquire SW lock on t1 and blocks, # creating a deadlock. This deadlock should be detected and resolved # by backing-off SELECT. As a result FTWRL should be able to finish. set debug_sync='now SIGNAL go'; # Switching to connection 'deadlock_con2'. # Reap FLUSH TABLES WITH READ LOCK. unlock tables; # Switching to connection 'deadlock_con1'. # Reap SELECT. i # # The same scenario with a slightly different order of events # which emphasizes that setting correct deadlock detector weights # for flush waits is important. # set debug_sync= 'RESET'; # Switching to connection 'deadlock_con2'. set debug_sync='flush_tables_with_read_lock_after_acquire_locks SIGNAL parked WAIT_FOR go'; # The below FLUSH TABLES WITH READ LOCK should acquire # SNW locks on t1 and t2 and wait on debug sync point. # Sending: flush tables t1, t2 with read lock; # Switching to connection 'deadlock_con1'. # Wait till FLUSH TABLE WITH READ LOCK stops. set debug_sync='now WAIT_FOR parked'; # Start statement which will acquire SR metadata lock on t1, open # it and then will block while trying to acquire SW lock on t2. # Sending: select * from t1 where i in (select j from t2 for update); # Switching to connection 'deadlock_con3'. # Wait till the above SELECT blocks. # Resume FLUSH TABLES, so it tries to flush t1, thus creating # a deadlock. This deadlock should be detected and resolved by # backing-off SELECT. As a result FTWRL should be able to finish. set debug_sync='now SIGNAL go'; # Switching to connection 'deadlock_con2'. # Reap FLUSH TABLES WITH READ LOCK. unlock tables; # Switching to connection 'deadlock_con1'. # Reap SELECT. i # # Now a more complex scenario involving two connections # waiting for MDL and one for TDC. # set debug_sync= 'RESET'; # Switching to connection 'deadlock_con1'. # Start a statement which will acquire SR metadata lock on t2, open it # and then stop, before trying to acquire SR on t1 and opening it. set debug_sync='open_tables_after_open_and_process_table SIGNAL parked WAIT_FOR go'; # Sending: select * from t2, t1; # Switching to connection 'deadlock_con2'. # Wait till the above SELECT stops. set debug_sync='now WAIT_FOR parked'; # The below FLUSH TABLES WITH READ LOCK should acquire # SNW locks on t2 and wait till SELECT closes t2. # Sending: flush tables t2 with read lock; # Switching to connection 'deadlock_con3'. # Wait until FLUSH TABLES WITH READ LOCK starts waiting # for SELECT to close t2. # The below DROP TABLES should acquire X lock on t1 and start # waiting for X lock on t2. # Sending: drop tables t1, t2; # Switching to connection 'default'. # Wait until DROP TABLES starts waiting for X lock on t2. # Resume SELECT, so it tries to acquire SR lock on t1 and blocks, # creating a deadlock. This deadlock should be detected and resolved # by backing-off SELECT. As a result, FTWRL should be able to finish. set debug_sync='now SIGNAL go'; # Switching to connection 'deadlock_con2'. # Reap FLUSH TABLES WITH READ LOCK. # Unblock DROP TABLES. unlock tables; # Switching to connection 'deadlock_con3'. # Reap DROP TABLES. # Switching to connection 'deadlock_con1'. # Reap SELECT. It should emit error about missing table. ERROR 42S02: Table 'test.t2' doesn't exist # Switching to connection 'default'. set debug_sync= 'RESET'; # # Test coverage for scenario when deadlock is caused by LOCK TABLES # implicitly acquiring "strong" metadata lock in order that is # different from one used by other DDL. # # Other DDL should not be chosen as a deadlock victim in this case. # Instead LOCK TABLES should be chosen as a victim and deadlock # should be handled by executing back-off and retry of lock # acquisition, without reporting any error to user. create table t1(i int); create table t2(j int); create table t3(j int); create trigger t3_bi before insert on t3 for each row insert into t1 values (1); # # Switching to connection 'deadlock_con1'. begin; select * from t2; j # # Switching to connection 'deadlock_con2'. # Send: rename table t1 to t0, t2 to t1, t3 to t2, t0 to t3; # # Switching to connection 'deadlock_con3'. # Wait until the above RENAME TABLE is blocked because it has to wait # for 'deadlock_con1' which holds SR lock on 't2'. At this point it # should already acquire X lock on 't0' and 't1'. # The below statement should acquire SNRW lock on 't3' and got # blocked trying to acquire SNRW lock on 't1'. # Sending: lock table t3 write;; # # Switching to connection 'deadlock_con1'. # Wait until the above LOCK TABLE WRITE starts waiting. # # Unblock RENAME TABLE by releasing SR on t2. commit; # # Switching to connection 'deadlock_con2'. # Reap RENAME TABLE. It should succeed. # # Switching to connection 'deadlock_con3'. # Reap LOCK TABLES WRITE. It should succeed too. # New version of 't3' should be visible. select * from t3; i unlock table; # # Switching to connection 'default'. # Clean-up. rename table t3 to t0, t2 to t3, t1 to t2, t0 to t1; drop trigger t3_bi; drop tables t1, t2, t3; # # Test for a scenario in which FLUSH TABLES <list> WITH READ LOCK # used to erroneously release metadata locks. # drop tables if exists t1, t2; set debug_sync= 'RESET'; create table t1(i int); create table t2(j int); # Switching to connection 'con2'. set debug_sync='open_tables_after_open_and_process_table SIGNAL parked WAIT_FOR go'; # The below FLUSH TABLES <list> WITH READ LOCK should acquire # SNW locks on t1 and t2, open table t1 and block on the debug # sync point. # Sending: flush tables t1, t2 with read lock; # Switching to connection 'con1'. # Wait till FLUSH TABLES <list> WITH READ LOCK stops. set debug_sync='now WAIT_FOR parked'; # Start a statement which will flush all tables and thus # invalidate table t1 open by FLUSH TABLES <list> WITH READ LOCK. # Sending: flush tables; # Switching to connection 'default'. # Wait till the above FLUSH TABLES blocks. # Resume FLUSH TABLES <list> WITH READ LOCK, so it tries to open t2 # discovers that its t1 is obsolete and tries to reopen all tables. # Such reopen should not cause releasing of SNW metadata locks # which would result in assertion failures. set debug_sync='now SIGNAL go'; # Switching to connection 'con2'. # Reap FLUSH TABLES <list> WITH READ LOCK. unlock tables; # Switching to connection 'con1'. # Reap FLUSH TABLES. # Clean-up. # Switching to connection 'default'. drop tables t1, t2; set debug_sync= 'RESET'; # # Test for bug #46748 "Assertion in MDL_context::wait_for_locks() # on INSERT + CREATE TRIGGER". # drop tables if exists t1, t2, t3, t4, t5; # Let us simulate scenario in which we open some tables from extended # part of prelocking set but then encounter conflicting metadata lock, # so have to back-off and wait for it to go away. create table t1 (i int); create table t2 (j int); create table t3 (k int); create table t4 (l int); create trigger t1_bi before insert on t1 for each row insert into t2 values (new.i); create trigger t2_bi before insert on t2 for each row insert into t3 values (new.j); # # Switching to connection 'con1root'. lock tables t4 read; # # Switching to connection 'con2root'. # Send : rename table t3 to t5, t4 to t3;; # # Switching to connection 'default'. # Wait until the above RENAME TABLE adds pending requests for exclusive # metadata lock on its tables and blocks due to 't4' being used by LOCK # TABLES. # Send : insert into t1 values (1);; # # Switching to connection 'con1root'. # Wait until INSERT statement waits due to encountering pending # exclusive metadata lock on 't3'. unlock tables; # # Switching to connection 'con2root'. # Reap RENAME TABLE. # # Switching to connection 'default'. # Reap INSERT. # Clean-up. drop tables t1, t2, t3, t5; # # Bug#42546 - Backup: RESTORE fails, thinking it finds an existing table # DROP TABLE IF EXISTS t1; set @save_log_output=@@global.log_output; set global log_output=file; # # Test 1: CREATE TABLE # # Connection 2 # Start insert on the not-yet existing table # Wait after taking the MDL lock SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish'; INSERT INTO t1 VALUES(1,"def"); # Connection 1 SET DEBUG_SYNC= 'now WAIT_FOR locked'; # Now INSERT has a MDL on the non-existent table t1. # # Continue the INSERT once CREATE waits for exclusive lock SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL finish'; # Try to create that table. CREATE TABLE t1 (c1 INT, c2 VARCHAR(100), KEY(c1)); # Connection 2 # Insert fails ERROR 42S02: Table 'test.t1' doesn't exist # Connection 1 SET DEBUG_SYNC= 'RESET'; SHOW TABLES; Tables_in_test t1 DROP TABLE IF EXISTS t1; # # Test 2: CREATE TABLE LIKE # CREATE TABLE t2 (c1 INT, c2 VARCHAR(100), KEY(c1)); # Connection 2 # Start insert on the not-yet existing table # Wait after taking the MDL SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish'; INSERT INTO t1 VALUES(1,"def"); # Connection 1 SET DEBUG_SYNC= 'now WAIT_FOR locked'; # Now INSERT has a MDL on the non-existent table t1. # # Continue the INSERT once CREATE waits for exclusive lock SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL finish'; # Try to create that table. CREATE TABLE t1 LIKE t2; # Connection 2 # Insert fails ERROR 42S02: Table 'test.t1' doesn't exist # Connection 1 SET DEBUG_SYNC= 'RESET'; SHOW TABLES; Tables_in_test t1 t2 DROP TABLE t2; DROP TABLE IF EXISTS t1; set global log_output=@save_log_output; # # Bug #46044 "MDL deadlock on LOCK TABLE + CREATE TABLE HIGH_PRIORITY # FOR UPDATE" # drop tables if exists t1, t2; create table t1 (i int); insert into t1 values(1); # Let us check that we won't deadlock if during filling # of I_S table we encounter conflicting metadata lock # which owner is in its turn waiting for our connection. lock tables t1 read; # Switching to connection 'con46044_2'. # Sending: lock tables t1 write;; # Switching to connection 'con46044'. # Waiting until LOCK TABLES WRITE is blocked. # Sending: create table t2 select * from t1;; # Switching to connection 'default'. # Waiting until CREATE TABLE ... SELECT ... is blocked. # First let us check that SHOW FIELDS/DESCRIBE doesn't # gets blocked and emits and error. show fields from t2; ERROR HY000: Table 'test'.'t2' was skipped since its definition is being modified by concurrent DDL statement # Now test for I_S query which reads only .FRMs. # # Query below should only emit a warning. select column_name from information_schema.columns where table_schema='test' and table_name='t2'; column_name Warnings: Warning 1684 Table 'test'.'t2' was skipped since its definition is being modified by concurrent DDL statement # Finally, test for I_S query which does full-blown table open. # # Query below should not be blocked. Warning message should be # stored in the 'table_comment' column. select table_name, table_type, auto_increment, table_comment from information_schema.tables where table_schema='test' and table_name='t2'; table_name table_type auto_increment table_comment t2 BASE TABLE NULL Table 'test'.'t2' was skipped since its definition is being modified by concurrent DDL statement Warnings: Warning 1684 Table 'test'.'t2' was skipped since its definition is being modified by concurrent DDL statement # Switching to connection 'default'. unlock tables; # Switching to connection 'con46044_2'. # Reaping LOCK TABLES WRITE unlock tables; # Switching to connection 'con46044'. # Reaping CREATE TABLE ... SELECT ... . drop table t2; # # Let us also check that queries to I_S wait for conflicting metadata # locks to go away instead of skipping table with a warning in cases # when deadlock is not possible. This is a nice thing from compatibility # and ease of use points of view. # # We check same three queries to I_S in this new situation. # Switching to connection 'con46044_2'. lock tables t1 write; # Switching to connection 'con46044'. # Sending: create table t2 select * from t1;; # Switching to connection 'default'. # Waiting until CREATE TABLE ... SELECT ... is blocked. # Let us check that SHOW FIELDS/DESCRIBE gets blocked. # Sending: show fields from t2;; # Switching to connection 'con46044_2'. # Wait until SHOW FIELDS gets blocked. unlock tables; # Switching to connection 'con46044'. # Reaping CREATE TABLE ... SELECT ... . # Switching to connection 'default'. # Reaping SHOW FIELDS ... Field Type Null Key Default Extra i int(11) YES NULL drop table t2; # Switching to connection 'con46044_2'. lock tables t1 write; # Switching to connection 'con46044'. # Sending: create table t2 select * from t1;; # Switching to connection 'default'. # Waiting until CREATE TABLE ... SELECT ... is blocked. # Check that I_S query which reads only .FRMs gets blocked. # Sending: select column_name from information_schema.columns where table_schema='test' and table_name='t2';; # Switching to connection 'con46044_2'. # Wait until SELECT COLUMN_NAME FROM I_S.COLUMNS gets blocked. unlock tables; # Switching to connection 'con46044'. # Reaping CREATE TABLE ... SELECT ... . # Switching to connection 'default'. # Reaping SELECT COLUMN_NAME FROM I_S.COLUMNS column_name i drop table t2; # Switching to connection 'con46044_2'. lock tables t1 write; # Switching to connection 'con46044'. # Sending: create table t2 select * from t1;; # Switching to connection 'default'. # Waiting until CREATE TABLE ... SELECT ... is blocked. # Finally, check that I_S query which does full-blown table open # also gets blocked. # Sending: select table_name, table_type, auto_increment, table_comment from information_schema.tables where table_schema='test' and table_name='t2';; # Switching to connection 'con46044_2'. # Wait until SELECT ... FROM I_S.TABLES gets blocked. unlock tables; # Switching to connection 'con46044'. # Reaping CREATE TABLE ... SELECT ... . # Switching to connection 'default'. # Reaping SELECT ... FROM I_S.TABLES table_name table_type auto_increment table_comment t2 BASE TABLE NULL drop table t2; # Switching to connection 'default'. # Clean-up. drop table t1; # # Test for bug #46273 "MySQL 5.4.4 new MDL: Bug#989 is not fully fixed # in case of ALTER". # drop table if exists t1; set debug_sync= 'RESET'; create table t1 (c1 int primary key, c2 int, c3 int); insert into t1 values (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0); begin; select * from t1 where c2 = 3; c1 c2 c3 3 3 0 # # Switching to connection 'con46273'. set debug_sync='alter_table_copy_after_lock_upgrade SIGNAL alter_table_locked WAIT_FOR alter_go'; alter table t1 add column e int, rename to t2;; # # Switching to connection 'default'. set debug_sync='now WAIT_FOR alter_table_locked'; set debug_sync='mdl_acquire_lock_wait SIGNAL alter_go'; # The below statement should get ER_LOCK_DEADLOCK error # (i.e. it should not allow ALTER to proceed, and then # fail due to 't1' changing its name to 't2'). update t1 set c3=c3+1 where c2 = 3; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction # # Switching to connection 'con46273'. # Reap ALTER TABLE. # # Switching to connection 'default'. # Clean-up. set debug_sync= 'RESET'; drop table t2; # # Test for bug #46673 "Deadlock between FLUSH TABLES WITH READ LOCK # and DML". # drop tables if exists t1; create table t1 (i int); # Switching to connection 'con46673'. begin; insert into t1 values (1); # Switching to connection 'default'. # Statement below should not get blocked. And if after some # changes to code it is there should not be a deadlock between # it and transaction from connection 'con46673'. flush tables with read lock; unlock tables; # Switching to connection 'con46673'. delete from t1 where i = 1; commit; # Switching to connection 'default'. # Clean-up drop table t1; # # Bug#48210 FLUSH TABLES WITH READ LOCK deadlocks # against concurrent CREATE PROCEDURE # # Test 1: CREATE PROCEDURE # Connection 1 # Start CREATE PROCEDURE and open mysql.proc SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL table_opened WAIT_FOR grlwait'; CREATE PROCEDURE p1() SELECT 1; # Connection 2 SET DEBUG_SYNC= 'now WAIT_FOR table_opened'; # Check that FLUSH must wait to get the GRL # and let CREATE PROCEDURE continue SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL grlwait'; FLUSH TABLES WITH READ LOCK; # Connection 1 # Connection 2 UNLOCK TABLES; # Connection 1 SET DEBUG_SYNC= 'RESET'; # Test 2: DROP PROCEDURE # Start DROP PROCEDURE and open tables SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL table_opened WAIT_FOR grlwait'; DROP PROCEDURE p1; # Connection 2 SET DEBUG_SYNC= 'now WAIT_FOR table_opened'; # Check that FLUSH must wait to get the GRL # and let DROP PROCEDURE continue SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL grlwait'; FLUSH TABLES WITH READ LOCK; # Connection 1 # Once FLUSH TABLES WITH READ LOCK starts waiting # DROP PROCEDURE will be waked up and will drop # procedure. Global read lock will be granted after # this statement ends. # # Reaping DROP PROCEDURE. # Connection 2 # Reaping FTWRL. UNLOCK TABLES; # Connection 1 SET DEBUG_SYNC= 'RESET'; # # Bug#50786 Assertion `thd->mdl_context.trans_sentinel() == __null' # failed in open_ltable() # # Supress warnings written to the log file call mtr.add_suppression("Wait on a lock was aborted due to a pending exclusive lock"); DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 (i INT); CREATE TABLE t2 (i INT); SET @old_general_log= @@global.general_log; SET @@global.general_log= 1; SET @old_log_output= @@global.log_output; SET @@global.log_output= 'TABLE'; SET @old_sql_log_off= @@session.sql_log_off; SET @@session.sql_log_off= 1; # connection: con1 HANDLER t1 OPEN; # connection: con3 SET @@session.sql_log_off= 1; # connection: con2 SET DEBUG_SYNC= 'thr_multi_lock_after_thr_lock SIGNAL parked WAIT_FOR go'; # Sending: SELECT 1; # connection: con3 SET DEBUG_SYNC= 'now WAIT_FOR parked'; # connection: con1 # Sending: SELECT 1; # connection: con3 ALTER TABLE t1 ADD COLUMN j INT; # connection: default SET DEBUG_SYNC= 'now SIGNAL go'; # connection: con1 # Reaping SELECT 1 1 1 HANDLER t1 CLOSE; # connection: con2 # Reaping SELECT 1 1 1 # connection: default DROP TABLE t1, t2; SET DEBUG_SYNC= 'RESET'; SET @@global.general_log= @old_general_log; SET @@global.log_output= @old_log_output; SET @@session.sql_log_off= @old_sql_log_off; # # Additional coverage for bug #50913 "Deadlock between # open_and_lock_tables_derived and MDL". The main test # case is in lock_multi.test # drop table if exists t1; set debug_sync= 'RESET'; create table t1 (i int) engine=InnoDB; # Switching to connection 'con50913_1'. set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL parked WAIT_FOR go'; # Sending: alter table t1 add column j int, ALGORITHM=COPY; # Switching to connection 'default'. # Wait until ALTER TABLE gets blocked on a sync point after # acquiring thr_lock.c lock. set debug_sync= 'now WAIT_FOR parked'; # The below statement should wait on MDL lock and not deadlock on # thr_lock.c lock. # Sending: truncate table t1; # Switching to connection 'con50913_2'. # Wait until TRUNCATE TABLE is blocked on MDL lock. # Unblock ALTER TABLE. set debug_sync= 'now SIGNAL go'; # Switching to connection 'con50913_1'. # Reaping ALTER TABLE. # Switching to connection 'default'. # Reaping TRUNCATE TABLE. set debug_sync= 'RESET'; drop table t1; # # Test for bug #50998 "Deadlock in MDL code during test # rqg_mdl_stability". # Also provides coverage for the case when addition of # waiting statement adds several loops in the waiters # graph and therefore several searches for deadlock # should be performed. drop table if exists t1; set debug_sync= 'RESET'; create table t1 (i int); # Switching to connection 'con1'. begin; select * from t1; i # Switching to connection 'con2'. begin; select * from t1; i # Switching to connection 'default'. # Start ALTER TABLE which will acquire SNW lock and # table lock and get blocked on sync point. set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL parked WAIT_FOR go'; # Sending: alter table t1 add column j int; # Switching to connection 'con1'. # Wait until ALTER TABLE gets blocked on a sync point. set debug_sync= 'now WAIT_FOR parked'; # Sending: insert into t1 values (1); # Switching to connection 'con2'. # Sending: insert into t1 values (1); # Switching to connection 'con3'. # Wait until both 'con1' and 'con2' are blocked trying to acquire # SW lock on the table. # Unblock ALTER TABLE. Since it will try to upgrade SNW to X lock # deadlock with two loops in waiting graph will occur. Both loops # should be found and DML statements in both 'con1' and 'con2' # should be aborted with ER_LOCK_DEADLOCK errors. set debug_sync= 'now SIGNAL go'; # Switching to connection 'con1'. # Reaping INSERT. It should end with ER_LOCK_DEADLOCK error and # not wait indefinitely (as it happened before the bugfix). ERROR 40001: Deadlock found when trying to get lock; try restarting transaction commit; # Switching to connection 'con2'. # Reaping INSERT. ERROR 40001: Deadlock found when trying to get lock; try restarting transaction commit; # Switching to connection 'default'. # Reap ALTER TABLE. set debug_sync= 'RESET'; drop table t1; # # Bug#42643: InnoDB does not support replication of TRUNCATE TABLE # # Ensure that a acquired lock is not given up due to a conflict. # DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a INT) ENGINE=InnoDB; INSERT INTO t1 VALUES (1),(2),(3); # Connection: con1 LOCK TABLES t1 WRITE; SET debug_sync='upgrade_lock_for_truncate SIGNAL parked_truncate WAIT_FOR go_truncate'; TRUNCATE TABLE t1; # Connection: default SET debug_sync='now WAIT_FOR parked_truncate'; # Connection: con2 SET debug_sync='after_open_table_ignore_flush SIGNAL parked_show WAIT_FOR go_show'; SHOW FIELDS FROM t1; # Connection: default SET debug_sync='now WAIT_FOR parked_show'; # Connection: con3 SET debug_sync='after_flush_unlock SIGNAL parked_flush WAIT_FOR go_flush'; FLUSH TABLES t1; # Connection: default SET debug_sync='now WAIT_FOR parked_flush'; SET debug_sync='now SIGNAL go_truncate'; # Ensure that truncate waits for a exclusive lock SET debug_sync= 'now SIGNAL go_show'; # Connection: con1 (TRUNCATE) # Reaping... UNLOCK TABLES; # Connection: con2 (SHOW FIELDS FROM t1) # Reaping... Field Type Null Key Default Extra a int(11) YES NULL # Connection: default SET debug_sync= 'now SIGNAL go_flush'; # Connection: con3 (FLUSH TABLES t1) # Reaping... # Connection: default SET debug_sync= 'RESET'; DROP TABLE t1; # # Bug#52856 concurrent show columns or show full columns causes a crash!!! # CREATE TABLE t1(a CHAR(255)); SET DEBUG_SYNC= "get_schema_column SIGNAL waiting WAIT_FOR completed"; SHOW FULL COLUMNS FROM t1; SET DEBUG_SYNC= "now WAIT_FOR waiting"; SHOW FULL COLUMNS FROM t1; Field Type Collation Null Key Default Extra Privileges Comment a char(255) latin1_swedish_ci YES NULL # SET DEBUG_SYNC= "now SIGNAL completed"; Field Type Collation Null Key Default Extra Privileges Comment a char(255) latin1_swedish_ci YES NULL # DROP TABLE t1; # # Tests for schema-scope locks # DROP DATABASE IF EXISTS db1; DROP DATABASE IF EXISTS db2; # Test 1: # CREATE DATABASE blocks database DDL on the same database, but # not database DDL on different databases. Tests X vs X lock. # # Connection default SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked'; # Sending: CREATE DATABASE db1; # Connection con2 SET DEBUG_SYNC= 'now WAIT_FOR locked'; # Sending: CREATE DATABASE db1; # Connection con3 CREATE DATABASE db2; ALTER DATABASE db2 DEFAULT CHARACTER SET utf8; DROP DATABASE db2; SET DEBUG_SYNC= 'now SIGNAL blocked'; # Connection default # Reaping: CREATE DATABASE db1 # Connection con2 # Reaping: CREATE DATABASE db1 ERROR HY000: Can't create database 'db1'; database exists # Test 2: # ALTER DATABASE blocks database DDL on the same database, but # not database DDL on different databases. Tests X vs X lock. # # Connection default SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked'; # Sending: ALTER DATABASE db1 DEFAULT CHARACTER SET utf8; # Connection con2 SET DEBUG_SYNC= 'now WAIT_FOR locked'; # Sending: ALTER DATABASE db1 DEFAULT CHARACTER SET utf8; # Connection con3 CREATE DATABASE db2; ALTER DATABASE db2 DEFAULT CHARACTER SET utf8; DROP DATABASE db2; SET DEBUG_SYNC= 'now SIGNAL blocked'; # Connection default # Reaping: ALTER DATABASE db1 DEFAULT CHARACTER SET utf8 # Connection con2 # Reaping: ALTER DATABASE db1 DEFAULT CHARACTER SET utf8 # Connection default SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked'; # Sending: ALTER DATABASE db1 DEFAULT CHARACTER SET utf8; # Connection con2 SET DEBUG_SYNC= 'now WAIT_FOR locked'; # Sending: DROP DATABASE db1; # Connection con3 SET DEBUG_SYNC= 'now SIGNAL blocked'; # Connection default # Reaping: ALTER DATABASE db1 DEFAULT CHARACTER SET utf8 # Connection con2 # Reaping: DROP DATABASE db1 CREATE DATABASE db1; # Test 3: # Two ALTER..UPGRADE of the same database are mutually exclusive, but # two ALTER..UPGRADE of different databases are not. Tests X vs X lock. # # Connection default SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked'; # Sending: ALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME; # Connection con2 SET DEBUG_SYNC= 'now WAIT_FOR locked'; # Sending: ALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME; # Connection con3 ALTER DATABASE `#mysql50#a-b-c-d` UPGRADE DATA DIRECTORY NAME; Warnings: Warning 1681 'UPGRADE DATA DIRECTORY NAME' is deprecated and will be removed in a future release. SET DEBUG_SYNC= 'now SIGNAL blocked'; # Connection default # Reaping: ALTER DATABASE '#mysql50#a-b-c' UPGRADE DATA DIRECTORY NAME Warnings: Warning 1681 'UPGRADE DATA DIRECTORY NAME' is deprecated and will be removed in a future release. # Connection con2 # Reaping: ALTER DATABASE '#mysql50#a-b-c' UPGRADE DATA DIRECTORY NAME ERROR 42000: Unknown database '#mysql50#a-b-c' DROP DATABASE `a-b-c`; DROP DATABASE `a-b-c-d`; # Test 4: # DROP DATABASE blocks database DDL on the same database, but # not database DDL on different databases. Tests X vs X lock. # # Connection default SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked'; # Sending: DROP DATABASE db1; # Connection con2 SET DEBUG_SYNC= 'now WAIT_FOR locked'; # Sending: DROP DATABASE db1; # Connection con3 CREATE DATABASE db2; ALTER DATABASE db2 DEFAULT CHARACTER SET utf8; DROP DATABASE db2; SET DEBUG_SYNC= 'now SIGNAL blocked'; # Connection default # Reaping: DROP DATABASE db1 # Connection con2 # Reaping: DROP DATABASE db1 ERROR HY000: Can't drop database 'db1'; database doesn't exist # Connection default CREATE DATABASE db1; SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked'; # Sending: DROP DATABASE db1; # Connection con2 SET DEBUG_SYNC= 'now WAIT_FOR locked'; # Sending: ALTER DATABASE db1 DEFAULT CHARACTER SET utf8; # Connection con3 SET DEBUG_SYNC= 'now SIGNAL blocked'; # Connection default # Reaping: DROP DATABASE db1 # Connection con2 # Reaping: ALTER DATABASE db1 DEFAULT CHARACTER SET utf8 Got one of the listed errors # Test 5: # Locked database name prevents CREATE of tables in that database. # Tests X vs IX lock. # # Connection default CREATE DATABASE db1; SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked'; # Sending: DROP DATABASE db1; # Connection con2 SET DEBUG_SYNC= 'now WAIT_FOR locked'; # Sending: CREATE TABLE db1.t1 (a INT); # Connection con3 SET DEBUG_SYNC= 'now SIGNAL blocked'; # Connection default # Reaping: DROP DATABASE db1 # Connection con2 # Reaping: CREATE TABLE db1.t1 (a INT) ERROR 42000: Unknown database 'db1' # Test 6: # Locked database name prevents RENAME of tables to/from that database. # Tests X vs IX lock. # # Connection default CREATE DATABASE db1; CREATE TABLE db1.t1 (a INT); SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked'; # Sending: DROP DATABASE db1; # Connection con2 SET DEBUG_SYNC= 'now WAIT_FOR locked'; # Sending: RENAME TABLE db1.t1 TO test.t1; # Connection con3 SET DEBUG_SYNC= 'now SIGNAL blocked'; # Connection default # Reaping: DROP DATABASE db1 # Connection con2 # Reaping: RENAME TABLE db1.t1 TO test.t1 Got one of the listed errors # Connection default CREATE DATABASE db1; CREATE TABLE test.t2 (a INT); SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked'; # Sending: DROP DATABASE db1; # Connection con2 SET DEBUG_SYNC= 'now WAIT_FOR locked'; # Sending: RENAME TABLE test.t2 TO db1.t2; # Connection con3 SET DEBUG_SYNC= 'now SIGNAL blocked'; # Connection default # Reaping: DROP DATABASE db1 # Connection con2 # Reaping: RENAME TABLE test.t2 TO db1.t2 Got one of the listed errors DROP TABLE test.t2; # Test 7: # Locked database name prevents DROP of tables in that database. # Tests X vs IX lock. # # Connection default CREATE DATABASE db1; CREATE TABLE db1.t1 (a INT); SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked'; # Sending: DROP DATABASE db1; # Connection con2 SET DEBUG_SYNC= 'now WAIT_FOR locked'; # Sending: DROP TABLE db1.t1; # Connection con3 SET DEBUG_SYNC= 'now SIGNAL blocked'; # Connection default # Reaping: DROP DATABASE db1 # Connection con2 # Reaping: DROP TABLE db1.t1 ERROR 42S02: Unknown table 'db1.t1' # Connection default SET DEBUG_SYNC= 'RESET'; # # End of tests for schema-scope locks # # # Tests of granted global S lock (FLUSH TABLE WITH READ LOCK) # CREATE DATABASE db1; CREATE TABLE db1.t1(a INT); # Connection default FLUSH TABLE WITH READ LOCK; # Connection con2 CREATE TABLE db1.t2(a INT); # Connection default UNLOCK TABLES; # Connection con2 # Reaping CREATE TABLE db1.t2(a INT) # Connection default FLUSH TABLE WITH READ LOCK; # Connection con2 ALTER DATABASE db1 DEFAULT CHARACTER SET utf8; # Connection default UNLOCK TABLES; # Connection con2 # Reaping ALTER DATABASE db1 DEFAULT CHARACTER SET utf8 # Connection default FLUSH TABLE WITH READ LOCK; # Connection con2 FLUSH TABLE WITH READ LOCK; UNLOCK TABLES; # Connection default UNLOCK TABLES; DROP DATABASE db1; # # Bug#56292 Deadlock with ALTER TABLE and MERGE tables # DROP TABLE IF EXISTS t1, t2, m1; CREATE TABLE t1(a INT) engine=MyISAM; CREATE TABLE t2(a INT) engine=MyISAM; CREATE TABLE m1(a INT) engine=MERGE UNION=(t1, t2); INSERT INTO t1 VALUES (1), (2); INSERT INTO t2 VALUES (3), (4); # Connection con1 # We need EXECUTE 2 since ALTER TABLE does SU => SNW => X and we want # to stop at the second upgrade. SET DEBUG_SYNC= 'mdl_upgrade_lock SIGNAL upgrade WAIT_FOR continue EXECUTE 2'; # Sending: ALTER TABLE m1 engine=MERGE UNION=(t2, t1); # Connection con2 # Waiting for ALTER TABLE to try lock upgrade SET DEBUG_SYNC= 'now WAIT_FOR upgrade'; SET DEBUG_SYNC= 'now SIGNAL continue'; SET DEBUG_SYNC= 'now WAIT_FOR upgrade'; # Sending: DELETE FROM t2 WHERE a = 3; # Connection default # Check that DELETE is waiting on a metadata lock and not a table lock. # Now that DELETE blocks on a metadata lock, we should be able to do # SELECT * FROM m1 here. SELECT used to be blocked by a DELETE table # lock request. SELECT * FROM m1; a 1 2 3 4 # Resuming ALTER TABLE SET DEBUG_SYNC= 'now SIGNAL continue'; # Connection con1 # Reaping: ALTER TABLE m1 engine=MERGE UNION=(t2, t1) # Connection con2 # Reaping: DELETE FROM t2 WHERE a = 3 # Connection default DROP TABLE m1, t1, t2; SET DEBUG_SYNC= 'RESET'; # # Bug#21021848 ASSERTION `M_STATUS == DA_ERROR' FAILED. # CREATE TABLE t1(c1 INT NOT NULL) ENGINE = csv; CREATE TABLE t2(c1 INT NOT NULL); # Emulate corruption of t1 LOCK TABLES t1 WRITE; INSERT INTO t1 VALUES(0); CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check error Corrupt UNLOCK TABLES; # Start XA txn on default XA START 'test2'; # Acquire SR on t2 SELECT * FROM t2; c1 # Block IS query just before calling lock_table_names() (before X on t1) SET DEBUG_SYNC='recover_ot_repair SIGNAL parked WAIT_FOR go'; SELECT COUNT(*) > 1 FROM information_schema.key_column_usage; # Create a new conncection which will compete for MDL lock # Wait until default becomes blocked SET DEBUG_SYNC='now WAIT_FOR parked'; # Try to acquire X on t1 and t2, which will block while default # holds SR on t2 DROP TABLES t1, t2; # Create control connection # Wait until con1 is blocked # Wake up XA txn/IS query on default SET DEBUG_SYNC='now SIGNAL go'; # Disconnect control connection # Switch to default connection # Wait for IS query which will try repair t1 which requires X. # Previously that resulted in deadlock with con1 over t1, # but now t1 is skipped and a warning is issued COUNT(*) > 1 1 Warnings: Warning 1194 Table 't1' is marked as crashed and should be repaired # Finish XA txn 'test2' to release SR on t2 so that con1 # becomes unblocked XA END 'test2'; XA PREPARE 'test2'; XA COMMIT 'test2'; # Cleanup SET DEBUG_SYNC= 'RESET'; # Clean up con1 now that the XA txn has finished # Wait for the now unblocked DROP t1, t2 to complete # Disconnecting con1 # Switching to back to default at end of test case # # Bug#26739438 DEADLOCK ON GET_LOCK(..., 0) # # Run GET_LOCK(...,0) from two connections to which would previously # cause deadlock CREATE TABLE t1(i INT); INSERT INTO t1 VALUES (0), (1); # Starting con0 SELECT i FROM t1 WHERE i = 0 AND GET_LOCK(i, 0); i 0 # Starting con1 SELECT i FROM t1 WHERE i = 1 AND GET_LOCK(i, 0); i 1 # Send query which will do a 0-wait on i=0 while holding lock on i=1 SET DEBUG_SYNC='mdl_acquire_lock_wait SIGNAL wait0 WAIT_FOR go0'; SELECT i FROM t1 WHERE GET_LOCK(i, 0) AND i = 0; # Switch to con0. Send query which will do a 0-wait on i=1 while # holding lock on i=0 SET DEBUG_SYNC='mdl_acquire_lock_wait SIGNAL wait1 WAIT_FOR go1'; SELECT i FROM t1 WHERE GET_LOCK(i, 0) AND i = 1; # Switch to default connection and wait until both con0 and con1 # are ready to check for deadlocks SET DEBUG_SYNC='now WAIT_FOR wait0'; SET DEBUG_SYNC='now WAIT_FOR wait1'; # Tell both connections to proceed SET DEBUG_SYNC='now SIGNAL go0'; SET DEBUG_SYNC='now SIGNAL go1'; # Wait for con0 i # Wait for con1 (should not deadlock) i DROP TABLE t1;
Close