Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e7669cf6
Commit
e7669cf6
authored
Aug 18, 2014
by
Jan Lindström
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.1' of github.com:MariaDB/server into 10.1
parents
8984bef2
0c5e04f0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
1 deletion
+93
-1
mysql-test/suite/sys_vars/r/slave_run_triggers_for_rbr_basic.result
.../suite/sys_vars/r/slave_run_triggers_for_rbr_basic.result
+45
-0
mysql-test/suite/sys_vars/t/slave_run_triggers_for_rbr_basic.test
...st/suite/sys_vars/t/slave_run_triggers_for_rbr_basic.test
+30
-0
sql/sql_prepare.cc
sql/sql_prepare.cc
+18
-1
No files found.
mysql-test/suite/sys_vars/r/slave_run_triggers_for_rbr_basic.result
0 → 100644
View file @
e7669cf6
SET @old_slave_run_triggers_for_rbr= @@global.slave_run_triggers_for_rbr;
SET @@global.slave_run_triggers_for_rbr= NO;
select @@global.slave_run_triggers_for_rbr;
@@global.slave_run_triggers_for_rbr
NO
SET @@global.slave_run_triggers_for_rbr= YES;
select @@global.slave_run_triggers_for_rbr;
@@global.slave_run_triggers_for_rbr
YES
SET @@global.slave_run_triggers_for_rbr= LOGGING;
select @@global.slave_run_triggers_for_rbr;
@@global.slave_run_triggers_for_rbr
LOGGING
SET @@global.slave_run_triggers_for_rbr= default;
select @@global.slave_run_triggers_for_rbr;
@@global.slave_run_triggers_for_rbr
NO
SET @@global.slave_run_triggers_for_rbr= 0;
select @@global.slave_run_triggers_for_rbr;
@@global.slave_run_triggers_for_rbr
NO
SET @@global.slave_run_triggers_for_rbr= 1;
select @@global.slave_run_triggers_for_rbr;
@@global.slave_run_triggers_for_rbr
YES
SET @@global.slave_run_triggers_for_rbr= 2;
select @@global.slave_run_triggers_for_rbr;
@@global.slave_run_triggers_for_rbr
LOGGING
SET @@global.slave_run_triggers_for_rbr= 3;
ERROR 42000: Variable 'slave_run_triggers_for_rbr' can't be set to the value of '3'
select @@global.slave_run_triggers_for_rbr;
@@global.slave_run_triggers_for_rbr
LOGGING
SET @@global.slave_run_triggers_for_rbr= "N";
ERROR 42000: Variable 'slave_run_triggers_for_rbr' can't be set to the value of 'N'
select @@global.slave_run_triggers_for_rbr;
@@global.slave_run_triggers_for_rbr
LOGGING
SET @@global.slave_run_triggers_for_rbr= -1;
ERROR 42000: Variable 'slave_run_triggers_for_rbr' can't be set to the value of '-1'
select @@global.slave_run_triggers_for_rbr;
@@global.slave_run_triggers_for_rbr
LOGGING
SET @@global.slave_run_triggers_for_rbr= @old_slave_run_triggers_for_rbr;
mysql-test/suite/sys_vars/t/slave_run_triggers_for_rbr_basic.test
0 → 100644
View file @
e7669cf6
--
source
include
/
have_rbr_triggers
.
inc
SET
@
old_slave_run_triggers_for_rbr
=
@@
global
.
slave_run_triggers_for_rbr
;
SET
@@
global
.
slave_run_triggers_for_rbr
=
NO
;
select
@@
global
.
slave_run_triggers_for_rbr
;
SET
@@
global
.
slave_run_triggers_for_rbr
=
YES
;
select
@@
global
.
slave_run_triggers_for_rbr
;
SET
@@
global
.
slave_run_triggers_for_rbr
=
LOGGING
;
select
@@
global
.
slave_run_triggers_for_rbr
;
SET
@@
global
.
slave_run_triggers_for_rbr
=
default
;
select
@@
global
.
slave_run_triggers_for_rbr
;
SET
@@
global
.
slave_run_triggers_for_rbr
=
0
;
select
@@
global
.
slave_run_triggers_for_rbr
;
SET
@@
global
.
slave_run_triggers_for_rbr
=
1
;
select
@@
global
.
slave_run_triggers_for_rbr
;
SET
@@
global
.
slave_run_triggers_for_rbr
=
2
;
select
@@
global
.
slave_run_triggers_for_rbr
;
--
error
ER_WRONG_VALUE_FOR_VAR
SET
@@
global
.
slave_run_triggers_for_rbr
=
3
;
select
@@
global
.
slave_run_triggers_for_rbr
;
--
error
ER_WRONG_VALUE_FOR_VAR
SET
@@
global
.
slave_run_triggers_for_rbr
=
"N"
;
select
@@
global
.
slave_run_triggers_for_rbr
;
--
error
ER_WRONG_VALUE_FOR_VAR
SET
@@
global
.
slave_run_triggers_for_rbr
=
-
1
;
select
@@
global
.
slave_run_triggers_for_rbr
;
SET
@@
global
.
slave_run_triggers_for_rbr
=
@
old_slave_run_triggers_for_rbr
;
sql/sql_prepare.cc
View file @
e7669cf6
...
...
@@ -160,6 +160,20 @@ class Prepared_statement: public Statement
uint
param_count
;
uint
last_errno
;
uint
flags
;
/*
The value of thd->select_number at the end of the PREPARE phase.
The issue is: each statement execution opens VIEWs, which may cause
select_lex objects to be created, and select_number values to be assigned.
On the other hand, PREPARE assigns select_number values for triggers and
subqueries.
In order for select_number values from EXECUTE not to conflict with
select_number values from PREPARE, we keep the number and set it at each
execution.
*/
uint
select_number_after_prepare
;
char
last_error
[
MYSQL_ERRMSG_SIZE
];
#ifndef EMBEDDED_LIBRARY
bool
(
*
set_params
)(
Prepared_statement
*
st
,
uchar
*
data
,
uchar
*
data_end
,
...
...
@@ -3455,6 +3469,8 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
trans_rollback_implicit
(
thd
);
thd
->
mdl_context
.
release_transactional_locks
();
}
select_number_after_prepare
=
thd
->
select_number
;
lex_end
(
lex
);
cleanup_stmt
();
...
...
@@ -3581,7 +3597,8 @@ Prepared_statement::execute_loop(String *expanded_query,
Reprepare_observer
reprepare_observer
;
bool
error
;
int
reprepare_attempt
=
0
;
thd
->
select_number
=
select_number_after_prepare
;
/* Check if we got an error when sending long data */
if
(
state
==
Query_arena
::
STMT_ERROR
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment