Commit c513c4cb authored by Elena Stepanova's avatar Elena Stepanova Committed by Nirbhay Choubey

MDEV-7635: Additional test fixes

parent c0209f87
......@@ -357,8 +357,9 @@ if ($CRC_RET_stmt_sidef) {
SHOW BINLOG EVENTS;
--die Wrong events in binlog.
}
# The first event is format_description, the second is Binlog_checkpoint,
# the third is Query_event('BEGIN'), and the fourth should be our Table_map
# The first event is format_description, the second is Gtid list,
# the third is Binlog_checkpoint, the fourth is Query_event('BEGIN'),
# the fifth is Annotate_rows, and the sixth should be our Table_map
# for unsafe statement.
if (`SELECT $unsafe_type != 3 AND '$event_type' != 'Table_map'`) {
--enable_query_log
......
......@@ -123,7 +123,7 @@ source include/wait_for_slave_sql_error.inc;
--disable_query_log
--eval SELECT "$err" as 'Last_SQL_Error (expected "Delete_rows_v1 event on table test1.t3; Can\'t find record in \'t3\'" error)'
--enable_query_log
call mtr.add_suppression("Slave: Can't find record in 't3' Error_code: 1032");
call mtr.add_suppression("Can't find record in 't3'");
SET GLOBAL sql_slave_skip_counter=1;
START SLAVE;
......@@ -182,8 +182,4 @@ DROP DATABASE test1;
sync_slave_with_master;
--enable_query_log
use test;
connection slave;
call mtr.add_suppression("Can't find record in 't3'");
--source include/rpl_end.inc
......@@ -3,9 +3,7 @@ drop table t1;
drop table t1;
ERROR 42S02: Unknown table 'test.t1'
set @my_max_allowed_packet= @@max_allowed_packet;
set global max_allowed_packet=100*@@max_allowed_packet;
Warnings:
Warning 1292 Truncated incorrect max_allowed_packet value: '1677721600'
set global max_allowed_packet=64*@@max_allowed_packet;
set global max_allowed_packet=@my_max_allowed_packet;
drop table t1;
End of 5.1 tests
......
......@@ -1560,6 +1560,7 @@ Warning 1301 Result of space() was larger than max_allowed_packet (16777216) - t
# Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT
#
SET NAMES utf8, @@character_set_connection=utf16;
SET STATEMENT group_concat_max_len=1024 FOR
SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l
FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body
UNION ALL
......@@ -1567,13 +1568,18 @@ SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1
GROUP BY id
ORDER BY l DESC;
id l
a 1401
a 512
Warnings:
Warning 1260 Row 1 was cut by GROUP_CONCAT()
SET STATEMENT group_concat_max_len=1024 FOR
SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l
FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body
UNION ALL
SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1;
id l
a 1401
a 512
Warnings:
Warning 1260 Row 1 was cut by GROUP_CONCAT()
#
# MDEV-6865 Merge Bug#18935421 RPAD DIES WITH CERTAIN PADSTR INTPUTS..
#
......
......@@ -1614,6 +1614,7 @@ DROP TABLE t1;
# Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT
#
SET NAMES utf8, @@character_set_connection=utf32;
SET STATEMENT group_concat_max_len=1024 FOR
SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l
FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body
UNION ALL
......@@ -1621,7 +1622,9 @@ SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1
GROUP BY id
ORDER BY l DESC;
id l
a 1401
a 256
Warnings:
Warning 1260 Row 1 was cut by GROUP_CONCAT()
#
# incorrect charset for val_str_ascii
#
......
......@@ -42,7 +42,7 @@
--stack-trace Print a symbolic stack trace on failure
(Defaults to on; use --skip-stack-trace to disable.)
+ --standalone Dummy option to start as a standalone program (NT).
--standards-compliant-cte
--standard-compliant-cte
Allow only standards compiant CTE
(Defaults to on; use --skip-standards-compliant-cte to disable.)
@@ -1109,6 +1117,11 @@
......
......@@ -3,16 +3,17 @@ insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
select * from t1 order by now(), cast(pk as char(0));
pk
1
9
8
7
6
5
4
3
2
10
Warnings:
2
3
4
5
6
7
8
9
show warnings;
Level Code Message
Warning 1292 Truncated incorrect CHAR(0) value: '1'
Warning 1292 Truncated incorrect CHAR(0) value: '2'
Warning 1292 Truncated incorrect CHAR(0) value: '3'
......
......@@ -413,11 +413,11 @@ t1 CREATE TABLE `t1` (
SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t1 x vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t1 y 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test t1 x vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL
test t1 y 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
ALTER TABLE t1 CHANGE COLUMN x b varchar(32),
CHANGE COLUMN y e double;
SHOW CREATE TABLE t1;
......@@ -465,11 +465,11 @@ test s1 40
SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test s1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test s1 x vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL
test s1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test s1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test s1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test s1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test s1 x vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test s1 PRIMARY 1 1.0000
......@@ -592,14 +592,14 @@ test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000
test t1 idx4 3 1.1304
test t1 idx4 2 1.6875
test t1 idx1 1 6.4000
test t1 idx1 2 1.6875
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx3 1 8.5000
test t1 idx4 1 6.2000
test t1 idx1 2 1.6875
test t1 idx1 1 6.4000
test t1 idx4 2 1.6875
test t1 idx4 3 1.1304
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/save_column_stats'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'
FROM mysql.column_stats WHERE column_name='b';
......@@ -681,14 +681,14 @@ test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000
test t1 idx4 3 1.1304
test t1 idx1 1 6.4000
test t1 idx1 2 1.6875
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx3 1 8.5000
test t1 idx4 2 1.6875
test t1 idx4 1 6.2000
test t1 idx1 2 1.6875
test t1 idx1 1 6.4000
test t1 idx4 2 1.6875
test t1 idx4 3 1.1304
ALTER TABLE t1 DROP COLUMN b;
SHOW CREATE TABLE t1;
Table Create Table
......@@ -793,11 +793,11 @@ test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000
test t1 idx2 1 7.0000
test t1 idx1 2 NULL
test t1 idx1 1 NULL
test t1 idx3 1 8.5000
test t1 idx1 2 NULL
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx3 1 8.5000
test t1 idx4 1 6.2000
test t1 idx4 2 NULL
test t1 idx4 3 NULL
......@@ -817,11 +817,11 @@ test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000
test t1 idx2 1 7.0000
test t1 idx1 2 1.6875
test t1 idx1 1 6.4000
test t1 idx3 1 8.5000
test t1 idx1 2 1.6875
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx3 1 8.5000
test t1 idx4 1 6.2000
test t1 idx4 2 1.6875
test t1 idx4 3 1.1304
......@@ -894,13 +894,13 @@ test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000
test t1 idx1 1 6.4000
test t1 idx1 2 1.6875
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx3 1 8.5000
test t1 idx4 1 6.2000
test t1 idx4 2 1.6875
test t1 idx3 1 8.5000
test t1 idx2 2 2.3846
test t1 idx2 1 7.0000
test t1 idx1 2 1.6875
test t1 idx1 1 6.4000
test t1 idx4 3 1.1304
DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stats;
......@@ -926,23 +926,23 @@ test t1 40
SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 idx4 3 1.1304
test t1 idx4 2 1.6875
test t1 idx4 1 6.2000
test t1 idx2 2 2.3846
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx4 1 6.2000
test t1 idx4 2 1.6875
test t1 idx4 3 1.1304
DELETE FROM mysql.index_stats WHERE table_name='t1' AND index_name='primary';
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 idx4 3 1.1304
test t1 idx4 2 1.6875
test t1 idx4 1 6.2000
test t1 idx2 2 2.3846
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx4 1 6.2000
test t1 idx4 2 1.6875
test t1 idx4 3 1.1304
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES(primary);
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
......@@ -950,11 +950,11 @@ test.t1 analyze status Table is already up to date
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000
test t1 idx4 3 1.1304
test t1 idx4 2 1.6875
test t1 idx4 1 6.2000
test t1 idx2 2 2.3846
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx4 1 6.2000
test t1 idx4 2 1.6875
test t1 idx4 3 1.1304
DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stats;
......@@ -967,22 +967,22 @@ db_name table_name cardinality
test t1 40
SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 idx4 2 1.6875
test t1 idx4 1 6.2000
test t1 PRIMARY 1 1.0000
test t1 idx1 1 6.4000
test t1 idx1 2 1.6875
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx1 2 1.6875
test t1 idx1 1 6.4000
test t1 idx3 1 8.5000
test t1 PRIMARY 1 1.0000
test t1 idx4 1 6.2000
test t1 idx4 2 1.6875
test t1 idx4 3 1.1304
CREATE TABLE t2 LIKE t1;
ALTER TABLE t2 ENGINE=InnoDB;
......@@ -996,10 +996,10 @@ SELECT * FROM mysql.table_stats;
db_name table_name cardinality
test t1 40
test t2 40
SELECT * FROM mysql.column_stats ORDER BY column_name;
SELECT * FROM mysql.column_stats ORDER BY column_name, table_name;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL
test t2 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
......@@ -1193,22 +1193,22 @@ ADD INDEX idx1 (b(4), e),
ADD INDEX idx4 (e, b(4), d);
SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t2 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test t2 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t2 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t2 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t2 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t2 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t2 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t2 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t2 PRIMARY 1 1.0000
test t2 idx3 2 1.0000
test t2 idx2 1 7.0000
test t2 idx2 2 2.3846
test t2 idx2 3 1.0000
test t2 idx3 1 8.5000
test t2 idx3 2 1.0000
test t2 idx4 1 6.2000
test t2 idx4 2 2.2308
test t2 idx4 3 1.0000
test t2 idx2 2 2.3846
test t2 idx2 1 7.0000
test t2 idx3 1 8.5000
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
......@@ -1216,36 +1216,36 @@ test.t1 analyze Warning Engine-independent statistics are not collected for colu
test.t1 analyze status OK
SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t2 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test t2 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t2 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t2 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t2 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t2 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t2 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t2 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000
test t1 idx1 1 NULL
test t1 idx1 2 NULL
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx3 1 8.5000
test t1 idx4 1 6.2000
test t1 idx4 2 NULL
test t1 idx4 3 NULL
test t2 PRIMARY 1 1.0000
test t2 idx3 2 1.0000
test t2 idx2 1 7.0000
test t2 idx2 2 2.3846
test t2 idx2 3 1.0000
test t2 idx3 1 8.5000
test t2 idx3 2 1.0000
test t2 idx4 1 6.2000
test t2 idx4 2 2.2308
test t2 idx4 3 1.0000
test t1 PRIMARY 1 1.0000
test t1 idx3 1 8.5000
test t2 idx2 2 2.3846
test t2 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx2 1 7.0000
test t2 idx3 1 8.5000
test t1 idx1 1 NULL
test t1 idx4 1 6.2000
test t1 idx4 2 NULL
test t1 idx4 3 NULL
DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stats;
......@@ -1272,22 +1272,22 @@ db_name table_name cardinality
test t1 40
SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 idx4 3 NULL
test t1 idx4 2 NULL
test t1 idx4 1 6.2000
test t1 idx1 2 NULL
test t1 PRIMARY 1 1.0000
test t1 idx1 1 NULL
test t1 idx2 2 2.3846
test t1 idx1 2 NULL
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx3 1 8.5000
test t1 PRIMARY 1 1.0000
test t1 idx4 1 6.2000
test t1 idx4 2 NULL
test t1 idx4 3 NULL
DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stats;
......@@ -1347,22 +1347,22 @@ ANALYZE TABLE Country, City, CountryLanguage;
SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stats;
UPPER(db_name) UPPER(table_name) cardinality
WORLD COUNTRY 239
WORLD CITY 4079
WORLD COUNTRY 239
WORLD COUNTRYLANGUAGE 984
SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stats;
UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency
WORLD CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195
WORLD CITY Population 42 10500000 0.0000 4.0000 1.0467
WORLD CITY Country ABW ZWE 0.0000 3.0000 17.5819
WORLD CITY ID 1 4079 0.0000 4.0000 1.0000
WORLD CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195
WORLD CITY Population 42 10500000 0.0000 4.0000 1.0467
WORLD COUNTRY Capital 1 4074 0.0293 4.0000 1.0000
WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000
WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000
WORLD COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575
WORLD COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042
WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000
WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000
WORLD COUNTRYLANGUAGE Country ABW ZWE 0.0000 3.0000 4.2232
WORLD COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532
WORLD COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640
......@@ -1370,14 +1370,14 @@ SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency
FROM mysql.index_stats;
UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency
WORLD COUNTRYLANGUAGE Percentage 1 2.7640
WORLD COUNTRYLANGUAGE PRIMARY 2 1.0000
WORLD COUNTRYLANGUAGE PRIMARY 1 4.2232
WORLD CITY Country 1 17.5819
WORLD CITY Population 1 1.0467
WORLD CITY PRIMARY 1 1.0000
WORLD CITY Population 1 1.0467
WORLD COUNTRY Name 1 1.0000
WORLD COUNTRY PRIMARY 1 1.0000
WORLD COUNTRYLANGUAGE PRIMARY 1 4.2232
WORLD COUNTRYLANGUAGE PRIMARY 2 1.0000
WORLD COUNTRYLANGUAGE Percentage 1 2.7640
use test;
set use_stat_tables='never';
CREATE DATABASE world_innodb;
......@@ -1415,37 +1415,37 @@ ANALYZE TABLE Country, City, CountryLanguage;
SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stats;
UPPER(db_name) UPPER(table_name) cardinality
WORLD COUNTRY 239
WORLD CITY 4079
WORLD COUNTRY 239
WORLD COUNTRYLANGUAGE 984
WORLD_INNODB COUNTRY 239
WORLD_INNODB CITY 4079
WORLD_INNODB COUNTRY 239
WORLD_INNODB COUNTRYLANGUAGE 984
SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stats;
UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency
WORLD CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195
WORLD CITY Population 42 10500000 0.0000 4.0000 1.0467
WORLD CITY Country ABW ZWE 0.0000 3.0000 17.5819
WORLD CITY ID 1 4079 0.0000 4.0000 1.0000
WORLD CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195
WORLD CITY Population 42 10500000 0.0000 4.0000 1.0467
WORLD COUNTRY Capital 1 4074 0.0293 4.0000 1.0000
WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000
WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000
WORLD COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575
WORLD COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042
WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000
WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000
WORLD COUNTRYLANGUAGE Country ABW ZWE 0.0000 3.0000 4.2232
WORLD COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532
WORLD COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640
WORLD_INNODB COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000
WORLD_INNODB COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000
WORLD_INNODB COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042
WORLD_INNODB COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575
WORLD_INNODB COUNTRY Capital 1 4074 0.0293 4.0000 1.0000
WORLD_INNODB CITY Country ABW ZWE 0.0000 3.0000 17.5819
WORLD_INNODB CITY ID 1 4079 0.0000 4.0000 1.0000
WORLD_INNODB CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195
WORLD_INNODB CITY Country ABW ZWE 0.0000 3.0000 17.5819
WORLD_INNODB CITY Population 42 10500000 0.0000 4.0000 1.0467
WORLD_INNODB COUNTRY Capital 1 4074 0.0293 4.0000 1.0000
WORLD_INNODB COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000
WORLD_INNODB COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000
WORLD_INNODB COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575
WORLD_INNODB COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042
WORLD_INNODB COUNTRYLANGUAGE Country ABW ZWE 0.0000 3.0000 4.2232
WORLD_INNODB COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532
WORLD_INNODB COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640
......@@ -1453,19 +1453,19 @@ SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency
FROM mysql.index_stats;
UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency
WORLD_INNODB CITY Country 1 17.5819
WORLD_INNODB CITY Population 1 1.0467
WORLD_INNODB CITY PRIMARY 1 1.0000
WORLD_INNODB COUNTRY Name 1 1.0000
WORLD_INNODB COUNTRY PRIMARY 1 1.0000
WORLD COUNTRYLANGUAGE Percentage 1 2.7640
WORLD COUNTRYLANGUAGE PRIMARY 2 1.0000
WORLD COUNTRYLANGUAGE PRIMARY 1 4.2232
WORLD CITY Country 1 17.5819
WORLD CITY Population 1 1.0467
WORLD CITY PRIMARY 1 1.0000
WORLD CITY Population 1 1.0467
WORLD COUNTRY Name 1 1.0000
WORLD COUNTRY PRIMARY 1 1.0000
WORLD COUNTRYLANGUAGE PRIMARY 1 4.2232
WORLD COUNTRYLANGUAGE PRIMARY 2 1.0000
WORLD COUNTRYLANGUAGE Percentage 1 2.7640
WORLD_INNODB CITY Country 1 17.5819
WORLD_INNODB CITY PRIMARY 1 1.0000
WORLD_INNODB CITY Population 1 1.0467
WORLD_INNODB COUNTRY Name 1 1.0000
WORLD_INNODB COUNTRY PRIMARY 1 1.0000
WORLD_INNODB COUNTRYLANGUAGE PRIMARY 1 4.2232
WORLD_INNODB COUNTRYLANGUAGE PRIMARY 2 1.0000
WORLD_INNODB COUNTRYLANGUAGE Percentage 1 2.7640
......@@ -1511,22 +1511,22 @@ DROP DATABASE world;
SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stats;
UPPER(db_name) UPPER(table_name) cardinality
WORLD_INNODB COUNTRY 239
WORLD_INNODB CITY 4079
WORLD_INNODB COUNTRY 239
WORLD_INNODB COUNTRYLANGUAGE 984
SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stats;
UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency
WORLD_INNODB COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000
WORLD_INNODB COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000
WORLD_INNODB COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042
WORLD_INNODB COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575
WORLD_INNODB COUNTRY Capital 1 4074 0.0293 4.0000 1.0000
WORLD_INNODB CITY Country ABW ZWE 0.0000 3.0000 17.5819
WORLD_INNODB CITY ID 1 4079 0.0000 4.0000 1.0000
WORLD_INNODB CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195
WORLD_INNODB CITY Country ABW ZWE 0.0000 3.0000 17.5819
WORLD_INNODB CITY Population 42 10500000 0.0000 4.0000 1.0467
WORLD_INNODB COUNTRY Capital 1 4074 0.0293 4.0000 1.0000
WORLD_INNODB COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000
WORLD_INNODB COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000
WORLD_INNODB COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575
WORLD_INNODB COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042
WORLD_INNODB COUNTRYLANGUAGE Country ABW ZWE 0.0000 3.0000 4.2232
WORLD_INNODB COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532
WORLD_INNODB COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640
......@@ -1535,8 +1535,8 @@ index_name, prefix_arity, avg_frequency
FROM mysql.index_stats;
UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency
WORLD_INNODB CITY Country 1 17.5819
WORLD_INNODB CITY Population 1 1.0467
WORLD_INNODB CITY PRIMARY 1 1.0000
WORLD_INNODB CITY Population 1 1.0467
WORLD_INNODB COUNTRY Name 1 1.0000
WORLD_INNODB COUNTRY PRIMARY 1 1.0000
WORLD_INNODB COUNTRYLANGUAGE PRIMARY 1 4.2232
......
......@@ -903,7 +903,11 @@ master-bin.000001 # Annotate_rows # # UPDATE user SET password=password('Another
master-bin.000001 # Table_map # # table_id: # (mysql.user)
master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Rotate # # master-bin.000002;pos=POS
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # DELETE FROM user WHERE host='localhost' AND user='@#@'
master-bin.000001 # Table_map # # table_id: # (mysql.user)
master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
drop table t1,t2,t3,tt1;
reset master;
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
......@@ -955,7 +959,7 @@ insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
*** show new binlog index after rotating ***
File master-bin.000003
File master-bin.000002
drop table t3;
#
# Bug #45998: database crashes when running "create as select"
......
--max_binlog_size=4096 --default-storage-engine=MyISAM
--max_binlog_size=8192 --default-storage-engine=MyISAM
include/master-slave.inc
[connection master]
connection master;
call mtr.add_suppression("mysqld: Table './mysql/gtid_slave_pos' is marked as crashed and should be repaired");
call mtr.add_suppression("mysqld: Table '.*gtid_slave_pos' is marked as crashed and should be repaired");
call mtr.add_suppression("Checking table: './mysql/gtid_slave_pos'");
call mtr.add_suppression("mysql.gtid_slave_pos: 1 client is using or hasn't closed the table properly");
SET @@session.gtid_domain_id= 0;
......@@ -57,10 +57,4 @@ connection slave;
include/stop_slave.inc
CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), MASTER_USE_GTID=NO;
include/start_slave.inc
connection master;
call mtr.add_suppression("Table 'gtid_slave_pos' is marked as crashed and should be repaired");
Warnings:
Error 145 Table './mtr/test_suppressions' is marked as crashed and should be repaired
Error 1194 Table 'test_suppressions' is marked as crashed and should be repaired
Error 1034 1 client is using or hasn't closed the table properly
include/rpl_end.inc
......@@ -67,7 +67,7 @@ connection slave;
include/wait_for_slave_sql_error.inc [errno=1032]
Last_SQL_Error (expected "Delete_rows_v1 event on table test1.t3; Can't find record in 't3'" error)
Could not execute Delete_rows_v1 event on table test1.t3; Can't find record in 't3', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log master-bin.000002, end_log_pos END_LOG_POS
call mtr.add_suppression("Slave: Can't find record in 't3' Error_code: 1032");
call mtr.add_suppression("Can't find record in 't3'");
SET GLOBAL sql_slave_skip_counter=1;
START SLAVE;
connection master;
......@@ -168,7 +168,7 @@ slave-bin.000001 # Table_map 1 # table_id: # (test1.t3)
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Gtid 2 # BEGIN GTID 0-2-27
slave-bin.000001 # Annotate_rows 2 # INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Slave: Can\'t find record in \'t3\' Error_code: 1032' COLLATE 'latin1_swedish_ci'))
slave-bin.000001 # Annotate_rows 2 # INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Can\'t find record in \'t3\'' COLLATE 'latin1_swedish_ci'))
slave-bin.000001 # Table_map 2 # table_id: # (mtr.test_suppressions)
slave-bin.000001 # Write_rows_v1 2 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 2 # COMMIT
......@@ -193,7 +193,4 @@ connection slave;
########################################################################
FLUSH LOGS;
connection master;
use test;
connection slave;
call mtr.add_suppression("Can't find record in 't3'");
include/rpl_end.inc
......@@ -45,15 +45,7 @@ a b
5 gs
########################################################################
# EVENTS ON SLAVE
# The following Annotate_rows events should appear below:
# - UPDATE t1 SET b = b + 1;
# - REPLACE t1 VALUES (1,1), (2,2), (3,3);
# - INSERT INTO t2 VALUES (1,1), (2,2), (3,3)
# - INSERT INTO t3 VALUES (1,1), (2,2), (3,3)
# - DELETE t1, t2 FROM <...>
# - INSERT INTO t2 VALUES (1,1), (2,2), (3,3)
# - DELETE xt1, t2 FROM <...>
# - INSERT INTO t5(b) VALUES <...> (3 instances)
# No Annotate_rows events should appear below
########################################################################
# Ensure that a replication failure doesn't segfault - MDEV-7864
########################################################################
......@@ -67,7 +59,7 @@ connection slave;
include/wait_for_slave_sql_error.inc [errno=1032]
Last_SQL_Error (expected "Delete_rows_v1 event on table test1.t3; Can't find record in 't3'" error)
Could not execute Delete_rows_v1 event on table test1.t3; Can't find record in 't3', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log master-bin.000002, end_log_pos END_LOG_POS
call mtr.add_suppression("Slave: Can't find record in 't3' Error_code: 1032");
call mtr.add_suppression("Can't find record in 't3'");
SET GLOBAL sql_slave_skip_counter=1;
START SLAVE;
connection master;
......@@ -100,55 +92,45 @@ slave-bin.000001 # Table_map 1 # table_id: # (test1.t1)
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-11
slave-bin.000001 # Annotate_rows 1 # UPDATE t1 SET b = b + 1
slave-bin.000001 # Table_map 1 # table_id: # (test1.t1)
slave-bin.000001 # Update_rows_v1 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-12
slave-bin.000001 # Annotate_rows 1 # REPLACE t1 VALUES (1,1), (2,2), (3,3)
slave-bin.000001 # Table_map 1 # table_id: # (test1.t1)
slave-bin.000001 # Update_rows_v1 1 # table_id: #
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-13
slave-bin.000001 # Annotate_rows 1 # INSERT INTO t2 VALUES (1,1), (2,2), (3,3)
slave-bin.000001 # Table_map 1 # table_id: # (test1.t2)
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-14
slave-bin.000001 # Annotate_rows 1 # INSERT INTO t3 VALUES (1,1), (2,2), (3,3)
slave-bin.000001 # Table_map 1 # table_id: # (test1.t3)
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-15
slave-bin.000001 # Annotate_rows 1 # DELETE t1, t2 FROM t1 INNER JOIN t2 INNER JOIN t3 WHERE t1.a=t2.a AND t2.a=t3.a
slave-bin.000001 # Table_map 1 # table_id: # (test1.t2)
slave-bin.000001 # Table_map 1 # table_id: # (test1.t1)
slave-bin.000001 # Delete_rows_v1 1 # table_id: #
slave-bin.000001 # Delete_rows_v1 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-17
slave-bin.000001 # Annotate_rows 1 # INSERT INTO t2 VALUES (1,1), (2,2), (3,3)
slave-bin.000001 # Table_map 1 # table_id: # (test1.t2)
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-18
slave-bin.000001 # Annotate_rows 1 # DELETE xt1, t2 FROM xt1 INNER JOIN t2 INNER JOIN t3 WHERE xt1.a=t2.a AND t2.a=t3.a
slave-bin.000001 # Table_map 1 # table_id: # (test1.t2)
slave-bin.000001 # Delete_rows_v1 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-22
slave-bin.000001 # Annotate_rows 1 # INSERT INTO t5(b) VALUES ('foo'), ('bar'), ('baz')
slave-bin.000001 # Table_map 1 # table_id: # (test1.t5)
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-23
slave-bin.000001 # Annotate_rows 1 # INSERT INTO t5(b) VALUES ('gs')
slave-bin.000001 # Table_map 1 # table_id: # (test1.t5)
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-24
slave-bin.000001 # Annotate_rows 1 # INSERT INTO t5(b) VALUES ('gås')
slave-bin.000001 # Table_map 1 # table_id: # (test1.t5)
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # COMMIT
......@@ -158,17 +140,15 @@ slave-bin.000001 # Table_map 2 # table_id: # (test1.t3)
slave-bin.000001 # Delete_rows_v1 2 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 2 # COMMIT
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-25
slave-bin.000001 # Annotate_rows 1 # INSERT INTO t5 (a) SELECT a.a*10000+b.a*1000+c.a*100+d.a*10 FROM t5 a, t5 b, t5 c, t5 d
slave-bin.000001 # Table_map 1 # table_id: # (test1.t5)
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-26
slave-bin.000001 # Annotate_rows 1 # INSERT INTO t3 (a) SELECT a FROM t5 WHERE a > 10
slave-bin.000001 # Table_map 1 # table_id: # (test1.t3)
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 1 # COMMIT
slave-bin.000001 # Gtid 2 # BEGIN GTID 0-2-27
slave-bin.000001 # Annotate_rows 2 # INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Slave: Can\'t find record in \'t3\' Error_code: 1032' COLLATE 'latin1_swedish_ci'))
slave-bin.000001 # Annotate_rows 2 # INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_latin1'Can\'t find record in \'t3\'' COLLATE 'latin1_swedish_ci'))
slave-bin.000001 # Table_map 2 # table_id: # (mtr.test_suppressions)
slave-bin.000001 # Write_rows_v1 2 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 2 # COMMIT
......@@ -193,7 +173,4 @@ connection slave;
########################################################################
FLUSH LOGS;
connection master;
use test;
connection slave;
call mtr.add_suppression("Can't find record in 't3'");
include/rpl_end.inc
......@@ -125,10 +125,7 @@ connection master;
CREATE TABLE t1 (a INT, b TIMESTAMP);
INSERT INTO t1 VALUES (1, NOW());
SET @@session.time_zone='Japan';
SET STATEMENT sql_mode = '' FOR
UPDATE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1;
Warnings:
Warning 1264 Out of range value for column 'b' at row 1
UPDATE IGNORE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1;
SELECT * FROM t1 ORDER BY a;
a b
1 0000-00-00 00:00:00
......
......@@ -6,10 +6,9 @@
connection master;
call mtr.add_suppression("mysqld: Table './mysql/gtid_slave_pos' is marked as crashed and should be repaired");
call mtr.add_suppression("mysqld: Table '.*gtid_slave_pos' is marked as crashed and should be repaired");
call mtr.add_suppression("Checking table: './mysql/gtid_slave_pos'");
call mtr.add_suppression("mysql.gtid_slave_pos: 1 client is using or hasn't closed the table properly");
SET @@session.gtid_domain_id= 0;
create table ti (a int auto_increment primary key) engine=innodb;
......@@ -86,7 +85,4 @@ sync_slave_with_master;
CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(), MASTER_USE_GTID=NO;
--source include/start_slave.inc
connection master;
call mtr.add_suppression("Table 'gtid_slave_pos' is marked as crashed and should be repaired");
--source include/rpl_end.inc
--log-slave-updates --replicate-ignore-table=test1.xt1 --replicate-ignore-table=test1.xt2
\ No newline at end of file
--log-slave-updates --skip-replicate-annotate-row-events --replicate-ignore-table=test1.xt1 --replicate-ignore-table=test1.xt2
......@@ -157,8 +157,9 @@ CREATE TABLE t1 (a INT, b TIMESTAMP);
INSERT INTO t1 VALUES (1, NOW());
SET @@session.time_zone='Japan';
SET STATEMENT sql_mode = '' FOR
UPDATE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1;
--disable_warnings
UPDATE IGNORE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1;
--enable_warnings
SELECT * FROM t1 ORDER BY a;
sync_slave_with_master;
......
......@@ -36,7 +36,7 @@ remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql;
# Bootstrap with a query larger than 2*thd->net.max_packet
#
set @my_max_allowed_packet= @@max_allowed_packet;
set global max_allowed_packet=100*@@max_allowed_packet;
set global max_allowed_packet=64*@@max_allowed_packet;
--disable_query_log
create table t1 select 2 as a, concat(repeat('MySQL', @@max_allowed_packet/10), ';') as b;
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/long_query.sql' from t1;
......
......@@ -773,6 +773,7 @@ SELECT space(date_add(101, INTERVAL CHAR('1' USING utf16) hour_second));
--echo #
SET NAMES utf8, @@character_set_connection=utf16;
SET STATEMENT group_concat_max_len=1024 FOR
SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l
FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body
UNION ALL
......@@ -780,6 +781,7 @@ SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1
GROUP BY id
ORDER BY l DESC;
SET STATEMENT group_concat_max_len=1024 FOR
SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l
FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body
UNION ALL
......
......@@ -861,6 +861,7 @@ DROP TABLE t1;
--echo #
SET NAMES utf8, @@character_set_connection=utf32;
SET STATEMENT group_concat_max_len=1024 FOR
SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l
FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body
UNION ALL
......
......@@ -3,6 +3,13 @@
#
create table t1 (pk int primary key);
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
# In strict mode the query produces result in a different order
# (not ordered implicitly by PK and indeterministic), so we force sorting.
# However, sorting also affects warnings, so we'll check them separately.
--disable_warnings
--sorted_result
select * from t1 order by now(), cast(pk as char(0));
--enable_warnings
show warnings;
drop table t1;
......@@ -7,7 +7,9 @@ drop table if exists t1,t2;
set @save_use_stat_tables=@@use_stat_tables;
DELETE FROM mysql.table_stats;
--sorted_result
DELETE FROM mysql.column_stats;
--sorted_result
DELETE FROM mysql.index_stats;
set use_stat_tables='preferably';
......@@ -171,6 +173,7 @@ DELETE FROM mysql.column_stats;
set histogram_size=4;
ANALYZE TABLE t1;
--sorted_result
SELECT db_name, table_name, column_name,
min_value, max_value,
nulls_ratio, avg_frequency,
......@@ -183,6 +186,7 @@ set histogram_size=8;
set histogram_type='DOUBLE_PREC_HB';
ANALYZE TABLE t1;
--sorted_result
SELECT db_name, table_name, column_name,
min_value, max_value,
nulls_ratio, avg_frequency,
......@@ -224,23 +228,34 @@ INSERT INTO t3 VALUES
ANALYZE TABLE t3;
--sorted_result
SELECT * FROM mysql.table_stats;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
ALTER TABLE t1 RENAME TO s1;
--sorted_result
SELECT * FROM mysql.table_stats;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
RENAME TABLE s1 TO t1;
--sorted_result
SELECT * FROM mysql.table_stats;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
DROP TABLE t3;
SELECT * FROM mysql.table_stats;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
......@@ -253,37 +268,49 @@ INSERT INTO t0 SELECT a,b FROM t1;
ALTER TABLE t1 CHANGE COLUMN b x varchar(32),
CHANGE COLUMN e y double;
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM mysql.column_stats;
ALTER TABLE t1 CHANGE COLUMN x b varchar(32),
CHANGE COLUMN y e double;
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM mysql.column_stats;
ALTER TABLE t1 RENAME TO s1, CHANGE COLUMN b x varchar(32);
SHOW CREATE TABLE s1;
SELECT * FROM mysql.table_stats;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
ALTER TABLE s1 RENAME TO t1, CHANGE COLUMN x b varchar(32);
SHOW CREATE TABLE t1;
SELECT * FROM mysql.table_stats;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
ALTER TABLE t1 CHANGE COLUMN b x varchar(30);
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
ALTER TABLE t1 CHANGE COLUMN x b varchar(32);
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx4);
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
......@@ -299,12 +326,16 @@ SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/save_index_stats'
ALTER TABLE t1 CHANGE COLUMN b x varchar(30);
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
ALTER TABLE t1 CHANGE COLUMN x b varchar(32);
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
......@@ -317,7 +348,9 @@ eval
LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/save_index_stats'
INTO TABLE mysql.index_stats
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
remove_file $MYSQLTEST_VARDIR/tmp/save_column_stats;
remove_file $MYSQLTEST_VARDIR/tmp/save_index_stats;
......@@ -325,11 +358,14 @@ remove_file $MYSQLTEST_VARDIR/tmp/save_index_stats;
ALTER TABLE t1 DROP COLUMN b;
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
DROP INDEX idx2 ON t1;
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM mysql.index_stats;
DROP INDEX idx1 ON t1;
......@@ -341,22 +377,30 @@ CREATE INDEX idx1 ON t1(b, e);
CREATE INDEX idx2 ON t1(c, d);
CREATE INDEX idx4 ON t1(e, b, d);
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4);
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
UPDATE t1 SET b=(SELECT b FROM t0 WHERE t0.a= t1.a);
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4);
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
ALTER TABLE t1 DROP COLUMN b,
DROP INDEX idx1, DROP INDEX idx2, DROP INDEX idx4;
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
ALTER TABLE t1 ADD COLUMN b varchar(32);
......@@ -364,10 +408,14 @@ ALTER TABLE t1
ADD INDEX idx1 (b, e), ADD INDEX idx2 (c, d), ADD INDEX idx4 (e, b, d);
UPDATE t1 SET b=(SELECT b FROM t0 WHERE t0.a= t1.a);
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4);
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
DELETE FROM mysql.table_stats;
......@@ -381,12 +429,16 @@ SELECT * FROM mysql.index_stats;
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(c,e,b) INDEXES(idx2,idx4);
SELECT * FROM mysql.table_stats;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
DELETE FROM mysql.index_stats WHERE table_name='t1' AND index_name='primary';
--sorted_result
SELECT * FROM mysql.index_stats;
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES(primary);
--sorted_result
SELECT * FROM mysql.index_stats;
DELETE FROM mysql.table_stats;
......@@ -396,7 +448,9 @@ DELETE FROM mysql.index_stats;
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS ALL INDEXES ALL;
SELECT * FROM mysql.table_stats;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
CREATE TABLE t2 LIKE t1;
......@@ -407,8 +461,9 @@ set optimizer_switch='extended_keys=off';
ANALYZE TABLE t2;
--sorted_result
SELECT * FROM mysql.table_stats;
SELECT * FROM mysql.column_stats ORDER BY column_name;
SELECT * FROM mysql.column_stats ORDER BY column_name, table_name;
SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name;
DELETE FROM mysql.table_stats;
......@@ -461,12 +516,16 @@ ALTER TABLE t1
ADD INDEX idx1 (b(4), e),
ADD INDEX idx4 (e, b(4), d);
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
ANALYZE TABLE t1;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
DELETE FROM mysql.table_stats;
......@@ -486,7 +545,9 @@ set use_stat_tables='never';
ANALYZE TABLE t1 PERSISTENT FOR ALL;
SELECT * FROM mysql.table_stats;
--sorted_result
SELECT * FROM mysql.column_stats;
--sorted_result
SELECT * FROM mysql.index_stats;
......@@ -529,11 +590,14 @@ set use_stat_tables='preferably';
ANALYZE TABLE Country, City, CountryLanguage;
--enable_result_log
--sorted_result
SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stats;
--sorted_result
SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stats;
--sorted_result
SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency
FROM mysql.index_stats;
......@@ -566,11 +630,14 @@ set use_stat_tables='preferably';
ANALYZE TABLE Country, City, CountryLanguage;
--enable_result_log
--sorted_result
SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stats;
--sorted_result
SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stats;
--sorted_result
SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency
FROM mysql.index_stats;
......@@ -596,11 +663,14 @@ set histogram_size=default;
use test;
DROP DATABASE world;
--sorted_result
SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stats;
--sorted_result
SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stats;
--sorted_result
SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency
FROM mysql.index_stats;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment