mariadb/mysql-test/suite
Alfranio Correia 88b3205653 BUG#50312 Warnings for unsafe sub-statement not returned to client
After BUG#36649, warnings for sub-statements are cleared when a 
new sub-statement is started. This is problematic since it suppresses
warnings for unsafe statements in some cases. It is important that we
always give a warning to the client, because the user needs to know
when there is a risk that the slave goes out of sync.
                        
We fixed the problem by generating warning messages for unsafe statements
while returning from a stored procedure, function, trigger or while
executing a top level statement.
                        
We also started checking unsafeness when both performance and log tables are
used. This is necessary after the performance schema which does a distinction
between performance and log tables.

mysql-test/extra/rpl_tests/create_recursive_construct.inc:
  Changed the order of the calls in the procedure because the code
  that checks if a warning message is printed out expects that the
  first statement gives an warning what is not the case for INSERT
  INTO ta$CRC_ARG_level VALUES (47);
mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result:
  Updated the result file.
mysql-test/suite/binlog/r/binlog_unsafe.result:
  There are several changes here:
          
  (1) - Changed the CREATE PROCEDURE $CRC.
                                  
  (2) - The procedure $CRC was failing and the content of the binlog
        was being printed out, after fix (1) the failure disappeared.
                                  
  (3) - The warning message for unsafeness due to auto-increment collumns was
        changed.
                                  
  (4) - The warning message for unsafeness due to VERSION(), RAND() was changed.
mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test:
  Tested filters.
mysql-test/suite/binlog/t/binlog_unsafe.test:
  Reenabled the test case binlog_unsafe.
mysql-test/suite/binlog/t/disabled.def:
  Reenabled the test case binlog_unsafe.
mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result:
  Updated the result file.
mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result:
  Updated the result file.
mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result:
  Updated the result file.
sql/sql_class.cc:
  Moved the stmt_accessed_table_flag variable and related information to the
  LEX as we need the variable reset after each statement even inside a stored
  procedure, what did not happen if the information was in the THD.
          
  Changed the routine in the THD::binlog_query that prints the warning
  messages to avoid trying to print them when inside a stored procedure,
  function or trigger.
                          
  Checked for unsafeness when both performance and log tables where used.
  After the introduction of the performance schema, we need to check both.
2010-08-10 12:32:54 +01:00
..
binlog BUG#50312 Warnings for unsafe sub-statement not returned to client 2010-08-10 12:32:54 +01:00
bugs Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
engines Manual merge 2010-05-26 22:34:25 +08:00
federated Fix federated.federated_server.test. 2010-07-31 17:10:27 +04:00
funcs_1 Auto-merge from mysql-trunk-bugfixing. 2010-07-30 19:28:36 +04:00
funcs_2 merge 5.0-> 5.1 2009-04-24 13:00:17 -04:00
ibmdb2i Unset the execute bit where it's not needed. 2010-07-03 20:17:03 -03:00
innodb Fix Bug #55395 INNODB_TRX duplicates columns 2010-07-26 03:07:36 -07:00
jp WL#2360 Performance schema 2010-01-11 18:47:27 -07:00
large_tests bug#50296 2010-02-28 19:39:28 +02:00
manual Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
ndb Follow-up for Bug 23032: update NDB result files. 2010-08-09 20:52:26 +04:00
ndb_team Manual merge 2010-05-26 22:34:25 +08:00
parts WL#5349 Change default storage engine to InnoDB 2010-06-17 22:51:35 +02:00
perfschema Merge trunk-bugfixing -> trunk-runtime. 2010-07-27 18:32:42 +04:00
perfschema_stress WL#2360 Performance schema 2010-01-11 18:47:27 -07:00
rpl BUG#50312 Warnings for unsafe sub-statement not returned to client 2010-08-10 12:32:54 +01:00
rpl_ndb Disable rpl_ndb.rpl_ndb_row_implicit_commit_binlog due to Bug 55849. 2010-08-09 20:55:26 +04:00
stress Merge trift2.:/MySQL/M51/mysql-5.1 2008-02-22 16:14:27 +01:00
sys_vars WL#5486: Remove code for unsupported platforms 2010-07-15 08:13:30 -03:00