Merge lp:~tsarev/percona-server/test55_830199 into lp:percona-server/5.5

Proposed by Oleg Tsarev
Status: Merged
Approved by: Oleg Tsarev
Approved revision: no longer in the source branch.
Merged at revision: 150
Proposed branch: lp:~tsarev/percona-server/test55_830199
Merge into: lp:percona-server/5.5
Diff against target: 80 lines (+41/-10)
1 file modified
patches/slow_extended.patch (+41/-10)
To merge this branch: bzr merge lp:~tsarev/percona-server/test55_830199
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Alexey Kopytov (community) Approve
Review via email: mp+76440@code.launchpad.net

This proposal supersedes a proposal from 2011-09-21.

Description of the change

Fix bug #830199 - thd->last_errno was not updated on handle_condition (bug was introduced while porting slow_extended.patch 5.1 to 5.5)

To post a comment you must log in.
Revision history for this message
Oleg Tsarev (tsarev) wrote : Posted in a previous version of this proposal
Revision history for this message
Oleg Tsarev (tsarev) wrote : Posted in a previous version of this proposal
Revision history for this message
Oleg Tsarev (tsarev) wrote : Posted in a previous version of this proposal
Revision history for this message
Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal

Do you really need "SET GLOBAL long_query_time" in the test case? Setting only the session value seems to be enough.

review: Needs Fixing
Revision history for this message
Oleg Tsarev (tsarev) wrote :
Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'patches/slow_extended.patch'
2--- patches/slow_extended.patch 2011-09-21 08:35:45 +0000
3+++ patches/slow_extended.patch 2011-09-21 16:21:23 +0000
4@@ -549,15 +549,16 @@
5
6 /**
7 Dumps a text description of a thread, its security context
8-@@ -912,6 +943,7 @@
9+@@ -907,6 +938,8 @@
10+ const char* msg,
11+ MYSQL_ERROR ** cond_hdl)
12+ {
13++ last_errno= sql_errno;
14++
15+ if (!m_internal_handler)
16+ {
17 *cond_hdl= NULL;
18- return FALSE;
19- }
20-+ last_errno= sql_errno;
21-
22- for (Internal_error_handler *error_handler= m_internal_handler;
23- error_handler;
24-@@ -3656,6 +3688,12 @@
25+@@ -3656,6 +3689,12 @@
26 first_successful_insert_id_in_prev_stmt;
27 backup->first_successful_insert_id_in_cur_stmt=
28 first_successful_insert_id_in_cur_stmt;
29@@ -570,7 +571,7 @@
30
31 if ((!lex->requires_prelocking() || is_update_query(lex->sql_command)) &&
32 !is_current_stmt_binlog_format_row())
33-@@ -3676,6 +3714,14 @@
34+@@ -3676,6 +3715,14 @@
35 cuted_fields= 0;
36 transaction.savepoints= 0;
37 first_successful_insert_id_in_cur_stmt= 0;
38@@ -585,7 +586,7 @@
39 }
40
41
42-@@ -3738,6 +3784,12 @@
43+@@ -3738,6 +3785,12 @@
44 */
45 examined_row_count+= backup->examined_row_count;
46 cuted_fields+= backup->cuted_fields;
47@@ -2384,3 +2385,33 @@
48 +++ b/mysql-test/t/percona_log_slow_global_control_default.test
49 @@ -0,0 +1 @@
50 +SET GLOBAL slow_query_log_use_global_control=default;
51+--- /dev/null
52++++ b/mysql-test/r/percona_slow_extended_log_error.result
53+@@ -0,0 +1,9 @@
54++SET long_query_time=0;
55++DROP TABLE IF EXISTS t1;
56++CREATE TABLE t(a INT);
57++[log_start.inc] percona.slow_extended.log_error
58++CREATE TABLE t(a INT);
59++ERROR 42S01: Table 't' already exists
60++[log_stop.inc] percona.slow_extended.log_error
61++[log_grep.inc] file: percona.slow_extended.log_error pattern: Last_errno: 1050
62++[log_grep.inc] lines: 1
63+--- /dev/null
64++++ b/mysql-test/t/percona_slow_extended_log_error.test
65+@@ -0,0 +1,15 @@
66++--let log_file=percona.slow_extended.log_error
67++SET long_query_time=0;
68++--disable_warnings
69++DROP TABLE IF EXISTS t1;
70++--enable_warnings
71++CREATE TABLE t(a INT);
72++--source include/log_start.inc
73++
74++--error ER_TABLE_EXISTS_ERROR
75++CREATE TABLE t(a INT);
76++
77++--source include/log_stop.inc
78++--let grep_pattern = Last_errno: 1050
79++--source include/log_grep.inc
80++DROP TABLE t;

Subscribers

People subscribed via source and target branches