------------------------------------------------------------
revno: 2658
revision-id: aelkin@stripped
parent: aelkin@stripped
committer: Andrei Elkin <aelkin@stripped>
branch nick: 6.0-bug36968-rpl_temporary_errors_warn
timestamp: Fri 2008-06-13 23:08:27 +0300
message:
Bug #36968 rpl_temporary_errors.test produces warning in pushbuild
the 2nd patch merely adds comments for two files.
modified:
sql/log.cc
sp1f-log.cc-19700101030959-r3hdfovek4kl6nd64ovoaknmirota6bq
sql/sql_error.h
sp1f-sql_error.h-20050401120445-unbavsp7gymaljdxxndo7ubiqyxaruld
------------------------------------------------------------
revno: 2657
revision-id: aelkin@stripped
parent: sven@stripped
committer: Andrei Elkin <aelkin@stripped>
branch nick: 6.0-bug36968-rpl_temporary_errors_warn
timestamp: Fri 2008-06-13 22:56:18 +0300
message:
Bug #36968 rpl_temporary_errors.test produces warning in pushbuild
The failure was due to incorrect type of the error reporting function was invoked
at time the slave sql was about to leave.
Fixed with correcting that to use the type of logging corrsponding to the error's.
Side effect of this patch is fixes for 4 tests in pb. only recording new results and
preventing
execution (on embedded) was needed to be done.
modified:
mysql-test/include/sync_binlog_basic.inc
sp1f-sync_binlog_basic.in-20080508181314-6v7ygkyz2tb7u4q6mnxponapo7jhjw7o
mysql-test/suite/rpl/r/rpl_locktrans_innodb.result
sp1f-rpl_locktrans_innodb-20070213173920-zqxppgoqfpqx63onlykt4q5bvidtn663
mysql-test/t/rpl_slave_allow_batching_basic.test
sp1f-slave_allow_batching-20080410131405-aj6zcqpvqgihrbr7ofyryuv6zb4kvjca
mysql-test/t/rpl_slave_exec_mode_basic.test
sp1f-slave_exec_mode_basi-20080410131405-5om5dcymr7c2isqenbagszzxgsmjgam4
sql/slave.cc
sp1f-slave.cc-19700101030959-a636aj3mjxgu7fnznrg5kt77p3u2bvhh
=== modified file 'mysql-test/include/sync_binlog_basic.inc'
--- a/mysql-test/include/sync_binlog_basic.inc 2008-05-08 18:13:39 +0000
+++ b/mysql-test/include/sync_binlog_basic.inc 2008-06-13 19:56:18 +0000
@@ -23,6 +23,7 @@
# #
###############################################################################
+--source include/not_embedded.inc
--source include/load_sysvars.inc
##################################################################
=== modified file 'mysql-test/suite/rpl/r/rpl_locktrans_innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_locktrans_innodb.result 2008-06-11 16:37:06 +0000
+++ b/mysql-test/suite/rpl/r/rpl_locktrans_innodb.result 2008-06-13 19:56:18 +0000
@@ -100,12 +100,12 @@
# Implicit lock method conversion due to mix in statement.
LOCK TABLE t1 READ, t2 IN EXCLUSIVE MODE;
Warnings:
-Warning 1613 Converted to non-transactional lock on 't2'
+Warning 1614 Converted to non-transactional lock on 't2'
UNLOCK TABLES;
# Lock t1 share (converted to read), t2 write.
LOCK TABLE t1 IN SHARE MODE, t2 WRITE;
Warnings:
-Warning 1613 Converted to non-transactional lock on 't1'
+Warning 1614 Converted to non-transactional lock on 't1'
# Show t1 is read locked, t2 write locked.
INSERT INTO t1 SELECT * FROM t2;
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
@@ -116,8 +116,8 @@
# Lock t1 exclusive (converted to write), t2 share (converted to read).
LOCK TABLE t1 IN EXCLUSIVE MODE, t2 IN SHARE MODE;
Warnings:
-Warning 1613 Converted to non-transactional lock on 't1'
-Warning 1613 Converted to non-transactional lock on 't2'
+Warning 1614 Converted to non-transactional lock on 't1'
+Warning 1614 Converted to non-transactional lock on 't2'
# Show t1 is write locked, t2 read locked.
INSERT INTO t1 SELECT * FROM t2;
INSERT INTO t2 SELECT * FROM t1;
@@ -141,8 +141,8 @@
## Error is reported on first table only. Show both errors:
SHOW WARNINGS;
Level Code Message
-Error 1614 Cannot convert to non-transactional lock in strict mode on 't1'
-Error 1614 Cannot convert to non-transactional lock in strict mode on 't2'
+Error 1615 Cannot convert to non-transactional lock in strict mode on 't1'
+Error 1615 Cannot convert to non-transactional lock in strict mode on 't2'
UNLOCK TABLES;
SET @@SQL_MODE= @wl3561_save_sql_mode;
#
@@ -162,7 +162,7 @@
# Request a transactional lock, which is converted to non-transactional.
LOCK TABLE t4 IN SHARE MODE;
Warnings:
-Warning 1613 Converted to non-transactional lock on 't4'
+Warning 1614 Converted to non-transactional lock on 't4'
# Try a conflict with the existing non-transactional lock.
INSERT INTO t4 VALUES(444);
ERROR HY000: Table 't4' was locked with a READ lock and can't be updated
@@ -179,8 +179,8 @@
# Request a share lock on the view, which is converted to read locks.
LOCK TABLE v1 IN SHARE MODE;
Warnings:
-Warning 1613 Converted to non-transactional lock on 't3'
-Warning 1613 Converted to non-transactional lock on 't4'
+Warning 1614 Converted to non-transactional lock on 't3'
+Warning 1614 Converted to non-transactional lock on 't4'
# Show that read locks on the base tables prohibit writing ...
INSERT INTO t3 SELECT * FROM t4;
ERROR HY000: Table 't3' was locked with a READ lock and can't be updated
@@ -196,7 +196,7 @@
## Report conversion on view due to existing non-transactional locks.
LOCK TABLE v1 IN EXCLUSIVE MODE;
Warnings:
-Warning 1613 Converted to non-transactional lock on 'v1'
+Warning 1614 Converted to non-transactional lock on 'v1'
INSERT INTO t3 VALUES(333);
INSERT INTO t4 VALUES(444);
INSERT INTO t1 VALUES(111);
@@ -205,8 +205,8 @@
## Now report conversion on base table again.
LOCK TABLE v1 IN EXCLUSIVE MODE;
Warnings:
-Warning 1613 Converted to non-transactional lock on 't3'
-Warning 1613 Converted to non-transactional lock on 't4'
+Warning 1614 Converted to non-transactional lock on 't3'
+Warning 1614 Converted to non-transactional lock on 't4'
INSERT INTO t3 VALUES(333);
INSERT INTO t4 VALUES(444);
INSERT INTO t1 VALUES(111);
=== modified file 'mysql-test/t/rpl_slave_allow_batching_basic.test'
--- a/mysql-test/t/rpl_slave_allow_batching_basic.test 2008-05-14 23:24:13 +0000
+++ b/mysql-test/t/rpl_slave_allow_batching_basic.test 2008-06-13 19:56:18 +0000
@@ -23,6 +23,7 @@
# #
################################################################################
+--source include/not_embedded.inc
--source include/load_sysvars.inc
########################################################################
=== modified file 'mysql-test/t/rpl_slave_exec_mode_basic.test'
--- a/mysql-test/t/rpl_slave_exec_mode_basic.test 2008-05-14 23:24:13 +0000
+++ b/mysql-test/t/rpl_slave_exec_mode_basic.test 2008-06-13 19:56:18 +0000
@@ -23,6 +23,7 @@
# #
################################################################################
+--source include/not_embedded.inc
--source include/load_sysvars.inc
########################################################################
=== modified file 'sql/log.cc'
--- a/sql/log.cc 2008-06-10 22:27:52 +0000
+++ b/sql/log.cc 2008-06-13 20:08:27 +0000
@@ -97,7 +97,13 @@
return TRUE;
}
+/*
+ Array of warning report functions.
+ The functions are listed in the order defined by
+ MYSQL_ERROR::enum_warning_level.
+ @todo: merge the array with MYSQL_ERROR class
+*/
sql_print_message_func sql_print_message_handlers[3] =
{
sql_print_information,
=== modified file 'sql/slave.cc'
--- a/sql/slave.cc 2008-06-10 22:27:52 +0000
+++ b/sql/slave.cc 2008-06-13 19:56:18 +0000
@@ -2584,7 +2584,8 @@
{
if (err->code == ER_CANT_OPEN_LIBRARY)
udf_error = true;
- sql_print_warning("Slave: %s Error_code: %d",err->msg, err->code);
+ (sql_print_message_handlers[err->level])("Slave: %s Error_code: %d",
+ err->msg, err->code);
}
if (udf_error)
sql_print_error("Error loading user-defined library, slave SQL "
=== modified file 'sql/sql_error.h'
--- a/sql/sql_error.h 2007-06-07 08:53:23 +0000
+++ b/sql/sql_error.h 2008-06-13 20:08:27 +0000
@@ -16,6 +16,12 @@
class MYSQL_ERROR: public Sql_alloc
{
public:
+ /*
+ Enumeration value describing the severity of the error.
+
+ Note that these enumeration values must correspond to the indices
+ of the sql_print_message_handlers array.
+ */
enum enum_warning_level
{ WARN_LEVEL_NOTE, WARN_LEVEL_WARN, WARN_LEVEL_ERROR, WARN_LEVEL_END};
| Thread |
|---|
| • push into mysql-6.0 branch (aelkin:2657 to 2658) Bug#36968 | Andrei Elkin | 13 Jun |