diff options
author | Bjorn Munch <bjorn.munch@oracle.com> | 2010-10-21 11:20:53 +0200 |
---|---|---|
committer | Bjorn Munch <bjorn.munch@oracle.com> | 2010-10-21 11:20:53 +0200 |
commit | add465e5a1e38821ee8e7eefd0cc323f280507ad (patch) | |
tree | 5284e145f525690cbe056d9703a9fef0cb1edc99 /mysql-test | |
parent | 3cdf62b02105696d86bcba86b384f579936b9fd9 (diff) | |
parent | f703a7779fed9a9b677649ba443a6b467f0125d2 (diff) | |
download | mariadb-git-add465e5a1e38821ee8e7eefd0cc323f280507ad.tar.gz |
merge from 5.5
Diffstat (limited to 'mysql-test')
40 files changed, 408 insertions, 274 deletions
diff --git a/mysql-test/CMakeLists.txt b/mysql-test/CMakeLists.txt index b8eb11b2fea..3c38e5772d0 100644 --- a/mysql-test/CMakeLists.txt +++ b/mysql-test/CMakeLists.txt @@ -13,6 +13,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +IF(INSTALL_MYSQLTESTDIR) INSTALL( DIRECTORY . DESTINATION ${INSTALL_MYSQLTESTDIR} @@ -28,6 +29,7 @@ INSTALL( PATTERN "*.am" EXCLUDE PATTERN "*.in" EXCLUDE ) +ENDIF() @@ -48,9 +50,11 @@ IF(UNIX) ./mysql-test-run.pl mysql-test-run WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mtr - ${CMAKE_CURRENT_BINARY_DIR}/mysql-test-run - DESTINATION ${INSTALL_MYSQLTESTDIR}) + IF(INSTALL_MYSQLTESTDIR) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mtr + ${CMAKE_CURRENT_BINARY_DIR}/mysql-test-run + DESTINATION ${INSTALL_MYSQLTESTDIR}) + ENDIF() ENDIF() IF(CMAKE_GENERATOR MATCHES "Visual Studio") diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 7609a4799e3..a8047ae9ed9 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -92,5 +92,3 @@ parts.partition_mgm_lc1_ndb # joro : NDB tests marked as experiment parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin -main.mysqlhotcopy_myisam # horst: due to bug#54129 -main.mysqlhotcopy_archive # horst: due to bug#54129 diff --git a/mysql-test/extra/binlog_tests/binlog_insert_delayed.test b/mysql-test/extra/binlog_tests/binlog_insert_delayed.test index c99d0b86be3..2526b2dd149 100644 --- a/mysql-test/extra/binlog_tests/binlog_insert_delayed.test +++ b/mysql-test/extra/binlog_tests/binlog_insert_delayed.test @@ -52,13 +52,19 @@ inc $count; FLUSH TABLES; source include/show_binlog_events.inc; -insert delayed into t1 values (null),(null),(null),(null); +RESET MASTER; +insert /* before delayed */ delayed /* after delayed */ into t1 values (null),(null),(null),(null); inc $count; inc $count; inc $count; inc $count; --source include/wait_until_rows_count.inc -insert delayed into t1 values (null),(null),(400),(null); +insert /*! delayed */ into t1 values (null),(null),(400),(null); inc $count; inc $count; inc $count; inc $count; --source include/wait_until_rows_count.inc +if (`SELECT @@SESSION.BINLOG_FORMAT = 'STATEMENT'`) { + FLUSH TABLES; + source include/show_binlog_events.inc; +} + select * from t1; drop table t1; diff --git a/mysql-test/extra/rpl_tests/create_recursive_construct.inc b/mysql-test/extra/rpl_tests/create_recursive_construct.inc index 48146769ae3..12693e752fe 100644 --- a/mysql-test/extra/rpl_tests/create_recursive_construct.inc +++ b/mysql-test/extra/rpl_tests/create_recursive_construct.inc @@ -338,10 +338,21 @@ if ($CRC_RET_stmt_sidef) { SHOW BINLOG EVENTS; --die Warnings printed } - # The first event is format_description, the second is - # Query_event('BEGIN'), and the third should be our Table_map. --let $event_type= query_get_value(SHOW BINLOG EVENTS, Event_type, 3) - if (`SELECT '$event_type' != 'Table_map'`) { + # The first event is format_description, the second is + # Query_event('BEGIN'), and the third should be our Query + # for 'INSERT DELAYED' unsafe_type 3, which is safe after + # the fix of bug#54579. + if (`SELECT $unsafe_type = 3 AND '$event_type' != 'Query'`) { + --enable_query_log + --echo ******** Failure! Event number 3 was a '$event_type', not a 'Query'. ******** + SHOW BINLOG EVENTS; + --die Wrong events in binlog. + } + # The first event is format_description, the second is + # Query_event('BEGIN'), and the third should be our Table_map + # for unsafe statement. + if (`SELECT $unsafe_type != 3 AND '$event_type' != 'Table_map'`) { --enable_query_log --echo ******** Failure! Event number 3 was a '$event_type', not a 'Table_map'. ******** SHOW BINLOG EVENTS; diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf index 46fdda7df84..f83b671b5dc 100644 --- a/mysql-test/include/default_mysqld.cnf +++ b/mysql-test/include/default_mysqld.cnf @@ -43,5 +43,11 @@ log-bin=mysqld-bin # Run tests with the performance schema instrumentation loose-enable-performance-schema +# Run tests with a small number of instrumented objects +# to limit memory consumption with MTR +loose-performance-schema-max-mutex-instances=10000 +loose-performance-schema-max-rwlock-instances=10000 +loose-performance-schema-max-table-instances=500 +loose-performance-schema-max-table-handles=1000 binlog-direct-non-transactional-updates diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 9ba1ae489ca..f2c26110d8a 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -1200,6 +1200,8 @@ set time_zone= @@global.time_zone; select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE; str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE NULL +Warnings: +Warning 1411 Incorrect datetime value: '10:00 PM' for function str_to_date create table t1 (field DATE); insert into t1 values ('2006-11-06'); select * from t1 where field < '2006-11-06 04:08:36.0'; diff --git a/mysql-test/r/parser.result b/mysql-test/r/parser.result index 467bb7c5cb8..1ea9e91df8a 100644 --- a/mysql-test/r/parser.result +++ b/mysql-test/r/parser.result @@ -556,9 +556,13 @@ DROP TABLE IF EXISTS t1; SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE; STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE NULL +Warnings: +Warning 1411 Incorrect datetime value: '10:00 PM' for function str_to_date SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE; STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE NULL +Warnings: +Warning 1411 Incorrect datetime value: '10:00 PM' for function str_to_date SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND; "1997-12-31 23:59:59" + INTERVAL 1 SECOND 1998-01-01 00:00:00 diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 4ec7a72d7c5..96979d257f1 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -4171,9 +4171,10 @@ str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00' set SQL_MODE=TRADITIONAL; select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'; str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34' -0 +NULL Warnings: Warning 1292 Truncated incorrect datetime value: '2007-10-00 12:34' +Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date select str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'; str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34' 0 @@ -4181,17 +4182,16 @@ Warnings: Warning 1292 Truncated incorrect datetime value: '2007-10-00 12:34' select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34'; str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34' -0 +NULL Warnings: -Warning 1292 Truncated incorrect datetime value: '2007-10-00 12:34:00' +Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01' and '2007/10/20'; str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01' and '2007/10/20' -0 +NULL Warnings: -Warning 1292 Incorrect datetime value: '2007-10-00' for column '2007/09/01' at row 1 -Warning 1292 Incorrect datetime value: '2007-10-00' for column '2007/10/20' at row 1 +Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date set SQL_MODE=DEFAULT; select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'; str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20' diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 79f8c20a150..872bfdc4873 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -206,12 +206,11 @@ INSERT INTO t1 (col1) VALUES (STR_TO_DATE('15.10.2004','%d.%m.%Y')); INSERT INTO t1 (col2) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i')); INSERT INTO t1 (col3) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i')); INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); -Warnings: -Note 1265 Data truncated for column 'col1' at row 1 +ERROR HY000: Incorrect datetime value: '31.10.0000 15.30' for function str_to_date INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); -ERROR 22007: Incorrect date value: '2004-00-31 15:30:00' for column 'col1' at row 1 +ERROR HY000: Incorrect datetime value: '31.0.2004 15.30' for function str_to_date INSERT INTO t1 (col1) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); -ERROR 22007: Incorrect date value: '2004-10-00 15:30:00' for column 'col1' at row 1 +ERROR HY000: Incorrect datetime value: '0.10.2004 15.30' for function str_to_date INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.9.2004 15.30','%d.%m.%Y %H.%i')); ERROR 22007: Incorrect date value: '2004-09-31 15:30:00' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i')); @@ -221,12 +220,13 @@ ERROR 22007: Incorrect date value: '2003-02-29 15:30:00' for column 'col1' at ro INSERT INTO t1 (col1) VALUES(STR_TO_DATE('15.13.2004 15.30','%d.%m.%Y %H.%i')); ERROR HY000: Incorrect datetime value: '15.13.2004 15.30' for function str_to_date INSERT INTO t1 (col1) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y')); -ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1 +ERROR HY000: Incorrect datetime value: '00.00.0000' for function str_to_date INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); +ERROR HY000: Incorrect datetime value: '31.10.0000 15.30' for function str_to_date INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); -ERROR 22007: Incorrect datetime value: '2004-00-31 15:30:00' for column 'col2' at row 1 +ERROR HY000: Incorrect datetime value: '31.0.2004 15.30' for function str_to_date INSERT INTO t1 (col2) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); -ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col2' at row 1 +ERROR HY000: Incorrect datetime value: '0.10.2004 15.30' for function str_to_date INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.9.2004 15.30','%d.%m.%Y %H.%i')); ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i')); @@ -236,13 +236,13 @@ ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column 'col2' a INSERT INTO t1 (col2) VALUES(STR_TO_DATE('15.13.2004 15.30','%d.%m.%Y %H.%i')); ERROR HY000: Incorrect datetime value: '15.13.2004 15.30' for function str_to_date INSERT INTO t1 (col2) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y')); -ERROR 22007: Incorrect datetime value: '0000-00-00' for column 'col2' at row 1 +ERROR HY000: Incorrect datetime value: '00.00.0000' for function str_to_date INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); -ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1 +ERROR HY000: Incorrect datetime value: '31.10.0000 15.30' for function str_to_date INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); -ERROR 22007: Incorrect datetime value: '2004-00-31 15:30:00' for column 'col3' at row 1 +ERROR HY000: Incorrect datetime value: '31.0.2004 15.30' for function str_to_date INSERT INTO t1 (col3) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); -ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col3' at row 1 +ERROR HY000: Incorrect datetime value: '0.10.2004 15.30' for function str_to_date INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.9.2004 15.30','%d.%m.%Y %H.%i')); ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column 'col3' at row 1 INSERT INTO t1 (col3) VALUES(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i')); @@ -252,7 +252,7 @@ ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column 'col3' a INSERT INTO t1 (col3) VALUES(STR_TO_DATE('15.13.2004 15.30','%d.%m.%Y %H.%i')); ERROR HY000: Incorrect datetime value: '15.13.2004 15.30' for function str_to_date INSERT INTO t1 (col3) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y')); -ERROR 22007: Incorrect datetime value: '0000-00-00' for column 'col3' at row 1 +ERROR HY000: Incorrect datetime value: '00.00.0000' for function str_to_date drop table t1; CREATE TABLE t1 (col1 date, col2 datetime, col3 timestamp); INSERT INTO t1 (col1) VALUES (CAST('2004-10-15' AS DATE)); @@ -1108,6 +1108,9 @@ Warnings: Warning 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date Warning 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date Warning 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date +Warning 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date +Warning 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date +Warning 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date drop table t1; create table t1 (col1 char(3), col2 integer); insert into t1 (col1) values (cast(1000 as char(3))); diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index a054659abe9..f7bfba0accd 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -655,5 +655,30 @@ Note 1003 select `test`.`t1`.`Id` AS `Id`,`test`.`t1`.`AtTime` AS `AtTime` from DROP TABLE t1; SET NAMES latin1; # +# Bug#56271: Wrong comparison result with STR_TO_DATE function +# +CREATE TABLE t1 ( +`year` int(4) NOT NULL, +`month` int(2) NOT NULL +); +INSERT INTO t1 VALUES (2010,3),(2010,4),(2009,8),(2008,9); +SELECT * +FROM t1 +WHERE STR_TO_DATE(CONCAT_WS('/01/',`month`,`year`), '%m/%d/%Y') >= +STR_TO_DATE('1/1/2010', '%m/%d/%Y'); +year month +2010 3 +2010 4 +create table t2(f1 datetime primary key); +insert into t2 select STR_TO_DATE(CONCAT_WS('/01/',`month`,`year`), '%m/%d/%Y') from t1; +select * from t2 where f1=STR_TO_DATE('4/1/2010', '%m/%d/%Y'); +f1 +2010-04-01 00:00:00 +t2 should be const +explain select * from t2 where f1=STR_TO_DATE('4/1/2010', '%m/%d/%Y'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 const PRIMARY PRIMARY 8 const 1 Using index +DROP TABLE t1,t2; +# # End of 5.5 tests # diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index e5fbf158a8b..819e41f41c5 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -1908,4 +1908,16 @@ group by PAY.id + 1; mult v_net_with_discount v_total 1.0000 27.18 27.180000 DROP TABLE currencies, payments, sub_tasks; +# +# BUG#52171: distinct aggregates on unsigned decimal fields trigger assertions +# +CREATE TABLE t1 (a DECIMAL(4,4) UNSIGNED); +INSERT INTO t1 VALUES (0); +SELECT AVG(DISTINCT a) FROM t1; +AVG(DISTINCT a) +0.00000000 +SELECT SUM(DISTINCT a) FROM t1; +SUM(DISTINCT a) +0.0000 +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result index 3c4668b72bb..e45f4a76643 100644 --- a/mysql-test/suite/binlog/r/binlog_row_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result @@ -1267,8 +1267,9 @@ master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; FLUSH TABLES -insert delayed into t1 values (null),(null),(null),(null); -insert delayed into t1 values (null),(null),(400),(null); +RESET MASTER; +insert /* before delayed */ delayed /* after delayed */ into t1 values (null),(null),(null),(null); +insert /*! delayed */ into t1 values (null),(null),(400),(null); select * from t1; a 207 diff --git a/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result b/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result index e081bed40e6..2219961aca0 100644 --- a/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result +++ b/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result @@ -20,12 +20,21 @@ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert delayed into t1 values (300) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; FLUSH TABLES -insert delayed into t1 values (null),(null),(null),(null); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. -insert delayed into t1 values (null),(null),(400),(null); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. +RESET MASTER; +insert /* before delayed */ delayed /* after delayed */ into t1 values (null),(null),(null),(null); +insert /*! delayed */ into t1 values (null),(null),(400),(null); +FLUSH TABLES; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Intvar # # INSERT_ID=301 +master-bin.000001 # Query # # use `test`; insert /* before delayed */ /* after delayed */ into t1 values (null),(null),(null),(null) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Intvar # # INSERT_ID=305 +master-bin.000001 # Query # # use `test`; insert /*! */ into t1 values (null),(null),(400),(null) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # use `test`; FLUSH TABLES select * from t1; a 207 diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result index b96707f994c..187a778d9cc 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result @@ -758,8 +758,9 @@ master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; FLUSH TABLES -insert delayed into t1 values (null),(null),(null),(null); -insert delayed into t1 values (null),(null),(400),(null); +RESET MASTER; +insert /* before delayed */ delayed /* after delayed */ into t1 values (null),(null),(null),(null); +insert /*! delayed */ into t1 values (null),(null),(400),(null); select * from t1; a 207 diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result index ba361e59428..7222f384a1f 100644 --- a/mysql-test/suite/binlog/r/binlog_unsafe.result +++ b/mysql-test/suite/binlog/r/binlog_unsafe.result @@ -862,65 +862,51 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc * Invoke statement so that return value is dicarded: expect no warning. SELECT * FROM data_table LIMIT 1; -==== Testing INSERT DELAYED unsafeness ==== +==== Testing INSERT DELAYED safeness after BUG#54579 is fixed ==== Invoking function func_sidef_1 invoking unsafe INSERT DELAYED statement. CREATE FUNCTION func_sidef_1() RETURNS VARCHAR(100) BEGIN INSERT INTO ta1 VALUES (47); INSERT DELAYED INTO t0 VALUES (1), (2); RETURN 0; END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO t1 SELECT func_sidef_1(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. Invoking function func_sidef_2 invoking function func_sidef_1 invoking unsafe INSERT DELAYED statement. CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); RETURN 0; END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO t2 SELECT func_sidef_2(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP FUNCTION func_sidef_2; Invoking procedure proc_2 invoking function func_sidef_1 invoking unsafe INSERT DELAYED statement. CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT func_sidef_1(); INSERT INTO ta2 VALUES (47); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. CALL proc_2(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP PROCEDURE proc_2; Invoking trigger trig_2 invoking function func_sidef_1 invoking unsafe INSERT DELAYED statement. CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO trigger_table_2 VALUES (1); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP TRIGGER trig_2; Invoking view view_sidef_2 invoking function func_sidef_1 invoking unsafe INSERT DELAYED statement. CREATE VIEW view_sidef_2 AS SELECT func_sidef_1(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO t2 SELECT * FROM view_sidef_2; -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP VIEW view_sidef_2; Invoking prepared statement prep_2 invoking function func_sidef_1 invoking unsafe INSERT DELAYED statement. PREPARE prep_2 FROM "INSERT INTO t1 SELECT func_sidef_1()"; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. EXECUTE prep_2; -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP PREPARE prep_2; @@ -928,49 +914,39 @@ DROP FUNCTION func_sidef_1; Invoking procedure proc_1 invoking unsafe INSERT DELAYED statement. CREATE PROCEDURE proc_1() BEGIN INSERT DELAYED INTO t0 VALUES (1), (2); INSERT INTO ta1 VALUES (47); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. CALL proc_1(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. Invoking function func_sidef_2 invoking procedure proc_1 invoking unsafe INSERT DELAYED statement. CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); RETURN 0; END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO t2 SELECT func_sidef_2(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP FUNCTION func_sidef_2; Invoking procedure proc_2 invoking procedure proc_1 invoking unsafe INSERT DELAYED statement. CREATE PROCEDURE proc_2() BEGIN CALL proc_1(); INSERT INTO ta2 VALUES (47); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. CALL proc_2(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP PROCEDURE proc_2; Invoking trigger trig_2 invoking procedure proc_1 invoking unsafe INSERT DELAYED statement. CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO trigger_table_2 VALUES (1); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP TRIGGER trig_2; Invoking prepared statement prep_2 invoking procedure proc_1 invoking unsafe INSERT DELAYED statement. PREPARE prep_2 FROM "CALL proc_1()"; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. EXECUTE prep_2; -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP PREPARE prep_2; @@ -978,49 +954,39 @@ DROP PROCEDURE proc_1; Invoking trigger trig_1 invoking unsafe INSERT DELAYED statement. CREATE TRIGGER trig_1 BEFORE INSERT ON trigger_table_1 FOR EACH ROW BEGIN INSERT INTO ta1 VALUES (47); INSERT DELAYED INTO t0 VALUES (1), (2); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO trigger_table_1 VALUES (1); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. Invoking function func_sidef_2 invoking trigger trig_1 invoking unsafe INSERT DELAYED statement. CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); RETURN 0; END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO t2 SELECT func_sidef_2(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP FUNCTION func_sidef_2; Invoking procedure proc_2 invoking trigger trig_1 invoking unsafe INSERT DELAYED statement. CREATE PROCEDURE proc_2() BEGIN INSERT INTO trigger_table_1 VALUES (1); INSERT INTO ta2 VALUES (47); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. CALL proc_2(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP PROCEDURE proc_2; Invoking trigger trig_2 invoking trigger trig_1 invoking unsafe INSERT DELAYED statement. CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO trigger_table_2 VALUES (1); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP TRIGGER trig_2; Invoking prepared statement prep_2 invoking trigger trig_1 invoking unsafe INSERT DELAYED statement. PREPARE prep_2 FROM "INSERT INTO trigger_table_1 VALUES (1)"; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. EXECUTE prep_2; -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP PREPARE prep_2; @@ -1028,19 +994,15 @@ DROP TRIGGER trig_1; Invoking prepared statement prep_1 invoking unsafe INSERT DELAYED statement. PREPARE prep_1 FROM "INSERT DELAYED INTO t0 VALUES (1), (2)"; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. EXECUTE prep_1; -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP PREPARE prep_1; Invoking unsafe INSERT DELAYED statement. -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT DELAYED INTO t0 VALUES (1), (2); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. @@ -1798,11 +1760,10 @@ SELECT COUNT(*) FROM mysql.general_log; Invoking function func_sidef_1 invoking statement that is unsafe in many ways. CREATE FUNCTION func_sidef_1() RETURNS VARCHAR(100) BEGIN INSERT INTO ta1 VALUES (47); INSERT DELAYED INTO double_autoinc_table SELECT CONCAT(UUID(), @@hostname, myfunc_int(), NULL) FROM mysql.general_log LIMIT 1; RETURN 0; END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO t1 SELECT func_sidef_1(); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1813,11 +1774,10 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc Invoking function func_sidef_2 invoking function func_sidef_1 invoking statement that is unsafe in many ways. CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); RETURN 0; END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO t2 SELECT func_sidef_2(); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1829,11 +1789,10 @@ DROP FUNCTION func_sidef_2; Invoking procedure proc_2 invoking function func_sidef_1 invoking statement that is unsafe in many ways. CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT func_sidef_1(); INSERT INTO ta2 VALUES (47); END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. CALL proc_2(); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1845,11 +1804,10 @@ DROP PROCEDURE proc_2; Invoking trigger trig_2 invoking function func_sidef_1 invoking statement that is unsafe in many ways. CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO trigger_table_2 VALUES (1); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1863,17 +1821,15 @@ Invoking view view_sidef_2 invoking function func_sidef_1 invoking statement tha CREATE VIEW view_sidef_2 AS SELECT func_sidef_1(); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. 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. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO t2 SELECT * FROM view_sidef_2; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1885,11 +1841,10 @@ DROP VIEW view_sidef_2; Invoking prepared statement prep_2 invoking function func_sidef_1 invoking statement that is unsafe in many ways. PREPARE prep_2 FROM "INSERT INTO t1 SELECT func_sidef_1()"; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. EXECUTE prep_2; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1902,11 +1857,10 @@ DROP FUNCTION func_sidef_1; Invoking procedure proc_1 invoking statement that is unsafe in many ways. CREATE PROCEDURE proc_1() BEGIN INSERT DELAYED INTO double_autoinc_table SELECT CONCAT(UUID(), @@hostname, myfunc_int(), NULL) FROM mysql.general_log LIMIT 1; INSERT INTO ta1 VALUES (47); END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. CALL proc_1(); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1917,11 +1871,10 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc Invoking function func_sidef_2 invoking procedure proc_1 invoking statement that is unsafe in many ways. CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); RETURN 0; END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO t2 SELECT func_sidef_2(); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1933,11 +1886,10 @@ DROP FUNCTION func_sidef_2; Invoking procedure proc_2 invoking procedure proc_1 invoking statement that is unsafe in many ways. CREATE PROCEDURE proc_2() BEGIN CALL proc_1(); INSERT INTO ta2 VALUES (47); END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. CALL proc_2(); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1949,11 +1901,10 @@ DROP PROCEDURE proc_2; Invoking trigger trig_2 invoking procedure proc_1 invoking statement that is unsafe in many ways. CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO trigger_table_2 VALUES (1); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1965,11 +1916,10 @@ DROP TRIGGER trig_2; Invoking prepared statement prep_2 invoking procedure proc_1 invoking statement that is unsafe in many ways. PREPARE prep_2 FROM "CALL proc_1()"; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. EXECUTE prep_2; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1982,11 +1932,10 @@ DROP PROCEDURE proc_1; Invoking trigger trig_1 invoking statement that is unsafe in many ways. CREATE TRIGGER trig_1 BEFORE INSERT ON trigger_table_1 FOR EACH ROW BEGIN INSERT INTO ta1 VALUES (47); INSERT DELAYED INTO double_autoinc_table SELECT CONCAT(UUID(), @@hostname, myfunc_int(), NULL) FROM mysql.general_log LIMIT 1; END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO trigger_table_1 VALUES (1); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1997,11 +1946,10 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc Invoking function func_sidef_2 invoking trigger trig_1 invoking statement that is unsafe in many ways. CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); RETURN 0; END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO t2 SELECT func_sidef_2(); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -2013,11 +1961,10 @@ DROP FUNCTION func_sidef_2; Invoking procedure proc_2 invoking trigger trig_1 invoking statement that is unsafe in many ways. CREATE PROCEDURE proc_2() BEGIN INSERT INTO trigger_table_1 VALUES (1); INSERT INTO ta2 VALUES (47); END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. CALL proc_2(); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -2029,11 +1976,10 @@ DROP PROCEDURE proc_2; Invoking trigger trig_2 invoking trigger trig_1 invoking statement that is unsafe in many ways. CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO trigger_table_2 VALUES (1); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -2045,11 +1991,10 @@ DROP TRIGGER trig_2; Invoking prepared statement prep_2 invoking trigger trig_1 invoking statement that is unsafe in many ways. PREPARE prep_2 FROM "INSERT INTO trigger_table_1 VALUES (1)"; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. EXECUTE prep_2; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -2062,11 +2007,10 @@ DROP TRIGGER trig_1; Invoking prepared statement prep_1 invoking statement that is unsafe in many ways. PREPARE prep_1 FROM "INSERT DELAYED INTO double_autoinc_table SELECT CONCAT(UUID(), @@hostname, myfunc_int(), NULL) FROM mysql.general_log LIMIT 1"; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. EXECUTE prep_1; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -2077,11 +2021,10 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc DROP PREPARE prep_1; Invoking statement that is unsafe in many ways. -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT DELAYED INTO double_autoinc_table SELECT CONCAT(UUID(), @@hostname, myfunc_int(), NULL) FROM mysql.general_log LIMIT 1; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -2554,8 +2497,7 @@ func_limit() show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; INSERT DELAYED INTO t1 VALUES (1), (2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) diff --git a/mysql-test/suite/binlog/t/binlog_unsafe.test b/mysql-test/suite/binlog/t/binlog_unsafe.test index 87c171c8aa0..5c649477dd8 100644 --- a/mysql-test/suite/binlog/t/binlog_unsafe.test +++ b/mysql-test/suite/binlog/t/binlog_unsafe.test @@ -179,13 +179,13 @@ while (`SELECT $unsafe_type < 9`) { } if (`SELECT $unsafe_type = 3`) { - --echo ==== Testing INSERT DELAYED unsafeness ==== + --echo ==== Testing INSERT DELAYED safeness after BUG#54579 is fixed ==== --let $desc_0= unsafe INSERT DELAYED statement --let $stmt_sidef_0= INSERT DELAYED INTO t0 VALUES (1), (2) --let $value_0= --let $sel_sidef_0= --let $sel_retval_0= - --let $CRC_ARG_expected_number_of_warnings= 1 + --let $CRC_ARG_expected_number_of_warnings= 0 } if (`SELECT $unsafe_type = 4`) { @@ -227,7 +227,7 @@ while (`SELECT $unsafe_type < 9`) { --let $value_0= --let $sel_sidef_0= --let $sel_retval_0= - --let $CRC_ARG_expected_number_of_warnings= 7 + --let $CRC_ARG_expected_number_of_warnings= 6 } if (`SELECT $unsafe_type = 8`) { diff --git a/mysql-test/suite/perfschema/include/upgrade_check.inc b/mysql-test/suite/perfschema/include/upgrade_check.inc index 935a71ab065..3620e80002f 100644 --- a/mysql-test/suite/perfschema/include/upgrade_check.inc +++ b/mysql-test/suite/perfschema/include/upgrade_check.inc @@ -18,7 +18,7 @@ # --error 1 ---exec $MYSQL_UPGRADE --skip-verbose > $out_file 2> $err_file +--exec $MYSQL_UPGRADE --skip-verbose --force > $out_file 2> $err_file # Verify that mysql_upgrade complained about the performance_schema --cat_file $err_file diff --git a/mysql-test/suite/perfschema/r/checksum.result b/mysql-test/suite/perfschema/r/checksum.result new file mode 100644 index 00000000000..323cb303dae --- /dev/null +++ b/mysql-test/suite/perfschema/r/checksum.result @@ -0,0 +1,34 @@ +checksum table performance_schema.COND_INSTANCES; +checksum table performance_schema.EVENTS_WAITS_CURRENT; +checksum table performance_schema.EVENTS_WAITS_HISTORY; +checksum table performance_schema.EVENTS_WAITS_HISTORY_LONG; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME; +checksum table performance_schema.FILE_INSTANCES; +checksum table performance_schema.FILE_SUMMARY_BY_EVENT_NAME; +checksum table performance_schema.FILE_SUMMARY_BY_INSTANCE; +checksum table performance_schema.MUTEX_INSTANCES; +checksum table performance_schema.PERFORMANCE_TIMERS; +checksum table performance_schema.RWLOCK_INSTANCES; +checksum table performance_schema.SETUP_CONSUMERS; +checksum table performance_schema.SETUP_INSTRUMENTS; +checksum table performance_schema.SETUP_TIMERS; +checksum table performance_schema.THREADS; +checksum table performance_schema.COND_INSTANCES extended; +checksum table performance_schema.EVENTS_WAITS_CURRENT extended; +checksum table performance_schema.EVENTS_WAITS_HISTORY extended; +checksum table performance_schema.EVENTS_WAITS_HISTORY_LONG extended; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE extended; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME extended; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME extended; +checksum table performance_schema.FILE_INSTANCES extended; +checksum table performance_schema.FILE_SUMMARY_BY_EVENT_NAME extended; +checksum table performance_schema.FILE_SUMMARY_BY_INSTANCE extended; +checksum table performance_schema.MUTEX_INSTANCES extended; +checksum table performance_schema.PERFORMANCE_TIMERS extended; +checksum table performance_schema.RWLOCK_INSTANCES extended; +checksum table performance_schema.SETUP_CONSUMERS extended; +checksum table performance_schema.SETUP_INSTRUMENTS extended; +checksum table performance_schema.SETUP_TIMERS extended; +checksum table performance_schema.THREADS extended; diff --git a/mysql-test/suite/perfschema/r/server_init.result b/mysql-test/suite/perfschema/r/server_init.result index 5f3b071484d..0c1e06d157c 100644 --- a/mysql-test/suite/perfschema/r/server_init.result +++ b/mysql-test/suite/perfschema/r/server_init.result @@ -116,18 +116,10 @@ where name like "wait/synch/mutex/sql/LOCK_rpl_status"; count(name) 1 select count(name) from MUTEX_INSTANCES -where name like "wait/synch/mutex/sql/LOG_INFO::lock"; -count(name) -1 -select count(name) from MUTEX_INSTANCES where name like "wait/synch/mutex/sql/Query_cache::structure_guard_mutex"; count(name) 1 select count(name) from MUTEX_INSTANCES -where name like "wait/synch/mutex/sql/Event_scheduler::LOCK_scheduler_state"; -count(name) -1 -select count(name) from MUTEX_INSTANCES where name like "wait/synch/mutex/sql/LOCK_event_metadata"; count(name) 1 @@ -144,15 +136,15 @@ where name like "wait/synch/mutex/sql/Cversion_lock"; count(name) 1 select count(name) from MUTEX_INSTANCES -where name like "wait/synch/mutex/sql/LOCK_xid_cache"; +where name like "wait/synch/mutex/sql/LOCK_audit_mask"; count(name) 1 select count(name) from MUTEX_INSTANCES -where name like "wait/synch/mutex/sql/LOCK_plugin"; +where name like "wait/synch/mutex/sql/LOCK_xid_cache"; count(name) 1 select count(name) from MUTEX_INSTANCES -where name like "wait/synch/mutex/sql/LOCK_gdl"; +where name like "wait/synch/mutex/sql/LOCK_plugin"; count(name) 1 select count(name) from MUTEX_INSTANCES @@ -212,10 +204,6 @@ where name like "wait/synch/cond/sql/Query_cache::COND_cache_status_changed"; count(name) 1 select count(name) from COND_INSTANCES -where name like "wait/synch/cond/sql/Event_scheduler::COND_state"; -count(name) -1 -select count(name) from COND_INSTANCES where name like "wait/synch/cond/sql/COND_queue_state"; count(name) 1 diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result index 0241313863d..d03e227fc83 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result @@ -45,11 +45,11 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000000 +performance_schema_max_mutex_instances 10000 performance_schema_max_rwlock_classes 30 -performance_schema_max_rwlock_instances 1000000 -performance_schema_max_table_handles 100000 -performance_schema_max_table_instances 50000 +performance_schema_max_rwlock_instances 10000 +performance_schema_max_table_handles 1000 +performance_schema_max_table_instances 500 performance_schema_max_thread_classes 50 performance_schema_max_thread_instances 1000 show engine PERFORMANCE_SCHEMA status; diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result index fe3e5646218..812dc329aaf 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result @@ -45,11 +45,11 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000000 +performance_schema_max_mutex_instances 10000 performance_schema_max_rwlock_classes 30 -performance_schema_max_rwlock_instances 1000000 -performance_schema_max_table_handles 100000 -performance_schema_max_table_instances 50000 +performance_schema_max_rwlock_instances 10000 +performance_schema_max_table_handles 1000 +performance_schema_max_table_instances 500 performance_schema_max_thread_classes 50 performance_schema_max_thread_instances 1000 show engine PERFORMANCE_SCHEMA status; diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_class.result b/mysql-test/suite/perfschema/r/start_server_no_file_class.result index 974d933ed8d..7ef247e0755 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_file_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_file_class.result @@ -45,11 +45,11 @@ performance_schema_max_file_classes 0 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000000 +performance_schema_max_mutex_instances 10000 performance_schema_max_rwlock_classes 30 -performance_schema_max_rwlock_instances 1000000 -performance_schema_max_table_handles 100000 -performance_schema_max_table_instances 50000 +performance_schema_max_rwlock_instances 10000 +performance_schema_max_table_handles 1000 +performance_schema_max_table_instances 500 performance_schema_max_thread_classes 50 performance_schema_max_thread_instances 1000 show engine PERFORMANCE_SCHEMA status; diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result index 303c31d1f08..301c4e44f1e 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result @@ -45,11 +45,11 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 0 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000000 +performance_schema_max_mutex_instances 10000 performance_schema_max_rwlock_classes 30 -performance_schema_max_rwlock_instances 1000000 -performance_schema_max_table_handles 100000 -performance_schema_max_table_instances 50000 +performance_schema_max_rwlock_instances 10000 +performance_schema_max_table_handles 1000 +performance_schema_max_table_instances 500 performance_schema_max_thread_classes 50 performance_schema_max_thread_instances 1000 show engine PERFORMANCE_SCHEMA status; diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result index 11b91f80b04..a1f880d3b9e 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result @@ -45,11 +45,11 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 0 -performance_schema_max_mutex_instances 1000000 +performance_schema_max_mutex_instances 10000 performance_schema_max_rwlock_classes 30 -performance_schema_max_rwlock_instances 1000000 -performance_schema_max_table_handles 100000 -performance_schema_max_table_instances 50000 +performance_schema_max_rwlock_instances 10000 +performance_schema_max_table_handles 1000 +performance_schema_max_table_instances 500 performance_schema_max_thread_classes 50 performance_schema_max_thread_instances 1000 show engine PERFORMANCE_SCHEMA status; diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result index 8cda000e36a..ab566f0703a 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result @@ -47,9 +47,9 @@ performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 performance_schema_max_mutex_instances 0 performance_schema_max_rwlock_classes 30 -performance_schema_max_rwlock_instances 1000000 -performance_schema_max_table_handles 100000 -performance_schema_max_table_instances 50000 +performance_schema_max_rwlock_instances 10000 +performance_schema_max_table_handles 1000 +performance_schema_max_table_instances 500 performance_schema_max_thread_classes 50 performance_schema_max_thread_instances 1000 show engine PERFORMANCE_SCHEMA status; diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result index 6cd7c180ddc..aabc9ec49bb 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result @@ -45,11 +45,11 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000000 +performance_schema_max_mutex_instances 10000 performance_schema_max_rwlock_classes 0 -performance_schema_max_rwlock_instances 1000000 -performance_schema_max_table_handles 100000 -performance_schema_max_table_instances 50000 +performance_schema_max_rwlock_instances 10000 +performance_schema_max_table_handles 1000 +performance_schema_max_table_instances 500 performance_schema_max_thread_classes 50 performance_schema_max_thread_instances 1000 show engine PERFORMANCE_SCHEMA status; diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result index 4393f9ea57b..5e5998a9959 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result @@ -45,11 +45,11 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000000 +performance_schema_max_mutex_instances 10000 performance_schema_max_rwlock_classes 30 performance_schema_max_rwlock_instances 0 -performance_schema_max_table_handles 100000 -performance_schema_max_table_instances 50000 +performance_schema_max_table_handles 1000 +performance_schema_max_table_instances 500 performance_schema_max_thread_classes 50 performance_schema_max_thread_instances 1000 show engine PERFORMANCE_SCHEMA status; diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result index 20e6f18a284..96c3cae97ab 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result @@ -45,11 +45,11 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000000 +performance_schema_max_mutex_instances 10000 performance_schema_max_rwlock_classes 30 -performance_schema_max_rwlock_instances 1000000 -performance_schema_max_table_handles 100000 -performance_schema_max_table_instances 50000 +performance_schema_max_rwlock_instances 10000 +performance_schema_max_table_handles 1000 +performance_schema_max_table_instances 500 performance_schema_max_thread_classes 0 performance_schema_max_thread_instances 1000 show engine PERFORMANCE_SCHEMA status; diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result index 28fe6923991..e2cf0917cbf 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result @@ -45,11 +45,11 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000000 +performance_schema_max_mutex_instances 10000 performance_schema_max_rwlock_classes 30 -performance_schema_max_rwlock_instances 1000000 -performance_schema_max_table_handles 100000 -performance_schema_max_table_instances 50000 +performance_schema_max_rwlock_instances 10000 +performance_schema_max_table_handles 1000 +performance_schema_max_table_instances 500 performance_schema_max_thread_classes 50 performance_schema_max_thread_instances 0 show engine PERFORMANCE_SCHEMA status; diff --git a/mysql-test/suite/perfschema/r/start_server_off.result b/mysql-test/suite/perfschema/r/start_server_off.result index de09d9daa07..8bf52580e77 100644 --- a/mysql-test/suite/perfschema/r/start_server_off.result +++ b/mysql-test/suite/perfschema/r/start_server_off.result @@ -45,11 +45,11 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000000 +performance_schema_max_mutex_instances 10000 performance_schema_max_rwlock_classes 30 -performance_schema_max_rwlock_instances 1000000 -performance_schema_max_table_handles 100000 -performance_schema_max_table_instances 50000 +performance_schema_max_rwlock_instances 10000 +performance_schema_max_table_handles 1000 +performance_schema_max_table_instances 500 performance_schema_max_thread_classes 50 performance_schema_max_thread_instances 1000 show engine PERFORMANCE_SCHEMA status; diff --git a/mysql-test/suite/perfschema/r/start_server_on.result b/mysql-test/suite/perfschema/r/start_server_on.result index 30546496050..15fe4e082ab 100644 --- a/mysql-test/suite/perfschema/r/start_server_on.result +++ b/mysql-test/suite/perfschema/r/start_server_on.result @@ -45,11 +45,11 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000000 +performance_schema_max_mutex_instances 10000 performance_schema_max_rwlock_classes 30 -performance_schema_max_rwlock_instances 1000000 -performance_schema_max_table_handles 100000 -performance_schema_max_table_instances 50000 +performance_schema_max_rwlock_instances 10000 +performance_schema_max_table_handles 1000 +performance_schema_max_table_instances 500 performance_schema_max_thread_classes 50 performance_schema_max_thread_instances 1000 show engine PERFORMANCE_SCHEMA status; diff --git a/mysql-test/suite/perfschema/t/checksum.test b/mysql-test/suite/perfschema/t/checksum.test new file mode 100644 index 00000000000..d7fdd7b4c2c --- /dev/null +++ b/mysql-test/suite/perfschema/t/checksum.test @@ -0,0 +1,64 @@ +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# 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 +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ + +# Tests for PERFORMANCE_SCHEMA + +--source include/not_embedded.inc +--source include/have_perfschema.inc + +# +# The checksum value itself is random (data is volatile), +# just testing that this does not crash +# +--disable_result_log + +checksum table performance_schema.COND_INSTANCES; +checksum table performance_schema.EVENTS_WAITS_CURRENT; +checksum table performance_schema.EVENTS_WAITS_HISTORY; +checksum table performance_schema.EVENTS_WAITS_HISTORY_LONG; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME; +checksum table performance_schema.FILE_INSTANCES; +checksum table performance_schema.FILE_SUMMARY_BY_EVENT_NAME; +checksum table performance_schema.FILE_SUMMARY_BY_INSTANCE; +checksum table performance_schema.MUTEX_INSTANCES; +checksum table performance_schema.PERFORMANCE_TIMERS; +checksum table performance_schema.RWLOCK_INSTANCES; +checksum table performance_schema.SETUP_CONSUMERS; +checksum table performance_schema.SETUP_INSTRUMENTS; +checksum table performance_schema.SETUP_TIMERS; +checksum table performance_schema.THREADS; + +checksum table performance_schema.COND_INSTANCES extended; +checksum table performance_schema.EVENTS_WAITS_CURRENT extended; +checksum table performance_schema.EVENTS_WAITS_HISTORY extended; +checksum table performance_schema.EVENTS_WAITS_HISTORY_LONG extended; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE extended; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME extended; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME extended; +checksum table performance_schema.FILE_INSTANCES extended; +checksum table performance_schema.FILE_SUMMARY_BY_EVENT_NAME extended; +checksum table performance_schema.FILE_SUMMARY_BY_INSTANCE extended; +checksum table performance_schema.MUTEX_INSTANCES extended; +checksum table performance_schema.PERFORMANCE_TIMERS extended; +checksum table performance_schema.RWLOCK_INSTANCES extended; +checksum table performance_schema.SETUP_CONSUMERS extended; +checksum table performance_schema.SETUP_INSTRUMENTS extended; +checksum table performance_schema.SETUP_TIMERS extended; +checksum table performance_schema.THREADS extended; + +--enable_result_log + diff --git a/mysql-test/suite/perfschema/t/server_init.test b/mysql-test/suite/perfschema/t/server_init.test index 2e19d2c843a..cc461374a79 100644 --- a/mysql-test/suite/perfschema/t/server_init.test +++ b/mysql-test/suite/perfschema/t/server_init.test @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Sun Microsystems, Inc +# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. # # 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 @@ -10,8 +10,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# along with this program; if not, write to the Free Software Foundation, +# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA # Tests for PERFORMANCE_SCHEMA @@ -43,10 +43,6 @@ select count(name) from MUTEX_INSTANCES select count(name) from MUTEX_INSTANCES where name like "wait/synch/mutex/mysys/THR_LOCK_myisam"; -# Does not exist in mysql 5.5, 6.0 only -# select count(name) from MUTEX_INSTANCES -# where name like "wait/synch/mutex/mysys/THR_LOCK_myisam_log"; - select count(name) from MUTEX_INSTANCES where name like "wait/synch/mutex/mysys/THR_LOCK_heap"; @@ -83,11 +79,6 @@ select count(name) from MUTEX_INSTANCES select count(name) from MUTEX_INSTANCES where name like "wait/synch/mutex/sql/LOCK_delayed_insert"; -# Named LOCK_uuid_short in 6.0 only -# select count(name) from MUTEX_INSTANCES -# where name like "wait/synch/mutex/sql/LOCK_uuid_short"; - -# Named LOCK_uuid_generator in 5.5, LOCK_uuid_short in 6.0 select count(name) from MUTEX_INSTANCES where name like "wait/synch/mutex/sql/LOCK_uuid_generator"; @@ -130,14 +121,16 @@ select count(name) from MUTEX_INSTANCES select count(name) from MUTEX_INSTANCES where name like "wait/synch/mutex/sql/LOCK_rpl_status"; -select count(name) from MUTEX_INSTANCES - where name like "wait/synch/mutex/sql/LOG_INFO::lock"; +# LOG_INFO object are created on demand, and are not global. +# select count(name) from MUTEX_INSTANCES +# where name like "wait/synch/mutex/sql/LOG_INFO::lock"; select count(name) from MUTEX_INSTANCES where name like "wait/synch/mutex/sql/Query_cache::structure_guard_mutex"; -select count(name) from MUTEX_INSTANCES - where name like "wait/synch/mutex/sql/Event_scheduler::LOCK_scheduler_state"; +# The event scheduler may be disabled +# select count(name) from MUTEX_INSTANCES +# where name like "wait/synch/mutex/sql/Event_scheduler::LOCK_scheduler_state"; select count(name) from MUTEX_INSTANCES where name like "wait/synch/mutex/sql/LOCK_event_metadata"; @@ -148,16 +141,11 @@ select count(name) from MUTEX_INSTANCES select count(name) from MUTEX_INSTANCES where name like "wait/synch/mutex/sql/LOCK_user_locks"; -# Does not exist in mysql 5.5, 6.0 only -# select count(name) from MUTEX_INSTANCES -# where name like "wait/synch/mutex/sql/LOCK_mdl"; - select count(name) from MUTEX_INSTANCES where name like "wait/synch/mutex/sql/Cversion_lock"; -# Does not exist in mysql 5.5, 6.0 only -# select count(name) from MUTEX_INSTANCES -# where name like "wait/synch/mutex/sql/LOCK_audit_mask"; +select count(name) from MUTEX_INSTANCES + where name like "wait/synch/mutex/sql/LOCK_audit_mask"; select count(name) from MUTEX_INSTANCES where name like "wait/synch/mutex/sql/LOCK_xid_cache"; @@ -165,28 +153,13 @@ select count(name) from MUTEX_INSTANCES select count(name) from MUTEX_INSTANCES where name like "wait/synch/mutex/sql/LOCK_plugin"; -select count(name) from MUTEX_INSTANCES - where name like "wait/synch/mutex/sql/LOCK_gdl"; +# Not a global variable, may be destroyed already. +# select count(name) from MUTEX_INSTANCES +# where name like "wait/synch/mutex/sql/LOCK_gdl"; select count(name) from MUTEX_INSTANCES where name like "wait/synch/mutex/sql/tz_LOCK"; -# Does not exist in mysql 5.5, 6.0 only -# select count(name) from MUTEX_INSTANCES -# where name like "wait/synch/mutex/sql/slave_start"; - -# Does not exist in mysql 5.5, 6.0 only -# select count(name) from MUTEX_INSTANCES -# where name like "wait/synch/mutex/sql/BML_class::THR_LOCK_BML"; - -# Does not exist in mysql 5.5, 6.0 only -# select count(name) from MUTEX_INSTANCES -# where name like "wait/synch/mutex/sql/BML_class::THR_LOCK_BML_active"; - -# Does not exist in mysql 5.5, 6.0 only -# select count(name) from MUTEX_INSTANCES -# where name like "wait/synch/mutex/sql/BML_class::THR_LOCK_BML_get"; - # Verify that these global rwlocks have been properly initilized in sql select count(name) from RWLOCK_INSTANCES @@ -230,25 +203,10 @@ select count(name) from COND_INSTANCES select count(name) from COND_INSTANCES where name like "wait/synch/cond/sql/Query_cache::COND_cache_status_changed"; -select count(name) from COND_INSTANCES - where name like "wait/synch/cond/sql/Event_scheduler::COND_state"; +# The event scheduler may be disabled +# select count(name) from COND_INSTANCES +# where name like "wait/synch/cond/sql/Event_scheduler::COND_state"; select count(name) from COND_INSTANCES where name like "wait/synch/cond/sql/COND_queue_state"; -# Does not exist in mysql 5.5, 6.0 only -# select count(name) from COND_INSTANCES -# where name like "wait/synch/cond/sql/COND_mdl"; - -# Does not exist in mysql 5.5, 6.0 only -# select count(name) from COND_INSTANCES -# where name like "wait/synch/cond/sql/BML_class::COND_BML"; - -# Does not exist in mysql 5.5, 6.0 only -# select count(name) from COND_INSTANCES -# where name like "wait/synch/cond/sql/BML_class::COND_BML_registered"; - -# Does not exist in mysql 5.5, 6.0 only -# select count(name) from COND_INSTANCES -# where name like "wait/synch/cond/sql/BML_class::COND_BML_release"; - diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index f864139495a..2ed7e087667 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -11,7 +11,6 @@ ############################################################################## rpl_failed_optimize : WL#4284: Can't optimize table used by a pending transaction (there is metadata lock on the table). -rpl_plugin_load : Bug#55966 2010-08-13 alik "plugin" tests fail in 5.5 rpl_read_only : WL#4284: Setting Read only won't succeed until all metadata locks are released. rpl_row_create_table : Bug#51574 2010-02-27 andrei failed different way than earlier with bug#45576 rpl_spec_variables : BUG#47661 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 8a1f91086d2..d35d612f93c 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -11,10 +11,9 @@ ############################################################################## kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enough for pushbuild. lowercase_table3 : Bug#54845 2010-06-30 alik main.lowercase_table3 on Mac OSX +mysqlhotcopy_myisam : Bug#54129 2010-08-31 alik mysqlhotcopy* fails +mysqlhotcopy_archive : Bug#54129 2010-08-31 alik mysqlhotcopy* fails partition_innodb_plugin : Bug#53307 2010-04-30 VasilDimov valgrind warnings -plugin : Bug#55966 2010-08-13 alik "plugin" tests fail in 5.5 -plugin_load : Bug#55966 2010-08-13 alik "plugin" tests fail in 5.5 -plugin_not_embedded : Bug#55966 2010-08-13 alik "plugin" tests fail in 5.5 query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically sp_sync : Bug#48157 2010-02-06 5.5-m3 demands a differnt solution ctype_utf8mb4_ndb : Bug#55799, Bug#51907, disabled by Konstantin 2010-08-06 diff --git a/mysql-test/t/log_tables_debug.test b/mysql-test/t/log_tables_debug.test index 19a62614608..78a1289b689 100644 --- a/mysql-test/t/log_tables_debug.test +++ b/mysql-test/t/log_tables_debug.test @@ -7,6 +7,7 @@ # changed (see explanation in log_state.test) let $fixed_bug38124 = 0; +--source include/not_embedded.inc --source include/have_debug.inc # Several subtests modify global variables. Save the initial values only here, diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index 0dd324d5df2..fc522a69a3c 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -192,11 +192,11 @@ INSERT INTO t1 (col3) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i')); # All test cases expected to fail should return # SQLSTATE 22007 <invalid date value> +--error 1411 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); - ---error 1292 +--error 1411 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); ---error 1292 +--error 1411 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); --error 1292 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.9.2004 15.30','%d.%m.%Y %H.%i')); @@ -206,18 +206,18 @@ INSERT INTO t1 (col1) VALUES(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i')); INSERT INTO t1 (col1) VALUES(STR_TO_DATE('29.02.2003 15.30','%d.%m.%Y %H.%i')); --error 1411 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('15.13.2004 15.30','%d.%m.%Y %H.%i')); ---error 1292 +--error 1411 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y')); ## Test INSERT with STR_TO_DATE into DATETIME # All test cases expected to fail should return # SQLSTATE 22007 <invalid datetime value> +--error 1411 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); - ---error 1292 +--error 1411 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); ---error 1292 +--error 1411 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); --error 1292 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.9.2004 15.30','%d.%m.%Y %H.%i')); @@ -227,18 +227,18 @@ INSERT INTO t1 (col2) VALUES(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i')); INSERT INTO t1 (col2) VALUES(STR_TO_DATE('29.02.2003 15.30','%d.%m.%Y %H.%i')); --error 1411 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('15.13.2004 15.30','%d.%m.%Y %H.%i')); ---error 1292 +--error 1411 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y')); ## Test INSERT with STR_TO_DATE into TIMESTAMP # All test cases expected to fail should return # SQLSTATE 22007 <invalid datetime value> ---error 1292 +--error 1411 INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); ---error 1292 +--error 1411 INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); ---error 1292 +--error 1411 INSERT INTO t1 (col3) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); --error 1292 INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.9.2004 15.30','%d.%m.%Y %H.%i')); @@ -248,7 +248,7 @@ INSERT INTO t1 (col3) VALUES(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i')); INSERT INTO t1 (col3) VALUES(STR_TO_DATE('29.02.2003 15.30','%d.%m.%Y %H.%i')); --error 1411 INSERT INTO t1 (col3) VALUES(STR_TO_DATE('15.13.2004 15.30','%d.%m.%Y %H.%i')); ---error 1292 +--error 1411 INSERT INTO t1 (col3) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y')); drop table t1; diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test index e607823764b..6e40c9ccfa0 100644 --- a/mysql-test/t/type_datetime.test +++ b/mysql-test/t/type_datetime.test @@ -462,5 +462,28 @@ DROP TABLE t1; SET NAMES latin1; --echo # +--echo # Bug#56271: Wrong comparison result with STR_TO_DATE function +--echo # +CREATE TABLE t1 ( + `year` int(4) NOT NULL, + `month` int(2) NOT NULL +); + +INSERT INTO t1 VALUES (2010,3),(2010,4),(2009,8),(2008,9); + +SELECT * +FROM t1 +WHERE STR_TO_DATE(CONCAT_WS('/01/',`month`,`year`), '%m/%d/%Y') >= +STR_TO_DATE('1/1/2010', '%m/%d/%Y'); + +create table t2(f1 datetime primary key); +insert into t2 select STR_TO_DATE(CONCAT_WS('/01/',`month`,`year`), '%m/%d/%Y') from t1; +select * from t2 where f1=STR_TO_DATE('4/1/2010', '%m/%d/%Y'); +--echo t2 should be const +explain select * from t2 where f1=STR_TO_DATE('4/1/2010', '%m/%d/%Y'); + +DROP TABLE t1,t2; + +--echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test index 3f418a339cc..bd70e64b1ad 100644 --- a/mysql-test/t/type_newdecimal.test +++ b/mysql-test/t/type_newdecimal.test @@ -1509,5 +1509,14 @@ group by PAY.id + 1; DROP TABLE currencies, payments, sub_tasks; +--echo # +--echo # BUG#52171: distinct aggregates on unsigned decimal fields trigger assertions +--echo # + +CREATE TABLE t1 (a DECIMAL(4,4) UNSIGNED); +INSERT INTO t1 VALUES (0); +SELECT AVG(DISTINCT a) FROM t1; +SELECT SUM(DISTINCT a) FROM t1; +DROP TABLE t1; --echo End of 5.1 tests diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp index 83896378883..0d63c2cb3ff 100644 --- a/mysql-test/valgrind.supp +++ b/mysql-test/valgrind.supp @@ -745,3 +745,38 @@ Memcheck:Addr1 fun:buf_buddy_relocate } + +# +# See related Bug#56666 +# Race condition between the server main thread and the kill server thread. +# +# Because of this race condition, the call to shutdown_performance_schema() +# was commented in sql/mysqld.cc, causing the reported leaks. +# + +{ + missing shutdown_performance_schema 1 + Memcheck:Leak + fun:malloc + fun:_Z10pfs_mallocmi +} + +{ + missing shutdown_performance_schema 2 + Memcheck:Leak + fun:malloc + fun:my_malloc + fun:_lf_alloc_new + fun:lf_hash_insert +} + +{ + missing shutdown_performance_schema 3 + Memcheck:Leak + fun:malloc + fun:my_malloc + fun:initialize_bucket + fun:lf_hash_search + fun:_Z19find_or_create_fileP10PFS_threadP14PFS_file_classPKcj +} + |