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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
26618a54
Commit
26618a54
authored
May 01, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-5736 remove what remains from ONE_SHOT hack
parent
d81b662b
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
3 additions
and
73 deletions
+3
-73
client/mysql.cc
client/mysql.cc
+0
-1
sql/log_event.cc
sql/log_event.cc
+1
-12
sql/sql_class.cc
sql/sql_class.cc
+0
-1
sql/sql_class.h
sql/sql_class.h
+1
-1
sql/sql_lex.h
sql/sql_lex.h
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+0
-55
sql/sql_yacc.yy
sql/sql_yacc.yy
+0
-2
No files found.
client/mysql.cc
View file @
26618a54
...
...
@@ -606,7 +606,6 @@ static COMMANDS commands[] = {
{
"OLD_PASSWORD"
,
0
,
0
,
0
,
""
},
{
"ON"
,
0
,
0
,
0
,
""
},
{
"ONE"
,
0
,
0
,
0
,
""
},
{
"ONE_SHOT"
,
0
,
0
,
0
,
""
},
{
"OPEN"
,
0
,
0
,
0
,
""
},
{
"OPTIMIZE"
,
0
,
0
,
0
,
""
},
{
"OPTION"
,
0
,
0
,
0
,
""
},
...
...
sql/log_event.cc
View file @
26618a54
...
...
@@ -4471,17 +4471,6 @@ end:
int
Query_log_event
::
do_update_pos
(
rpl_group_info
*
rgi
)
{
/*
Note that we will not increment group* positions if we are just
after a SET ONE_SHOT, because SET ONE_SHOT should not be separated
from its following updating query.
*/
if
(
thd
->
one_shot_set
)
{
rgi
->
inc_event_relay_log_pos
();
return
0
;
}
else
return
Log_event
::
do_update_pos
(
rgi
);
}
...
...
sql/sql_class.cc
View file @
26618a54
...
...
@@ -956,7 +956,6 @@ THD::THD()
connection_name
.
length
=
0
;
bzero
(
&
variables
,
sizeof
(
variables
));
one_shot_set
=
0
;
file_id
=
0
;
query_id
=
0
;
query_name_consts
=
0
;
...
...
sql/sql_class.h
View file @
26618a54
...
...
@@ -2592,7 +2592,7 @@ public:
char
default_master_connection_buff
[
MAX_CONNECTION_NAME
+
1
];
uint8
password
;
/* 0, 1 or 2 */
uint8
failed_com_change_user
;
bool
slave_thread
,
one_shot_set
;
bool
slave_thread
;
bool
extra_port
;
/* If extra connection */
bool
no_errors
;
...
...
sql/sql_lex.h
View file @
26618a54
...
...
@@ -2468,7 +2468,7 @@ struct LEX: public Query_tables_list
uint16
create_view_algorithm
;
uint8
create_view_check
;
uint8
context_analysis_only
;
bool
drop_temporary
,
local_file
,
one_shot_set
;
bool
drop_temporary
,
local_file
;
bool
check_exists
;
bool
autocommit
;
bool
verbose
,
no_write_to_binlog
;
...
...
sql/sql_parse.cc
View file @
26618a54
...
...
@@ -2031,23 +2031,6 @@ bool alloc_query(THD *thd, const char *packet, uint packet_length)
return
FALSE
;
}
static
void
reset_one_shot_variables
(
THD
*
thd
)
{
thd
->
variables
.
character_set_client
=
global_system_variables
.
character_set_client
;
thd
->
variables
.
collation_connection
=
global_system_variables
.
collation_connection
;
thd
->
variables
.
collation_database
=
global_system_variables
.
collation_database
;
thd
->
variables
.
collation_server
=
global_system_variables
.
collation_server
;
thd
->
update_charset
();
thd
->
variables
.
time_zone
=
global_system_variables
.
time_zone
;
thd
->
variables
.
lc_time_names
=
&
my_locale_en_US
;
thd
->
one_shot_set
=
0
;
}
bool
sp_process_definer
(
THD
*
thd
)
{
...
...
@@ -2348,9 +2331,6 @@ mysql_execute_command(THD *thd)
{
/* we warn the slave SQL thread */
my_message
(
ER_SLAVE_IGNORED_TABLE
,
ER
(
ER_SLAVE_IGNORED_TABLE
),
MYF
(
0
));
if
(
thd
->
one_shot_set
)
reset_one_shot_variables
(
thd
);
DBUG_RETURN
(
0
);
}
for
(
table
=
all_tables
;
table
;
table
=
table
->
next_global
)
...
...
@@ -2378,23 +2358,6 @@ mysql_execute_command(THD *thd)
{
/* we warn the slave SQL thread */
my_message
(
ER_SLAVE_IGNORED_TABLE
,
ER
(
ER_SLAVE_IGNORED_TABLE
),
MYF
(
0
));
if
(
thd
->
one_shot_set
)
{
/*
It's ok to check thd->one_shot_set here:
The charsets in a MySQL 5.0 slave can change by both a binlogged
SET ONE_SHOT statement and the event-internal charset setting,
and these two ways to change charsets do not seems to work
together.
At least there seems to be problems in the rli cache for
charsets if we are using ONE_SHOT. Note that this is normally no
problem because either the >= 5.0 slave reads a 4.1 binlog (with
ONE_SHOT) *or* or 5.0 binlog (without ONE_SHOT) but never both."
*/
reset_one_shot_variables
(
thd
);
}
DBUG_RETURN
(
0
);
}
/*
...
...
@@ -3782,11 +3745,6 @@ end_with_restore_list:
goto
error
;
if
(
!
(
res
=
sql_set_variables
(
thd
,
lex_var_list
)))
{
/*
If the previous command was a SET ONE_SHOT, we don't want to forget
about the ONE_SHOT property of that SET. So we use a |= instead of = .
*/
thd
->
one_shot_set
|=
lex
->
one_shot_set
;
my_ok
(
thd
);
}
else
...
...
@@ -5132,19 +5090,6 @@ create_sp_error:
THD_STAGE_INFO
(
thd
,
stage_query_end
);
thd
->
update_stats
();
/*
Binlog-related cleanup:
Reset system variables temporarily modified by SET ONE SHOT.
Exception: If this is a SET, do nothing. This is to allow
mysqlbinlog to print many SET commands (in this case we want the
charset temp setting to live until the real query). This is also
needed so that SET CHARACTER_SET_CLIENT... does not cancel itself
immediately.
*/
if
(
thd
->
one_shot_set
&&
lex
->
sql_command
!=
SQLCOM_SET_OPTION
)
reset_one_shot_variables
(
thd
);
goto
finish
;
error:
...
...
sql/sql_yacc.yy
View file @
26618a54
...
...
@@ -810,7 +810,6 @@ static void sp_create_assignment_lex(THD *thd, bool no_lookahead)
lex->sql_command= SQLCOM_SET_OPTION;
mysql_init_select(lex);
lex->var_list.empty();
lex->one_shot_set= 0;
lex->autocommit= 0;
/* get_ptr() is only correct with no lookahead. */
DBUG_ASSERT(no_lookahead);
...
...
@@ -14424,7 +14423,6 @@ set:
mysql_init_select(lex);
lex->option_type=OPT_SESSION;
lex->var_list.empty();
lex->one_shot_set= 0;
lex->autocommit= 0;
sp_create_assignment_lex(thd, yychar == YYEMPTY);
}
...
...
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