Merge 10.4 into 10.5
This commit is contained in:
commit
620c55e708
@ -429,14 +429,12 @@ IF(WITH_UNIT_TESTS)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(cpack_tgz)
|
||||
INCLUDE(cpack_rpm)
|
||||
INCLUDE(cpack_deb)
|
||||
|
||||
UNSET (MYSQLD_STATIC_PLUGIN_LIBS CACHE)
|
||||
|
||||
INCLUDE(mariadb_connector_c) # this does ADD_SUBDIRECTORY(libmariadb)
|
||||
|
||||
INCLUDE(cpack_tgz)
|
||||
INCLUDE(cpack_rpm)
|
||||
INCLUDE(cpack_deb)
|
||||
|
||||
|
@ -6707,7 +6707,7 @@ int main(int argc, char **argv)
|
||||
key_map_full.set_all();
|
||||
|
||||
logger.init_base();
|
||||
logger.set_handlers(LOG_FILE, LOG_NONE, LOG_NONE);
|
||||
logger.set_handlers(LOG_NONE, LOG_NONE);
|
||||
mysql_mutex_init(key_LOCK_error_log, &LOCK_error_log,
|
||||
MY_MUTEX_INIT_FAST);
|
||||
|
||||
|
@ -94,7 +94,6 @@ ${WOLFCRYPT_SRCDIR}/md5.c
|
||||
${WOLFCRYPT_SRCDIR}/memory.c
|
||||
${WOLFCRYPT_SRCDIR}/pkcs12.c
|
||||
${WOLFCRYPT_SRCDIR}/pwdbased.c
|
||||
${WOLFCRYPT_SRCDIR}/rabbit.c
|
||||
${WOLFCRYPT_SRCDIR}/random.c
|
||||
${WOLFCRYPT_SRCDIR}/rsa.c
|
||||
${WOLFCRYPT_SRCDIR}/sha.c
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit c3513bf2573c30f6d2df815de216120e92142020
|
||||
Subproject commit e6c07a296d2996e8d5c3cc615dfc50013bbcc794
|
@ -4131,7 +4131,7 @@ create view v1 as
|
||||
(select * from t2 order by a limit 2) order by b desc;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__3`.`a` AS `a`,`__3`.`b` AS `b` from (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` order by `test`.`t2`.`a` limit 2) `__3` order by `__3`.`b` desc latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__3`.`a` AS `a`,`__3`.`b` AS `b` from (select `t2`.`a` AS `a`,`t2`.`b` AS `b` from `t2` order by `t2`.`a` limit 2) `__3` order by `__3`.`b` desc latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a b
|
||||
2 20
|
||||
@ -4230,7 +4230,7 @@ union
|
||||
select a from t1 where a=7;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__5`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` <= 3 except select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` >= 3) `__5` union select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 7 latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__5`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1` where `t1`.`a` <= 3 except select `t1`.`a` AS `a` from `t1` where `t1`.`a` >= 3) `__5` union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 7 latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
1
|
||||
@ -4257,7 +4257,7 @@ union
|
||||
( select a from t1 where a=4 ) ) );
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 union select `__7`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 3 union select `__6`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 2 union (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 4)) `__6`) `__7` latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 union select `__7`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 3 union select `__6`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 2 union (select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 4)) `__6`) `__7` latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
1
|
||||
@ -4275,7 +4275,7 @@ union
|
||||
select a from t1 where a=1;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__7`.`a` AS `a` from (select `__5`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` >= 2 union select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 order by `a` desc limit 2) `__5` union select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 3 order by `a` limit 2) `__7` union select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__7`.`a` AS `a` from (select `__5`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1` where `t1`.`a` >= 2 union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 order by `a` desc limit 2) `__5` union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 3 order by `a` limit 2) `__7` union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
3
|
||||
@ -4384,7 +4384,7 @@ union
|
||||
select a from t1 where a=2 order by a desc limit 3;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__5`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 union values (3),(4),(2) order by 1 desc) `__5` union select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 2 order by `a` desc limit 3 latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__5`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 union values (3),(4),(2) order by 1 desc) `__5` union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 2 order by `a` desc limit 3 latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
4
|
||||
@ -4397,7 +4397,7 @@ with t as (select * from t1 where a <=3)
|
||||
select * from t;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` <= 3)select `t`.`a` AS `a` from `t` latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `t1`.`a` AS `a` from `t1` where `t1`.`a` <= 3)select `t`.`a` AS `a` from `t` latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
3
|
||||
@ -4413,7 +4413,7 @@ order by a desc limit 3 )
|
||||
select a from t1 where a=4 union select a from t where a=7;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3 union select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 3 order by `a` desc limit 3)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `t1`.`a` AS `a` from `t1` where `t1`.`a` < 3 union select `t1`.`a` AS `a` from `t1` where `t1`.`a` > 3 order by `a` desc limit 3)select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
4
|
||||
@ -4429,7 +4429,7 @@ order by a desc limit 3 )
|
||||
(select a from t1 where a=4 union select a from t where a=7 order by a desc);
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as ((select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3) union (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 3) order by `a` desc limit 3)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as ((select `t1`.`a` AS `a` from `t1` where `t1`.`a` < 3) union (select `t1`.`a` AS `a` from `t1` where `t1`.`a` > 3) order by `a` desc limit 3)select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
7
|
||||
@ -4444,7 +4444,7 @@ order by a desc limit 3 )
|
||||
(select a from t where a=4 union select a from t where a=7 order by a desc);
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as ((select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3) union (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 3) order by `a` desc limit 3)select `t`.`a` AS `a` from `t` where `t`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as ((select `t1`.`a` AS `a` from `t1` where `t1`.`a` < 3) union (select `t1`.`a` AS `a` from `t1` where `t1`.`a` > 3) order by `a` desc limit 3)select `t`.`a` AS `a` from `t` where `t`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
7
|
||||
@ -4469,7 +4469,7 @@ order by 1 desc limit 3 )
|
||||
select a from t1 where a=4 union select a from t where a=7 order by a desc;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t(`a`) as (values (2),(1) union (values (4),(7)) order by 1 desc limit 3)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t(`a`) as (values (2),(1) union (values (4),(7)) order by 1 desc limit 3)select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
7
|
||||
@ -4484,7 +4484,7 @@ order by 1 desc limit 3 )
|
||||
select a from t1 where a=1 union select a from t where a=7 order by a desc;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t(`a`) as ((values (2),(1)) union (values (4),(7) order by 1 desc) order by 1 desc limit 3)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t(`a`) as ((values (2),(1)) union (values (4),(7) order by 1 desc) order by 1 desc limit 3)select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
7
|
||||
@ -4496,7 +4496,7 @@ s as (select * from t1 where a > 3)
|
||||
select a from t where a=1 union select a from s where a=7 order by a desc;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3), s as (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 3)select `t`.`a` AS `a` from `t` where `t`.`a` = 1 union select `s`.`a` AS `a` from `s` where `s`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `t1`.`a` AS `a` from `t1` where `t1`.`a` < 3), s as (select `t1`.`a` AS `a` from `t1` where `t1`.`a` > 3)select `t`.`a` AS `a` from `t` where `t`.`a` = 1 union select `s`.`a` AS `a` from `s` where `s`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
7
|
||||
@ -4508,7 +4508,7 @@ s as (select * from t where a > 3)
|
||||
select a from t where a=1 union select a from s where a=7 order by a desc;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3), s as (select `t`.`a` AS `a` from `t` where `t`.`a` > 3)select `t`.`a` AS `a` from `t` where `t`.`a` = 1 union select `s`.`a` AS `a` from `s` where `s`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `t1`.`a` AS `a` from `t1` where `t1`.`a` < 3), s as (select `t`.`a` AS `a` from `t` where `t`.`a` > 3)select `t`.`a` AS `a` from `t` where `t`.`a` = 1 union select `s`.`a` AS `a` from `s` where `s`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
1
|
||||
|
@ -67,7 +67,7 @@ FROM t1, cte WHERE t1.from_ = cte.to_
|
||||
select * from cte;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with recursive cte(`depth`,`from_`,`to_`) as (select 0 AS `depth`,1 AS `from_`,1 AS `to_` union select `cte`.`depth` + 1 AS `depth+1`,`test`.`t1`.`from_` AS `from_`,`test`.`t1`.`to_` AS `to_` from (`test`.`t1` join `cte`) where `test`.`t1`.`from_` = `cte`.`to_`) CYCLE `from_`,`to_` RESTRICT select `cte`.`depth` AS `depth`,`cte`.`from_` AS `from_`,`cte`.`to_` AS `to_` from `cte` latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with recursive cte(`depth`,`from_`,`to_`) as (select 0 AS `depth`,1 AS `from_`,1 AS `to_` union select `cte`.`depth` + 1 AS `depth+1`,`t1`.`from_` AS `from_`,`t1`.`to_` AS `to_` from (`t1` join `cte`) where `t1`.`from_` = `cte`.`to_`) CYCLE `from_`,`to_` RESTRICT select `cte`.`depth` AS `depth`,`cte`.`from_` AS `from_`,`cte`.`to_` AS `to_` from `cte` latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
depth from_ to_
|
||||
0 1 1
|
||||
|
@ -571,7 +571,7 @@ with t as (select a from t1 where b >= 'c')
|
||||
select * from t2,t where t2.c=t.a;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`b` >= 'c')select `test`.`t2`.`c` AS `c`,`t`.`a` AS `a` from (`test`.`t2` join `t`) where `test`.`t2`.`c` = `t`.`a` latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `t1`.`a` AS `a` from `t1` where `t1`.`b` >= 'c')select `t2`.`c` AS `c`,`t`.`a` AS `a` from (`t2` join `t`) where `t2`.`c` = `t`.`a` latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
c a
|
||||
4 4
|
||||
@ -588,7 +588,7 @@ with t as (select a, count(*) from t1 where b >= 'c' group by a)
|
||||
select * from t2,t where t2.c=t.a;
|
||||
show create view v2;
|
||||
View Create View character_set_client collation_connection
|
||||
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with t as (select `test`.`t1`.`a` AS `a`,count(0) AS `count(*)` from `test`.`t1` where `test`.`t1`.`b` >= 'c' group by `test`.`t1`.`a`)select `test`.`t2`.`c` AS `c`,`t`.`a` AS `a`,`t`.`count(*)` AS `count(*)` from (`test`.`t2` join `t`) where `test`.`t2`.`c` = `t`.`a` latin1 latin1_swedish_ci
|
||||
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with t as (select `t1`.`a` AS `a`,count(0) AS `count(*)` from `t1` where `t1`.`b` >= 'c' group by `t1`.`a`)select `t2`.`c` AS `c`,`t`.`a` AS `a`,`t`.`count(*)` AS `count(*)` from (`t2` join `t`) where `t2`.`c` = `t`.`a` latin1 latin1_swedish_ci
|
||||
select * from v2;
|
||||
c a count(*)
|
||||
4 4 2
|
||||
@ -606,7 +606,7 @@ with t(c) as (select a from t1 where b >= 'c')
|
||||
select * from t r1 where r1.c=4;
|
||||
show create view v3;
|
||||
View Create View character_set_client collation_connection
|
||||
v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS with t(`c`) as (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c')select `r1`.`c` AS `c` from `t` `r1` where `r1`.`c` = 4 latin1 latin1_swedish_ci
|
||||
v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS with t(`c`) as (select `t1`.`a` AS `c` from `t1` where `t1`.`b` >= 'c')select `r1`.`c` AS `c` from `t` `r1` where `r1`.`c` = 4 latin1 latin1_swedish_ci
|
||||
select * from v3;
|
||||
c
|
||||
4
|
||||
@ -618,7 +618,7 @@ with t(c) as (select a from t1 where b >= 'c')
|
||||
select * from t r1, t r2 where r1.c=r2.c and r2.c=4;
|
||||
show create view v4;
|
||||
View Create View character_set_client collation_connection
|
||||
v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS with t(`c`) as (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c')select `r1`.`c` AS `c`,`r2`.`c` AS `d` from (`t` `r1` join `t` `r2`) where `r1`.`c` = `r2`.`c` and `r2`.`c` = 4 latin1 latin1_swedish_ci
|
||||
v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS with t(`c`) as (select `t1`.`a` AS `c` from `t1` where `t1`.`b` >= 'c')select `r1`.`c` AS `c`,`r2`.`c` AS `d` from (`t` `r1` join `t` `r2`) where `r1`.`c` = `r2`.`c` and `r2`.`c` = 4 latin1 latin1_swedish_ci
|
||||
select * from v4;
|
||||
c d
|
||||
4 4
|
||||
@ -1021,10 +1021,10 @@ select a from t1;
|
||||
show table status;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `s`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1`) `s`), r as (select `t`.`a` AS `a` from (`test`.`t2` join `t`) where `test`.`t2`.`b` = `t`.`a`)select `r`.`a` AS `a` from `r` latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `s`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1`) `s`), r as (select `t`.`a` AS `a` from (`t2` join `t`) where `t2`.`b` = `t`.`a`)select `r`.`a` AS `a` from `r` latin1 latin1_swedish_ci
|
||||
show create view v2;
|
||||
View Create View character_set_client collation_connection
|
||||
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with t as (select `s`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1`) `s`), r as (select `t`.`a` AS `a` from (`test`.`t2` join `t`) where `test`.`t2`.`b` = `t`.`a`)select `test`.`t1`.`a` AS `a` from `test`.`t1` latin1 latin1_swedish_ci
|
||||
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with t as (select `s`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1`) `s`), r as (select `t`.`a` AS `a` from (`t2` join `t`) where `t2`.`b` = `t`.`a`)select `t1`.`a` AS `a` from `t1` latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
2
|
||||
@ -1349,7 +1349,7 @@ r.r_regionkey in
|
||||
select r_regionkey from t where r_name <> "ASIA");
|
||||
show create view v;
|
||||
View Create View character_set_client collation_connection
|
||||
v CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select `n`.`n_nationkey` AS `n_nationkey`,`n`.`n_name` AS `n_name`,`n`.`n_regionkey` AS `n_regionkey`,`r`.`r_regionkey` AS `r_regionkey`,`r`.`r_name` AS `r_name` from (`test`.`nation` `n` join `test`.`region` `r`) where `n`.`n_regionkey` = `r`.`r_regionkey` and `r`.`r_regionkey` in (with t as (select `test`.`region`.`r_regionkey` AS `r_regionkey`,`test`.`region`.`r_name` AS `r_name` from `test`.`region` where `test`.`region`.`r_regionkey` <= 3)select `t`.`r_regionkey` from `t` where `t`.`r_name` <> 'ASIA') latin1 latin1_swedish_ci
|
||||
v CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select `n`.`n_nationkey` AS `n_nationkey`,`n`.`n_name` AS `n_name`,`n`.`n_regionkey` AS `n_regionkey`,`r`.`r_regionkey` AS `r_regionkey`,`r`.`r_name` AS `r_name` from (`nation` `n` join `region` `r`) where `n`.`n_regionkey` = `r`.`r_regionkey` and `r`.`r_regionkey` in (with t as (select `region`.`r_regionkey` AS `r_regionkey`,`region`.`r_name` AS `r_name` from `region` where `region`.`r_regionkey` <= 3)select `t`.`r_regionkey` from `t` where `t`.`r_name` <> 'ASIA') latin1 latin1_swedish_ci
|
||||
select * from v;
|
||||
n_nationkey n_name n_regionkey r_regionkey r_name
|
||||
0 ALGERIA 0 0 AFRICA
|
||||
|
@ -818,7 +818,7 @@ where p.id = a.father or p.id = a.mother
|
||||
select * from ancestors;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with recursive ancestors as (select `test`.`folks`.`id` AS `id`,`test`.`folks`.`name` AS `name`,`test`.`folks`.`dob` AS `dob`,`test`.`folks`.`father` AS `father`,`test`.`folks`.`mother` AS `mother` from `test`.`folks` where `test`.`folks`.`name` = 'Me' and `test`.`folks`.`dob` = '2000-01-01' union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from (`test`.`folks` `p` join `ancestors` `a`) where `p`.`id` = `a`.`father` or `p`.`id` = `a`.`mother`)select `ancestors`.`id` AS `id`,`ancestors`.`name` AS `name`,`ancestors`.`dob` AS `dob`,`ancestors`.`father` AS `father`,`ancestors`.`mother` AS `mother` from `ancestors` latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with recursive ancestors as (select `folks`.`id` AS `id`,`folks`.`name` AS `name`,`folks`.`dob` AS `dob`,`folks`.`father` AS `father`,`folks`.`mother` AS `mother` from `folks` where `folks`.`name` = 'Me' and `folks`.`dob` = '2000-01-01' union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from (`folks` `p` join `ancestors` `a`) where `p`.`id` = `a`.`father` or `p`.`id` = `a`.`mother`)select `ancestors`.`id` AS `id`,`ancestors`.`name` AS `name`,`ancestors`.`dob` AS `dob`,`ancestors`.`father` AS `father`,`ancestors`.`mother` AS `mother` from `ancestors` latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
id name dob father mother
|
||||
100 Me 2000-01-01 20 30
|
||||
@ -849,7 +849,7 @@ where p.id = ma.mother
|
||||
select * from ancestors;
|
||||
show create view v2;
|
||||
View Create View character_set_client collation_connection
|
||||
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with recursive ancestors as (select `test`.`folks`.`id` AS `id`,`test`.`folks`.`name` AS `name`,`test`.`folks`.`dob` AS `dob`,`test`.`folks`.`father` AS `father`,`test`.`folks`.`mother` AS `mother` from `test`.`folks` where `test`.`folks`.`name` = 'Me' union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from (`test`.`folks` `p` join `ancestors` `fa`) where `p`.`id` = `fa`.`father` union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from (`test`.`folks` `p` join `ancestors` `ma`) where `p`.`id` = `ma`.`mother`)select `ancestors`.`id` AS `id`,`ancestors`.`name` AS `name`,`ancestors`.`dob` AS `dob`,`ancestors`.`father` AS `father`,`ancestors`.`mother` AS `mother` from `ancestors` latin1 latin1_swedish_ci
|
||||
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with recursive ancestors as (select `folks`.`id` AS `id`,`folks`.`name` AS `name`,`folks`.`dob` AS `dob`,`folks`.`father` AS `father`,`folks`.`mother` AS `mother` from `folks` where `folks`.`name` = 'Me' union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from (`folks` `p` join `ancestors` `fa`) where `p`.`id` = `fa`.`father` union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from (`folks` `p` join `ancestors` `ma`) where `p`.`id` = `ma`.`mother`)select `ancestors`.`id` AS `id`,`ancestors`.`name` AS `name`,`ancestors`.`dob` AS `dob`,`ancestors`.`father` AS `father`,`ancestors`.`mother` AS `mother` from `ancestors` latin1 latin1_swedish_ci
|
||||
select * from v2;
|
||||
id name dob father mother
|
||||
100 Me 2000-01-01 20 30
|
||||
@ -4040,10 +4040,6 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union1,4>",
|
||||
"access_type": "ALL",
|
||||
"r_loops": 0,
|
||||
"r_rows": null,
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
|
@ -756,3 +756,20 @@ hex(b)
|
||||
|
||||
61
|
||||
drop table t1;
|
||||
#
|
||||
# Start of 10.2 tests
|
||||
#
|
||||
#
|
||||
# MDEV-27690 Crash on `CHARACTER SET csname COLLATE DEFAULT` in column definition
|
||||
#
|
||||
CREATE TABLE t1 (a CHAR(10) CHARACTER SET latin1 COLLATE DEFAULT);
|
||||
DROP TABLE t1;
|
||||
SELECT CAST('a' AS CHAR(10) CHARACTER SET latin1 COLLATE DEFAULT);
|
||||
CAST('a' AS CHAR(10) CHARACTER SET latin1 COLLATE DEFAULT)
|
||||
a
|
||||
SELECT COLUMN_GET(COLUMN_CREATE(0, 'string'),0 AS CHAR CHARACTER SET latin1 COLLATE DEFAULT) AS c1;
|
||||
c1
|
||||
string
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
|
@ -339,3 +339,20 @@ select hex(b) from t1 where b<'zzz' order by b;
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.2 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-27690 Crash on `CHARACTER SET csname COLLATE DEFAULT` in column definition
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a CHAR(10) CHARACTER SET latin1 COLLATE DEFAULT);
|
||||
DROP TABLE t1;
|
||||
SELECT CAST('a' AS CHAR(10) CHARACTER SET latin1 COLLATE DEFAULT);
|
||||
SELECT COLUMN_GET(COLUMN_CREATE(0, 'string'),0 AS CHAR CHARACTER SET latin1 COLLATE DEFAULT) AS c1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
34
mysql-test/main/ctype_utf32_innodb.result
Normal file
34
mysql-test/main/ctype_utf32_innodb.result
Normal file
@ -0,0 +1,34 @@
|
||||
#
|
||||
# Start of 10.3 tests
|
||||
#
|
||||
#
|
||||
# MDEV-28062 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on INSERT..SELECT
|
||||
#
|
||||
SET sql_mode='';
|
||||
CREATE TABLE t1 (
|
||||
HOST CHAR DEFAULT '%',
|
||||
USER CHAR DEFAULT '%',
|
||||
ROLE CHAR DEFAULT '%',
|
||||
ENABLED ENUM ('a','a') DEFAULT 'a',
|
||||
HISTORY ENUM ('a','a') DEFAULT 'a'
|
||||
) COLLATE=utf32_general_ci ENGINE=InnoDB;
|
||||
Warnings:
|
||||
Note 1291 Column 'ENABLED' has duplicated value 'a' in ENUM
|
||||
Note 1291 Column 'HISTORY' has duplicated value 'a' in ENUM
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
HOST CHAR DEFAULT '%',
|
||||
USER CHAR DEFAULT '%',
|
||||
ROLE CHAR DEFAULT '%',
|
||||
ENABLED ENUM ('a','a') DEFAULT 'a',
|
||||
HISTORY ENUM ('a','a') DEFAULT 'a'
|
||||
) COLLATE=utf32_general_ci ENGINE=MyISAM;
|
||||
Warnings:
|
||||
Note 1291 Column 'ENABLED' has duplicated value 'a' in ENUM
|
||||
Note 1291 Column 'HISTORY' has duplicated value 'a' in ENUM
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
35
mysql-test/main/ctype_utf32_innodb.test
Normal file
35
mysql-test/main/ctype_utf32_innodb.test
Normal file
@ -0,0 +1,35 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.3 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28062 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on INSERT..SELECT
|
||||
--echo #
|
||||
|
||||
SET sql_mode='';
|
||||
|
||||
CREATE TABLE t1 (
|
||||
HOST CHAR DEFAULT '%',
|
||||
USER CHAR DEFAULT '%',
|
||||
ROLE CHAR DEFAULT '%',
|
||||
ENABLED ENUM ('a','a') DEFAULT 'a',
|
||||
HISTORY ENUM ('a','a') DEFAULT 'a'
|
||||
) COLLATE=utf32_general_ci ENGINE=InnoDB;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 (
|
||||
HOST CHAR DEFAULT '%',
|
||||
USER CHAR DEFAULT '%',
|
||||
ROLE CHAR DEFAULT '%',
|
||||
ENABLED ENUM ('a','a') DEFAULT 'a',
|
||||
HISTORY ENUM ('a','a') DEFAULT 'a'
|
||||
) COLLATE=utf32_general_ci ENGINE=MyISAM;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
@ -10698,8 +10698,6 @@ EXPLAIN
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union2,3>",
|
||||
"access_type": "ALL",
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -14729,8 +14727,6 @@ EXPLAIN
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union2,3>",
|
||||
"access_type": "ALL",
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -14951,8 +14947,6 @@ EXPLAIN
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union2,3,4>",
|
||||
"access_type": "ALL",
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
|
@ -247,8 +247,6 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union1,2>",
|
||||
"access_type": "ALL",
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
|
@ -702,7 +702,7 @@ a b
|
||||
drop procedure p1;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) union select `__6`.`c` AS `c`,`__6`.`d` AS `d` from ((select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) intersect (select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`)) `__6` union (select 4 AS `4`,4 AS `4`) latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1`) union select `__6`.`c` AS `c`,`__6`.`d` AS `d` from ((select `t2`.`c` AS `c`,`t2`.`d` AS `d` from `t2`) intersect (select `t3`.`e` AS `e`,`t3`.`f` AS `f` from `t3`)) `__6` union (select 4 AS `4`,4 AS `4`) latin1 latin1_swedish_ci
|
||||
drop view v1;
|
||||
drop tables t1,t2,t3;
|
||||
#
|
||||
|
@ -755,7 +755,7 @@ a b
|
||||
drop procedure p1;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) union all select `__6`.`c` AS `c`,`__6`.`d` AS `d` from ((select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) intersect all (select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`)) `__6` union all (select 4 AS `4`,4 AS `4`) latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1`) union all select `__6`.`c` AS `c`,`__6`.`d` AS `d` from ((select `t2`.`c` AS `c`,`t2`.`d` AS `d` from `t2`) intersect all (select `t3`.`e` AS `e`,`t3`.`f` AS `f` from `t3`)) `__6` union all (select 4 AS `4`,4 AS `4`) latin1 latin1_swedish_ci
|
||||
drop view v1;
|
||||
drop tables t1,t2,t3;
|
||||
CREATE TABLE t (i INT);
|
||||
|
@ -256,7 +256,7 @@ SET character_set_client = @saved_cs_client;
|
||||
/*!50001 SET collation_connection = latin1_swedish_ci */;
|
||||
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||
/*!50013 DEFINER=`u1`@`localhost` SQL SECURITY DEFINER */
|
||||
/*!50001 VIEW `v1` AS select `dt`.`id` AS `id` from (select `test`.`t1`.`id` AS `id` from `test`.`t1`) `dt` */;
|
||||
/*!50001 VIEW `v1` AS select `dt`.`id` AS `id` from (select `t1`.`id` AS `id` from `t1`) `dt` */;
|
||||
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||
|
@ -5593,4 +5593,50 @@ select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined));
|
||||
(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined))
|
||||
NULL
|
||||
drop table t1;
|
||||
#
|
||||
# Bug MDEV-24262 Server crashes in st_join_table::cleanup upon
|
||||
# erroneous GROUP_CONCAT
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT);
|
||||
INSERT INTO t1 VALUES (1,10),(2,20);
|
||||
SELECT b, GROUP_CONCAT(b ORDER BY 2), MIN(a) AS f FROM t1 GROUP BY b ORDER BY f;
|
||||
ERROR 42S22: Unknown column '2' in 'order clause'
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug MDEV-24560 SIGSEGV in st_join_table::cleanup + server and client
|
||||
# hang + cross-mysqld-interaction + double free or corruption (!prev)
|
||||
#
|
||||
CREATE TABLE t1 (c INT);
|
||||
SET SESSION sql_buffer_result=1;
|
||||
SELECT GROUP_CONCAT(c ORDER BY 2) FROM t1;
|
||||
GROUP_CONCAT(c ORDER BY 2)
|
||||
NULL
|
||||
SELECT GROUP_CONCAT(c ORDER BY 0) FROM t1;
|
||||
GROUP_CONCAT(c ORDER BY 0)
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (grp INT,c CHAR);
|
||||
SET sql_buffer_result=1;
|
||||
SELECT grp,GROUP_CONCAT(c ORDER BY 2) FROM t1 GROUP BY grp;
|
||||
grp GROUP_CONCAT(c ORDER BY 2)
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug MDEV-28077 "Wrong create options" with "big_tables" option enabled
|
||||
#
|
||||
CREATE TABLE t1(a VARCHAR(16383) CHARACTER SET UTF32, KEY k(a));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
INSERT INTO t1 VALUES ('abc'), ('def'), ('FFF'), ('abc'), ('FFF');
|
||||
SET SESSION big_tables=ON;
|
||||
SELECT DISTINCT COUNT(DISTINCT a) FROM t1;
|
||||
COUNT(DISTINCT a)
|
||||
3
|
||||
PREPARE stmt FROM 'SELECT DISTINCT COUNT(DISTINCT a) FROM t1';
|
||||
EXECUTE stmt;
|
||||
COUNT(DISTINCT a)
|
||||
3
|
||||
EXECUTE stmt;
|
||||
COUNT(DISTINCT a)
|
||||
3
|
||||
DROP TABLE t1;
|
||||
End of 10.0 tests
|
||||
|
@ -4675,4 +4675,50 @@ select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined));
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug MDEV-24262 Server crashes in st_join_table::cleanup upon
|
||||
--echo # erroneous GROUP_CONCAT
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT, b INT);
|
||||
INSERT INTO t1 VALUES (1,10),(2,20);
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
SELECT b, GROUP_CONCAT(b ORDER BY 2), MIN(a) AS f FROM t1 GROUP BY b ORDER BY f;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug MDEV-24560 SIGSEGV in st_join_table::cleanup + server and client
|
||||
--echo # hang + cross-mysqld-interaction + double free or corruption (!prev)
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (c INT);
|
||||
SET SESSION sql_buffer_result=1;
|
||||
SELECT GROUP_CONCAT(c ORDER BY 2) FROM t1;
|
||||
SELECT GROUP_CONCAT(c ORDER BY 0) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 (grp INT,c CHAR);
|
||||
SET sql_buffer_result=1;
|
||||
SELECT grp,GROUP_CONCAT(c ORDER BY 2) FROM t1 GROUP BY grp;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug MDEV-28077 "Wrong create options" with "big_tables" option enabled
|
||||
--echo #
|
||||
CREATE TABLE t1(a VARCHAR(16383) CHARACTER SET UTF32, KEY k(a));
|
||||
INSERT INTO t1 VALUES ('abc'), ('def'), ('FFF'), ('abc'), ('FFF');
|
||||
|
||||
# big_tables are deprecated after some version
|
||||
--disable_warnings
|
||||
SET SESSION big_tables=ON;
|
||||
SELECT DISTINCT COUNT(DISTINCT a) FROM t1;
|
||||
|
||||
PREPARE stmt FROM 'SELECT DISTINCT COUNT(DISTINCT a) FROM t1';
|
||||
EXECUTE stmt;
|
||||
EXECUTE stmt;
|
||||
|
||||
--enable_warnings
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 10.0 tests
|
||||
|
@ -5604,6 +5604,52 @@ select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined));
|
||||
(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined))
|
||||
NULL
|
||||
drop table t1;
|
||||
#
|
||||
# Bug MDEV-24262 Server crashes in st_join_table::cleanup upon
|
||||
# erroneous GROUP_CONCAT
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT);
|
||||
INSERT INTO t1 VALUES (1,10),(2,20);
|
||||
SELECT b, GROUP_CONCAT(b ORDER BY 2), MIN(a) AS f FROM t1 GROUP BY b ORDER BY f;
|
||||
ERROR 42S22: Unknown column '2' in 'order clause'
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug MDEV-24560 SIGSEGV in st_join_table::cleanup + server and client
|
||||
# hang + cross-mysqld-interaction + double free or corruption (!prev)
|
||||
#
|
||||
CREATE TABLE t1 (c INT);
|
||||
SET SESSION sql_buffer_result=1;
|
||||
SELECT GROUP_CONCAT(c ORDER BY 2) FROM t1;
|
||||
GROUP_CONCAT(c ORDER BY 2)
|
||||
NULL
|
||||
SELECT GROUP_CONCAT(c ORDER BY 0) FROM t1;
|
||||
GROUP_CONCAT(c ORDER BY 0)
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (grp INT,c CHAR);
|
||||
SET sql_buffer_result=1;
|
||||
SELECT grp,GROUP_CONCAT(c ORDER BY 2) FROM t1 GROUP BY grp;
|
||||
grp GROUP_CONCAT(c ORDER BY 2)
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug MDEV-28077 "Wrong create options" with "big_tables" option enabled
|
||||
#
|
||||
CREATE TABLE t1(a VARCHAR(16383) CHARACTER SET UTF32, KEY k(a));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
INSERT INTO t1 VALUES ('abc'), ('def'), ('FFF'), ('abc'), ('FFF');
|
||||
SET SESSION big_tables=ON;
|
||||
SELECT DISTINCT COUNT(DISTINCT a) FROM t1;
|
||||
COUNT(DISTINCT a)
|
||||
3
|
||||
PREPARE stmt FROM 'SELECT DISTINCT COUNT(DISTINCT a) FROM t1';
|
||||
EXECUTE stmt;
|
||||
COUNT(DISTINCT a)
|
||||
3
|
||||
EXECUTE stmt;
|
||||
COUNT(DISTINCT a)
|
||||
3
|
||||
DROP TABLE t1;
|
||||
End of 10.0 tests
|
||||
set join_cache_level=default;
|
||||
set @@optimizer_switch=@save_optimizer_switch_jcl6;
|
||||
|
@ -5593,4 +5593,50 @@ select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined));
|
||||
(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined))
|
||||
NULL
|
||||
drop table t1;
|
||||
#
|
||||
# Bug MDEV-24262 Server crashes in st_join_table::cleanup upon
|
||||
# erroneous GROUP_CONCAT
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT);
|
||||
INSERT INTO t1 VALUES (1,10),(2,20);
|
||||
SELECT b, GROUP_CONCAT(b ORDER BY 2), MIN(a) AS f FROM t1 GROUP BY b ORDER BY f;
|
||||
ERROR 42S22: Unknown column '2' in 'order clause'
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug MDEV-24560 SIGSEGV in st_join_table::cleanup + server and client
|
||||
# hang + cross-mysqld-interaction + double free or corruption (!prev)
|
||||
#
|
||||
CREATE TABLE t1 (c INT);
|
||||
SET SESSION sql_buffer_result=1;
|
||||
SELECT GROUP_CONCAT(c ORDER BY 2) FROM t1;
|
||||
GROUP_CONCAT(c ORDER BY 2)
|
||||
NULL
|
||||
SELECT GROUP_CONCAT(c ORDER BY 0) FROM t1;
|
||||
GROUP_CONCAT(c ORDER BY 0)
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (grp INT,c CHAR);
|
||||
SET sql_buffer_result=1;
|
||||
SELECT grp,GROUP_CONCAT(c ORDER BY 2) FROM t1 GROUP BY grp;
|
||||
grp GROUP_CONCAT(c ORDER BY 2)
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug MDEV-28077 "Wrong create options" with "big_tables" option enabled
|
||||
#
|
||||
CREATE TABLE t1(a VARCHAR(16383) CHARACTER SET UTF32, KEY k(a));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
INSERT INTO t1 VALUES ('abc'), ('def'), ('FFF'), ('abc'), ('FFF');
|
||||
SET SESSION big_tables=ON;
|
||||
SELECT DISTINCT COUNT(DISTINCT a) FROM t1;
|
||||
COUNT(DISTINCT a)
|
||||
3
|
||||
PREPARE stmt FROM 'SELECT DISTINCT COUNT(DISTINCT a) FROM t1';
|
||||
EXECUTE stmt;
|
||||
COUNT(DISTINCT a)
|
||||
3
|
||||
EXECUTE stmt;
|
||||
COUNT(DISTINCT a)
|
||||
3
|
||||
DROP TABLE t1;
|
||||
End of 10.0 tests
|
||||
|
@ -626,8 +626,6 @@ EXPLAIN
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union5,6>",
|
||||
"access_type": "ALL",
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -909,7 +907,7 @@ UNION ALL
|
||||
select * from t3;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`a` AS `i1`,`test`.`t1`.`b` AS `i2` from `test`.`t1` union all select `__9`.`c` AS `c`,`__9`.`d` AS `d` from (select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` intersect all (values (1,1),(2,2),(2,2),(5,5),(2,2)) intersect all select `sq`.`a` AS `a`,`sq`.`b` AS `b` from (select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` union all select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) `sq`) `__9` except all select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3` union all select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` union select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3` except select `test`.`t1`.`a` AS `a`,`test`.`t2`.`c` AS `c` from (`test`.`t1` join `test`.`t2`) union all select `v0`.`g` AS `g`,`v0`.`h` AS `h` from `test`.`v0` where `v0`.`g` < 4 union all select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3` latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `i1`,`t1`.`b` AS `i2` from `t1` union all select `__9`.`c` AS `c`,`__9`.`d` AS `d` from (select `t2`.`c` AS `c`,`t2`.`d` AS `d` from `t2` intersect all (values (1,1),(2,2),(2,2),(5,5),(2,2)) intersect all select `sq`.`a` AS `a`,`sq`.`b` AS `b` from (select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` union all select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1`) `sq`) `__9` except all select `t3`.`e` AS `e`,`t3`.`f` AS `f` from `t3` union all select `t2`.`c` AS `c`,`t2`.`d` AS `d` from `t2` union select `t3`.`e` AS `e`,`t3`.`f` AS `f` from `t3` except select `t1`.`a` AS `a`,`t2`.`c` AS `c` from (`t1` join `t2`) union all select `v0`.`g` AS `g`,`v0`.`h` AS `h` from `v0` where `v0`.`g` < 4 union all select `t3`.`e` AS `e`,`t3`.`f` AS `f` from `t3` latin1 latin1_swedish_ci
|
||||
select * from v1 limit 14;
|
||||
i1 i2
|
||||
1 1
|
||||
|
@ -53,3 +53,15 @@ drop table t1;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
# MDEV-28253 Mysqldump - INVISIBLE column error
|
||||
#
|
||||
create table t1 (a int, b datetime invisible on update now() without system versioning) with system versioning;
|
||||
desc t1;
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) YES NULL
|
||||
b datetime YES NULL on update current_timestamp(), INVISIBLE, WITHOUT SYSTEM VERSIONING
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
||||
|
@ -45,3 +45,14 @@ drop table t1;
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28253 Mysqldump - INVISIBLE column error
|
||||
--echo #
|
||||
create table t1 (a int, b datetime invisible on update now() without system versioning) with system versioning;
|
||||
desc t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
@ -987,7 +987,7 @@ def information_schema COLUMNS COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253
|
||||
def information_schema COLUMNS COLUMNS COLLATION_NAME COLLATION_NAME 253 96 0 Y 4096 0 33
|
||||
def information_schema COLUMNS COLUMNS COLUMN_TYPE COLUMN_TYPE 252 589815 7 N 4113 0 33
|
||||
def information_schema COLUMNS COLUMNS COLUMN_KEY COLUMN_KEY 253 9 3 N 4097 0 33
|
||||
def information_schema COLUMNS COLUMNS EXTRA EXTRA 253 90 0 N 4097 0 33
|
||||
def information_schema COLUMNS COLUMNS EXTRA EXTRA 253 240 0 N 4097 0 33
|
||||
def information_schema COLUMNS COLUMNS PRIVILEGES PRIVILEGES 253 240 31 N 4097 0 33
|
||||
def information_schema COLUMNS COLUMNS COLUMN_COMMENT COLUMN_COMMENT 253 3072 0 N 4097 0 33
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
|
||||
@ -1006,7 +1006,7 @@ def information_schema COLUMNS COLUMNS COLUMN_TYPE Type 252 589815 7 N 4113 0 33
|
||||
def information_schema COLUMNS COLUMNS IS_NULLABLE Null 253 9 2 N 4097 0 33
|
||||
def information_schema COLUMNS COLUMNS COLUMN_KEY Key 253 9 3 N 4097 0 33
|
||||
def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 589788 0 Y 4112 0 33
|
||||
def information_schema COLUMNS COLUMNS EXTRA Extra 253 90 0 N 4097 0 33
|
||||
def information_schema COLUMNS COLUMNS EXTRA Extra 253 240 0 N 4097 0 33
|
||||
Field Type Null Key Default Extra
|
||||
c int(11) NO PRI NULL
|
||||
----------------------------------------------------------------
|
||||
|
34
mysql-test/main/sp-i_s_columns.result
Normal file
34
mysql-test/main/sp-i_s_columns.result
Normal file
@ -0,0 +1,34 @@
|
||||
#
|
||||
# MDEV-28267 ASAN heap-use-after-free in Item_sp::func_name_cstring
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE FUNCTION test.f1(a INT) RETURNS TEXT RETURN '';
|
||||
CREATE FUNCTION test.f2(a INT) RETURNS TEXT RETURN '';
|
||||
CREATE VIEW v1 AS SELECT f1(a) AS v1 FROM t1;
|
||||
CREATE VIEW v2 AS SELECT f1(a) AS v2 FROM t1;
|
||||
CREATE VIEW v3 AS SELECT f1(a) AS v3 FROM t1;
|
||||
CREATE VIEW v4 AS SELECT f1(a) AS v4 FROM t1;
|
||||
BEGIN NOT ATOMIC
|
||||
FOR i IN 1..10
|
||||
DO
|
||||
ANALYZE FORMAT=JSON SELECT *
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE
|
||||
TABLE_SCHEMA='test'
|
||||
AND
|
||||
TABLE_NAME LIKE 'v%'
|
||||
AND
|
||||
(SLEEP(0.01)=0 OR f1(ordinal_position) >'')
|
||||
ORDER BY TABLE_NAME;
|
||||
END FOR;
|
||||
END;
|
||||
$$
|
||||
connect con1,localhost,root,,test;
|
||||
CREATE OR REPLACE FUNCTION f2(a INT) RETURNS TEXT RETURN '';
|
||||
connection default;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
DROP FUNCTION f1;
|
||||
DROP FUNCTION f2;
|
||||
DROP TABLE t1;
|
||||
DROP VIEW v1, v2, v3, v4;
|
49
mysql-test/main/sp-i_s_columns.test
Normal file
49
mysql-test/main/sp-i_s_columns.test
Normal file
@ -0,0 +1,49 @@
|
||||
--echo #
|
||||
--echo # MDEV-28267 ASAN heap-use-after-free in Item_sp::func_name_cstring
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE FUNCTION test.f1(a INT) RETURNS TEXT RETURN '';
|
||||
CREATE FUNCTION test.f2(a INT) RETURNS TEXT RETURN '';
|
||||
CREATE VIEW v1 AS SELECT f1(a) AS v1 FROM t1;
|
||||
CREATE VIEW v2 AS SELECT f1(a) AS v2 FROM t1;
|
||||
CREATE VIEW v3 AS SELECT f1(a) AS v3 FROM t1;
|
||||
CREATE VIEW v4 AS SELECT f1(a) AS v4 FROM t1;
|
||||
|
||||
--disable_result_log
|
||||
|
||||
DELIMITER $$;
|
||||
--send
|
||||
BEGIN NOT ATOMIC
|
||||
FOR i IN 1..10
|
||||
DO
|
||||
ANALYZE FORMAT=JSON SELECT *
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE
|
||||
TABLE_SCHEMA='test'
|
||||
AND
|
||||
TABLE_NAME LIKE 'v%'
|
||||
AND
|
||||
(SLEEP(0.01)=0 OR f1(ordinal_position) >'')
|
||||
ORDER BY TABLE_NAME;
|
||||
END FOR;
|
||||
END;
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
|
||||
--connect (con1,localhost,root,,test)
|
||||
CREATE OR REPLACE FUNCTION f2(a INT) RETURNS TEXT RETURN '';
|
||||
--connection default
|
||||
--reap
|
||||
|
||||
--enable_result_log
|
||||
|
||||
|
||||
# Cleanup
|
||||
--disconnect con1
|
||||
--connection default
|
||||
|
||||
DROP FUNCTION f1;
|
||||
DROP FUNCTION f2;
|
||||
DROP TABLE t1;
|
||||
DROP VIEW v1, v2, v3, v4;
|
@ -1304,8 +1304,6 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<unit1>",
|
||||
"access_type": "ALL",
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -1525,8 +1523,6 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union1,2>",
|
||||
"access_type": "ALL",
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -1589,8 +1585,6 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union1,2>",
|
||||
"access_type": "ALL",
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -1633,8 +1627,6 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union1,2,3>",
|
||||
"access_type": "ALL",
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -1677,10 +1669,6 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<unit1>",
|
||||
"access_type": "ALL",
|
||||
"r_loops": 0,
|
||||
"r_rows": null,
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -1908,10 +1896,6 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union1,2>",
|
||||
"access_type": "ALL",
|
||||
"r_loops": 0,
|
||||
"r_rows": null,
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -1976,10 +1960,6 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union1,2>",
|
||||
"access_type": "ALL",
|
||||
"r_loops": 0,
|
||||
"r_rows": null,
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -2022,10 +2002,6 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union1,2,3>",
|
||||
"access_type": "ALL",
|
||||
"r_loops": 0,
|
||||
"r_rows": null,
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
|
@ -6550,7 +6550,7 @@ INSERT INTO t3 VALUES (1),(8);
|
||||
CREATE VIEW v1 AS SELECT * FROM t1 LEFT JOIN ( SELECT t2.* FROM t2 INNER JOIN t3 ON ( k = j ) ) AS alias1 ON ( i = j );
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i`,`alias1`.`j` AS `j` from (`test`.`t1` left join (select `test`.`t2`.`j` AS `j` from (`test`.`t2` join `test`.`t3` on(`test`.`t3`.`k` = `test`.`t2`.`j`))) `alias1` on(`test`.`t1`.`i` = `alias1`.`j`)) latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,`alias1`.`j` AS `j` from (`t1` left join (select `t2`.`j` AS `j` from (`t2` join `t3` on(`t3`.`k` = `t2`.`j`))) `alias1` on(`t1`.`i` = `alias1`.`j`)) latin1 latin1_swedish_ci
|
||||
SELECT * FROM t1 LEFT JOIN ( SELECT t2.* FROM t2 INNER JOIN t3 ON ( k = j ) ) AS alias1 ON ( i = j );
|
||||
i j
|
||||
3 NULL
|
||||
@ -6697,7 +6697,7 @@ EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `testalias`.`testcase` AS `testcase` from (select case when 1 in (select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` < 2) then 1 end AS `testcase`) `testalias` latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `testalias`.`testcase` AS `testcase` from (select case when 1 in (select `t1`.`a` from `t1` where `t1`.`a` < 2) then 1 end AS `testcase`) `testalias` latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
testcase
|
||||
1
|
||||
|
@ -5658,7 +5658,7 @@ sub usage ($) {
|
||||
{
|
||||
print STDERR "$message\n";
|
||||
print STDERR "For full list of options, use $0 --help\n";
|
||||
exit;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
local $"= ','; # for @DEFAULT_SUITES below
|
||||
|
@ -1,5 +1,25 @@
|
||||
SET sql_mode=ORACLE;
|
||||
#
|
||||
# Start of 10.2 tests
|
||||
#
|
||||
#
|
||||
# MDEV-27690 Crash on `CHARACTER SET csname COLLATE DEFAULT` in column definition
|
||||
#
|
||||
CREATE TABLE t1 (a CHAR(10) CHARACTER SET latin1 COLLATE DEFAULT);
|
||||
DROP TABLE t1;
|
||||
SELECT CAST('a' AS CHAR(10) CHARACTER SET latin1 COLLATE DEFAULT);
|
||||
CAST('a' AS CHAR(10) CHARACTER SET latin1 COLLATE DEFAULT)
|
||||
a
|
||||
SELECT COLUMN_GET(COLUMN_CREATE(0, 'string'),0 AS CHAR CHARACTER SET latin1 COLLATE DEFAULT) AS c1;
|
||||
c1
|
||||
string
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.3 tests
|
||||
#
|
||||
#
|
||||
# MDEV-12086 sql_mode=ORACLE: allow SELECT UNIQUE as a synonym for SELECT DISTINCT
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
@ -10,3 +30,6 @@ a
|
||||
20
|
||||
30
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
||||
|
@ -1302,8 +1302,6 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<unit1>",
|
||||
"access_type": "ALL",
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -1523,8 +1521,6 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union1,2>",
|
||||
"access_type": "ALL",
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -1587,8 +1583,6 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union1,2>",
|
||||
"access_type": "ALL",
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -1631,8 +1625,6 @@ EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union1,2,3>",
|
||||
"access_type": "ALL",
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -1675,10 +1667,6 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<unit1>",
|
||||
"access_type": "ALL",
|
||||
"r_loops": 0,
|
||||
"r_rows": null,
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -1906,10 +1894,6 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union1,2>",
|
||||
"access_type": "ALL",
|
||||
"r_loops": 0,
|
||||
"r_rows": null,
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -1974,10 +1958,6 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union1,2>",
|
||||
"access_type": "ALL",
|
||||
"r_loops": 0,
|
||||
"r_rows": null,
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
@ -2020,10 +2000,6 @@ ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"union_result": {
|
||||
"table_name": "<union1,2,3>",
|
||||
"access_type": "ALL",
|
||||
"r_loops": 0,
|
||||
"r_rows": null,
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
|
@ -1,5 +1,28 @@
|
||||
SET sql_mode=ORACLE;
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.2 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-27690 Crash on `CHARACTER SET csname COLLATE DEFAULT` in column definition
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a CHAR(10) CHARACTER SET latin1 COLLATE DEFAULT);
|
||||
DROP TABLE t1;
|
||||
SELECT CAST('a' AS CHAR(10) CHARACTER SET latin1 COLLATE DEFAULT);
|
||||
SELECT COLUMN_GET(COLUMN_CREATE(0, 'string'),0 AS CHAR CHARACTER SET latin1 COLLATE DEFAULT) AS c1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.3 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-12086 sql_mode=ORACLE: allow SELECT UNIQUE as a synonym for SELECT DISTINCT
|
||||
--echo #
|
||||
@ -8,3 +31,8 @@ CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (10),(20),(20),(30),(30),(30);
|
||||
SELECT UNIQUE a FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
@ -45,7 +45,7 @@ CHARACTER_SET_NAME varchar(32) YES NULL
|
||||
COLLATION_NAME varchar(32) YES NULL
|
||||
COLUMN_TYPE longtext NO NULL
|
||||
COLUMN_KEY varchar(3) NO NULL
|
||||
EXTRA varchar(30) NO NULL
|
||||
EXTRA varchar(80) NO NULL
|
||||
PRIVILEGES varchar(80) NO NULL
|
||||
COLUMN_COMMENT varchar(1024) NO NULL
|
||||
IS_GENERATED varchar(6) NO NULL
|
||||
@ -70,7 +70,7 @@ COLUMNS CREATE TEMPORARY TABLE `COLUMNS` (
|
||||
`COLLATION_NAME` varchar(32),
|
||||
`COLUMN_TYPE` longtext NOT NULL,
|
||||
`COLUMN_KEY` varchar(3) NOT NULL,
|
||||
`EXTRA` varchar(30) NOT NULL,
|
||||
`EXTRA` varchar(80) NOT NULL,
|
||||
`PRIVILEGES` varchar(80) NOT NULL,
|
||||
`COLUMN_COMMENT` varchar(1024) NOT NULL,
|
||||
`IS_GENERATED` varchar(6) NOT NULL,
|
||||
@ -95,7 +95,7 @@ CHARACTER_SET_NAME varchar(32) YES NULL
|
||||
COLLATION_NAME varchar(32) YES NULL
|
||||
COLUMN_TYPE longtext NO NULL
|
||||
COLUMN_KEY varchar(3) NO NULL
|
||||
EXTRA varchar(30) NO NULL
|
||||
EXTRA varchar(80) NO NULL
|
||||
PRIVILEGES varchar(80) NO NULL
|
||||
COLUMN_COMMENT varchar(1024) NO NULL
|
||||
IS_GENERATED varchar(6) NO NULL
|
||||
|
@ -74,7 +74,7 @@ def information_schema COLUMNS COLUMN_NAME 4 NULL NO varchar 64 192 NULL NULL NU
|
||||
def information_schema COLUMNS COLUMN_TYPE 16 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL
|
||||
def information_schema COLUMNS DATA_TYPE 8 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL
|
||||
def information_schema COLUMNS DATETIME_PRECISION 13 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL
|
||||
def information_schema COLUMNS EXTRA 18 NULL NO varchar 30 90 NULL NULL NULL utf8 utf8_general_ci varchar(30) select NEVER NULL
|
||||
def information_schema COLUMNS EXTRA 18 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL
|
||||
def information_schema COLUMNS GENERATION_EXPRESSION 22 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL
|
||||
def information_schema COLUMNS IS_GENERATED 21 NULL NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) select NEVER NULL
|
||||
def information_schema COLUMNS IS_NULLABLE 7 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL
|
||||
@ -627,7 +627,7 @@ NULL information_schema COLUMNS DATETIME_PRECISION bigint NULL NULL NULL NULL bi
|
||||
3.0000 information_schema COLUMNS COLLATION_NAME varchar 32 96 utf8 utf8_general_ci varchar(32)
|
||||
1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
|
||||
3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8 utf8_general_ci varchar(3)
|
||||
3.0000 information_schema COLUMNS EXTRA varchar 30 90 utf8 utf8_general_ci varchar(30)
|
||||
3.0000 information_schema COLUMNS EXTRA varchar 80 240 utf8 utf8_general_ci varchar(80)
|
||||
3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80)
|
||||
3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
|
||||
3.0000 information_schema COLUMNS IS_GENERATED varchar 6 18 utf8 utf8_general_ci varchar(6)
|
||||
|
@ -74,7 +74,7 @@ def information_schema COLUMNS COLUMN_NAME 4 NULL NO varchar 64 192 NULL NULL NU
|
||||
def information_schema COLUMNS COLUMN_TYPE 16 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL
|
||||
def information_schema COLUMNS DATA_TYPE 8 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL
|
||||
def information_schema COLUMNS DATETIME_PRECISION 13 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
|
||||
def information_schema COLUMNS EXTRA 18 NULL NO varchar 30 90 NULL NULL NULL utf8 utf8_general_ci varchar(30) NEVER NULL
|
||||
def information_schema COLUMNS EXTRA 18 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL
|
||||
def information_schema COLUMNS GENERATION_EXPRESSION 22 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL
|
||||
def information_schema COLUMNS IS_GENERATED 21 NULL NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) NEVER NULL
|
||||
def information_schema COLUMNS IS_NULLABLE 7 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL
|
||||
@ -627,7 +627,7 @@ NULL information_schema COLUMNS DATETIME_PRECISION bigint NULL NULL NULL NULL bi
|
||||
3.0000 information_schema COLUMNS COLLATION_NAME varchar 32 96 utf8 utf8_general_ci varchar(32)
|
||||
1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
|
||||
3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8 utf8_general_ci varchar(3)
|
||||
3.0000 information_schema COLUMNS EXTRA varchar 30 90 utf8 utf8_general_ci varchar(30)
|
||||
3.0000 information_schema COLUMNS EXTRA varchar 80 240 utf8 utf8_general_ci varchar(80)
|
||||
3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80)
|
||||
3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
|
||||
3.0000 information_schema COLUMNS IS_GENERATED varchar 6 18 utf8 utf8_general_ci varchar(6)
|
||||
|
@ -15,6 +15,8 @@ GCF-939 : MDEV-21520 galera.GCF-939
|
||||
MW-328A : MDEV-22666 galera.MW-328A MTR failed: "Semaphore wait has lasted > 600 seconds" and do not release port 16002
|
||||
MW-328B : MDEV-22666 galera.MW-328A MTR failed: "Semaphore wait has lasted > 600 seconds" and do not release port 16002
|
||||
MW-329 : MDEV-19962 Galera test failure on MW-329
|
||||
galera_as_slave_ctas : MDEV-28378 timeout
|
||||
galera_as_slave_nonprim : MDEV-28377 bind: Address already in use
|
||||
galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
|
||||
galera_bf_abort_group_commit : MDEV-18282 Galera test failure on galera.galera_bf_abort_group_commit
|
||||
galera_bf_kill_debug : MDEV-24485 wsrep::client_state::do_acquire_ownership(): Assertion `state_ == s_idle || mode_ != m_local' failed
|
||||
|
@ -7,30 +7,24 @@ binlog-format=row
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-sync-wait=15
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
wsrep-on=1
|
||||
|
||||
[mysqld.1]
|
||||
loose-innodb
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep_causal_reads=ON
|
||||
wsrep_sync_wait = 15
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.2]
|
||||
loose-innodb
|
||||
@ -38,25 +32,15 @@ loose-innodb
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep_causal_reads=ON
|
||||
wsrep_sync_wait = 15
|
||||
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
|
||||
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
wsrep_sst_receive_address='127.0.0.2:@mysqld.2.#sst_port'
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep_causal_reads=ON
|
||||
wsrep_sync_wait = 15
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[ENV]
|
||||
NODE_MYPORT_1= @mysqld.1.port
|
||||
|
@ -11,9 +11,6 @@ log-bin=mysqld-bin
|
||||
binlog-format=row
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.1]
|
||||
#galera_port=@OPT.port
|
||||
@ -28,14 +25,11 @@ wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
|
||||
wsrep_cluster_address=gcomm://
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.2]
|
||||
#galera_port=@OPT.port
|
||||
@ -50,20 +44,14 @@ wsrep_provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.3]
|
||||
server-id=3
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[ENV]
|
||||
NODE_MYPORT_1= @mysqld.1.port
|
||||
|
@ -21,7 +21,6 @@ log-slave-updates
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
@ -31,9 +30,6 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
server-id=1
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.2]
|
||||
#galera_port=@OPT.port
|
||||
@ -51,6 +47,7 @@ wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
|
||||
@ -60,8 +57,28 @@ wsrep-sync-wait=15
|
||||
server-id=2
|
||||
|
||||
[mysqld.3]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
|
||||
wsrep-on=1
|
||||
|
||||
log-bin=master-bin
|
||||
log-bin-index=master-bin
|
||||
log-slave-updates
|
||||
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
server-id=3
|
||||
wsrep-on=OFF
|
||||
|
||||
|
@ -8,9 +8,6 @@
|
||||
[mysqld]
|
||||
log-bin
|
||||
binlog-format=row
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.1]
|
||||
#galera_port=@OPT.port
|
||||
@ -24,9 +21,9 @@ wsrep-on=1
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;evs.install_timeout = PT15S;evs.max_install_timeouts=1;gcache.size=10M'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
|
||||
@ -34,9 +31,6 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
server-id=1
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.2]
|
||||
#galera_port=@OPT.port
|
||||
@ -52,17 +46,14 @@ default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
server-id=2
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.3]
|
||||
#galera_port=@OPT.port
|
||||
@ -76,9 +67,9 @@ wsrep-on=1
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
|
||||
|
||||
@ -86,15 +77,28 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
server-id=3
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.4]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
|
||||
log-slave-updates
|
||||
wsrep-on=1
|
||||
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.4.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.4.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
server-id=4
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[ENV]
|
||||
NODE_MYPORT_1= @mysqld.1.port
|
||||
|
@ -6,67 +6,49 @@ binlog-format=row
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.1]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.2]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
|
||||
[mysqld.3]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
|
||||
[mysqld.4]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M'
|
||||
wsrep_node_address='127.0.0.1:@mysqld.4.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[ENV]
|
||||
NODE_MYPORT_1= @mysqld.1.port
|
||||
|
@ -11,10 +11,14 @@ c char(32) DEFAULT 'dummy_text',
|
||||
PRIMARY KEY (i)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
insert into t1(i) values(null);
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
|
||||
select * from t1;
|
||||
i c
|
||||
1 dummy_text
|
||||
insert into t1(i) values(null), (null), (null);
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
|
||||
select * from t1;
|
||||
i c
|
||||
1 dummy_text
|
||||
@ -23,8 +27,12 @@ i c
|
||||
4 dummy_text
|
||||
SET SESSION auto_increment_increment=7;
|
||||
insert into t1(i) values(null), (null), (null);
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
|
||||
SET SESSION auto_increment_offset=5;
|
||||
insert into t1(i) values(null), (null), (null);
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
|
||||
select * from t1;
|
||||
i c
|
||||
1 dummy_text
|
||||
@ -81,8 +89,10 @@ binlog_format ROW
|
||||
show variables like 'auto_increment_increment';
|
||||
Variable_name Value
|
||||
auto_increment_increment 2
|
||||
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format");
|
||||
connection node_3;
|
||||
DROP TABLE t1;
|
||||
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format");
|
||||
connection node_2;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE ALL;
|
||||
|
@ -10,6 +10,6 @@ SET AUTOCOMMIT=ON;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 SELECT REPEAT('a', 767) FROM ten;
|
||||
INSERT INTO t1 SELECT REPEAT('a', 767) FROM ten;
|
||||
ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage
|
||||
ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mariadbd variable and try again
|
||||
DROP TABLE t1;
|
||||
DROP TABLE ten;
|
||||
|
348
mysql-test/suite/galera/r/galera_sst_encrypted.result
Normal file
348
mysql-test/suite/galera/r/galera_sst_encrypted.result
Normal file
@ -0,0 +1,348 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
Performing State Transfer on a server that has been shut down cleanly and restarted
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'node2_committed_before');
|
||||
COMMIT;
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
|
||||
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
|
||||
connection node_2;
|
||||
Starting server ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_shutdown_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_15 FROM t1;
|
||||
EXPECT_15
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_15 FROM t1;
|
||||
EXPECT_15
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
||||
Performing State Transfer on a server that starts from a clean var directory
|
||||
This is accomplished by shutting down node #2 and removing its var directory before restarting it
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'node2_committed_before');
|
||||
COMMIT;
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
Cleaning var directory ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
|
||||
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
|
||||
connection node_2;
|
||||
Starting server ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_clean_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
||||
disconnect node_2;
|
||||
disconnect node_1;
|
@ -0,0 +1,116 @@
|
||||
--- r/galera_sst_mariabackup_logarchive.result
|
||||
+++ r/galera_sst_mariabackup_logarchive.reject
|
||||
@@ -286,5 +286,113 @@
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=ON;
|
||||
+Performing State Transfer on a server that has been killed and restarted
|
||||
+while a DDL was in progress on it
|
||||
+connection node_1;
|
||||
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
+connection node_2;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
+COMMIT;
|
||||
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
|
||||
+connection node_1;
|
||||
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||
+connection node_2;
|
||||
+SET wsrep_sync_wait = 0;
|
||||
+Killing server ...
|
||||
+connection node_1;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||
+COMMIT;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||
+connection node_2;
|
||||
+Performing --wsrep-recover ...
|
||||
+connection node_2;
|
||||
+Starting server ...
|
||||
+Using --wsrep-start-position when starting mysqld ...
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||
+COMMIT;
|
||||
+connection node_1;
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||
+COMMIT;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||
+COMMIT;
|
||||
+connection node_1a_galera_st_kill_slave_ddl;
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||
+ROLLBACK;
|
||||
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||
+COUNT(*) = 2
|
||||
+1
|
||||
+SELECT COUNT(*) = 35 FROM t1;
|
||||
+COUNT(*) = 35
|
||||
+1
|
||||
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
+COUNT(*) = 0
|
||||
+1
|
||||
+COMMIT;
|
||||
+SET AUTOCOMMIT=ON;
|
||||
+connection node_1;
|
||||
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||
+COUNT(*) = 2
|
||||
+1
|
||||
+SELECT COUNT(*) = 35 FROM t1;
|
||||
+COUNT(*) = 35
|
||||
+1
|
||||
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
+COUNT(*) = 0
|
||||
+1
|
||||
+DROP TABLE t1;
|
||||
+COMMIT;
|
||||
+SET AUTOCOMMIT=ON;
|
||||
+SET GLOBAL debug_dbug = $debug_orig;
|
||||
disconnect node_2;
|
||||
disconnect node_1;
|
@ -0,0 +1,292 @@
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
Performing State Transfer on a server that has been shut down cleanly and restarted
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
COMMIT;
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
connection node_2;
|
||||
Starting server ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_shutdown_slave;
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
ROLLBACK;
|
||||
SELECT COUNT(*) = 35 FROM t1;
|
||||
COUNT(*) = 35
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=ON;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 35 FROM t1;
|
||||
COUNT(*) = 35
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=ON;
|
||||
Performing State Transfer on a server that starts from a clean var directory
|
||||
This is accomplished by shutting down node #2 and removing its var directory before restarting it
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
COMMIT;
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
Cleaning var directory ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
connection node_2;
|
||||
Starting server ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_clean_slave;
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
ROLLBACK;
|
||||
SELECT COUNT(*) = 35 FROM t1;
|
||||
COUNT(*) = 35
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=ON;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 35 FROM t1;
|
||||
COUNT(*) = 35
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=ON;
|
||||
Performing State Transfer on a server that has been killed and restarted
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
COMMIT;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
connection node_2;
|
||||
Performing --wsrep-recover ...
|
||||
Starting server ...
|
||||
Using --wsrep-start-position when starting mysqld ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_kill_slave;
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
ROLLBACK;
|
||||
SELECT COUNT(*) = 35 FROM t1;
|
||||
COUNT(*) = 35
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=ON;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 35 FROM t1;
|
||||
COUNT(*) = 35
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=ON;
|
||||
disconnect node_2;
|
||||
disconnect node_1;
|
188
mysql-test/suite/galera/r/galera_sst_rsync_recv_auto,debug.rdiff
Normal file
188
mysql-test/suite/galera/r/galera_sst_rsync_recv_auto,debug.rdiff
Normal file
@ -0,0 +1,188 @@
|
||||
@@ -516,3 +516,187 @@
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
||||
+Performing State Transfer on a server that has been killed and restarted
|
||||
+while a DDL was in progress on it
|
||||
+connection node_1;
|
||||
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (5,'node1_committed_before');
|
||||
+connection node_2;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (10,'node2_committed_before');
|
||||
+COMMIT;
|
||||
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
|
||||
+connection node_1;
|
||||
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||
+connection node_2;
|
||||
+SET wsrep_sync_wait = 0;
|
||||
+Killing server ...
|
||||
+connection node_1;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
|
||||
+COMMIT;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
|
||||
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
|
||||
+connection node_2;
|
||||
+Performing --wsrep-recover ...
|
||||
+connection node_2;
|
||||
+Starting server ...
|
||||
+Using --wsrep-start-position when starting mysqld ...
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
|
||||
+COMMIT;
|
||||
+connection node_1;
|
||||
+INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
|
||||
+COMMIT;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
|
||||
+COMMIT;
|
||||
+connection node_1a_galera_st_kill_slave_ddl;
|
||||
+INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
|
||||
+ROLLBACK;
|
||||
+SET AUTOCOMMIT=ON;
|
||||
+SET SESSION wsrep_sync_wait=15;
|
||||
+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||
+EXPECT_3
|
||||
+3
|
||||
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
+EXPECT_35
|
||||
+35
|
||||
+SELECT * FROM t1;
|
||||
+id f1 f2
|
||||
+1 node1_committed_before NULL
|
||||
+2 node1_committed_before NULL
|
||||
+3 node1_committed_before NULL
|
||||
+4 node1_committed_before NULL
|
||||
+5 node1_committed_before NULL
|
||||
+6 node2_committed_before NULL
|
||||
+7 node2_committed_before NULL
|
||||
+8 node2_committed_before NULL
|
||||
+9 node2_committed_before NULL
|
||||
+10 node2_committed_before NULL
|
||||
+11 node1_committed_during NULL
|
||||
+12 node1_committed_during NULL
|
||||
+13 node1_committed_during NULL
|
||||
+14 node1_committed_during NULL
|
||||
+15 node1_committed_during NULL
|
||||
+16 node1_to_be_committed_after NULL
|
||||
+17 node1_to_be_committed_after NULL
|
||||
+18 node1_to_be_committed_after NULL
|
||||
+19 node1_to_be_committed_after NULL
|
||||
+20 node1_to_be_committed_after NULL
|
||||
+26 node2_committed_after NULL
|
||||
+27 node2_committed_after NULL
|
||||
+28 node2_committed_after NULL
|
||||
+29 node2_committed_after NULL
|
||||
+30 node2_committed_after NULL
|
||||
+31 node1_to_be_committed_after NULL
|
||||
+32 node1_to_be_committed_after NULL
|
||||
+33 node1_to_be_committed_after NULL
|
||||
+34 node1_to_be_committed_after NULL
|
||||
+35 node1_to_be_committed_after NULL
|
||||
+36 node1_committed_after NULL
|
||||
+37 node1_committed_after NULL
|
||||
+38 node1_committed_after NULL
|
||||
+39 node1_committed_after NULL
|
||||
+40 node1_committed_after NULL
|
||||
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
+COUNT(*) = 0
|
||||
+1
|
||||
+COMMIT;
|
||||
+connection node_1;
|
||||
+SET AUTOCOMMIT=ON;
|
||||
+SET SESSION wsrep_sync_wait=15;
|
||||
+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||
+EXPECT_3
|
||||
+3
|
||||
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
+EXPECT_35
|
||||
+35
|
||||
+SELECT * FROM t1;
|
||||
+id f1 f2
|
||||
+1 node1_committed_before NULL
|
||||
+2 node1_committed_before NULL
|
||||
+3 node1_committed_before NULL
|
||||
+4 node1_committed_before NULL
|
||||
+5 node1_committed_before NULL
|
||||
+6 node2_committed_before NULL
|
||||
+7 node2_committed_before NULL
|
||||
+8 node2_committed_before NULL
|
||||
+9 node2_committed_before NULL
|
||||
+10 node2_committed_before NULL
|
||||
+11 node1_committed_during NULL
|
||||
+12 node1_committed_during NULL
|
||||
+13 node1_committed_during NULL
|
||||
+14 node1_committed_during NULL
|
||||
+15 node1_committed_during NULL
|
||||
+16 node1_to_be_committed_after NULL
|
||||
+17 node1_to_be_committed_after NULL
|
||||
+18 node1_to_be_committed_after NULL
|
||||
+19 node1_to_be_committed_after NULL
|
||||
+20 node1_to_be_committed_after NULL
|
||||
+26 node2_committed_after NULL
|
||||
+27 node2_committed_after NULL
|
||||
+28 node2_committed_after NULL
|
||||
+29 node2_committed_after NULL
|
||||
+30 node2_committed_after NULL
|
||||
+31 node1_to_be_committed_after NULL
|
||||
+32 node1_to_be_committed_after NULL
|
||||
+33 node1_to_be_committed_after NULL
|
||||
+34 node1_to_be_committed_after NULL
|
||||
+35 node1_to_be_committed_after NULL
|
||||
+36 node1_committed_after NULL
|
||||
+37 node1_committed_after NULL
|
||||
+38 node1_committed_after NULL
|
||||
+39 node1_committed_after NULL
|
||||
+40 node1_committed_after NULL
|
||||
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
+COUNT(*) = 0
|
||||
+1
|
||||
+DROP TABLE t1;
|
||||
+COMMIT;
|
||||
+SET GLOBAL debug_dbug = $debug_orig;
|
518
mysql-test/suite/galera/r/galera_sst_rsync_recv_auto.result
Normal file
518
mysql-test/suite/galera/r/galera_sst_rsync_recv_auto.result
Normal file
@ -0,0 +1,518 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
Performing State Transfer on a server that has been shut down cleanly and restarted
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'node2_committed_before');
|
||||
COMMIT;
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
|
||||
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
|
||||
connection node_2;
|
||||
Starting server ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_shutdown_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_15 FROM t1;
|
||||
EXPECT_15
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_15 FROM t1;
|
||||
EXPECT_15
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
||||
Performing State Transfer on a server that starts from a clean var directory
|
||||
This is accomplished by shutting down node #2 and removing its var directory before restarting it
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'node2_committed_before');
|
||||
COMMIT;
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
Cleaning var directory ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
|
||||
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
|
||||
connection node_2;
|
||||
Starting server ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_clean_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
||||
Performing State Transfer on a server that has been killed and restarted
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'node2_committed_before');
|
||||
COMMIT;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
|
||||
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
|
||||
connection node_2;
|
||||
Performing --wsrep-recover ...
|
||||
Starting server ...
|
||||
Using --wsrep-start-position when starting mysqld ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_kill_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
@ -48,7 +48,7 @@ CALL mtr.add_suppression("failed to open gcomm backend connection: 110: failed t
|
||||
CALL mtr.add_suppression("Failed to open backend connection: -110 \\(Connection timed out\\)");
|
||||
CALL mtr.add_suppression("gcs connect failed: Connection timed out");
|
||||
CALL mtr.add_suppression("WSREP: wsrep::connect\\(foo://\\) failed: 7");
|
||||
CALL mtr.add_suppression("WSREP: wsrep::connect\\(gcomm://192.0.2.1\\) failed: 7");
|
||||
CALL mtr.add_suppression("WSREP: wsrep::connect\\(gcomm://.*\\) failed: 7");
|
||||
disconnect node_2;
|
||||
disconnect node_1;
|
||||
# End of test
|
||||
|
@ -68,9 +68,11 @@ select * from t1;
|
||||
|
||||
show variables like 'binlog_format';
|
||||
show variables like 'auto_increment_increment';
|
||||
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format");
|
||||
|
||||
--connection node_3
|
||||
DROP TABLE t1;
|
||||
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format");
|
||||
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
|
||||
|
17
mysql-test/suite/galera/t/galera_sst_encrypted.cnf
Normal file
17
mysql-test/suite/galera/t/galera_sst_encrypted.cnf
Normal file
@ -0,0 +1,17 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
plugin-load-add=@ENV.FILE_KEY_MANAGEMENT_SO
|
||||
loose-file-key-management
|
||||
loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt
|
||||
loose-file-key-management-encryption-algorithm=aes_cbc
|
||||
wsrep-debug=1
|
||||
innodb_encryption_threads = 4
|
||||
innodb_file_per_table=1
|
||||
wsrep_sst_method=rsync
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
|
16
mysql-test/suite/galera/t/galera_sst_encrypted.test
Normal file
16
mysql-test/suite/galera/t/galera_sst_encrypted.test
Normal file
@ -0,0 +1,16 @@
|
||||
--source include/big_test.inc
|
||||
--source include/galera_cluster.inc
|
||||
--source ../encryption/include/have_file_key_management_plugin.inc
|
||||
|
||||
# Save original auto_increment_offset values.
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
--source suite/galera/include/galera_st_shutdown_slave.inc
|
||||
--source suite/galera/include/galera_st_clean_slave.inc
|
||||
|
||||
# Restore original auto_increment_offset values.
|
||||
--source include/auto_increment_offset_restore.inc
|
||||
|
||||
--source include/galera_end.inc
|
@ -0,0 +1,17 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
wsrep_sst_method=mariabackup
|
||||
wsrep_sst_auth="root:"
|
||||
loose_wsrep_debug=ON
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
|
||||
|
||||
[sst]
|
||||
transferfmt=@ENV.MTR_GALERA_TFMT
|
||||
sst-log-archive=1
|
||||
sst-log-archive-dir=@ENV.MYSQLTEST_VARDIR/tmp/logarchive
|
@ -0,0 +1,64 @@
|
||||
--source include/big_test.inc
|
||||
--source include/galera_cluster.inc
|
||||
--source include/galera_have_debug_sync.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_mariabackup.inc
|
||||
|
||||
# Save original auto_increment_offset values.
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
--connection node_2
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--connection node_1
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--remove_files_wildcard $MYSQLTEST_VARDIR/tmp/logarchive *
|
||||
|
||||
--source suite/galera/include/galera_st_shutdown_slave.inc
|
||||
--source suite/galera/include/galera_st_clean_slave.inc
|
||||
|
||||
--source suite/galera/include/galera_st_kill_slave.inc
|
||||
--source suite/galera/include/galera_st_kill_slave_ddl.inc
|
||||
|
||||
# Restore original auto_increment_offset values.
|
||||
--source include/auto_increment_offset_restore.inc
|
||||
|
||||
--let sst_test_true_count=7
|
||||
if (`select version() like '%debug%'`)
|
||||
{
|
||||
--let sst_test_true_count=10
|
||||
}
|
||||
|
||||
--source include/galera_end.inc
|
||||
|
||||
--list_files_write_file $MYSQLTEST_VARDIR/tmp/logarchive_list $MYSQLTEST_VARDIR/tmp/logarchive mariabackup.*.log.*.gz
|
||||
|
||||
--perl
|
||||
use strict;
|
||||
use warnings;
|
||||
my $file= $ENV{'MYSQLTEST_VARDIR'}.'/tmp/logarchive_list';
|
||||
my $count= 0;
|
||||
open(FILE, "$file") or die("Error $? opening $file: $!\n");
|
||||
while (<FILE>) {
|
||||
my $line = $_;
|
||||
$count++;
|
||||
}
|
||||
close(FILE) or die("Error $? closing $file: $!");
|
||||
if ($count != $ENV{'sst_test_true_count'}) {
|
||||
die("Wrong log archives counter: $count");
|
||||
}
|
||||
EOF
|
||||
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/logarchive_list
|
||||
--remove_files_wildcard $MYSQLTEST_VARDIR/tmp/logarchive *
|
||||
--rmdir $MYSQLTEST_VARDIR/tmp/logarchive
|
18
mysql-test/suite/galera/t/galera_sst_rsync_recv_auto.cnf
Normal file
18
mysql-test/suite/galera/t/galera_sst_rsync_recv_auto.cnf
Normal file
@ -0,0 +1,18 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
wsrep_sst_method=rsync
|
||||
bind-address=::
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port;gcache.size=1;pc.ignore_sb=true'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port;gcache.size=1;pc.ignore_sb=true'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
|
||||
wsrep_sst_receive_address=AUTO
|
15
mysql-test/suite/galera/t/galera_sst_rsync_recv_auto.test
Normal file
15
mysql-test/suite/galera/t/galera_sst_rsync_recv_auto.test
Normal file
@ -0,0 +1,15 @@
|
||||
--source include/big_test.inc
|
||||
--source include/galera_cluster.inc
|
||||
--source include/check_ipv6.inc
|
||||
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
--source suite/galera/include/galera_st_shutdown_slave.inc
|
||||
--source suite/galera/include/galera_st_clean_slave.inc
|
||||
|
||||
--source suite/galera/include/galera_st_kill_slave.inc
|
||||
--source suite/galera/include/galera_st_kill_slave_ddl.inc
|
||||
|
||||
--source include/auto_increment_offset_restore.inc
|
@ -67,7 +67,7 @@ CALL mtr.add_suppression("failed to open gcomm backend connection: 110: failed t
|
||||
CALL mtr.add_suppression("Failed to open backend connection: -110 \\(Connection timed out\\)");
|
||||
CALL mtr.add_suppression("gcs connect failed: Connection timed out");
|
||||
CALL mtr.add_suppression("WSREP: wsrep::connect\\(foo://\\) failed: 7");
|
||||
CALL mtr.add_suppression("WSREP: wsrep::connect\\(gcomm://192.0.2.1\\) failed: 7");
|
||||
CALL mtr.add_suppression("WSREP: wsrep::connect\\(gcomm://.*\\) failed: 7");
|
||||
|
||||
# Restore original auto_increment_offset values.
|
||||
--source include/auto_increment_offset_restore.inc
|
||||
|
@ -12,7 +12,6 @@ gtid_ignore_duplicates
|
||||
auto_increment_increment=3
|
||||
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-sync-wait=15
|
||||
|
||||
@ -25,6 +24,7 @@ wsrep-cluster-address='gcomm://'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT30S;evs.inactive_timeout=PT90S;evs.install_timeout=PT60S;pc.wait_prim_timeout = PT60S'
|
||||
|
||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port
|
||||
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
|
||||
@ -37,6 +37,7 @@ wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT30S;evs.inactive_timeout=PT90S;evs.install_timeout=PT60S;pc.wait_prim_timeout = PT60S'
|
||||
|
||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
|
||||
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
|
||||
@ -49,9 +50,16 @@ wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT30S;evs.inactive_timeout=PT90S;evs.install_timeout=PT60S;pc.wait_prim_timeout = PT60S'
|
||||
|
||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port
|
||||
wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
|
||||
<<<<<<< HEAD
|
||||
|
||||
||||||| 3c99a48db31
|
||||
wsrep-on=1
|
||||
|
||||
=======
|
||||
>>>>>>> origin/st-10.3-marko
|
||||
|
||||
[mysqld.4]
|
||||
wsrep_cluster_name=cluster2
|
||||
@ -63,6 +71,7 @@ wsrep-cluster-address='gcomm://'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.4.#galera_port;evs.suspect_timeout=PT30S;evs.inactive_timeout=PT90S;evs.install_timeout=PT60S;pc.wait_prim_timeout = PT60S'
|
||||
|
||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.4.#sst_port
|
||||
wsrep_node_address='127.0.0.1:@mysqld.4.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
|
||||
|
||||
@ -76,6 +85,7 @@ wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.4.#galera_port'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.5.#galera_port;evs.suspect_timeout=PT30S;evs.inactive_timeout=PT90S;evs.install_timeout=PT60S;pc.wait_prim_timeout = PT60S'
|
||||
|
||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.5.#sst_port
|
||||
wsrep_node_address='127.0.0.1:@mysqld.5.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.5.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.5.#sst_port'
|
||||
|
||||
@ -89,6 +99,7 @@ wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.4.#galera_port'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.6.#galera_port;evs.suspect_timeout=PT30S;evs.inactive_timeout=PT90S;evs.install_timeout=PT60S;pc.wait_prim_timeout = PT60S'
|
||||
|
||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.6.#sst_port
|
||||
wsrep_node_address='127.0.0.1:@mysqld.6.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.6.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.6.#sst_port'
|
||||
|
||||
|
@ -8,7 +8,6 @@ default-storage-engine=innodb
|
||||
auto_increment_increment=3
|
||||
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
@ -23,6 +22,7 @@ wsrep-cluster-address='gcomm://'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
|
||||
|
||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port
|
||||
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
|
||||
@ -35,6 +35,7 @@ wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
|
||||
|
||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
|
||||
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
|
||||
@ -47,6 +48,7 @@ wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
|
||||
|
||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port
|
||||
wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
|
||||
|
||||
|
@ -3,33 +3,33 @@
|
||||
[mysqld]
|
||||
wsrep_sst_method=mariabackup
|
||||
wsrep_sst_auth="root:"
|
||||
wsrep_node_address=::1
|
||||
bind-address=::
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
|
||||
wsrep_node_name=node_1
|
||||
bind-address=::
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
|
||||
wsrep_node_name=node_2
|
||||
wsrep_sst_donor=node_1
|
||||
bind-address=::
|
||||
|
||||
[mysqld.3]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
|
||||
wsrep_node_name=node_3
|
||||
wsrep_sst_donor=node_1
|
||||
bind-address=::
|
||||
|
||||
[SST]
|
||||
transferfmt=@ENV.MTR_GALERA_TFMT
|
||||
|
@ -7,33 +7,33 @@ bind-address=::
|
||||
innodb-data-home-dir=
|
||||
wsrep_sst_method=mariabackup
|
||||
wsrep_sst_auth="root:"
|
||||
wsrep_node_address=::1
|
||||
bind-address=::
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
|
||||
wsrep_node_name=node_1
|
||||
bind-address=::
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
|
||||
wsrep_node_name=node_2
|
||||
wsrep_sst_donor=node_1
|
||||
bind-address=::
|
||||
|
||||
[mysqld.3]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
|
||||
wsrep_node_name=node_3
|
||||
wsrep_sst_donor=node_1
|
||||
bind-address=::
|
||||
|
||||
[SST]
|
||||
transferfmt=@ENV.MTR_GALERA_TFMT
|
||||
|
@ -2,25 +2,25 @@
|
||||
|
||||
[mysqld]
|
||||
wsrep_sst_method=rsync
|
||||
wsrep_node_address=::1
|
||||
bind-address=::
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
|
||||
bind-address=::
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
|
||||
bind-address=::
|
||||
|
||||
[mysqld.3]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
|
||||
bind-address=::
|
||||
|
@ -2,25 +2,25 @@
|
||||
|
||||
[mysqld]
|
||||
wsrep_sst_method=rsync
|
||||
wsrep_node_address=::1
|
||||
bind-address=::
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
|
||||
bind-address=::
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
|
||||
bind-address=::
|
||||
|
||||
[mysqld.3]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
|
||||
bind-address=::
|
||||
|
@ -7,25 +7,25 @@ innodb-data-home-dir=/tmp
|
||||
[mysqld]
|
||||
innodb-data-home-dir=
|
||||
wsrep_sst_method=rsync
|
||||
wsrep_node_address=::1
|
||||
bind-address=::
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
|
||||
bind-address=::
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
|
||||
bind-address=::
|
||||
|
||||
[mysqld.3]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
|
||||
wsrep_node_address=::1
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
|
||||
bind-address=::
|
||||
|
@ -15,31 +15,71 @@ col_1 TEXT
|
||||
,col_11 TEXT
|
||||
) ENGINE=INNODB ROW_FORMAT=COMPACT;
|
||||
Warnings:
|
||||
Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
TRUNCATE TABLE t1;
|
||||
Warnings:
|
||||
Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
Warnings:
|
||||
Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
ALTER TABLE t1 FORCE;
|
||||
Warnings:
|
||||
Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
SET innodb_strict_mode = ON;
|
||||
TRUNCATE TABLE t1;
|
||||
Warnings:
|
||||
Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
Warnings:
|
||||
Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
ALTER TABLE t1 FORCE;
|
||||
Warnings:
|
||||
Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
DROP TABLE t1;
|
||||
SET @@global.log_warnings = 2;
|
||||
#
|
||||
# MDEV-20194 Warnings inconsistently issued upon CHECK on
|
||||
# table from older versions
|
||||
#
|
||||
set global innodb_compression_level=1;
|
||||
CREATE TABLE t1(
|
||||
f1 INT, f2 CHAR(200), f3 CHAR(200),
|
||||
f4 CHAR(200), f5 CHAR(200), f6 CHAR(200),
|
||||
f7 CHAR(200), f8 CHAR(200), f9 CHAR(200),
|
||||
f10 CHAR(200), PRIMARY KEY(f1, f2(20), f3(20), f4(20))
|
||||
) ROW_FORMAT=COMPRESSED, ENGINE=InnoDB;
|
||||
INSERT INTO t1 SELECT seq, repeat('a', 200), repeat('b', 200),
|
||||
repeat('c', 200), repeat('d', 200),
|
||||
repeat('d', 200), repeat('e', 200),
|
||||
repeat('e', 200), repeat('f', 200),
|
||||
repeat('g', 200) FROM seq_1_to_20;
|
||||
DROP TABLE t1;
|
||||
set global innodb_compression_level=default;
|
||||
CREATE TABLE t1(f1 char(200), f2 char(200), f3 char(200),
|
||||
f4 char(200), f5 char(200), f6 char(200),
|
||||
f7 char(200), f8 char(200), f9 char(200),
|
||||
f10 char(200), f11 char(200), f12 char(200),
|
||||
f13 char(200), f14 char(200), f15 char(200),
|
||||
f16 char(200), f17 char(200), f18 char(200),
|
||||
f19 char(200), f20 char(200), f21 char(200),
|
||||
f22 char(200), f23 char(200), f24 char(200),
|
||||
f25 char(200), f26 char(200), f27 char(200),
|
||||
f28 char(200), f29 char(200), f30 char(200),
|
||||
f31 char(200), f32 char(200), f33 char(200),
|
||||
primary key(f1(10), f2(10), f3(10), f4(10),
|
||||
f5(10), f6(10), f7(10), f8(10),
|
||||
f9(10), f10(10), f11(10), f12(10),
|
||||
f13(10), f14(10), f15(10), f16(10),
|
||||
f17(10), f18(10), f19(10), f20(10),
|
||||
f21(10), f22(10), f23(10), f24(10),
|
||||
f25(10), f26(10), f27(10), f28(10),
|
||||
f29(10), f30(10), f31(10), f32(10),
|
||||
f33(10)))
|
||||
ENGINE=InnoDB;
|
||||
ERROR 42000: Too many key parts specified; max 32 parts allowed
|
||||
|
@ -1,10 +1,14 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_sequence.inc
|
||||
--source include/innodb_page_size_small.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
|
||||
|
||||
SET innodb_strict_mode = 0;
|
||||
SET @@global.log_warnings = 3;
|
||||
|
||||
# Check the Warning | 139 | Row size too large (> 16318)
|
||||
--replace_regex /> [0-9]+/> NNNN/
|
||||
CREATE TABLE t1 (
|
||||
col_1 TEXT
|
||||
,col_2 TEXT
|
||||
@ -19,14 +23,65 @@ CREATE TABLE t1 (
|
||||
,col_11 TEXT
|
||||
) ENGINE=INNODB ROW_FORMAT=COMPACT;
|
||||
--enable_warnings
|
||||
--replace_regex /> [0-9]+/> NNNN/
|
||||
TRUNCATE TABLE t1;
|
||||
--replace_regex /> [0-9]+/> NNNN/
|
||||
OPTIMIZE TABLE t1;
|
||||
--replace_regex /> [0-9]+/> NNNN/
|
||||
ALTER TABLE t1 FORCE;
|
||||
SET innodb_strict_mode = ON;
|
||||
--replace_regex /> [0-9]+/> NNNN/
|
||||
TRUNCATE TABLE t1;
|
||||
--replace_regex /> [0-9]+/> NNNN/
|
||||
OPTIMIZE TABLE t1;
|
||||
--replace_regex /> [0-9]+/> NNNN/
|
||||
ALTER TABLE t1 FORCE;
|
||||
DROP TABLE t1;
|
||||
--disable_warnings
|
||||
|
||||
SET @@global.log_warnings = 2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-20194 Warnings inconsistently issued upon CHECK on
|
||||
--echo # table from older versions
|
||||
--echo #
|
||||
set global innodb_compression_level=1;
|
||||
CREATE TABLE t1(
|
||||
f1 INT, f2 CHAR(200), f3 CHAR(200),
|
||||
f4 CHAR(200), f5 CHAR(200), f6 CHAR(200),
|
||||
f7 CHAR(200), f8 CHAR(200), f9 CHAR(200),
|
||||
f10 CHAR(200), PRIMARY KEY(f1, f2(20), f3(20), f4(20))
|
||||
) ROW_FORMAT=COMPRESSED, ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t1 SELECT seq, repeat('a', 200), repeat('b', 200),
|
||||
repeat('c', 200), repeat('d', 200),
|
||||
repeat('d', 200), repeat('e', 200),
|
||||
repeat('e', 200), repeat('f', 200),
|
||||
repeat('g', 200) FROM seq_1_to_20;
|
||||
DROP TABLE t1;
|
||||
set global innodb_compression_level=default;
|
||||
|
||||
# Maximum field in the index
|
||||
|
||||
--error ER_TOO_MANY_KEY_PARTS
|
||||
CREATE TABLE t1(f1 char(200), f2 char(200), f3 char(200),
|
||||
f4 char(200), f5 char(200), f6 char(200),
|
||||
f7 char(200), f8 char(200), f9 char(200),
|
||||
f10 char(200), f11 char(200), f12 char(200),
|
||||
f13 char(200), f14 char(200), f15 char(200),
|
||||
f16 char(200), f17 char(200), f18 char(200),
|
||||
f19 char(200), f20 char(200), f21 char(200),
|
||||
f22 char(200), f23 char(200), f24 char(200),
|
||||
f25 char(200), f26 char(200), f27 char(200),
|
||||
f28 char(200), f29 char(200), f30 char(200),
|
||||
f31 char(200), f32 char(200), f33 char(200),
|
||||
primary key(f1(10), f2(10), f3(10), f4(10),
|
||||
f5(10), f6(10), f7(10), f8(10),
|
||||
f9(10), f10(10), f11(10), f12(10),
|
||||
f13(10), f14(10), f15(10), f16(10),
|
||||
f17(10), f18(10), f19(10), f20(10),
|
||||
f21(10), f22(10), f23(10), f24(10),
|
||||
f25(10), f26(10), f27(10), f28(10),
|
||||
f29(10), f30(10), f31(10), f32(10),
|
||||
f33(10)))
|
||||
ENGINE=InnoDB;
|
||||
|
@ -2893,3 +2893,17 @@ key(c, a), unique(b)
|
||||
partition by hash (b);
|
||||
replace into t1 values (1, 0, 0), (2, 0, 0), (0, 0, 0);
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-28269 Assertion `save_errno' in maria_write or ER_GET_ERRNO
|
||||
#
|
||||
connect session1,localhost,root,,;
|
||||
SET big_tables= on;
|
||||
Warnings:
|
||||
Warning 1287 '@@big_tables' is deprecated and will be removed in a future release
|
||||
SET NAMES 'sjis';
|
||||
SELECT 'למטה' AS a UNION SELECT 'Wetter' AS a;
|
||||
a
|
||||
למט×?
|
||||
Wetter
|
||||
connection default;
|
||||
disconnect session1;
|
||||
|
@ -1437,7 +1437,7 @@ CREATE TABLE t1 (
|
||||
) ENGINE=aria DEFAULT CHARSET=utf8 PACK_KEYS=0;
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--exec $MARIA_CHK -d $MYSQLD_DATADIR/test/t1
|
||||
--exec $MARIA_CHK -d --ignore-control-file $MYSQLD_DATADIR/test/t1
|
||||
DROP TABLE t1;
|
||||
|
||||
# Test warnings with transactional=1 with MyISAM
|
||||
@ -2112,3 +2112,14 @@ partition by hash (b);
|
||||
replace into t1 values (1, 0, 0), (2, 0, 0), (0, 0, 0);
|
||||
# cleanup
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28269 Assertion `save_errno' in maria_write or ER_GET_ERRNO
|
||||
--echo #
|
||||
|
||||
connect (session1,localhost,root,,);
|
||||
SET big_tables= on;
|
||||
SET NAMES 'sjis';
|
||||
SELECT 'למטה' AS a UNION SELECT 'Wetter' AS a;
|
||||
connection default;
|
||||
disconnect session1;
|
||||
|
@ -36,12 +36,43 @@ ALTER TABLE t1 REORGANIZE PARTITION p1 INTO
|
||||
);
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# MDEV-15456 Server crashes upon adding or dropping a partition in ALTER under LOCK TABLE after ER_SAME_NAME_PARTITION
|
||||
#
|
||||
--echo #
|
||||
--echo # MDEV-15456 Server crashes upon adding or dropping a partition in ALTER under LOCK TABLE after ER_SAME_NAME_PARTITION
|
||||
--echo #
|
||||
--eval create table t1 (i int) engine=$engine partition by range(i) (partition p0 values less than (10))
|
||||
lock table t1 write;
|
||||
--error ER_SAME_NAME_PARTITION
|
||||
alter table t1 add partition (partition p0 values less than (20));
|
||||
alter table t1 add partition (partition p1 values less than (20)) /* comment */;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-27065 Partitioning tables with custom data directories moves data back to default directory
|
||||
--echo #
|
||||
|
||||
--mkdir $MYSQLTEST_VARDIR/tmp/mdev_27065
|
||||
|
||||
--disable_query_log
|
||||
--eval CREATE TABLE t1 (id INT) ENGINE=$engine DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp/mdev_27065'
|
||||
--enable_query_log
|
||||
ALTER TABLE t1 PARTITION BY RANGE(id)(
|
||||
PARTITION p0 VALUES LESS THAN (1000),
|
||||
PARTITION p1 VALUES LESS THAN MAXVALUE
|
||||
);
|
||||
DROP TABLE t1;
|
||||
|
||||
# InnoDB doesn't support INDEX DIRECTORY.
|
||||
if (`SELECT IF('$engine' != 'InnoDB', 1, 0)`)
|
||||
{
|
||||
--disable_query_log
|
||||
--eval CREATE TABLE t2 (id INT) ENGINE=$engine INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp/mdev_27065'
|
||||
--enable_query_log
|
||||
ALTER TABLE t2 PARTITION BY RANGE(id)(
|
||||
PARTITION p0 VALUES LESS THAN (1000),
|
||||
PARTITION p1 VALUES LESS THAN MAXVALUE
|
||||
);
|
||||
DROP TABLE t2;
|
||||
}
|
||||
|
||||
--remove_files_wildcard $MYSQLTEST_VARDIR/tmp/mdev_27065 *
|
||||
--rmdir $MYSQLTEST_VARDIR/tmp/mdev_27065
|
||||
|
@ -42,9 +42,22 @@ PARTITION p3 VALUES IN (4,5,6)
|
||||
);
|
||||
ERROR HY000: Syntax error: LIST PARTITIONING requires definition of VALUES IN for each partition
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-15456 Server crashes upon adding or dropping a partition in ALTER under LOCK TABLE after ER_SAME_NAME_PARTITION
|
||||
#
|
||||
create table t1 (i int) engine=InnoDB partition by range(i) (partition p0 values less than (10));
|
||||
lock table t1 write;
|
||||
alter table t1 add partition (partition p0 values less than (20));
|
||||
ERROR HY000: Duplicate partition name p0
|
||||
alter table t1 add partition (partition p1 values less than (20)) /* comment */;
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-27065 Partitioning tables with custom data directories moves data back to default directory
|
||||
#
|
||||
ALTER TABLE t1 PARTITION BY RANGE(id)(
|
||||
PARTITION p0 VALUES LESS THAN (1000),
|
||||
PARTITION p1 VALUES LESS THAN MAXVALUE
|
||||
);
|
||||
Warnings:
|
||||
Warning 1618 <DATA DIRECTORY> table option of old schema is ignored
|
||||
DROP TABLE t1;
|
||||
|
@ -69,9 +69,29 @@ PARTITION p3 VALUES IN (4,5,6)
|
||||
);
|
||||
ERROR HY000: Syntax error: LIST PARTITIONING requires definition of VALUES IN for each partition
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-15456 Server crashes upon adding or dropping a partition in ALTER under LOCK TABLE after ER_SAME_NAME_PARTITION
|
||||
#
|
||||
create table t1 (i int) engine=Aria partition by range(i) (partition p0 values less than (10));
|
||||
lock table t1 write;
|
||||
alter table t1 add partition (partition p0 values less than (20));
|
||||
ERROR HY000: Duplicate partition name p0
|
||||
alter table t1 add partition (partition p1 values less than (20)) /* comment */;
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-27065 Partitioning tables with custom data directories moves data back to default directory
|
||||
#
|
||||
ALTER TABLE t1 PARTITION BY RANGE(id)(
|
||||
PARTITION p0 VALUES LESS THAN (1000),
|
||||
PARTITION p1 VALUES LESS THAN MAXVALUE
|
||||
);
|
||||
Warnings:
|
||||
Warning 1618 <DATA DIRECTORY> table option of old schema is ignored
|
||||
DROP TABLE t1;
|
||||
ALTER TABLE t2 PARTITION BY RANGE(id)(
|
||||
PARTITION p0 VALUES LESS THAN (1000),
|
||||
PARTITION p1 VALUES LESS THAN MAXVALUE
|
||||
);
|
||||
Warnings:
|
||||
Warning 1618 <INDEX DIRECTORY> table option of old schema is ignored
|
||||
DROP TABLE t2;
|
||||
|
@ -42,12 +42,32 @@ PARTITION p3 VALUES IN (4,5,6)
|
||||
);
|
||||
ERROR HY000: Syntax error: LIST PARTITIONING requires definition of VALUES IN for each partition
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-15456 Server crashes upon adding or dropping a partition in ALTER under LOCK TABLE after ER_SAME_NAME_PARTITION
|
||||
#
|
||||
create table t1 (i int) engine=MyISAM partition by range(i) (partition p0 values less than (10));
|
||||
lock table t1 write;
|
||||
alter table t1 add partition (partition p0 values less than (20));
|
||||
ERROR HY000: Duplicate partition name p0
|
||||
alter table t1 add partition (partition p1 values less than (20)) /* comment */;
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-27065 Partitioning tables with custom data directories moves data back to default directory
|
||||
#
|
||||
ALTER TABLE t1 PARTITION BY RANGE(id)(
|
||||
PARTITION p0 VALUES LESS THAN (1000),
|
||||
PARTITION p1 VALUES LESS THAN MAXVALUE
|
||||
);
|
||||
Warnings:
|
||||
Warning 1618 <DATA DIRECTORY> table option of old schema is ignored
|
||||
DROP TABLE t1;
|
||||
ALTER TABLE t2 PARTITION BY RANGE(id)(
|
||||
PARTITION p0 VALUES LESS THAN (1000),
|
||||
PARTITION p1 VALUES LESS THAN MAXVALUE
|
||||
);
|
||||
Warnings:
|
||||
Warning 1618 <INDEX DIRECTORY> table option of old schema is ignored
|
||||
DROP TABLE t2;
|
||||
create table t1 ( c1 int, c2 int, c3 varchar(100)) delay_key_write=1
|
||||
partition by key(c1) (
|
||||
partition p01 data directory = 'MYSQL_TMP_DIR'
|
||||
|
@ -94,6 +94,97 @@ create table t1 (a int, v_a int generated always as (a));
|
||||
update t1 as x set a = 1;
|
||||
alter table t1 force;
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
id int not null auto_increment primary key,
|
||||
order_date_time datetime not null,
|
||||
order_date date generated always as (convert(order_date_time, date)),
|
||||
language_id binary(16) null
|
||||
);
|
||||
update t1 as tx set order_date= null;
|
||||
alter table t1 modify column language_id binary(16) not null;
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
# MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if()
|
||||
#
|
||||
create table t1 (d1 date not null, d2 date not null,
|
||||
gd text as (concat(d1,if(d1 <> d2, date_format(d2, 'to %y-%m-%d '), ''))) );
|
||||
insert into t1(d1,d2) values
|
||||
('2020-09-01','2020-09-01'),('2020-05-01','2020-09-01');
|
||||
select * from t1;
|
||||
d1 d2 gd
|
||||
2020-09-01 2020-09-01 2020-09-01
|
||||
2020-05-01 2020-09-01 2020-05-01to 20-09-01
|
||||
drop table t1;
|
||||
# MDEV-25772 (duplicate) and LOCK TABLES case
|
||||
create table t1 (d1 datetime , v_d1 tinyint(1) as (d1 < curdate()));
|
||||
insert into t1 (d1) values ('2021-09-11 08:38:23'), ('2021-09-01 08:38:23');
|
||||
lock tables t1 write;
|
||||
select * from t1 where v_d1=1;
|
||||
d1 v_d1
|
||||
2021-09-11 08:38:23 1
|
||||
2021-09-01 08:38:23 1
|
||||
select * from t1;
|
||||
d1 v_d1
|
||||
2021-09-11 08:38:23 1
|
||||
2021-09-01 08:38:23 1
|
||||
unlock tables;
|
||||
drop table t1;
|
||||
# MDEV-26432 (duplicate)
|
||||
create table t1 (v2 int, v1 int as ((user() like 'x'))) ;
|
||||
select 1 from t1 where v1=1 ;
|
||||
1
|
||||
select * from t1;
|
||||
v2 v1
|
||||
drop table t1;
|
||||
create table t1 (v2 int as ( user () like 'x'));
|
||||
select 1 from t1 order by v2 ;
|
||||
1
|
||||
alter table t1 add i int;
|
||||
drop table t1;
|
||||
# MDEV-26437 (duplicate)
|
||||
create table v0 (v2 int not null,
|
||||
v1 bigint as (case 'x' when current_user() then v2 end));
|
||||
select v2 as v3 from v0 where v1 like 'x' escape 'x';
|
||||
v3
|
||||
insert into v0 (v2) values (-128);
|
||||
drop table v0;
|
||||
create table t1 (vi int as (case 'x' when current_user() then 1 end));
|
||||
select 1 from t1 where vi=1;
|
||||
1
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`vi` int(11) GENERATED ALWAYS AS (case 'x' when current_user() then 1 end) VIRTUAL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 (vi int as (case 'x' when current_user() then 1 end));
|
||||
select 1 from t1 where vi=1;
|
||||
1
|
||||
select 1 from t1 where vi=1;
|
||||
1
|
||||
drop table t1;
|
||||
# MDEV-28092 (duplicate)
|
||||
create table t1 (b timestamp, a int as (1 in (dayofmonth (b between 'x' and current_user) = b)));
|
||||
insert into t1(b) values ('2022-03-17 14:55:37');
|
||||
select 1 from t1 x natural join t1;
|
||||
1
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect datetime value: 'x'
|
||||
Warning 1292 Truncated incorrect datetime value: 'root@localhost'
|
||||
Warning 1292 Truncated incorrect datetime value: 'x'
|
||||
Warning 1292 Truncated incorrect datetime value: 'root@localhost'
|
||||
drop table t1;
|
||||
# MDEV-28089 (duplicate)
|
||||
create table t1 (a int , b date as (1 in ('x' ,(database () = 'x' is null) ))) ;
|
||||
select b from t1;
|
||||
b
|
||||
select a from t1 order by 'x' = b;
|
||||
a
|
||||
drop table t1;
|
||||
create table t1 (a int , b date as (1 in ('x' ,(database ()) ))) ;
|
||||
select b from t1;
|
||||
b
|
||||
select a from t1 order by 'x' = b;
|
||||
a
|
||||
drop table t1;
|
||||
|
@ -77,7 +77,88 @@ update t1 as x set a = 1;
|
||||
alter table t1 force;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (
|
||||
id int not null auto_increment primary key,
|
||||
order_date_time datetime not null,
|
||||
order_date date generated always as (convert(order_date_time, date)),
|
||||
language_id binary(16) null
|
||||
);
|
||||
|
||||
update t1 as tx set order_date= null;
|
||||
alter table t1 modify column language_id binary(16) not null;
|
||||
# Cleanup
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo # MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if()
|
||||
--echo #
|
||||
create table t1 (d1 date not null, d2 date not null,
|
||||
gd text as (concat(d1,if(d1 <> d2, date_format(d2, 'to %y-%m-%d '), ''))) );
|
||||
|
||||
insert into t1(d1,d2) values
|
||||
('2020-09-01','2020-09-01'),('2020-05-01','2020-09-01');
|
||||
select * from t1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo # MDEV-25772 (duplicate) and LOCK TABLES case
|
||||
create table t1 (d1 datetime , v_d1 tinyint(1) as (d1 < curdate()));
|
||||
insert into t1 (d1) values ('2021-09-11 08:38:23'), ('2021-09-01 08:38:23');
|
||||
|
||||
lock tables t1 write;
|
||||
select * from t1 where v_d1=1;
|
||||
select * from t1;
|
||||
unlock tables;
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo # MDEV-26432 (duplicate)
|
||||
create table t1 (v2 int, v1 int as ((user() like 'x'))) ;
|
||||
select 1 from t1 where v1=1 ;
|
||||
select * from t1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
create table t1 (v2 int as ( user () like 'x'));
|
||||
select 1 from t1 order by v2 ;
|
||||
alter table t1 add i int;
|
||||
drop table t1;
|
||||
|
||||
--echo # MDEV-26437 (duplicate)
|
||||
create table v0 (v2 int not null,
|
||||
v1 bigint as (case 'x' when current_user() then v2 end));
|
||||
|
||||
select v2 as v3 from v0 where v1 like 'x' escape 'x';
|
||||
insert into v0 (v2) values (-128);
|
||||
|
||||
drop table v0;
|
||||
|
||||
create table t1 (vi int as (case 'x' when current_user() then 1 end));
|
||||
select 1 from t1 where vi=1;
|
||||
show create table t1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
create table t1 (vi int as (case 'x' when current_user() then 1 end));
|
||||
select 1 from t1 where vi=1;
|
||||
select 1 from t1 where vi=1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo # MDEV-28092 (duplicate)
|
||||
create table t1 (b timestamp, a int as (1 in (dayofmonth (b between 'x' and current_user) = b)));
|
||||
insert into t1(b) values ('2022-03-17 14:55:37');
|
||||
|
||||
select 1 from t1 x natural join t1;
|
||||
drop table t1;
|
||||
|
||||
--echo # MDEV-28089 (duplicate)
|
||||
create table t1 (a int , b date as (1 in ('x' ,(database () = 'x' is null) ))) ;
|
||||
select b from t1;
|
||||
select a from t1 order by 'x' = b;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a int , b date as (1 in ('x' ,(database ()) ))) ;
|
||||
select b from t1;
|
||||
select a from t1 order by 'x' = b;
|
||||
drop table t1;
|
||||
|
@ -535,7 +535,14 @@ read_cnf()
|
||||
ssystag=$(parse_cnf mysqld_safe syslog-tag "${SST_SYSLOG_TAG:-}")
|
||||
ssystag="$ssystag-"
|
||||
sstlogarchive=$(parse_cnf sst sst-log-archive 1)
|
||||
sstlogarchivedir=$(parse_cnf sst sst-log-archive-dir '/tmp/sst_log_archive')
|
||||
sstlogarchivedir=""
|
||||
if [ $sstlogarchive -ne 0 ]; then
|
||||
sstlogarchivedir=$(parse_cnf sst sst-log-archive-dir \
|
||||
'/tmp/sst_log_archive')
|
||||
if [ -n "$sstlogarchivedir" ]; then
|
||||
sstlogarchivedir=$(trim_dir "$sstlogarchivedir")
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $speciald -eq 0 ]; then
|
||||
wsrep_log_error \
|
||||
@ -879,7 +886,15 @@ else
|
||||
|
||||
if [ -n "$sstlogarchivedir" ]; then
|
||||
if [ ! -d "$sstlogarchivedir" ]; then
|
||||
mkdir -p "$sstlogarchivedir"
|
||||
if ! mkdir -p "$sstlogarchivedir"; then
|
||||
sstlogarchivedir=""
|
||||
wsrep_log_warning \
|
||||
"Unable to create '$sstlogarchivedir' directory"
|
||||
fi
|
||||
elif [ ! -w "$sstlogarchivedir" ]; then
|
||||
sstlogarchivedir=""
|
||||
wsrep_log_warning \
|
||||
"The '$sstlogarchivedir' directory is not writtable"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -891,8 +906,8 @@ else
|
||||
newfile="$INNOAPPLYLOG.$ARCHIVETIMESTAMP"
|
||||
fi
|
||||
wsrep_log_info "Moving '$INNOAPPLYLOG' to '$newfile'"
|
||||
mv "$INNOAPPLYLOG" "$newfile"
|
||||
gzip "$newfile"
|
||||
mv "$INNOAPPLYLOG" "$newfile" && gzip "$newfile" || \
|
||||
wsrep_log_warning "Failed to archive log file ('$newfile')"
|
||||
fi
|
||||
|
||||
if [ -e "$INNOMOVELOG" ]; then
|
||||
@ -903,8 +918,8 @@ else
|
||||
newfile="$INNOMOVELOG.$ARCHIVETIMESTAMP"
|
||||
fi
|
||||
wsrep_log_info "Moving '$INNOMOVELOG' to '$newfile'"
|
||||
mv "$INNOMOVELOG" "$newfile"
|
||||
gzip "$newfile"
|
||||
mv "$INNOMOVELOG" "$newfile" && gzip "$newfile" || \
|
||||
wsrep_log_warning "Failed to archive log file ('$newfile')"
|
||||
fi
|
||||
|
||||
if [ -e "$INNOBACKUPLOG" ]; then
|
||||
@ -915,8 +930,8 @@ else
|
||||
newfile="$INNOBACKUPLOG.$ARCHIVETIMESTAMP"
|
||||
fi
|
||||
wsrep_log_info "Moving '$INNOBACKUPLOG' to '$newfile'"
|
||||
mv "$INNOBACKUPLOG" "$newfile"
|
||||
gzip "$newfile"
|
||||
mv "$INNOBACKUPLOG" "$newfile" && gzip "$newfile" || \
|
||||
wsrep_log_warning "Failed to archive log file ('$newfile')"
|
||||
fi
|
||||
fi
|
||||
INNOAPPLY="> '$INNOAPPLYLOG' 2>&1"
|
||||
|
@ -615,6 +615,8 @@ Event_db_repository::open_event_table(THD *thd, enum thr_lock_type lock_type,
|
||||
|
||||
*table= tables.table;
|
||||
tables.table->use_all_columns();
|
||||
/* NOTE: &tables pointer will be invalid after return */
|
||||
tables.table->pos_in_table_list= NULL;
|
||||
|
||||
if (table_intact.check(*table, &event_table_def))
|
||||
{
|
||||
|
@ -2591,6 +2591,11 @@ int Field::set_default()
|
||||
if (default_value)
|
||||
{
|
||||
Query_arena backup_arena;
|
||||
/*
|
||||
TODO: this may impose memory leak until table flush.
|
||||
See comment in
|
||||
TABLE::update_virtual_fields(handler *, enum_vcol_update_mode).
|
||||
*/
|
||||
table->in_use->set_n_backup_active_arena(table->expr_arena, &backup_arena);
|
||||
int rc= default_value->expr->save_in_field(this, 0);
|
||||
table->in_use->restore_active_arena(table->expr_arena, &backup_arena);
|
||||
|
@ -638,6 +638,14 @@ public:
|
||||
{
|
||||
in_partitioning_expr= TRUE;
|
||||
}
|
||||
bool need_refix() const
|
||||
{
|
||||
return flags & VCOL_SESSION_FUNC;
|
||||
}
|
||||
bool fix_expr(THD *thd);
|
||||
bool fix_session_expr(THD *thd);
|
||||
bool cleanup_session_expr();
|
||||
bool fix_and_check_expr(THD *thd, TABLE *table);
|
||||
inline bool is_equal(const Virtual_column_info* vcol) const;
|
||||
inline void print(String*);
|
||||
};
|
||||
|
@ -766,6 +766,7 @@ int ha_partition::create(const char *name, TABLE *table_arg,
|
||||
HA_CREATE_INFO *create_info)
|
||||
{
|
||||
int error;
|
||||
THD *thd= ha_thd();
|
||||
char name_buff[FN_REFLEN + 1], name_lc_buff[FN_REFLEN];
|
||||
char *name_buffer_ptr;
|
||||
const char *path;
|
||||
@ -784,8 +785,27 @@ int ha_partition::create(const char *name, TABLE *table_arg,
|
||||
my_error(ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING, MYF(0), "CREATE TEMPORARY TABLE");
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
/*
|
||||
The following block should be removed once the table-level data directory
|
||||
specification is supported by the partitioning engine (MDEV-28108).
|
||||
*/
|
||||
if (thd_sql_command(thd) == SQLCOM_ALTER_TABLE && create_info)
|
||||
{
|
||||
if (create_info->data_file_name)
|
||||
{
|
||||
push_warning_printf(
|
||||
thd, Sql_condition::WARN_LEVEL_WARN, WARN_OPTION_IGNORED,
|
||||
"<DATA DIRECTORY> table option of old schema is ignored");
|
||||
}
|
||||
if (create_info->index_file_name)
|
||||
{
|
||||
push_warning_printf(
|
||||
thd, Sql_condition::WARN_LEVEL_WARN, WARN_OPTION_IGNORED,
|
||||
"<INDEX DIRECTORY> table option of old schema is ignored");
|
||||
}
|
||||
}
|
||||
|
||||
if (get_from_handler_file(name, ha_thd()->mem_root, false))
|
||||
if (get_from_handler_file(name, thd->mem_root, false))
|
||||
DBUG_RETURN(TRUE);
|
||||
DBUG_ASSERT(m_file_buffer);
|
||||
name_buffer_ptr= m_name_buffer_ptr;
|
||||
|
12
sql/item.cc
12
sql/item.cc
@ -711,7 +711,6 @@ bool Item_ident::remove_dependence_processor(void * arg)
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
bool Item_ident::collect_outer_ref_processor(void *param)
|
||||
{
|
||||
Collect_deps_prm *prm= (Collect_deps_prm *)param;
|
||||
@ -2725,7 +2724,7 @@ Item_sp::Item_sp(THD *thd, Item_sp *item):
|
||||
}
|
||||
|
||||
const char *
|
||||
Item_sp::func_name(THD *thd) const
|
||||
Item_sp::func_name(THD *thd, bool is_package_function) const
|
||||
{
|
||||
/* Calculate length to avoid reallocation of string for sure */
|
||||
size_t len= (((m_name->m_explicit_name ? m_name->m_db.length : 0) +
|
||||
@ -2746,7 +2745,7 @@ Item_sp::func_name(THD *thd) const
|
||||
append_identifier(thd, &qname, &m_name->m_db);
|
||||
qname.append('.');
|
||||
}
|
||||
if (m_sp && m_sp->m_handler == &sp_handler_package_function)
|
||||
if (is_package_function)
|
||||
{
|
||||
/*
|
||||
In case of a package function split `pkg.func` and print
|
||||
@ -6139,8 +6138,6 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
|
||||
}
|
||||
#endif
|
||||
fixed= 1;
|
||||
if (field->vcol_info)
|
||||
fix_session_vcol_expr_for_read(thd, field, field->vcol_info);
|
||||
if (thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY &&
|
||||
!outer_fixed && !thd->lex->in_sum_func &&
|
||||
select &&
|
||||
@ -9498,11 +9495,6 @@ bool Item_default_value::fix_fields(THD *thd, Item **items)
|
||||
uchar *newptr= (uchar*) thd->alloc(1+def_field->pack_length());
|
||||
if (!newptr)
|
||||
goto error;
|
||||
/*
|
||||
Even if DEFAULT() do not read tables fields, the default value
|
||||
expression can do it.
|
||||
*/
|
||||
fix_session_vcol_expr_for_read(thd, def_field, def_field->default_value);
|
||||
if (should_mark_column(thd->column_usage))
|
||||
def_field->default_value->expr->update_used_tables();
|
||||
def_field->move_field(newptr+1, def_field->maybe_null() ? newptr : 0, 1);
|
||||
|
@ -3319,6 +3319,10 @@ public:
|
||||
LEX_CSTRING db_name;
|
||||
LEX_CSTRING table_name;
|
||||
LEX_CSTRING field_name;
|
||||
/*
|
||||
NOTE: came from TABLE::alias_name_used and this is only a hint!
|
||||
See comment for TABLE::alias_name_used.
|
||||
*/
|
||||
bool alias_name_used; /* true if item was resolved against alias */
|
||||
/*
|
||||
Cached value of index for this field in table->field array, used by prep.
|
||||
@ -5320,7 +5324,7 @@ public:
|
||||
Field *sp_result_field;
|
||||
Item_sp(THD *thd, Name_resolution_context *context_arg, sp_name *name_arg);
|
||||
Item_sp(THD *thd, Item_sp *item);
|
||||
const char *func_name(THD *thd) const;
|
||||
const char *func_name(THD *thd, bool is_package_function) const;
|
||||
void cleanup();
|
||||
bool sp_check_access(THD *thd);
|
||||
bool execute(THD *thd, bool *null_value, Item **args, uint arg_count);
|
||||
|
@ -6583,7 +6583,7 @@ const char *
|
||||
Item_func_sp::func_name() const
|
||||
{
|
||||
THD *thd= current_thd;
|
||||
return Item_sp::func_name(thd);
|
||||
return Item_sp::func_name(thd, m_handler == &sp_handler_package_function);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2832,6 +2832,8 @@ bool Item_in_subselect::inject_in_to_exists_cond(JOIN *join_arg)
|
||||
}
|
||||
|
||||
where_item= and_items(thd, join_arg->conds, where_item);
|
||||
|
||||
/* This is the fix_fields() call mentioned in the comment above */
|
||||
if (where_item->fix_fields_if_needed(thd, 0))
|
||||
DBUG_RETURN(true);
|
||||
// TIMOUR TODO: call optimize_cond() for the new where clause
|
||||
@ -2842,7 +2844,10 @@ bool Item_in_subselect::inject_in_to_exists_cond(JOIN *join_arg)
|
||||
/* Attach back the list of multiple equalities to the new top-level AND. */
|
||||
if (and_args && join_arg->cond_equal)
|
||||
{
|
||||
/* The argument list of the top-level AND may change after fix fields. */
|
||||
/*
|
||||
The fix_fields() call above may have changed the argument list, so
|
||||
fetch it again:
|
||||
*/
|
||||
and_args= ((Item_cond*) join_arg->conds)->argument_list();
|
||||
((Item_cond_and *) (join_arg->conds))->m_cond_equal=
|
||||
*join_arg->cond_equal;
|
||||
|
@ -1461,7 +1461,7 @@ const char *
|
||||
Item_sum_sp::func_name() const
|
||||
{
|
||||
THD *thd= current_thd;
|
||||
return Item_sp::func_name(thd);
|
||||
return Item_sp::func_name(thd, false);
|
||||
}
|
||||
|
||||
Item* Item_sum_sp::copy_or_same(THD *thd)
|
||||
|
@ -1572,13 +1572,9 @@ bool Log_to_csv_event_handler::init()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LOGGER::set_handlers(ulonglong error_log_printer,
|
||||
ulonglong slow_log_printer,
|
||||
int LOGGER::set_handlers(ulonglong slow_log_printer,
|
||||
ulonglong general_log_printer)
|
||||
{
|
||||
/* error log table is not supported yet */
|
||||
DBUG_ASSERT(error_log_printer < LOG_TABLE);
|
||||
|
||||
lock_exclusive();
|
||||
|
||||
if ((slow_log_printer & LOG_TABLE || general_log_printer & LOG_TABLE) &&
|
||||
@ -1591,7 +1587,6 @@ int LOGGER::set_handlers(ulonglong error_log_printer,
|
||||
"Falling back to the old-fashioned logs");
|
||||
}
|
||||
|
||||
init_error_log(error_log_printer);
|
||||
init_slow_log(slow_log_printer);
|
||||
init_general_log(general_log_printer);
|
||||
|
||||
|
@ -1109,8 +1109,7 @@ public:
|
||||
const char *query, size_t query_length);
|
||||
|
||||
/* we use this function to setup all enabled log event handlers */
|
||||
int set_handlers(ulonglong error_log_printer,
|
||||
ulonglong slow_log_printer,
|
||||
int set_handlers(ulonglong slow_log_printer,
|
||||
ulonglong general_log_printer);
|
||||
void init_error_log(ulonglong error_log_printer);
|
||||
void init_slow_log(ulonglong slow_log_printer);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, 2021, MariaDB
|
||||
Copyright (c) 2008, 2022, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -2978,7 +2978,7 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
|
||||
sql_print_information("Got signal %d to shutdown mysqld",sig);
|
||||
#endif
|
||||
/* switch to the old log message processing */
|
||||
logger.set_handlers(LOG_FILE, global_system_variables.sql_log_slow ? LOG_FILE:LOG_NONE,
|
||||
logger.set_handlers(global_system_variables.sql_log_slow ? LOG_FILE:LOG_NONE,
|
||||
opt_log ? LOG_FILE:LOG_NONE);
|
||||
DBUG_PRINT("info",("Got signal: %d abort_loop: %d",sig,abort_loop));
|
||||
if (!abort_loop)
|
||||
@ -3020,8 +3020,8 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
|
||||
ulonglong fixed_log_output_options=
|
||||
log_output_options & LOG_NONE ? LOG_TABLE : log_output_options;
|
||||
|
||||
logger.set_handlers(LOG_FILE, global_system_variables.sql_log_slow
|
||||
? fixed_log_output_options : LOG_NONE,
|
||||
logger.set_handlers(global_system_variables.sql_log_slow
|
||||
? fixed_log_output_options : LOG_NONE,
|
||||
opt_log ? fixed_log_output_options : LOG_NONE);
|
||||
}
|
||||
break;
|
||||
@ -5043,7 +5043,7 @@ static int init_server_components()
|
||||
sql_print_warning("There were other values specified to "
|
||||
"log-output besides NONE. Disabling slow "
|
||||
"and general logs anyway.");
|
||||
logger.set_handlers(LOG_FILE, LOG_NONE, LOG_NONE);
|
||||
logger.set_handlers(LOG_NONE, LOG_NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -5059,8 +5059,7 @@ static int init_server_components()
|
||||
/* purecov: end */
|
||||
}
|
||||
|
||||
logger.set_handlers(LOG_FILE,
|
||||
global_system_variables.sql_log_slow ?
|
||||
logger.set_handlers(global_system_variables.sql_log_slow ?
|
||||
log_output_options:LOG_NONE,
|
||||
opt_log ? log_output_options:LOG_NONE);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2021, MariaDB
|
||||
Copyright (c) 2010, 2022, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -805,6 +805,9 @@ int close_thread_tables(THD *thd)
|
||||
DBUG_PRINT("tcache", ("table: '%s' query_id: %lu",
|
||||
table->s->table_name.str, (ulong) table->query_id));
|
||||
|
||||
if (thd->locked_tables_mode)
|
||||
table->vcol_cleanup_expr(thd);
|
||||
|
||||
/* Detach MERGE children after every statement. Even under LOCK TABLES. */
|
||||
if (thd->locked_tables_mode <= LTM_LOCK_TABLES ||
|
||||
table->query_id == thd->query_id)
|
||||
@ -941,6 +944,8 @@ void close_thread_table(THD *thd, TABLE **table_ptr)
|
||||
table->s->db.str,
|
||||
table->s->table_name.str,
|
||||
MDL_SHARED));
|
||||
|
||||
table->vcol_cleanup_expr(thd);
|
||||
table->mdl_ticket= NULL;
|
||||
|
||||
if (table->file)
|
||||
@ -1668,6 +1673,7 @@ bool open_table(THD *thd, TABLE_LIST *table_list, Open_table_context *ot_ctx)
|
||||
MDL_ticket *mdl_ticket;
|
||||
TABLE_SHARE *share;
|
||||
uint gts_flags;
|
||||
bool from_share= false;
|
||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
int part_names_error=0;
|
||||
#endif
|
||||
@ -2030,6 +2036,7 @@ retry_share:
|
||||
|
||||
/* Add table to the share's used tables list. */
|
||||
tc_add_table(thd, table);
|
||||
from_share= true;
|
||||
}
|
||||
|
||||
if (!(flags & MYSQL_OPEN_HAS_MDL_LOCK) &&
|
||||
@ -2121,6 +2128,9 @@ retry_share:
|
||||
table_list->updatable= 1; // It is not derived table nor non-updatable VIEW
|
||||
table_list->table= table;
|
||||
|
||||
if (!from_share && table->vcol_fix_expr(thd))
|
||||
DBUG_RETURN(true);
|
||||
|
||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
if (unlikely(table->part_info))
|
||||
{
|
||||
@ -5389,54 +5399,6 @@ static void mark_real_tables_as_free_for_reuse(TABLE_LIST *table_list)
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
int TABLE::fix_vcol_exprs(THD *thd)
|
||||
{
|
||||
for (Field **vf= vfield; vf && *vf; vf++)
|
||||
if (fix_session_vcol_expr(thd, (*vf)->vcol_info))
|
||||
return 1;
|
||||
|
||||
for (Field **df= default_field; df && *df; df++)
|
||||
if ((*df)->default_value &&
|
||||
fix_session_vcol_expr(thd, (*df)->default_value))
|
||||
return 1;
|
||||
|
||||
for (Virtual_column_info **cc= check_constraints; cc && *cc; cc++)
|
||||
if (fix_session_vcol_expr(thd, (*cc)))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static bool fix_all_session_vcol_exprs(THD *thd, TABLE_LIST *tables)
|
||||
{
|
||||
Security_context *save_security_ctx= thd->security_ctx;
|
||||
TABLE_LIST *first_not_own= thd->lex->first_not_own_table();
|
||||
DBUG_ENTER("fix_session_vcol_expr");
|
||||
|
||||
int error= 0;
|
||||
for (TABLE_LIST *table= tables; table && table != first_not_own && !error;
|
||||
table= table->next_global)
|
||||
{
|
||||
TABLE *t= table->table;
|
||||
if (!table->placeholder() && t->s->vcols_need_refixing &&
|
||||
table->lock_type >= TL_WRITE_ALLOW_WRITE)
|
||||
{
|
||||
Query_arena *stmt_backup= thd->stmt_arena;
|
||||
if (thd->stmt_arena->is_conventional())
|
||||
thd->stmt_arena= t->expr_arena;
|
||||
if (table->security_ctx)
|
||||
thd->security_ctx= table->security_ctx;
|
||||
|
||||
error= t->fix_vcol_exprs(thd);
|
||||
|
||||
thd->security_ctx= save_security_ctx;
|
||||
thd->stmt_arena= stmt_backup;
|
||||
}
|
||||
}
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Lock all tables in a list.
|
||||
@ -5611,9 +5573,8 @@ bool lock_tables(THD *thd, TABLE_LIST *tables, uint count, uint flags)
|
||||
}
|
||||
}
|
||||
|
||||
bool res= fix_all_session_vcol_exprs(thd, tables);
|
||||
if (!res && !(flags & MYSQL_OPEN_IGNORE_LOGGING_FORMAT))
|
||||
res= thd->decide_logging_format(tables);
|
||||
const bool res= !(flags & MYSQL_OPEN_IGNORE_LOGGING_FORMAT) &&
|
||||
thd->decide_logging_format(tables);
|
||||
|
||||
DBUG_RETURN(res);
|
||||
}
|
||||
|
@ -80,19 +80,7 @@ public:
|
||||
Select_materialize(THD *thd_arg, select_result *result_arg):
|
||||
select_unit(thd_arg), result(result_arg), materialized_cursor(0) {}
|
||||
virtual bool send_result_set_metadata(List<Item> &list, uint flags);
|
||||
bool send_eof()
|
||||
{
|
||||
if (materialized_cursor)
|
||||
materialized_cursor->on_table_fill_finished();
|
||||
return false;
|
||||
}
|
||||
|
||||
void abort_result_set()
|
||||
{
|
||||
if (materialized_cursor)
|
||||
materialized_cursor->on_table_fill_finished();
|
||||
}
|
||||
|
||||
bool send_eof() { return false; }
|
||||
bool view_structure_only() const
|
||||
{
|
||||
return result->view_structure_only();
|
||||
@ -333,6 +321,8 @@ int Materialized_cursor::open(JOIN *join __attribute__((unused)))
|
||||
result->abort_result_set();
|
||||
}
|
||||
|
||||
on_table_fill_finished();
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -604,27 +604,29 @@ void Explain_union::print_explain_json(Explain_query *query,
|
||||
else
|
||||
writer->add_member("union_result").start_object();
|
||||
|
||||
// using_temporary_table
|
||||
make_union_table_name(table_name_buffer);
|
||||
writer->add_member("table_name").add_str(table_name_buffer);
|
||||
writer->add_member("access_type").add_str("ALL"); // not very useful
|
||||
|
||||
/* r_loops (not present in tabular output) */
|
||||
if (is_analyze)
|
||||
if (using_tmp)
|
||||
{
|
||||
writer->add_member("r_loops").add_ll(fake_select_lex_tracker.get_loops());
|
||||
}
|
||||
make_union_table_name(table_name_buffer);
|
||||
writer->add_member("table_name").add_str(table_name_buffer);
|
||||
writer->add_member("access_type").add_str("ALL"); // not very useful
|
||||
|
||||
/* `r_rows` */
|
||||
if (is_analyze)
|
||||
{
|
||||
writer->add_member("r_rows");
|
||||
if (fake_select_lex_tracker.has_scans())
|
||||
writer->add_double(fake_select_lex_tracker.get_avg_rows());
|
||||
else
|
||||
writer->add_null();
|
||||
}
|
||||
/* r_loops (not present in tabular output) */
|
||||
if (is_analyze)
|
||||
{
|
||||
writer->add_member("r_loops").add_ll(
|
||||
fake_select_lex_tracker.get_loops());
|
||||
}
|
||||
|
||||
/* `r_rows` */
|
||||
if (is_analyze)
|
||||
{
|
||||
writer->add_member("r_rows");
|
||||
if (fake_select_lex_tracker.has_scans())
|
||||
writer->add_double(fake_select_lex_tracker.get_avg_rows());
|
||||
else
|
||||
writer->add_null();
|
||||
}
|
||||
}
|
||||
writer->add_member("query_specifications").start_array();
|
||||
|
||||
for (int i= 0; i < (int) union_members.elements(); i++)
|
||||
|
@ -5450,7 +5450,6 @@ that are reorganised.
|
||||
my_error(ER_ROW_IS_REFERENCED, MYF(0));
|
||||
goto err;
|
||||
}
|
||||
tab_part_info->num_parts-= num_parts_dropped;
|
||||
}
|
||||
else if (alter_info->partition_flags & ALTER_PARTITION_REBUILD)
|
||||
{
|
||||
@ -6116,8 +6115,6 @@ static bool mysql_drop_partitions(ALTER_PARTITION_PARAM_TYPE *lpt)
|
||||
char path[FN_REFLEN+1];
|
||||
partition_info *part_info= lpt->table->part_info;
|
||||
List_iterator<partition_element> part_it(part_info->partitions);
|
||||
uint i= 0;
|
||||
uint remove_count= 0;
|
||||
int error;
|
||||
DBUG_ENTER("mysql_drop_partitions");
|
||||
|
||||
@ -6132,16 +6129,6 @@ static bool mysql_drop_partitions(ALTER_PARTITION_PARAM_TYPE *lpt)
|
||||
lpt->table->file->print_error(error, MYF(0));
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
do
|
||||
{
|
||||
partition_element *part_elem= part_it++;
|
||||
if (part_elem->part_state == PART_IS_DROPPED)
|
||||
{
|
||||
part_it.remove();
|
||||
remove_count++;
|
||||
}
|
||||
} while (++i < part_info->num_parts);
|
||||
part_info->num_parts-= remove_count;
|
||||
DBUG_RETURN(FALSE);
|
||||
}
|
||||
|
||||
|
@ -3837,12 +3837,9 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List<Item> *table_fields,
|
||||
tab->join= this;
|
||||
DBUG_ASSERT(tab > tab->join->join_tab || !top_join_tab_count ||
|
||||
!tables_list);
|
||||
tab->table= table;
|
||||
if (tab > join_tab)
|
||||
(tab - 1)->next_select= sub_select_postjoin_aggr;
|
||||
if (!(tab->aggr= new (thd->mem_root) AGGR_OP(tab)))
|
||||
goto err;
|
||||
tab->table= table;
|
||||
table->reginfo.join_tab= tab;
|
||||
|
||||
/* if group or order on first table, sort first */
|
||||
if ((group_list && simple_group) ||
|
||||
@ -3891,12 +3888,15 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List<Item> *table_fields,
|
||||
order= NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(tab->aggr= new (thd->mem_root) AGGR_OP(tab)))
|
||||
goto err;
|
||||
table->reginfo.join_tab= tab;
|
||||
DBUG_RETURN(false);
|
||||
|
||||
err:
|
||||
if (table != NULL)
|
||||
free_tmp_table(thd, table);
|
||||
tab->table= NULL;
|
||||
DBUG_RETURN(true);
|
||||
}
|
||||
|
||||
@ -14065,6 +14065,7 @@ void JOIN::cleanup(bool full)
|
||||
if (curr_tab->aggr)
|
||||
{
|
||||
free_tmp_table(thd, curr_tab->table);
|
||||
curr_tab->table= NULL;
|
||||
delete curr_tab->tmp_table_param;
|
||||
curr_tab->tmp_table_param= NULL;
|
||||
curr_tab->aggr= NULL;
|
||||
|
@ -2607,7 +2607,8 @@ static int show_create_view(THD *thd, TABLE_LIST *table, String *buff)
|
||||
tbl;
|
||||
tbl= tbl->next_global)
|
||||
{
|
||||
if (cmp(&table->view_db, tbl->view ? &tbl->view_db : &tbl->db))
|
||||
if (!tbl->is_derived() &&
|
||||
cmp(&table->view_db, tbl->view ? &tbl->view_db : &tbl->db))
|
||||
{
|
||||
table->compact_view_format= FALSE;
|
||||
break;
|
||||
@ -9045,7 +9046,7 @@ ST_FIELD_INFO columns_fields_info[]=
|
||||
Column("COLLATION_NAME", CSName(), NULLABLE, "Collation", OPEN_FRM_ONLY),
|
||||
Column("COLUMN_TYPE", Longtext(65535), NOT_NULL, "Type", OPEN_FRM_ONLY),
|
||||
Column("COLUMN_KEY", Varchar(3), NOT_NULL, "Key", OPEN_FRM_ONLY),
|
||||
Column("EXTRA", Varchar(30), NOT_NULL, "Extra", OPEN_FRM_ONLY),
|
||||
Column("EXTRA", Varchar(80), NOT_NULL, "Extra", OPEN_FRM_ONLY),
|
||||
Column("PRIVILEGES", Varchar(80), NOT_NULL, "Privileges", OPEN_FRM_ONLY),
|
||||
Column("COLUMN_COMMENT", Varchar(COLUMN_COMMENT_MAXLEN), NOT_NULL, "Comment",
|
||||
OPEN_FRM_ONLY),
|
||||
|
@ -1553,6 +1553,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
|
||||
|
||||
%type <charset>
|
||||
opt_collate
|
||||
collate
|
||||
charset_name
|
||||
charset_or_alias
|
||||
charset_name_or_default
|
||||
@ -6773,10 +6774,7 @@ charset_or_alias:
|
||||
}
|
||||
;
|
||||
|
||||
collate: COLLATE_SYM collation_name_or_default
|
||||
{
|
||||
Lex->charset= $2;
|
||||
}
|
||||
collate: COLLATE_SYM collation_name_or_default { $$= $2; }
|
||||
;
|
||||
|
||||
opt_binary:
|
||||
@ -6791,11 +6789,17 @@ binary:
|
||||
| BINARY charset_or_alias { bincmp_collation($2, true); }
|
||||
| charset_or_alias collate
|
||||
{
|
||||
if (!my_charset_same(Lex->charset, $1))
|
||||
my_yyabort_error((ER_COLLATION_CHARSET_MISMATCH, MYF(0),
|
||||
Lex->charset->name, $1->csname));
|
||||
if (!$2)
|
||||
Lex->charset= $1; // CHARACTER SET cs COLLATE DEFAULT
|
||||
else
|
||||
{
|
||||
if (!my_charset_same($2, $1))
|
||||
my_yyabort_error((ER_COLLATION_CHARSET_MISMATCH, MYF(0),
|
||||
$2->name, $1->csname));
|
||||
Lex->charset= $2;
|
||||
}
|
||||
}
|
||||
| collate { }
|
||||
| collate { Lex->charset= $1; }
|
||||
;
|
||||
|
||||
opt_bin_mod:
|
||||
|
@ -73,14 +73,14 @@ typedef struct st_key_part_info { /* Info about a key part */
|
||||
uint offset; /* Offset in record (from 0) */
|
||||
uint null_offset; /* Offset to null_bit in record */
|
||||
/* Length of key part in bytes, excluding NULL flag and length bytes */
|
||||
uint16 length;
|
||||
uint length;
|
||||
/*
|
||||
Number of bytes required to store the keypart value. This may be
|
||||
different from the "length" field as it also counts
|
||||
- possible NULL-flag byte (see HA_KEY_NULL_LENGTH)
|
||||
- possible HA_KEY_BLOB_LENGTH bytes needed to store actual value length.
|
||||
*/
|
||||
uint16 store_length;
|
||||
uint store_length;
|
||||
uint16 key_type;
|
||||
uint16 fieldnr; /* Fieldnr begins counting from 1 */
|
||||
uint16 key_part_flag; /* 0 or HA_REVERSE_SORT */
|
||||
|
275
sql/table.cc
275
sql/table.cc
@ -76,10 +76,8 @@ struct extra2_fields
|
||||
{ bzero((void*)this, sizeof(*this)); }
|
||||
};
|
||||
|
||||
static Virtual_column_info * unpack_vcol_info_from_frm(THD *, MEM_ROOT *,
|
||||
static Virtual_column_info * unpack_vcol_info_from_frm(THD *,
|
||||
TABLE *, String *, Virtual_column_info **, bool *);
|
||||
static bool check_vcol_forward_refs(Field *, Virtual_column_info *,
|
||||
bool check_constraint);
|
||||
|
||||
/* INFORMATION_SCHEMA name */
|
||||
LEX_CSTRING INFORMATION_SCHEMA_NAME= {STRING_WITH_LEN("information_schema")};
|
||||
@ -1106,9 +1104,6 @@ static void mysql57_calculate_null_position(TABLE_SHARE *share,
|
||||
}
|
||||
}
|
||||
|
||||
static bool fix_and_check_vcol_expr(THD *thd, TABLE *table,
|
||||
Virtual_column_info *vcol);
|
||||
|
||||
/** Parse TABLE_SHARE::vcol_defs
|
||||
|
||||
unpack_vcol_info_from_frm
|
||||
@ -1134,6 +1129,31 @@ static bool fix_and_check_vcol_expr(THD *thd, TABLE *table,
|
||||
bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
|
||||
bool *error_reported, vcol_init_mode mode)
|
||||
{
|
||||
struct check_vcol_forward_refs
|
||||
{
|
||||
static bool check(Field *field, Virtual_column_info *vcol)
|
||||
{
|
||||
return vcol &&
|
||||
vcol->expr->walk(&Item::check_field_expression_processor, 0, field);
|
||||
}
|
||||
static bool check_constraint(Field *field, Virtual_column_info *vcol)
|
||||
{
|
||||
uint32 flags= field->flags;
|
||||
/* Check constraints can refer it itself */
|
||||
field->flags|= NO_DEFAULT_VALUE_FLAG;
|
||||
const bool res= check(field, vcol);
|
||||
field->flags= flags;
|
||||
return res;
|
||||
}
|
||||
static bool check(Field *field)
|
||||
{
|
||||
if (check(field, field->vcol_info) ||
|
||||
check_constraint(field, field->check_constraint) ||
|
||||
check(field, field->default_value))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
CHARSET_INFO *save_character_set_client= thd->variables.character_set_client;
|
||||
CHARSET_INFO *save_collation= thd->variables.collation_connection;
|
||||
Query_arena *backup_stmt_arena_ptr= thd->stmt_arena;
|
||||
@ -1214,7 +1234,7 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
|
||||
switch (type) {
|
||||
case VCOL_GENERATED_VIRTUAL:
|
||||
case VCOL_GENERATED_STORED:
|
||||
vcol= unpack_vcol_info_from_frm(thd, mem_root, table, &expr_str,
|
||||
vcol= unpack_vcol_info_from_frm(thd, table, &expr_str,
|
||||
&((*field_ptr)->vcol_info), error_reported);
|
||||
*(vfield_ptr++)= *field_ptr;
|
||||
DBUG_ASSERT(table->map == 0);
|
||||
@ -1234,7 +1254,7 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
|
||||
table->map= 0;
|
||||
break;
|
||||
case VCOL_DEFAULT:
|
||||
vcol= unpack_vcol_info_from_frm(thd, mem_root, table, &expr_str,
|
||||
vcol= unpack_vcol_info_from_frm(thd, table, &expr_str,
|
||||
&((*field_ptr)->default_value),
|
||||
error_reported);
|
||||
*(dfield_ptr++)= *field_ptr;
|
||||
@ -1242,13 +1262,13 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
|
||||
table->s->non_determinstic_insert= true;
|
||||
break;
|
||||
case VCOL_CHECK_FIELD:
|
||||
vcol= unpack_vcol_info_from_frm(thd, mem_root, table, &expr_str,
|
||||
vcol= unpack_vcol_info_from_frm(thd, table, &expr_str,
|
||||
&((*field_ptr)->check_constraint),
|
||||
error_reported);
|
||||
*check_constraint_ptr++= (*field_ptr)->check_constraint;
|
||||
break;
|
||||
case VCOL_CHECK_TABLE:
|
||||
vcol= unpack_vcol_info_from_frm(thd, mem_root, table, &expr_str,
|
||||
vcol= unpack_vcol_info_from_frm(thd, table, &expr_str,
|
||||
check_constraint_ptr, error_reported);
|
||||
check_constraint_ptr++;
|
||||
break;
|
||||
@ -1300,7 +1320,7 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
|
||||
field->vcol_info= v;
|
||||
field->vcol_info->expr= hash_item;
|
||||
field->vcol_info->set_vcol_type(VCOL_USING_HASH);
|
||||
if (fix_and_check_vcol_expr(thd, table, v))
|
||||
if (v->fix_and_check_expr(thd, table))
|
||||
goto end;
|
||||
key->user_defined_key_parts= key->ext_key_parts= key->usable_key_parts= 1;
|
||||
key->key_part+= parts;
|
||||
@ -1318,7 +1338,7 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
|
||||
expr_str.append(STRING_WITH_LEN("current_timestamp("));
|
||||
expr_str.append_ulonglong(field->decimals());
|
||||
expr_str.append(')');
|
||||
vcol= unpack_vcol_info_from_frm(thd, mem_root, table, &expr_str,
|
||||
vcol= unpack_vcol_info_from_frm(thd, table, &expr_str,
|
||||
&((*field_ptr)->default_value),
|
||||
error_reported);
|
||||
*(dfield_ptr++)= *field_ptr;
|
||||
@ -1340,16 +1360,11 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
|
||||
|
||||
/* Check that expressions aren't referring to not yet initialized fields */
|
||||
for (field_ptr= table->field; *field_ptr; field_ptr++)
|
||||
{
|
||||
Field *field= *field_ptr;
|
||||
if (check_vcol_forward_refs(field, field->vcol_info, 0) ||
|
||||
check_vcol_forward_refs(field, field->check_constraint, 1) ||
|
||||
check_vcol_forward_refs(field, field->default_value, 0))
|
||||
if (check_vcol_forward_refs::check(*field_ptr))
|
||||
{
|
||||
*error_reported= true;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
table->find_constraint_correlated_indexes();
|
||||
|
||||
@ -3504,21 +3519,21 @@ void TABLE_SHARE::free_frm_image(const uchar *frm)
|
||||
}
|
||||
|
||||
|
||||
static bool fix_vcol_expr(THD *thd, Virtual_column_info *vcol)
|
||||
bool Virtual_column_info::fix_expr(THD *thd)
|
||||
{
|
||||
DBUG_ENTER("fix_vcol_expr");
|
||||
|
||||
const enum enum_column_usage saved_column_usage= thd->column_usage;
|
||||
thd->column_usage= COLUMNS_WRITE;
|
||||
|
||||
int error= vcol->expr->fix_fields(thd, &vcol->expr);
|
||||
int error= expr->fix_fields(thd, &expr);
|
||||
|
||||
thd->column_usage= saved_column_usage;
|
||||
|
||||
if (unlikely(error))
|
||||
{
|
||||
StringBuffer<MAX_FIELD_WIDTH> str;
|
||||
vcol->print(&str);
|
||||
print(&str);
|
||||
my_error(ER_ERROR_EVALUATING_EXPRESSION, MYF(0), str.c_ptr_safe());
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
@ -3531,36 +3546,131 @@ static bool fix_vcol_expr(THD *thd, Virtual_column_info *vcol)
|
||||
@note this is done for all vcols for INSERT/UPDATE/DELETE,
|
||||
and only as needed for SELECTs.
|
||||
*/
|
||||
bool fix_session_vcol_expr(THD *thd, Virtual_column_info *vcol)
|
||||
bool Virtual_column_info::fix_session_expr(THD *thd)
|
||||
{
|
||||
DBUG_ENTER("fix_session_vcol_expr");
|
||||
if (!(vcol->flags & (VCOL_TIME_FUNC|VCOL_SESSION_FUNC)))
|
||||
DBUG_RETURN(0);
|
||||
if (!need_refix())
|
||||
return false;
|
||||
|
||||
vcol->expr->walk(&Item::cleanup_excluding_fields_processor, 0, 0);
|
||||
DBUG_ASSERT(!vcol->expr->is_fixed());
|
||||
DBUG_RETURN(fix_vcol_expr(thd, vcol));
|
||||
DBUG_ASSERT(!expr->is_fixed());
|
||||
return fix_expr(thd);
|
||||
}
|
||||
|
||||
|
||||
/** invoke fix_session_vcol_expr for a vcol
|
||||
|
||||
@note this is called for generated column or a DEFAULT expression from
|
||||
their corresponding fix_fields on SELECT.
|
||||
*/
|
||||
bool fix_session_vcol_expr_for_read(THD *thd, Field *field,
|
||||
Virtual_column_info *vcol)
|
||||
bool Virtual_column_info::cleanup_session_expr()
|
||||
{
|
||||
DBUG_ENTER("fix_session_vcol_expr_for_read");
|
||||
TABLE_LIST *tl= field->table->pos_in_table_list;
|
||||
if (!tl || tl->lock_type >= TL_WRITE_ALLOW_WRITE)
|
||||
DBUG_RETURN(0);
|
||||
Security_context *save_security_ctx= thd->security_ctx;
|
||||
if (tl->security_ctx)
|
||||
DBUG_ASSERT(need_refix());
|
||||
if (expr->walk(&Item::cleanup_excluding_fields_processor, 0, 0))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Vcol_expr_context
|
||||
{
|
||||
bool inited;
|
||||
THD *thd;
|
||||
TABLE *table;
|
||||
LEX *old_lex;
|
||||
LEX lex;
|
||||
table_map old_map;
|
||||
Security_context *save_security_ctx;
|
||||
sql_mode_t save_sql_mode;
|
||||
|
||||
public:
|
||||
Vcol_expr_context(THD *_thd, TABLE *_table) :
|
||||
inited(false),
|
||||
thd(_thd),
|
||||
table(_table),
|
||||
old_lex(thd->lex),
|
||||
old_map(table->map),
|
||||
save_security_ctx(thd->security_ctx),
|
||||
save_sql_mode(thd->variables.sql_mode) {}
|
||||
bool init();
|
||||
|
||||
~Vcol_expr_context();
|
||||
};
|
||||
|
||||
|
||||
bool Vcol_expr_context::init()
|
||||
{
|
||||
/*
|
||||
As this is vcol expression we must narrow down name resolution to
|
||||
single table.
|
||||
*/
|
||||
if (init_lex_with_single_table(thd, table, &lex))
|
||||
{
|
||||
my_error(ER_OUT_OF_RESOURCES, MYF(0));
|
||||
table->map= old_map;
|
||||
return true;
|
||||
}
|
||||
|
||||
lex.sql_command= old_lex->sql_command;
|
||||
thd->variables.sql_mode= 0;
|
||||
|
||||
TABLE_LIST const *tl= table->pos_in_table_list;
|
||||
DBUG_ASSERT(table->pos_in_table_list);
|
||||
|
||||
if (table->pos_in_table_list->security_ctx)
|
||||
thd->security_ctx= tl->security_ctx;
|
||||
bool res= fix_session_vcol_expr(thd, vcol);
|
||||
|
||||
inited= true;
|
||||
return false;
|
||||
}
|
||||
|
||||
Vcol_expr_context::~Vcol_expr_context()
|
||||
{
|
||||
if (!inited)
|
||||
return;
|
||||
end_lex_with_single_table(thd, table, old_lex);
|
||||
table->map= old_map;
|
||||
thd->security_ctx= save_security_ctx;
|
||||
DBUG_RETURN(res);
|
||||
thd->variables.sql_mode= save_sql_mode;
|
||||
}
|
||||
|
||||
|
||||
bool TABLE::vcol_fix_expr(THD *thd)
|
||||
{
|
||||
if (pos_in_table_list->placeholder() || vcol_refix_list.is_empty())
|
||||
return false;
|
||||
|
||||
if (!thd->stmt_arena->is_conventional() &&
|
||||
vcol_refix_list.head()->expr->is_fixed())
|
||||
{
|
||||
/* NOTE: Under trigger we already have fixed expressions */
|
||||
return false;
|
||||
}
|
||||
|
||||
Vcol_expr_context expr_ctx(thd, this);
|
||||
if (expr_ctx.init())
|
||||
return true;
|
||||
|
||||
List_iterator_fast<Virtual_column_info> it(vcol_refix_list);
|
||||
while (Virtual_column_info *vcol= it++)
|
||||
if (vcol->fix_session_expr(thd))
|
||||
goto error;
|
||||
|
||||
return false;
|
||||
|
||||
error:
|
||||
DBUG_ASSERT(thd->get_stmt_da()->is_error());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool TABLE::vcol_cleanup_expr(THD *thd)
|
||||
{
|
||||
if (vcol_refix_list.is_empty())
|
||||
return false;
|
||||
|
||||
List_iterator<Virtual_column_info> it(vcol_refix_list);
|
||||
bool result= false;
|
||||
|
||||
while (Virtual_column_info *vcol= it++)
|
||||
result|= vcol->cleanup_session_expr();
|
||||
|
||||
DBUG_ASSERT(!result || thd->get_stmt_da()->is_error());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ -3585,28 +3695,25 @@ bool fix_session_vcol_expr_for_read(THD *thd, Field *field,
|
||||
FALSE Otherwise
|
||||
*/
|
||||
|
||||
static bool fix_and_check_vcol_expr(THD *thd, TABLE *table,
|
||||
Virtual_column_info *vcol)
|
||||
bool Virtual_column_info::fix_and_check_expr(THD *thd, TABLE *table)
|
||||
{
|
||||
Item* func_expr= vcol->expr;
|
||||
DBUG_ENTER("fix_and_check_vcol_expr");
|
||||
DBUG_PRINT("info", ("vcol: %p", vcol));
|
||||
DBUG_ASSERT(func_expr);
|
||||
DBUG_ENTER("Virtual_column_info::fix_and_check_expr");
|
||||
DBUG_PRINT("info", ("vcol: %p", this));
|
||||
DBUG_ASSERT(expr);
|
||||
|
||||
if (func_expr->is_fixed())
|
||||
/* NOTE: constants are fixed when constructed */
|
||||
if (expr->is_fixed())
|
||||
DBUG_RETURN(0); // nothing to do
|
||||
|
||||
if (fix_vcol_expr(thd, vcol))
|
||||
if (fix_expr(thd))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
if (vcol->flags)
|
||||
if (flags)
|
||||
DBUG_RETURN(0); // already checked, no need to do it again
|
||||
|
||||
/* fix_fields could've changed the expression */
|
||||
func_expr= vcol->expr;
|
||||
|
||||
/* this was checked in check_expression(), but the frm could be mangled... */
|
||||
if (unlikely(func_expr->result_type() == ROW_RESULT))
|
||||
if (unlikely(expr->result_type() == ROW_RESULT))
|
||||
{
|
||||
my_error(ER_OPERAND_COLUMNS, MYF(0), 1);
|
||||
DBUG_RETURN(1);
|
||||
@ -3618,12 +3725,12 @@ static bool fix_and_check_vcol_expr(THD *thd, TABLE *table,
|
||||
*/
|
||||
Item::vcol_func_processor_result res;
|
||||
|
||||
int error= func_expr->walk(&Item::check_vcol_func_processor, 0, &res);
|
||||
int error= expr->walk(&Item::check_vcol_func_processor, 0, &res);
|
||||
if (unlikely(error || (res.errors & VCOL_IMPOSSIBLE)))
|
||||
{
|
||||
// this can only happen if the frm was corrupted
|
||||
my_error(ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED, MYF(0), res.name,
|
||||
vcol->get_vcol_type_name(), vcol->name.str);
|
||||
get_vcol_type_name(), name.str);
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
else if (unlikely(res.errors & VCOL_AUTO_INC))
|
||||
@ -3638,14 +3745,14 @@ static bool fix_and_check_vcol_expr(THD *thd, TABLE *table,
|
||||
*/
|
||||
myf warn= table->s->frm_version < FRM_VER_EXPRESSSIONS ? ME_WARNING : 0;
|
||||
my_error(ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED, MYF(warn),
|
||||
"AUTO_INCREMENT", vcol->get_vcol_type_name(), res.name);
|
||||
"AUTO_INCREMENT", get_vcol_type_name(), res.name);
|
||||
if (!warn)
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
vcol->flags= res.errors;
|
||||
flags= res.errors;
|
||||
|
||||
if (vcol->flags & VCOL_SESSION_FUNC)
|
||||
table->s->vcols_need_refixing= true;
|
||||
if (!table->s->tmp_table && need_refix())
|
||||
table->vcol_refix_list.push_back(this, &table->mem_root);
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
@ -3683,7 +3790,7 @@ static bool fix_and_check_vcol_expr(THD *thd, TABLE *table,
|
||||
*/
|
||||
|
||||
static Virtual_column_info *
|
||||
unpack_vcol_info_from_frm(THD *thd, MEM_ROOT *mem_root, TABLE *table,
|
||||
unpack_vcol_info_from_frm(THD *thd, TABLE *table,
|
||||
String *expr_str, Virtual_column_info **vcol_ptr,
|
||||
bool *error_reported)
|
||||
{
|
||||
@ -3722,7 +3829,7 @@ unpack_vcol_info_from_frm(THD *thd, MEM_ROOT *mem_root, TABLE *table,
|
||||
vcol_storage.vcol_info->stored_in_db= vcol->stored_in_db;
|
||||
vcol_storage.vcol_info->name= vcol->name;
|
||||
vcol_storage.vcol_info->utf8= vcol->utf8;
|
||||
if (!fix_and_check_vcol_expr(thd, table, vcol_storage.vcol_info))
|
||||
if (!vcol_storage.vcol_info->fix_and_check_expr(thd, table))
|
||||
{
|
||||
*vcol_ptr= vcol_info= vcol_storage.vcol_info; // Expression ok
|
||||
DBUG_ASSERT(vcol_info->expr);
|
||||
@ -3736,22 +3843,6 @@ end:
|
||||
DBUG_RETURN(vcol_info);
|
||||
}
|
||||
|
||||
static bool check_vcol_forward_refs(Field *field, Virtual_column_info *vcol,
|
||||
bool check_constraint)
|
||||
{
|
||||
bool res;
|
||||
uint32 flags= field->flags;
|
||||
if (check_constraint)
|
||||
{
|
||||
/* Check constraints can refer it itself */
|
||||
field->flags|= NO_DEFAULT_VALUE_FLAG;
|
||||
}
|
||||
res= (vcol &&
|
||||
vcol->expr->walk(&Item::check_field_expression_processor, 0, field));
|
||||
field->flags= flags;
|
||||
return res;
|
||||
}
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
static void print_long_unique_table(TABLE *table)
|
||||
{
|
||||
@ -3952,6 +4043,7 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share,
|
||||
goto err;
|
||||
|
||||
outparam->alias.set(tmp_alias, alias->length, table_alias_charset);
|
||||
outparam->vcol_refix_list.empty();
|
||||
|
||||
/* Allocate handler */
|
||||
outparam->file= 0;
|
||||
@ -8604,7 +8696,16 @@ int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode)
|
||||
|
||||
if (h->keyread_enabled())
|
||||
DBUG_RETURN(0);
|
||||
/*
|
||||
TODO: this imposes memory leak until table flush when save_in_field()
|
||||
does expr_arena allocation. F.ex. case in
|
||||
gcol.gcol_supported_sql_funcs_innodb (see CONVERT_TZ):
|
||||
|
||||
create table t1 (
|
||||
a datetime, b datetime generated always as
|
||||
(convert_tz(a, 'MET', 'UTC')) virtual);
|
||||
insert into t1 values ('2008-08-31', default);
|
||||
*/
|
||||
in_use->set_n_backup_active_arena(expr_arena, &backup_arena);
|
||||
|
||||
/* When reading or deleting row, ignore errors from virtual columns */
|
||||
@ -8675,10 +8776,12 @@ int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode)
|
||||
|
||||
if (update)
|
||||
{
|
||||
int field_error __attribute__((unused)) = 0;
|
||||
/* Compute the actual value of the virtual fields */
|
||||
DBUG_FIX_WRITE_SET(vf);
|
||||
field_error= vcol_info->expr->save_in_field(vf, 0);
|
||||
# ifndef DBUG_OFF
|
||||
int field_error=
|
||||
# endif
|
||||
vcol_info->expr->save_in_field(vf, 0);
|
||||
DBUG_RESTORE_WRITE_SET(vf);
|
||||
DBUG_PRINT("info", ("field '%s' - updated error: %d",
|
||||
vf->field_name.str, field_error));
|
||||
@ -8712,6 +8815,11 @@ int TABLE::update_virtual_field(Field *vf)
|
||||
Query_arena backup_arena;
|
||||
Counting_error_handler count_errors;
|
||||
in_use->push_internal_handler(&count_errors);
|
||||
/*
|
||||
TODO: this may impose memory leak until table flush.
|
||||
See comment in
|
||||
TABLE::update_virtual_fields(handler *, enum_vcol_update_mode).
|
||||
*/
|
||||
in_use->set_n_backup_active_arena(expr_arena, &backup_arena);
|
||||
bitmap_clear_all(&tmp_set);
|
||||
vf->vcol_info->expr->walk(&Item::update_vcol_processor, 0, &tmp_set);
|
||||
@ -8752,6 +8860,11 @@ int TABLE::update_default_fields(bool ignore_errors)
|
||||
DBUG_ENTER("TABLE::update_default_fields");
|
||||
DBUG_ASSERT(default_field);
|
||||
|
||||
/*
|
||||
TODO: this may impose memory leak until table flush.
|
||||
See comment in
|
||||
TABLE::update_virtual_fields(handler *, enum_vcol_update_mode).
|
||||
*/
|
||||
in_use->set_n_backup_active_arena(expr_arena, &backup_arena);
|
||||
|
||||
/* Iterate over fields with default functions in the table */
|
||||
|
11
sql/table.h
11
sql/table.h
@ -850,7 +850,6 @@ struct TABLE_SHARE
|
||||
/* This is set for temporary tables where CREATE was binary logged */
|
||||
bool table_creation_was_logged;
|
||||
bool non_determinstic_insert;
|
||||
bool vcols_need_refixing;
|
||||
bool has_update_default_function;
|
||||
bool can_do_row_logging; /* 1 if table supports RBR */
|
||||
bool long_unique_table;
|
||||
@ -1480,8 +1479,15 @@ public:
|
||||
*/
|
||||
bool auto_increment_field_not_null;
|
||||
bool insert_or_update; /* Can be used by the handler */
|
||||
/*
|
||||
NOTE: alias_name_used is only a hint! It works only in need_correct_ident()
|
||||
condition. On other cases it is FALSE even if table_name is alias.
|
||||
|
||||
E.g. in update t1 as x set a = 1
|
||||
*/
|
||||
bool alias_name_used; /* true if table_name is alias */
|
||||
bool get_fields_in_item_tree; /* Signal to fix_field */
|
||||
List<Virtual_column_info> vcol_refix_list;
|
||||
private:
|
||||
bool m_needs_reopen;
|
||||
bool created; /* For tmp tables. TRUE <=> tmp table was actually created.*/
|
||||
@ -1675,7 +1681,8 @@ public:
|
||||
TABLE *tmp_table,
|
||||
TMP_TABLE_PARAM *tmp_table_param,
|
||||
bool with_cleanup);
|
||||
int fix_vcol_exprs(THD *thd);
|
||||
bool vcol_fix_expr(THD *thd);
|
||||
bool vcol_cleanup_expr(THD *thd);
|
||||
Field *find_field_by_name(LEX_CSTRING *str) const;
|
||||
bool export_structure(THD *thd, class Row_definition_list *defs);
|
||||
bool is_splittable() { return spl_opt_info != NULL; }
|
||||
|
@ -1225,35 +1225,46 @@ std::string wsrep_sst_prepare()
|
||||
/*
|
||||
Figure out SST receive address. Common for all SST methods.
|
||||
*/
|
||||
wsp::Address* addr_in_parser= NULL;
|
||||
|
||||
// Attempt 1: wsrep_sst_receive_address
|
||||
if (wsrep_sst_receive_address &&
|
||||
strcmp (wsrep_sst_receive_address, WSREP_SST_ADDRESS_AUTO))
|
||||
strcmp(wsrep_sst_receive_address, WSREP_SST_ADDRESS_AUTO))
|
||||
{
|
||||
addr_in= wsrep_sst_receive_address;
|
||||
addr_in_parser = new wsp::Address(wsrep_sst_receive_address);
|
||||
|
||||
if (!addr_in_parser->is_valid())
|
||||
{
|
||||
WSREP_ERROR("Could not parse wsrep_sst_receive_address : %s",
|
||||
wsrep_sst_receive_address);
|
||||
unireg_abort(1);
|
||||
}
|
||||
}
|
||||
|
||||
//Attempt 2: wsrep_node_address
|
||||
else if (wsrep_node_address && strlen(wsrep_node_address))
|
||||
else if (wsrep_node_address && *wsrep_node_address)
|
||||
{
|
||||
wsp::Address addr(wsrep_node_address);
|
||||
addr_in_parser = new wsp::Address(wsrep_node_address);
|
||||
|
||||
if (!addr.is_valid())
|
||||
if (addr_in_parser->is_valid())
|
||||
{
|
||||
// we must not inherit the port number from this address:
|
||||
addr_in_parser->set_port(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
WSREP_ERROR("Could not parse wsrep_node_address : %s",
|
||||
wsrep_node_address);
|
||||
throw wsrep::runtime_error("Failed to prepare for SST. Unrecoverable");
|
||||
}
|
||||
memcpy(ip_buf, addr.get_address(), addr.get_address_len());
|
||||
addr_in= ip_buf;
|
||||
}
|
||||
// Attempt 3: Try to get the IP from the list of available interfaces.
|
||||
else
|
||||
{
|
||||
ssize_t ret= wsrep_guess_ip (ip_buf, ip_max);
|
||||
ssize_t ret= wsrep_guess_ip(ip_buf, ip_max);
|
||||
|
||||
if (ret && ret < ip_max)
|
||||
{
|
||||
addr_in= ip_buf;
|
||||
addr_in_parser = new wsp::Address(ip_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1263,6 +1274,51 @@ std::string wsrep_sst_prepare()
|
||||
}
|
||||
}
|
||||
|
||||
assert(addr_in_parser);
|
||||
|
||||
size_t len= addr_in_parser->get_address_len();
|
||||
bool is_ipv6= addr_in_parser->is_ipv6();
|
||||
const char* address= addr_in_parser->get_address();
|
||||
|
||||
if (len > (is_ipv6 ? ip_max - 2 : ip_max))
|
||||
{
|
||||
WSREP_ERROR("Address to accept state transfer is too long: '%s'",
|
||||
address);
|
||||
unireg_abort(1);
|
||||
}
|
||||
|
||||
if (is_ipv6)
|
||||
{
|
||||
/* wsrep_sst_*.sh scripts requite ipv6 addreses to be in square breackets */
|
||||
ip_buf[0] = '[';
|
||||
/* the length (len) already includes the null byte: */
|
||||
memcpy(ip_buf + 1, address, len - 1);
|
||||
ip_buf[len] = ']';
|
||||
ip_buf[len + 1] = 0;
|
||||
len += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(ip_buf, address, len);
|
||||
}
|
||||
|
||||
int port= addr_in_parser->get_port();
|
||||
if (port)
|
||||
{
|
||||
size_t space= ip_max - len;
|
||||
ip_buf[len - 1] = ':';
|
||||
int ret= snprintf(ip_buf + len, ip_max - len, "%d", port);
|
||||
if (ret <= 0 || (size_t) ret > space)
|
||||
{
|
||||
WSREP_ERROR("Address to accept state transfer is too long: '%s:%d'",
|
||||
address, port);
|
||||
unireg_abort(1);
|
||||
}
|
||||
}
|
||||
|
||||
delete addr_in_parser;
|
||||
addr_in = ip_buf;
|
||||
|
||||
ssize_t addr_len= -ENOSYS;
|
||||
method = wsrep_sst_method;
|
||||
if (!strcmp(method, WSREP_SST_MYSQLDUMP))
|
||||
|
@ -46,6 +46,7 @@ public:
|
||||
const char* get_address() { return m_address; }
|
||||
size_t get_address_len() { return m_address_len; }
|
||||
int get_port() { return m_port; }
|
||||
void set_port(int port) { m_port= port; }
|
||||
|
||||
private:
|
||||
enum family {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user