222 changed files with 7304 additions and 3924 deletions
-
3.gitignore
-
45CREDITS
-
8README
-
1VERSION
-
77client/mysql.cc
-
4client/mysql_upgrade.c
-
3cmake/dtrace.cmake
-
49cmake/jemalloc.cmake
-
26configure.cmake
-
11extra/yassl/README
-
1extra/yassl/include/crypto_wrapper.hpp
-
2extra/yassl/include/openssl/ssl.h
-
11extra/yassl/src/crypto_wrapper.cpp
-
15extra/yassl/src/yassl_imp.cpp
-
15extra/yassl/src/yassl_int.cpp
-
2include/byte_order_generic_x86_64.h
-
19include/my_global.h
-
0include/probes_mysql_nodtrace.h.in
-
6include/welcome_copyright_notice.h
-
1mysql-test/lib/mtr_cases.pm
-
9mysql-test/r/alter_table_online.result
-
18mysql-test/r/contributors.result
-
16mysql-test/r/create.result
-
7mysql-test/r/ctype_utf8.result
-
2mysql-test/r/ctype_utf8mb4.result
-
2mysql-test/r/ctype_utf8mb4_heap.result
-
2mysql-test/r/ctype_utf8mb4_innodb.result
-
2mysql-test/r/ctype_utf8mb4_myisam.result
-
345mysql-test/r/derived.result
-
9mysql-test/r/func_str.result
-
39mysql-test/r/func_time.result
-
33mysql-test/r/merge_innodb.result
-
60mysql-test/r/mysql_upgrade_view.result
-
13mysql-test/r/second_frac-9175.result
-
15mysql-test/r/select_found.result
-
18mysql-test/r/sp.result
-
5mysql-test/r/ssl_cert_verify.result
-
14mysql-test/r/subselect.result
-
8mysql-test/r/subselect_extra_no_semijoin.result
-
14mysql-test/r/subselect_no_exists_to_in.result
-
14mysql-test/r/subselect_no_mat.result
-
14mysql-test/r/subselect_no_opts.result
-
14mysql-test/r/subselect_no_scache.result
-
14mysql-test/r/subselect_no_semijoin.result
-
65mysql-test/r/subselect_sj.result
-
65mysql-test/r/subselect_sj_jcl6.result
-
15mysql-test/r/type_date.result
-
20mysql-test/r/view.result
-
20mysql-test/std_data/ca-cert-verify.pem
-
19mysql-test/std_data/server-cert-verify-fail.pem
-
19mysql-test/std_data/server-cert-verify-pass.pem
-
27mysql-test/std_data/server-key-verify-fail.pem
-
27mysql-test/std_data/server-key-verify-pass.pem
-
2mysql-test/suite.pm
-
6mysql-test/suite/federated/federatedx.result
-
9mysql-test/suite/federated/federatedx.test
-
30mysql-test/suite/innodb/r/innodb-alter-filewrite.result
-
92mysql-test/suite/innodb/r/innodb-alter-table.result
-
9mysql-test/suite/innodb/r/innodb_monitor.result
-
3mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
-
51mysql-test/suite/innodb/r/tmpdir.result
-
32mysql-test/suite/innodb/t/innodb-alter-filewrite.test
-
81mysql-test/suite/innodb/t/innodb-alter-table.test
-
68mysql-test/suite/innodb/t/tmpdir.test
-
2mysql-test/suite/parts/t/partition_debug_innodb-master.opt
-
2mysql-test/suite/perfschema/r/view_table_io.result
-
7mysql-test/suite/perfschema/t/dml_setup_instruments.test
-
1mysql-test/suite/plugins/r/feedback_plugin_install.result
-
29mysql-test/suite/rpl/r/rpl_autogen_query_multi_byte_char.result
-
53mysql-test/suite/rpl/r/rpl_unsafe_statements.result
-
87mysql-test/suite/rpl/t/rpl_autogen_query_multi_byte_char.test
-
176mysql-test/suite/rpl/t/rpl_unsafe_statements.test
-
9mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result
-
9mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result
-
9mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result
-
9mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result
-
35mysql-test/suite/sys_vars/r/innodb_tmpdir_basic.result
-
35mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff
-
16mysql-test/suite/sys_vars/r/sysvars_innodb.result
-
48mysql-test/suite/sys_vars/t/innodb_tmpdir_basic.test
-
27mysql-test/suite/vcol/inc/vcol_ins_upd.inc
-
44mysql-test/suite/vcol/r/alter_inplace-9045.result
-
16mysql-test/suite/vcol/r/innodb_autoinc_vcol.result
-
26mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
-
26mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
-
31mysql-test/suite/vcol/t/alter_inplace-9045.test
-
9mysql-test/suite/vcol/t/innodb_autoinc_vcol.test
-
11mysql-test/t/alter_table_online.test
-
21mysql-test/t/create.test
-
2mysql-test/t/ctype_utf8.test
-
290mysql-test/t/derived.test
-
18mysql-test/t/func_time.test
-
31mysql-test/t/merge_innodb.test
-
27mysql-test/t/mysql_upgrade_view.test
-
9mysql-test/t/second_frac-9175.test
-
10mysql-test/t/select_found.test
-
43mysql-test/t/ssl_cert_verify.test
-
11mysql-test/t/subselect.test
-
69mysql-test/t/subselect_sj.test
-
17mysql-test/t/type_date.test
@ -1,4 +1,3 @@ |
|||
MYSQL_VERSION_MAJOR=10 |
|||
MYSQL_VERSION_MINOR=1 |
|||
MYSQL_VERSION_PATCH=12 |
|||
MYSQL_VERSION_EXTRA= |
@ -0,0 +1,13 @@ |
|||
select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456'); |
|||
timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456') |
|||
31622400123456 |
|||
explain extended select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456'); |
|||
id select_type table type possible_keys key key_len ref rows filtered Extra |
|||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used |
|||
Warnings: |
|||
Note 1003 select timestampdiff(MICROSECOND,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456') AS `timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456')` |
|||
create view v1 as select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456'); |
|||
select * from v1; |
|||
Name_exp_1 |
|||
31622400123456 |
|||
drop view v1; |
@ -0,0 +1,5 @@ |
|||
#T1: Host name (/CN=localhost/) as OU name in the server certificate, server certificate verification should fail. |
|||
#T2: Host name (localhost) as common name in the server certificate, server certificate verification should pass. |
|||
Variable_name Value |
|||
Ssl_version TL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Pa0OBQbLb+58/naV+ywUpCYZ6flLdCMH3fXuDSlSq |
|||
qrCznextjojtWbnzrBmCmJmXWGd2gSaJDvb90ZZp/Elt3vN1sgjW0M/JEkb4MJ1r |
|||
6nfD/FHr2lUwBHm2yk7Blovx7x4d/Ip3pglk63cNO/Rn0SBTdoVDS2LB9du3Phq2 |
|||
TZiL3NrRMGUNwmdaavyrJxaPq5D+Sfa4LYP3MMYD4KhLogNzIl299n5joyizlJw= |
|||
-----END CERTIFICATE----- |
@ -0,0 +1,19 @@ |
|||
-----BEGIN CERTIFICATE----- |
|||
MIIDJzCCAg8CAQEwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCSU4xETAPBgNV |
|||
BAgMCEthcm5hdGthMRIwEAYDVQQHDAlCYW5nYWxvcmUxDjAMBgNVBAoMBU15U1FM |
|||
MB4XDTE2MDEwNTEwMDgyN1oXDTI1MTExMzEwMDgyN1owbzELMAkGA1UEBhMCSU4x |
|||
EjAQBgNVBAgMCTpLYXJuYXRrYTETMBEGA1UEBwwKOkJhbmdhbG9yZTEPMA0GA1UE |
|||
CgwGOk15U1FMMRcwFQYDVQQLDA4vQ049bG9jYWxob3N0LzENMAsGA1UEAwwEZmFp |
|||
bDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3wnWuJodzZYq9TAJRm |
|||
HU7995FA3TEWdUinYTgGP79aTVQ4M9aeINlB6whWXOI8seh9Ja7C6kMzqOgYbgCl |
|||
WlDPAVJWktFYeWXOLxbpzh1KWkS6jBkWT02t7H7JcYbil7xjlJUxLz4UOOUDUDIP |
|||
6yqdA9VE3osESttjzj57Zm2xPqzbIHVJfORn7EexH4pryS7439p6i4XtfL31NJ8V |
|||
07M3j3a8GqbcEqXYvcUCrLnywDQ1igP817b6ta52nbgYWiqdn0mJs535UJ/p/rSl |
|||
D4Ae/6G3BSEY7whir6xY6vsd4KJ6w+wRCHnY0ky6OdDJVJLH1iqh7si7P3RBGkxw |
|||
Y7MCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAggbw1jj2b7H5KDdeGJGIoOGkQAcs |
|||
GNSJussCfdk7qnzYXKmjyNppC86jjaOrXona5f+SNCuujdu86Tv8V69EH57k4lUc |
|||
DW7J4AD3vUb/tBzB0tsI/76Z4gm1XoCsnCGGpWd8GQAg/QNn/ZfJB2Vb/9ObN6rH |
|||
0HV7ouB6OGZSsb71+grKiN6mDyB1lZynCGvqBxOCKFISfcRbCNFHo/pONlHaNGPE |
|||
vjDH1bPZbEHj8owYgkdcQe0a8EbJYeQfm6fH8V8bmUcG7N60DrCnq4l1qwwVkh1S |
|||
7RpIDgrWkU+esIIdYZIIbtDxQP1Sm7kUh++7b+bcHnyw3KtDVSCw7MIedA== |
|||
-----END CERTIFICATE----- |
@ -0,0 +1,19 @@ |
|||
-----BEGIN CERTIFICATE----- |
|||
MIIDEzCCAfsCAQEwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCSU4xETAPBgNV |
|||
BAgMCEthcm5hdGthMRIwEAYDVQQHDAlCYW5nYWxvcmUxDjAMBgNVBAoMBU15U1FM |
|||
MB4XDTE2MDEwNTEwMDU1OVoXDTI1MTExMzEwMDU1OVowWzELMAkGA1UEBhMCSU4x |
|||
EjAQBgNVBAgMCTpLYXJuYXRrYTETMBEGA1UEBwwKOkJhbmdhbG9yZTEPMA0GA1UE |
|||
CgwGOk15U1FMMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUA |
|||
A4IBDwAwggEKAoIBAQDAmkbUwDe+nrqL8A8uwlIZk74HHCDjUAWrskKF9leEIQsB |
|||
5exFZ8JEo1u6mdR4laQWsxizGdTPqIEidkDyyEMh4+joHgyQEPD/G3rFVW8yEFHb |
|||
42O04O96BEPFXNPDRuX3MxI+lGbYDjxTS/WhVub4/3SqLjC28FJmEUXIHA0/A+c5 |
|||
hlYXK0u+aPAqXxHIjBgB4BxxHXZKqecmvR3LhXoVmhJmndsVfKajB27nDKc8/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ndIw49RCtMhYhtXQ87AsEAP6kzXQyKppDkn0os+xI5igIL |
|||
i/UDxB33hx3yjrUZwoGDV9MwlMhZNX5Tf5bwjPmmh1NR6KdEpPt5AkklX4s6uil2 |
|||
Bxl1P5l1jl/PbEYtv5LDZKIPANWRzViMSIWqjUWlbdqE7/vjx+Oo+cc= |
|||
-----END RSA PRIVATE KEY----- |
@ -0,0 +1,27 @@ |
|||
-----BEGIN RSA PRIVATE KEY----- |
|||
MIIEowIBAAKCAQEAwJpG1MA3vp66i/APLsJSGZO+Bxwg41AFq7JChfZXhCELAeXs |
|||
RWfCRKNbupnUeJWkFrMYsxnUz6iBInZA8shDIePo6B4MkBDw/xt6xVVvMhBR2+Nj |
|||
tODvegRDxVzTw0bl9zMSPpRm2A48U0v1oVbm+P90qi4wtvBSZhFFyBwNPwPnOYZW |
|||
FytLvmjwKl8RyIwYAeAccR12SqnnJr0dy4V6FZoSZp3bFXymowdu5wynPPzkyB9k |
|||
l2+od50Tw10X8AfwuYvtNOLRLFXiIJGLIXAoC0sg3XlYnlD9qZtxAJg0o5rSxego |
|||
GPxAUnx/iQihVJO+WwOJPAghswXyHjnLCh8IBQIDAQABAoIBAHPQUSc9LkgBSks7 |
|||
XuXPE28t1+aOk3gcdkx4NGg5aQaal/PcPea+LaL4WAAs4AZidPjxWLjZn43+1SfT |
|||
09opcbS/Rx3Mc+FtTn0YGQrwBJ0mExMV+K6bU2Ubi2TyHKQfzciHfUEEG5Nve/ba |
|||
hikuCFVRxuVOQRzABcw6NqvNsmlg892lfw6/+RDwMBcz7ocwzmiOUoIxgjyFo9G4 |
|||
aJvRmHLij5892H6qveik+A/Xr+8leGQHiQET2wW/F9MFP5ypIT7aeE6remeZH7fG |
|||
f4/Zfei/TE4xK2ElNR/91byzeKIVY4vjtTndAiBuqpfYuICb40MC02LNW5Oe6VN2 |
|||
3mQ6EgECgYEA7O4ndBnbs/00gyTGyNg6I+3wRTibhNH4R8RZFJiLfKRKOlUiLhUo |
|||
+bQeO4bCQ6YY++TYDvMEXTlA3jow9R9Mj2AWc6bNmQmJd/065QyFHftywT66I+V4 |
|||
rz1ohSJyHXcv4DxqNk3o3Vb4N8GFjZKcodSgTv2Lk+9ipDYFcQiZop0CgYEA0BrF |
|||
SIyLTnjoVht/7RbIGEqhMQUiz5mx7qQ1TPB+YTG77G2xXJNg5d6S7WT4LN+cqbxN |
|||
YdndIbW4NdV7bH7FlG9q7jfkuZ+AY2BPU047tcDeyO0HYYEhVY+EyZqHci/26mvt |
|||
JrawdqS5HQS1y/rKfytm7YBGTvqoNZHvOHc6aokCgYEAxcjlbJkte+pyzMuFmiJP |
|||
HrFBczeXM+BoJ9j0GCpjvvAS+vEYsGl/pDvFRSHwx7I/hv/5kTkzOnNSAHGJbwbq |
|||
zYGEHJVxakC43k6pvI2gDnBa0pD/qHmmLnvP5dvkcU6Oy90DOUP+kc9JNJo7V/y8 |
|||
/qdWD7q+qwcaTETAdCSexE0CgYA/DN1Y7bwHOnqqHArWOmDFe1b7EyNI4rgWJYpA |
|||
lVy09eyJ5XInKj/hZV3+rujCL723b2XCj89/tx7osJWEeaRDJL6xDh4uXzT25uch |
|||
xkIw/w6Asc/aqtT+p00EB92hqwaUX76qTA+K4r1zHUo3UvSnMu8sZgDnTOpJ0L05 |
|||
zmXUgQKBgDT+IFrAzOty4B0mJncTCC/TulpW704bEZwNJfQSdtiBQr/vqoXygBQc |
|||
bHfpncpSfhzHB5lhRUv02TqXgl53D70nM7JD5nx98WYTTBxsbvxPlt4gBRZkfgq5 |
|||
tHKclAArc1SbfW5Z8oYyl7h33LQJK116QSyiIIGieH5VXNPwnqUs |
|||
-----END RSA PRIVATE KEY----- |
@ -1,30 +0,0 @@ |
|||
CREATE TABLE `test_wo_keys` ( |
|||
`f01` int AUTO_INCREMENT, |
|||
`f02` bigint, `f03` bigint, `f04` enum('a','b'), |
|||
`f05` date, `f06` int, `f07` int, `f08` double, `f09` int, |
|||
`f10` bigint, `f11` double, `f12` enum('a','b','c','d','e'), |
|||
`f13` int, `f14` int, `f15` varchar(255), `f16` int, `f17` int, `f18` int, |
|||
`f19` double, `f20` double, `f21` double, `f22` double, `f23` double, `f24` tinyint, |
|||
`f25` double, `f26` double, `f27` double, `f28` double, `f29` int unsigned, |
|||
`f30` int unsigned, `f31` bigint, `f32` int unsigned, `f33` bigint, |
|||
`f34` int unsigned, `f35` int unsigned, |
|||
PRIMARY KEY `f01` (`f01`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
|||
show status like '%merge_buffers%'; |
|||
Variable_name Value |
|||
Innodb_os_merge_buffers_written 0 |
|||
Innodb_os_merge_buffers_read 0 |
|||
Innodb_os_merge_buffers_merged 0 |
|||
ALTER TABLE test_wo_keys |
|||
ADD KEY `f06` (`f06`), ADD KEY `f05` (`f05`), ADD KEY `f04` (`f04`), ADD KEY `f23` (`f23`), |
|||
ADD KEY `f10` (`f10`), ADD KEY `f11` (`f11`), ADD KEY `f09` (`f09`), ADD KEY `f22` (`f22`), |
|||
ADD KEY `f21` (`f21`), ADD KEY `f07` (`f07`), ADD KEY `f08` (`f08`), ADD KEY `f18` (`f18`), |
|||
ADD KEY `f19` (`f19`), ADD KEY `f20` (`f20`), ADD KEY `f29` (`f29`,`f31`,`f33`), |
|||
ADD KEY `f35` (`f35`), ADD KEY `f25` (`f25`), ADD KEY `f26` (`f26`), |
|||
ADD KEY `f27` (`f27`), ADD KEY `f28` (`f28`); |
|||
show status like '%merge_buffers%'; |
|||
Variable_name Value |
|||
Innodb_os_merge_buffers_written 0 |
|||
Innodb_os_merge_buffers_read 0 |
|||
Innodb_os_merge_buffers_merged 0 |
|||
DROP TABLE test_wo_keys; |
@ -0,0 +1,51 @@ |
|||
# |
|||
# Bug #19183565 CREATE DYNAMIC INNODB_TMPDIR VARIABLE TO CONTROL |
|||
# WHERE INNODB WRITES TEMP FILES |
|||
# |
|||
# If innodb_tmpdir is NULL or "", temporary file will be created in |
|||
# server configuration variable location(--tmpdir) |
|||
create table t1(a int primary key)engine=innodb; |
|||
show session variables like 'innodb_tmpdir'; |
|||
Variable_name Value |
|||
innodb_tmpdir |
|||
alter table t1 add column b int not null; |
|||
set global innodb_tmpdir=NULL; |
|||
# Connection con1 |
|||
show session variables like 'innodb_tmpdir'; |
|||
Variable_name Value |
|||
innodb_tmpdir |
|||
alter table t1 add key(b); |
|||
drop table t1; |
|||
# innodb_tmpdir with invalid path. |
|||
create table t1(a int primary key)engine=innodb; |
|||
set global innodb_tmpdir='wrong_value'; |
|||
ERROR 42000: Variable 'innodb_tmpdir' can't be set to the value of 'wrong_value' |
|||
show warnings; |
|||
Level Code Message |
|||
Warning 1210 InnoDB: Path doesn't exist. |
|||
Error 1231 Variable 'innodb_tmpdir' can't be set to the value of 'wrong_value' |
|||
drop table t1; |
|||
# innodb_tmpdir with mysql data directory path. |
|||
create table t1(a text, b text, fulltext(a,b))engine=innodb; |
|||
insert into t1 values('test1', 'test2'); |
|||
insert into t1 values('text1', 'text2'); |
|||
set global innodb_tmpdir = @@global.datadir; |
|||
ERROR 42000: Variable 'innodb_tmpdir' can't be set to the value of 'MYSQL_DATADIR' |
|||
show warnings; |
|||
Level Code Message |
|||
Warning 1210 InnoDB: Path Location should not be same as mysql data directory location. |
|||
Error 1231 DATADIR/data/' |
|||
drop table t1; |
|||
# innodb_tmpdir with valid location. |
|||
create table t1(a text, b text, fulltext(a,b))engine=innodb; |
|||
insert into t1 values('test1', 'test2'); |
|||
insert into t1 values('text1', 'text2'); |
|||
set @tmpdir = @@global.tmpdir; |
|||
set global innodb_tmpdir = @tmpdir; |
|||
show session variables like 'innodb_tmpdir'; |
|||
Variable_name Value |
|||
innodb_tmpdir |
|||
# Connection con3 |
|||
alter table t1 add fulltext(b); |
|||
set global innodb_tmpdir=NULL; |
|||
drop table t1; |
@ -1,32 +0,0 @@ |
|||
--source include/have_innodb.inc |
|||
|
|||
# |
|||
# MDEV-8696: Adding indexes on empty table is slow with large innodb_sort_buffer_size. |
|||
# |
|||
|
|||
CREATE TABLE `test_wo_keys` ( |
|||
`f01` int AUTO_INCREMENT, |
|||
`f02` bigint, `f03` bigint, `f04` enum('a','b'), |
|||
`f05` date, `f06` int, `f07` int, `f08` double, `f09` int, |
|||
`f10` bigint, `f11` double, `f12` enum('a','b','c','d','e'), |
|||
`f13` int, `f14` int, `f15` varchar(255), `f16` int, `f17` int, `f18` int, |
|||
`f19` double, `f20` double, `f21` double, `f22` double, `f23` double, `f24` tinyint, |
|||
`f25` double, `f26` double, `f27` double, `f28` double, `f29` int unsigned, |
|||
`f30` int unsigned, `f31` bigint, `f32` int unsigned, `f33` bigint, |
|||
`f34` int unsigned, `f35` int unsigned, |
|||
PRIMARY KEY `f01` (`f01`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
|||
|
|||
show status like '%merge_buffers%'; |
|||
|
|||
ALTER TABLE test_wo_keys |
|||
ADD KEY `f06` (`f06`), ADD KEY `f05` (`f05`), ADD KEY `f04` (`f04`), ADD KEY `f23` (`f23`), |
|||
ADD KEY `f10` (`f10`), ADD KEY `f11` (`f11`), ADD KEY `f09` (`f09`), ADD KEY `f22` (`f22`), |
|||
ADD KEY `f21` (`f21`), ADD KEY `f07` (`f07`), ADD KEY `f08` (`f08`), ADD KEY `f18` (`f18`), |
|||
ADD KEY `f19` (`f19`), ADD KEY `f20` (`f20`), ADD KEY `f29` (`f29`,`f31`,`f33`), |
|||
ADD KEY `f35` (`f35`), ADD KEY `f25` (`f25`), ADD KEY `f26` (`f26`), |
|||
ADD KEY `f27` (`f27`), ADD KEY `f28` (`f28`); |
|||
|
|||
show status like '%merge_buffers%'; |
|||
|
|||
DROP TABLE test_wo_keys; |
@ -0,0 +1,68 @@ |
|||
--source include/have_innodb.inc |
|||
--source include/count_sessions.inc |
|||
|
|||
if (`select plugin_auth_version <= "5.6.28-MariaDB-76.1" from information_schema.plugins where plugin_name='innodb'`) |
|||
{ |
|||
--skip Not fixed in XtraDB as of 5.6.28-MariaDB-76.1 or earlier |
|||
} |
|||
|
|||
--echo # |
|||
--echo # Bug #19183565 CREATE DYNAMIC INNODB_TMPDIR VARIABLE TO CONTROL |
|||
--echo # WHERE INNODB WRITES TEMP FILES |
|||
--echo # |
|||
|
|||
--echo # If innodb_tmpdir is NULL or "", temporary file will be created in |
|||
--echo # server configuration variable location(--tmpdir) |
|||
|
|||
create table t1(a int primary key)engine=innodb; |
|||
show session variables like 'innodb_tmpdir'; |
|||
alter table t1 add column b int not null; |
|||
set global innodb_tmpdir=NULL; |
|||
--echo # Connection con1 |
|||
connect (con1,localhost,root); |
|||
show session variables like 'innodb_tmpdir'; |
|||
alter table t1 add key(b); |
|||
connection default; |
|||
disconnect con1; |
|||
drop table t1; |
|||
|
|||
--echo # innodb_tmpdir with invalid path. |
|||
|
|||
create table t1(a int primary key)engine=innodb; |
|||
--error ER_WRONG_VALUE_FOR_VAR |
|||
set global innodb_tmpdir='wrong_value'; |
|||
show warnings; |
|||
drop table t1; |
|||
|
|||
|
|||
--echo # innodb_tmpdir with mysql data directory path. |
|||
|
|||
let $MYSQLD_DATADIR= `select @@datadir`; |
|||
create table t1(a text, b text, fulltext(a,b))engine=innodb; |
|||
insert into t1 values('test1', 'test2'); |
|||
insert into t1 values('text1', 'text2'); |
|||
--replace_result $MYSQLD_DATADIR MYSQL_DATADIR |
|||
--error ER_WRONG_VALUE_FOR_VAR |
|||
set global innodb_tmpdir = @@global.datadir; |
|||
--replace_regex /.*mysqld.1/DATADIR/ |
|||
show warnings; |
|||
drop table t1; |
|||
|
|||
--echo # innodb_tmpdir with valid location. |
|||
let $MYSQL_TMP_DIR= `select @@tmpdir`; |
|||
create table t1(a text, b text, fulltext(a,b))engine=innodb; |
|||
insert into t1 values('test1', 'test2'); |
|||
insert into t1 values('text1', 'text2'); |
|||
set @tmpdir = @@global.tmpdir; |
|||
set global innodb_tmpdir = @tmpdir; |
|||
show session variables like 'innodb_tmpdir'; |
|||
--echo # Connection con3 |
|||
connect (con3,localhost,root); |
|||
# Following alter using innodb_tmpdir as a path to create temporary files |
|||
alter table t1 add fulltext(b); |
|||
disconnect con3; |
|||
connection default; |
|||
set global innodb_tmpdir=NULL; |
|||
drop table t1; |
|||
|
|||
--source include/wait_until_count_sessions.inc |
@ -1 +1 @@ |
|||
--loose-innodb-file-format-check --loose-innodb-file-per-table=1 --skip-stack-trace --skip-core-file |
|||
--loose-innodb-file-format-check --loose-innodb-file-per-table=1 --skip-stack-trace --skip-core-file --loose-innodb-buffer-pool-size=32M |
@ -0,0 +1,29 @@ |
|||
include/master-slave.inc |
|||
[connection master] |
|||
Test case 1:- table name with one character latin name. |
|||
SET @s:=CONCAT("CREATE TABLE `",REPEAT(CHAR(131),1),"` (a INT)"); |
|||
PREPARE STMT FROM @s; |
|||
EXECUTE stmt; |
|||
SET @s:=CONCAT("INSERT INTO `",REPEAT(CHAR(131),1),"` VALUES (1)"); |
|||
PREPARE STMT FROM @s; |
|||
EXECUTE stmt; |
|||
SET @s:=CONCAT("DROP TABLE `",REPEAT(CHAR(131),1), "`"); |
|||
PREPARE STMT FROM @s; |
|||
EXECUTE stmt; |
|||
Test case 2:- table name and database names with one character latin name. |
|||
SET @s:=CONCAT("CREATE DATABASE `",REPEAT(CHAR(131),1),"`"); |
|||
PREPARE STMT FROM @s; |
|||
EXECUTE stmt; |
|||
SET @s:=CONCAT("CREATE TABLE `",REPEAT(CHAR(131),1),"`.`",REPEAT(CHAR(131),1),"` (a INT)"); |
|||
PREPARE STMT FROM @s; |
|||
EXECUTE stmt; |
|||
SET @s:=CONCAT("INSERT INTO `",REPEAT(CHAR(131),1),"`.`",REPEAT(CHAR(131),1),"` VALUES (1)"); |
|||
PREPARE STMT FROM @s; |
|||
EXECUTE stmt; |
|||
SET @s:=CONCAT("DROP TABLE `",REPEAT(CHAR(131),1),"`.`",REPEAT(CHAR(131),1), "`"); |
|||
PREPARE STMT FROM @s; |
|||
EXECUTE stmt; |
|||
SET @s:=CONCAT("DROP DATABASE `",REPEAT(CHAR(131),1),"`"); |
|||
PREPARE STMT FROM @s; |
|||
EXECUTE stmt; |
|||
include/rpl_end.inc |
@ -0,0 +1,53 @@ |
|||
include/master-slave.inc |
|||
[connection master] |
|||
CREATE TABLE t1(id INT AUTO_INCREMENT, i INT, PRIMARY KEY (id)) ENGINE=INNODB; |
|||
CREATE TABLE t2(id INT AUTO_INCREMENT, i INT, PRIMARY KEY (id)) ENGINE=INNODB; |
|||
CREATE TRIGGER trig1 AFTER INSERT ON t1 |
|||
FOR EACH ROW |
|||
INSERT INTO t2(i) VALUES(new.i); |
|||
START TRANSACTION; |
|||
INSERT INTO t2(i) VALUES (1); |
|||
ROLLBACK; |
|||
INSERT INTO t1(i) VALUES(2); |
|||
START TRANSACTION; |
|||
LOCK TABLES t1 WRITE, t2 WRITE; |
|||
INSERT INTO t1(i) VALUES(3); |
|||
UNLOCK TABLES; |
|||
COMMIT; |
|||
include/diff_tables.inc [master:t1, slave:t1] |
|||
include/diff_tables.inc [master:t2, slave:t2] |
|||
DROP TABLE t1,t2; |
|||
CREATE TABLE t1(i INT) ENGINE=INNODB; |
|||
CREATE TABLE t2(id INT AUTO_INCREMENT, i INT, PRIMARY KEY (id)) ENGINE=INNODB; |
|||
INSERT INTO t1 values (1), (2), (3); |
|||
START TRANSACTION; |
|||
INSERT INTO t2(i) VALUES (1); |
|||
ROLLBACK; |
|||
INSERT INTO t2(i) SELECT i FROM t1; |
|||
START TRANSACTION; |
|||
LOCK TABLES t2 WRITE, t1 READ; |
|||
INSERT INTO t2(i) SELECT i FROM t1; |
|||
UNLOCK TABLES; |
|||
COMMIT; |
|||
include/diff_tables.inc [master:t1, slave:t1] |
|||
include/diff_tables.inc [master:t2, slave:t2] |
|||
DROP TABLE t1,t2; |
|||
CREATE TABLE t1(i int, id INT AUTO_INCREMENT, PRIMARY KEY (i, id)) ENGINE=MYISAM; |
|||
INSERT INTO t1 (i) values (1); |
|||
START TRANSACTION; |
|||
LOCK TABLES t1 WRITE; |
|||
INSERT INTO t1 (i) values (2); |
|||
UNLOCK TABLES; |
|||
COMMIT; |
|||
include/diff_tables.inc [master:t1, slave:t1] |
|||
DROP TABLE t1; |
|||
CREATE TABLE t1(i INT, j INT, UNIQUE KEY(i), UNIQUE KEY(j)) ENGINE=INNODB; |
|||
INSERT INTO t1 (i,j) VALUES (1,2) ON DUPLICATE KEY UPDATE j=j+1; |
|||
START TRANSACTION; |
|||
LOCK TABLES t1 WRITE; |
|||
INSERT INTO t1 (i,j) VALUES (1,2) ON DUPLICATE KEY UPDATE j=j+1; |
|||
UNLOCK TABLES; |
|||
COMMIT; |
|||
include/diff_tables.inc [master:t1, slave:t1] |
|||
DROP TABLE t1; |
|||
include/rpl_end.inc |
@ -0,0 +1,87 @@ |
|||
############################################################################### |
|||
# Bug#21205695 DROP TABLE MAY CAUSE SLAVES TO BREAK |
|||
# |
|||
# Problem: |
|||
# ======== |
|||
# 1) Drop table queries are re-generated by server |
|||
# before writing the events(queries) into binlog |
|||
# for various reasons. If table name/db name contains |
|||
# a non regular characters (like latin characters), |
|||
# the generated query is wrong. Hence it breaks the |
|||
# replication. |
|||
# 2) In the edge case, when table name contains |
|||
# 64 latin characters (latin takes 2 bytes), server is |
|||
# throwing an assert (M_TBLLEN < 128) |
|||
# |
|||
# 3) In the edge case, when db name contains 64 latin |
|||
# characters, binlog contents are interpreted wrongly |
|||
# which is leading to replication issues. |
|||
# |
|||
############################################################################### |
|||
|
|||
--source include/not_windows.inc |
|||
--source include/master-slave.inc |
|||
|
|||
--let iter=1 |
|||
# Change iteration to 4 after fixing Bug #22280214 |
|||
while ($iter <= 2) |
|||
{ |
|||
--connection master |
|||
if ($iter == 1) |
|||
{ |
|||
--echo Test case 1:- table name with one character latin name. |
|||
--let $tblname= REPEAT(CHAR(131),1) |
|||
} |
|||
if ($iter == 2) |
|||
{ |
|||
--echo Test case 2:- table name and database names with one character latin name. |
|||
--let $tblname= REPEAT(CHAR(131),1),"`.`",REPEAT(CHAR(131),1) |
|||
--eval SET @s:=CONCAT("CREATE DATABASE `",REPEAT(CHAR(131),1),"`") |
|||
PREPARE STMT FROM @s; EXECUTE stmt; |
|||
} |
|||
# After fixing Bug #22280214 DATADIR LOCATION IS LIMITING |
|||
# IDENTIFIER MAX LENGTH, the following two tests (iter 3 and 4) can be |
|||
# uncommented. |
|||
#if ($iter == 3) |
|||
#{ |
|||
# --echo Test case 3:- table name and database names with 64 latin characters name. |
|||
# --let $tblname= REPEAT(CHAR(131),64),"`.`", REPEAT(CHAR(131),64) |
|||
# --eval SET @s:=CONCAT("CREATE DATABASE `",REPEAT(CHAR(131),64),"`") |
|||
# PREPARE STMT FROM @s; EXECUTE stmt; |
|||
#} |
|||
#if ($iter == 4) |
|||
#{ |
|||
# --echo Test case 4:- table name and database names with 64 Euro(€) characters. |
|||
# --let $tblname= REPEAT(CHAR(226,130,172),64),"`.`", REPEAT(CHAR(226,130,172),64) |
|||
# --eval SET @s:=CONCAT("CREATE DATABASE `",REPEAT(CHAR(226,130,172),64),"`") |
|||
# PREPARE STMT FROM @s; EXECUTE stmt; |
|||
#} |
|||
--eval SET @s:=CONCAT("CREATE TABLE `",$tblname,"` (a INT)") |
|||
PREPARE STMT FROM @s; EXECUTE stmt; |
|||
--eval SET @s:=CONCAT("INSERT INTO `",$tblname,"` VALUES (1)") |
|||
PREPARE STMT FROM @s; EXECUTE stmt; |
|||
--eval SET @s:=CONCAT("DROP TABLE `",$tblname, "`") |
|||
PREPARE STMT FROM @s; EXECUTE stmt; |
|||
if ($iter == 2) |
|||
{ |
|||
--eval SET @s:=CONCAT("DROP DATABASE `",REPEAT(CHAR(131),1),"`") |
|||
PREPARE STMT FROM @s; EXECUTE stmt; |
|||
} |
|||
# After fixing Bug #22280214 DATADIR LOCATION IS LIMITING |
|||
# IDENTIFIER MAX LENGTH, the following two tests (iter 3 and 4) can be |
|||
# uncommented. |
|||
#if ($iter == 3) |
|||
#{ |
|||
# --eval SET @s:=CONCAT("DROP DATABASE `",REPEAT(CHAR(131),64),"`") |
|||
# PREPARE STMT FROM @s; EXECUTE stmt; |
|||
#} |
|||
#if ($iter == 4) |
|||
#{ |
|||
# --eval SET @s:=CONCAT("DROP DATABASE `",REPEAT(CHAR(226,130,172),64),"`") |
|||
# PREPARE STMT FROM @s; EXECUTE stmt; |
|||
#} |
|||
--sync_slave_with_master |
|||
--inc $iter |
|||
} |
|||
|
|||
--source include/rpl_end.inc |
@ -0,0 +1,176 @@ |
|||
################################################################################ |
|||
# Bug#17047208 REPLICATION DIFFERENCE FOR MULTIPLE TRIGGERS |
|||
# Problem: If DML invokes a trigger or a stored function that inserts into an |
|||
# AUTO_INCREMENT column, that DML has to be marked as 'unsafe' statement. If the |
|||
# tables are locked in the transaction prior to DML statement (using LOCK |
|||
# TABLES), then the DML statement is not marked as 'unsafe' statement. |
|||
|
|||
# Steps to reproduce the reported test case (BINLOG_STMT_UNSAFE_AUTOINC_COLUMNS) |
|||
# Case-1: |
|||
# > Create a trigger on a table and do a insert in the trigger that updates |
|||
# auto increment column |
|||
# > A DML that executes the trigger in step.1 and check that DML is marked |
|||
# as unsafe and DML is written into binlog using row format (in MBR) |
|||
# > Execute the step 2 by locking the required tables prior to DML and check |
|||
# that DML is marked as unsafe and DML is written into binlog using row |
|||
# format (in MBR) |
|||
# |
|||
# This test script also adds test cases to cover few other unsafe statements. |
|||
# Case-2: BINLOG_STMT_UNSAFE_WRITE_AUTOINC_SELECT |
|||
# Case-3: BINLOG_STMT_UNSAFE_AUTOINC_NOT_FIRST |
|||
# Case-4: BINLOG_STMT_UNSAFE_INSERT_TWO_KEYS |
|||
################################################################################ |
|||
|
|||
--source include/have_innodb.inc |
|||
--source include/have_binlog_format_mixed.inc |
|||
--source include/master-slave.inc |
|||
|
|||
# Case-1: BINLOG_STMT_UNSAFE_AUTOINC_COLUMNS |
|||
# Statement is unsafe because it invokes a trigger or a |
|||
# stored function that inserts into an AUTO_INCREMENT column. |
|||
|
|||
# Step-1.1: Create two tables, one with AUTO_INCREMENT column. |
|||
CREATE TABLE t1(id INT AUTO_INCREMENT, i INT, PRIMARY KEY (id)) ENGINE=INNODB; |
|||
CREATE TABLE t2(id INT AUTO_INCREMENT, i INT, PRIMARY KEY (id)) ENGINE=INNODB; |
|||
|
|||
# Step-1.2: Create a trigger that inserts into an AUTO_INCREMENT column. |
|||
CREATE TRIGGER trig1 AFTER INSERT ON t1 |
|||
FOR EACH ROW |
|||
INSERT INTO t2(i) VALUES(new.i); |
|||
|
|||
# Step-1.3: Create some gap in auto increment value on master's t2 table |
|||
# but not on slave (by doing rollback). Just in case if the unsafe statements |
|||
# are written in statement format, diff tables will fail. |
|||
START TRANSACTION; |
|||
INSERT INTO t2(i) VALUES (1); |
|||
ROLLBACK; |
|||
|
|||
# Step-1.4: Insert a tuple into table t1 that triggers trig1 which inserts |
|||
# into an AUTO_INCREMENT column. |
|||
INSERT INTO t1(i) VALUES(2); |
|||
|
|||
# Step-1.5: Repeat step 1.4 but using 'LOCK TABLES' logic. |
|||
START TRANSACTION; |
|||
LOCK TABLES t1 WRITE, t2 WRITE; |
|||
INSERT INTO t1(i) VALUES(3); |
|||
UNLOCK TABLES; |
|||
COMMIT; |
|||
|
|||
# Step-1.6: Sync slave with master |
|||
--sync_slave_with_master |
|||
|
|||
# Step-1.7: Diff master-slave tables to make sure everything is in sync. |
|||
--let $diff_tables=master:t1, slave:t1 |
|||
--source include/diff_tables.inc |
|||
|
|||
--let $diff_tables=master:t2, slave:t2 |
|||
--source include/diff_tables.inc |
|||
|
|||
# Step-1.8: Cleanup |
|||
--connection master |
|||
DROP TABLE t1,t2; |
|||
|
|||
# Case-2: BINLOG_STMT_UNSAFE_WRITE_AUTOINC_SELECT |
|||
# Statements writing to a table with an auto-increment column after selecting |
|||
# from another table are unsafe because the order in which rows are retrieved |
|||
# determines what (if any) rows will be written. This order cannot be |
|||
# predicted and may differ on master and the slave. |
|||
|
|||
# Step-2.1: Create two tables, one with AUTO_INCREMENT column. |
|||
CREATE TABLE t1(i INT) ENGINE=INNODB; |
|||
CREATE TABLE t2(id INT AUTO_INCREMENT, i INT, PRIMARY KEY (id)) ENGINE=INNODB; |
|||
|
|||
# Step-2.2: Create some tuples in table t1. |
|||
INSERT INTO t1 values (1), (2), (3); |
|||
|
|||
# Step-2.3: Create some gap in auto increment value on master's t2 table |
|||
# but not on slave (by doing rollback). Just in case if the unsafe statements |
|||
# are written in statement format, diff tables will fail. |
|||
START TRANSACTION; |
|||
INSERT INTO t2(i) VALUES (1); |
|||
ROLLBACK; |
|||
|
|||
# Step-2.4: Insert into t2 (table with an auto-increment) by selecting tuples |
|||
# from table t1. |
|||
INSERT INTO t2(i) SELECT i FROM t1; |
|||
|
|||
# Step-2.5: Repeat step 2.4 but now with 'LOCK TABLES' logic. |
|||
START TRANSACTION; |
|||
LOCK TABLES t2 WRITE, t1 READ; |
|||
INSERT INTO t2(i) SELECT i FROM t1; |
|||
UNLOCK TABLES; |
|||
COMMIT; |
|||
|
|||
# Step-2.6: Sync slave with master |
|||
--sync_slave_with_master |
|||
|
|||
# Step-2.7: Diff master-slave tables to make sure everything is in sync. |
|||
--let $diff_tables=master:t1, slave:t1 |
|||
--source include/diff_tables.inc |
|||
|
|||
--let $diff_tables=master:t2, slave:t2 |
|||
--source include/diff_tables.inc |
|||
|
|||
# Step-2.8: Cleanup |
|||
--connection master |
|||
DROP TABLE t1,t2; |
|||
|
|||
# Case-3: BINLOG_STMT_UNSAFE_AUTOINC_NOT_FIRST |
|||
# INSERT into autoincrement field which is not the first part in the |
|||
# composed primary key is unsafe |
|||
# |
|||
# Step-3.1: Create a table with auto increment column and a composed primary key |
|||
# (second column is auto increment column). Such a definition is allowed only |
|||
# with 'myisam' engine. |
|||
CREATE TABLE t1(i int, id INT AUTO_INCREMENT, PRIMARY KEY (i, id)) ENGINE=MYISAM; |
|||
|
|||
# Step-3.2: Inserting into such a table is unsafe. |
|||
INSERT INTO t1 (i) values (1); |
|||
|
|||
# Step-3.3: Repeat step 3.2, now with 'LOCK TABLES' logic. |
|||
START TRANSACTION; |
|||
LOCK TABLES t1 WRITE; |
|||
INSERT INTO t1 (i) values (2); |
|||
UNLOCK TABLES; |
|||
COMMIT; |
|||
|
|||
# Step-3.4: Sync slave with master |
|||
--sync_slave_with_master |
|||
|
|||
# Step-3.5: Diff master-slave tables to make sure everything is in sync. |
|||
--let $diff_tables=master:t1, slave:t1 |
|||
--source include/diff_tables.inc |
|||
|
|||
# Step-3.6: Cleanup |
|||
--connection master |
|||
DROP TABLE t1; |
|||
|
|||
# Case-4: BINLOG_STMT_UNSAFE_INSERT_TWO_KEYS |
|||
# INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY |
|||
# is unsafe Statement |
|||
|
|||
# Step-4.1: Create a table with two unique keys |
|||
CREATE TABLE t1(i INT, j INT, UNIQUE KEY(i), UNIQUE KEY(j)) ENGINE=INNODB; |
|||
|
|||
# Step-4.2: Inserting into such a table is unsafe. |
|||
INSERT INTO t1 (i,j) VALUES (1,2) ON DUPLICATE KEY UPDATE j=j+1; |
|||
|
|||
# Step-4.3: Repeat step 3.2, now with 'LOCK TABLES' logic. |
|||
START TRANSACTION; |
|||
LOCK TABLES t1 WRITE; |
|||
INSERT INTO t1 (i,j) VALUES (1,2) ON DUPLICATE KEY UPDATE j=j+1; |
|||
UNLOCK TABLES; |
|||
COMMIT; |
|||
|
|||
# Step-4.4: Sync slave with master |
|||
--sync_slave_with_master |
|||
|
|||
# Step-4.5: Diff master-slave tables to make sure everything is in sync. |
|||
--let $diff_tables=master:t1, slave:t1 |
|||
--source include/diff_tables.inc |
|||
|
|||
# Step-4.6: Cleanup |
|||
--connection master |
|||
DROP TABLE t1; |
|||
|
|||
--source include/rpl_end.inc |
@ -0,0 +1,35 @@ |
|||
SET @start_global_value = @@global.innodb_tmpdir; |
|||
SELECT @start_global_value; |
|||
@start_global_value |
|||
NULL |
|||
select @@session.innodb_tmpdir; |
|||
@@session.innodb_tmpdir |
|||
NULL |
|||
show global variables like 'innodb_tmpdir'; |
|||
Variable_name Value |
|||
innodb_tmpdir |
|||
show session variables like 'innodb_tmpdir'; |
|||
Variable_name Value |
|||
innodb_tmpdir |
|||
select * from information_schema.global_variables where variable_name='innodb_tmpdir'; |
|||
VARIABLE_NAME VARIABLE_VALUE |
|||
INNODB_TMPDIR |
|||
select * from information_schema.session_variables where variable_name='innodb_tmpdir'; |
|||
VARIABLE_NAME VARIABLE_VALUE |
|||
INNODB_TMPDIR |
|||
set global innodb_tmpdir=@@global.tmpdir; |
|||
set session innodb_tmpdir=@@global.tmpdir; |
|||
set global innodb_tmpdir=1.1; |
|||
ERROR 42000: Incorrect argument type to variable 'innodb_tmpdir' |
|||
set global innodb_tmpdir=1e1; |
|||
ERROR 42000: Incorrect argument type to variable 'innodb_tmpdir' |
|||
set global innodb_tmpdir=repeat('a',1000); |
|||
ERROR 42000: Variable 'innodb_tmpdir' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' |
|||
show warnings; |
|||
Level Code Message |
|||
Warning 1210 Path length should not exceed 512 bytes |
|||
Error 1231 Variable 'innodb_tmpdir' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' |
|||
SET @@global.innodb_tmpdir = @start_global_value; |
|||
SELECT @@global.innodb_tmpdir; |
|||
@@global.innodb_tmpdir |
|||
NULL |
@ -0,0 +1,48 @@ |
|||
--source include/have_innodb.inc |
|||
|
|||
if (`select plugin_auth_version <= "5.6.28-MariaDB-76.1" from information_schema.plugins where plugin_name='innodb'`) |
|||
{ |
|||
--skip Not fixed in XtraDB as of 5.6.28-MariaDB-76.1 or earlier |
|||
} |
|||
|
|||
SET @start_global_value = @@global.innodb_tmpdir; |
|||
SELECT @start_global_value; |
|||
|
|||
# |
|||
# exists as global and session |
|||
# |
|||
select @@session.innodb_tmpdir; |
|||
|
|||
show global variables like 'innodb_tmpdir'; |
|||
show session variables like 'innodb_tmpdir'; |
|||
|
|||
select * from information_schema.global_variables where variable_name='innodb_tmpdir'; |
|||
select * from information_schema.session_variables where variable_name='innodb_tmpdir'; |
|||
# |
|||
# Show that it is writable |
|||
# |
|||
|
|||
set global innodb_tmpdir=@@global.tmpdir; |
|||
set session innodb_tmpdir=@@global.tmpdir; |
|||
|
|||
# |
|||
# incorrect types |
|||
# |
|||
--error ER_WRONG_TYPE_FOR_VAR |
|||
set global innodb_tmpdir=1.1; |
|||
--error ER_WRONG_TYPE_FOR_VAR |
|||
set global innodb_tmpdir=1e1; |
|||
|
|||
# |
|||
# path len more than 512 |
|||
# |
|||
--error ER_WRONG_VALUE_FOR_VAR |
|||
set global innodb_tmpdir=repeat('a',1000); |
|||
show warnings; |
|||
|
|||
# |
|||
# Cleanup |
|||
# |
|||
|
|||
SET @@global.innodb_tmpdir = @start_global_value; |
|||
SELECT @@global.innodb_tmpdir; |
@ -0,0 +1,44 @@ |
|||
create table t1(id int auto_increment primary key, handle int, data bigint not null default 0) engine = innodb; |
|||
insert into t1(handle) values(12),(54),(NULL); |
|||
select *, md5(handle) from t1; |
|||
id handle data md5(handle) |
|||
1 12 0 c20ad4d76fe97759aa27a0c99bff6710 |
|||
2 54 0 a684eceee76fc522773286a895bc8436 |
|||
3 NULL 0 NULL |
|||
alter table t1 add index handle(handle), algorithm=inplace; |
|||
alter table t1 add column hash varchar(32) as (md5(handle)) persistent, algorithm=inplace; |
|||
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. |
|||
alter table t1 add column hash varchar(32) as (md5(handle)) persistent, add unique index hash(hash), algorithm=inplace; |
|||
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. |
|||
alter table t1 add column hash varchar(32) as (md5(handle)) persistent, add unique index hash(hash), algorithm=copy; |
|||
select * from t1; |
|||
id handle data hash |
|||
1 12 0 c20ad4d76fe97759aa27a0c99bff6710 |
|||
2 54 0 a684eceee76fc522773286a895bc8436 |
|||
3 NULL 0 NULL |
|||
alter table t1 modify column hash varchar(32) as (md5(handle+1)) persistent, algorithm=inplace; |
|||
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. |
|||
alter table t1 modify column hash varchar(32) as (md5(handle+1)) persistent, algorithm=copy; |
|||
select * from t1; |
|||
id handle data hash |
|||
1 12 0 c51ce410c124a10e0db5e4b97fc2af39 |
|||
2 54 0 b53b3a3d6ab90ce0268229151c9bde11 |
|||
3 NULL 0 NULL |
|||
alter table t1 modify column handle int not null, algorithm=inplace; |
|||
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. |
|||
alter table t1 modify column handle int not null, algorithm=copy; |
|||
Warnings: |
|||
Warning 1265 Data truncated for column 'handle' at row 3 |
|||
select * from t1; |
|||
id handle data hash |
|||
1 12 0 c51ce410c124a10e0db5e4b97fc2af39 |
|||
2 54 0 b53b3a3d6ab90ce0268229151c9bde11 |
|||
3 0 0 c4ca4238a0b923820dcc509a6f75849b |
|||
alter table t1 drop index handle, algorithm=inplace; |
|||
create index data on t1(data) algorithm=inplace; |
|||
alter table t1 drop column data, algorithm=inplace; |
|||
alter table t1 add column sha varchar(32) as (sha1(handle)) persistent, algorithm=inplace; |
|||
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY. |
|||
alter table t1 add column sha varchar(32), algorithm=inplace; |
|||
alter table t1 drop column hash, algorithm=inplace; |
|||
drop table t1; |
@ -0,0 +1,16 @@ |
|||
create table t1 (c2 int as (-c1), c1 int primary key auto_increment) engine=innodb; |
|||
insert into t1(c1) values (null),(null),(null); |
|||
select * from t1; |
|||
c2 c1 |
|||
-1 1 |
|||
-2 2 |
|||
-3 3 |
|||
alter table t1 auto_increment = 3; |
|||
show create table t1; |
|||
Table Create Table |
|||
t1 CREATE TABLE `t1` ( |
|||
`c2` int(11) AS (-c1) VIRTUAL, |
|||
`c1` int(11) NOT NULL AUTO_INCREMENT, |
|||
PRIMARY KEY (`c1`) |
|||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 |
|||
drop table t1; |
@ -0,0 +1,31 @@ |
|||
# |
|||
# MDEV-9045 Inconsistent handling of "ALGORITHM=INPLACE" with PERSISTENT generated columns |
|||
# |
|||
--source include/have_innodb.inc |
|||
|
|||
create table t1(id int auto_increment primary key, handle int, data bigint not null default 0) engine = innodb; |
|||
insert into t1(handle) values(12),(54),(NULL); |
|||
select *, md5(handle) from t1; |
|||
alter table t1 add index handle(handle), algorithm=inplace; |
|||
--error ER_ALTER_OPERATION_NOT_SUPPORTED |
|||
alter table t1 add column hash varchar(32) as (md5(handle)) persistent, algorithm=inplace; |
|||
--error ER_ALTER_OPERATION_NOT_SUPPORTED |
|||
alter table t1 add column hash varchar(32) as (md5(handle)) persistent, add unique index hash(hash), algorithm=inplace; |
|||
alter table t1 add column hash varchar(32) as (md5(handle)) persistent, add unique index hash(hash), algorithm=copy; |
|||
select * from t1; |
|||
--error ER_ALTER_OPERATION_NOT_SUPPORTED |
|||
alter table t1 modify column hash varchar(32) as (md5(handle+1)) persistent, algorithm=inplace; |
|||
alter table t1 modify column hash varchar(32) as (md5(handle+1)) persistent, algorithm=copy; |
|||
select * from t1; |
|||
--error ER_ALTER_OPERATION_NOT_SUPPORTED |
|||
alter table t1 modify column handle int not null, algorithm=inplace; |
|||
alter table t1 modify column handle int not null, algorithm=copy; |
|||
select * from t1; |
|||
alter table t1 drop index handle, algorithm=inplace; |
|||
create index data on t1(data) algorithm=inplace; |
|||
alter table t1 drop column data, algorithm=inplace; |
|||
--error ER_ALTER_OPERATION_NOT_SUPPORTED |
|||
alter table t1 add column sha varchar(32) as (sha1(handle)) persistent, algorithm=inplace; |
|||
alter table t1 add column sha varchar(32), algorithm=inplace; |
|||
alter table t1 drop column hash, algorithm=inplace; |
|||
drop table t1; |
@ -0,0 +1,9 @@ |
|||
--source include/have_innodb.inc |
|||
|
|||
create table t1 (c2 int as (-c1), c1 int primary key auto_increment) engine=innodb; |
|||
insert into t1(c1) values (null),(null),(null); |
|||
select * from t1; |
|||
alter table t1 auto_increment = 3; |
|||
show create table t1; |
|||
drop table t1; |
|||
|
@ -0,0 +1,9 @@ |
|||
# |
|||
# MDEV-9175 Query parser tansforms MICROSECOND into SECOND_FRAC, which does not work |
|||
# |
|||
|
|||
select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456'); |
|||
explain extended select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456'); |
|||
create view v1 as select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456'); |
|||
select * from v1; |
|||
drop view v1; |
@ -0,0 +1,43 @@ |
|||
# Want to skip this test from Valgrind execution |
|||
--source include/no_valgrind_without_big.inc |
|||
# This test should work in embedded server after we fix mysqltest |
|||
-- source include/not_embedded.inc |
|||
-- source include/have_ssl_communication.inc |
|||
# Save the initial number of concurrent sessions |
|||
--source include/count_sessions.inc |
|||
|
|||
let $ssl_verify_fail_path = --ssl --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify.pem --ssl-key=$MYSQL_TEST_DIR/std_data/server-key-verify-fail.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/server-cert-verify-fail.pem; |
|||
let $ssl_verify_pass_path = --ssl --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify.pem --ssl-key=$MYSQL_TEST_DIR/std_data/server-key-verify-pass.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/server-cert-verify-pass.pem; |
|||
|
|||
--echo #T1: Host name (/CN=localhost/) as OU name in the server certificate, server certificate verification should fail. |
|||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
--shutdown_server |
|||
--source include/wait_until_disconnected.inc |
|||
|
|||
--exec echo "restart:" $ssl_verify_fail_path > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
--enable_reconnect |
|||
--source include/wait_until_connected_again.inc |
|||
|
|||
--error 1 |
|||
--exec $MYSQL --protocol=tcp --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify.pem --ssl-verify-server-cert -e "SHOW STATUS like 'Ssl_version'" |
|||
|
|||
--echo #T2: Host name (localhost) as common name in the server certificate, server certificate verification should pass. |
|||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
--shutdown_server |
|||
--source include/wait_until_disconnected.inc |
|||
|
|||
--exec echo "restart:" $ssl_verify_pass_path > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
--enable_reconnect |
|||
--source include/wait_until_connected_again.inc |
|||
|
|||
--replace_result TLSv1.2 TLS_VERSION TLSv1.1 TLS_VERSION TLSv1 TLS_VERSION |
|||
--exec $MYSQL --protocol=tcp --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify.pem --ssl-verify-server-cert -e "SHOW STATUS like 'Ssl_version'" |
|||
|
|||
--echo # restart server using restart |
|||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
--shutdown_server |
|||
--source include/wait_until_disconnected.inc |
|||
|
|||
--exec echo "restart: " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
|||
--enable_reconnect |
|||
--source include/wait_until_connected_again.inc |
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue