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
28f76c50
Commit
28f76c50
authored
Jul 15, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge gbichot@
bk-internal.mysql.com://home/bk/mysql-5.0
into mysql.com:/home/mysql_src/mysql-5.0
parents
b0df2034
898ceb0f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
86 deletions
+69
-86
mysql-test/r/rpl_charset.result
mysql-test/r/rpl_charset.result
+58
-58
mysql-test/r/rpl_timezone.result
mysql-test/r/rpl_timezone.result
+5
-3
sql/log.cc
sql/log.cc
+1
-2
sql/set_var.cc
sql/set_var.cc
+3
-5
sql/set_var.h
sql/set_var.h
+2
-18
No files found.
mysql-test/r/rpl_charset.result
View file @
28f76c50
...
@@ -103,64 +103,64 @@ a b
...
@@ -103,64 +103,64 @@ a b
1 cp850_general_ci
1 cp850_general_ci
drop database test2;
drop database test2;
drop database test3;
drop database test3;
show binlog events from
79
;
show binlog events from
95
;
Log_name Pos Event_type Server_id
Orig
_log_pos Info
Log_name Pos Event_type Server_id
End
_log_pos Info
master-bin.000001
79 Query 1 79
use `test`; drop database if exists test2
master-bin.000001
95 Query 1 181
use `test`; drop database if exists test2
master-bin.000001 1
43 Query 1 143
use `test`; drop database if exists test3
master-bin.000001 1
81 Query 1 267
use `test`; drop database if exists test3
master-bin.000001 2
07 Query 1 207
use `test`; create database test2 character set latin2
master-bin.000001 2
67 Query 1 366
use `test`; create database test2 character set latin2
master-bin.000001
284 Query 1 284
use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=30
master-bin.000001
366 Query 1 522
use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=30
master-bin.000001
418 Query 1 418
use `test`; create database test3
master-bin.000001
522 Query 1 600
use `test`; create database test3
master-bin.000001
474 Query 1 474
use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
master-bin.000001
600 Query 1 756
use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
master-bin.000001
608 Query 1 608
use `test`; drop database test3
master-bin.000001
756 Query 1 832
use `test`; drop database test3
master-bin.000001
662 Query 1 662
use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
master-bin.000001
832 Query 1 988
use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
master-bin.000001
796 Query 1 79
6 use `test`; create database test3
master-bin.000001
988 Query 1 106
6 use `test`; create database test3
master-bin.000001
852 Query 1 852
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
1066 Query 1 1223
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
987 Query 1 98
7 use `test2`; create table t1 (a int auto_increment primary key, b varchar(100))
master-bin.000001
1223 Query 1 134
7 use `test2`; create table t1 (a int auto_increment primary key, b varchar(100))
master-bin.000001 1
089 Query 1 1089
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 1
347 Query 1 1505
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 1
225 Intvar 1 1225
INSERT_ID=1
master-bin.000001 1
505 Intvar 1 1533
INSERT_ID=1
master-bin.000001 1
253 Query 1 1253
use `test2`; insert into t1 (b) values(@@character_set_server)
master-bin.000001 1
533 Query 1 1640
use `test2`; insert into t1 (b) values(@@character_set_server)
master-bin.000001 1
338 Query 1 133
8 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 1
640 Query 1 179
8 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 1
474 Intvar 1 1474
INSERT_ID=2
master-bin.000001 1
798 Intvar 1 1826
INSERT_ID=2
master-bin.000001 1
502 Query 1 1502
use `test2`; insert into t1 (b) values(@@collation_server)
master-bin.000001 1
826 Query 1 1929
use `test2`; insert into t1 (b) values(@@collation_server)
master-bin.000001 1
583 Query 1 1583
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 1
929 Query 1 2087
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
1719 Intvar 1 1719
INSERT_ID=3
master-bin.000001
2087 Intvar 1 2115
INSERT_ID=3
master-bin.000001
1747 Query 1 1747
use `test2`; insert into t1 (b) values(@@character_set_client)
master-bin.000001
2115 Query 1 2222
use `test2`; insert into t1 (b) values(@@character_set_client)
master-bin.000001
1832 Query 1 1832
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
2222 Query 1 2380
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
1968 Intvar 1 196
8 INSERT_ID=4
master-bin.000001
2380 Intvar 1 240
8 INSERT_ID=4
master-bin.000001
1996 Query 1 1996
use `test2`; insert into t1 (b) values(@@character_set_connection)
master-bin.000001
2408 Query 1 2519
use `test2`; insert into t1 (b) values(@@character_set_connection)
master-bin.000001 2
085 Query 1 2085
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 2
519 Query 1 2677
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 2
221 Intvar 1 2221
INSERT_ID=5
master-bin.000001 2
677 Intvar 1 2705
INSERT_ID=5
master-bin.000001 2
249 Query 1 2249
use `test2`; insert into t1 (b) values(@@collation_connection)
master-bin.000001 2
705 Query 1 2812
use `test2`; insert into t1 (b) values(@@collation_connection)
master-bin.000001 2
334 Query 1 2334
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 2
812 Query 1 2969
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 2
469 Query 1 2469
use `test2`; truncate table t1
master-bin.000001 2
969 Query 1 3044
use `test2`; truncate table t1
master-bin.000001
2522 Query 1 2522
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
3044 Query 1 3201
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
2657 Intvar 1 2657
INSERT_ID=1
master-bin.000001
3201 Intvar 1 3229
INSERT_ID=1
master-bin.000001
2685 Query 1 2685
use `test2`; insert into t1 (b) values(@@collation_connection)
master-bin.000001
3229 Query 1 3336
use `test2`; insert into t1 (b) values(@@collation_connection)
master-bin.000001
2770 Query 1 2770
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
3336 Query 1 3493
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
2905 Intvar 1 2905
INSERT_ID=2
master-bin.000001
3493 Intvar 1 3521
INSERT_ID=2
master-bin.000001
2933 Query 1 2933
use `test2`; insert into t1 (b) values(LEAST("Müller","Muffler"))
master-bin.000001
3521 Query 1 3631
use `test2`; insert into t1 (b) values(LEAST("Müller","Muffler"))
master-bin.000001 3
021 Query 1 3021
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 3
631 Query 1 3789
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 3
157 Intvar 1 315
7 INSERT_ID=3
master-bin.000001 3
789 Intvar 1 381
7 INSERT_ID=3
master-bin.000001 3
185 Query 1 3185
use `test2`; insert into t1 (b) values(@@collation_connection)
master-bin.000001 3
817 Query 1 3924
use `test2`; insert into t1 (b) values(@@collation_connection)
master-bin.000001 3
270 Query 1 3270
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 3
924 Query 1 4082
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
3406 Intvar 1 3406
INSERT_ID=4
master-bin.000001
4082 Intvar 1 4110
INSERT_ID=4
master-bin.000001
3434 Query 1 3434
use `test2`; insert into t1 (b) values(LEAST("Müller","Muffler"))
master-bin.000001
4110 Query 1 4220
use `test2`; insert into t1 (b) values(LEAST("Müller","Muffler"))
master-bin.000001
3522 Query 1 3522
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
4220 Query 1 4378
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
3658 Intvar 1 3658
INSERT_ID=74
master-bin.000001
4378 Intvar 1 4406
INSERT_ID=74
master-bin.000001
3686 Create_file 1 3686
db=test2;table=t1;file_id=1;block_len=581
master-bin.000001
4406 Create_file 1 5074
db=test2;table=t1;file_id=1;block_len=581
master-bin.000001
4354 Query 1 4354
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
5074 Query 1 5232
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
4490 Intvar 1 449
0 INSERT_ID=5
master-bin.000001
5232 Intvar 1 526
0 INSERT_ID=5
master-bin.000001
4518 Exec_load 1 4518
;file_id=1
master-bin.000001
5260 Exec_load 1 5283
;file_id=1
master-bin.000001
4541 Query 1 45
41 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
5283 Query 1 54
41 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
4677 Query 1 4677
use `test2`; truncate table t1
master-bin.000001
5441 Query 1 5516
use `test2`; truncate table t1
master-bin.000001
4730 Query 1 4730
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
5516 Query 1 5674
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
4866 Intvar 1 4866
INSERT_ID=1
master-bin.000001
5674 Intvar 1 5702
INSERT_ID=1
master-bin.000001
4894 User var 1 4894
@`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci
master-bin.000001
5702 User var 1 5742
@`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci
master-bin.000001
4934 Query 1 4934
use `test2`; insert into t1 (b) values(collation(@a))
master-bin.000001
5742 Query 1 5840
use `test2`; insert into t1 (b) values(collation(@a))
master-bin.000001 5
010 Query 1 5010
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 5
840 Query 1 5998
use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001 5
146 Query 1 5146
use `test2`; drop database test2
master-bin.000001 5
998 Query 1 6075
use `test2`; drop database test2
master-bin.000001
5201 Query 1 5201
SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
6075 Query 1 6228
SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
master-bin.000001
5332 Query 1 5332
drop database test3
master-bin.000001
6228 Query 1 6300
drop database test3
set global character_set_server=latin2;
set global character_set_server=latin2;
ERROR HY000: Binary logging and replication forbid changing the global server character set or collation
ERROR HY000: Binary logging and replication forbid changing the global server character set or collation
set global character_set_server=latin2;
set global character_set_server=latin2;
...
...
mysql-test/r/rpl_timezone.result
View file @
28f76c50
...
@@ -35,9 +35,10 @@ Log_name Pos Event_type Server_id End_log_pos Info
...
@@ -35,9 +35,10 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
master-bin.000001 95 Query 1 181 use `test`; create table t1 (t timestamp)
master-bin.000001 95 Query 1 181 use `test`; create table t1 (t timestamp)
master-bin.000001 181 Query 1 266 use `test`; create table t2 (t char(32))
master-bin.000001 181 Query 1 266 use `test`; create table t2 (t char(32))
master-bin.000001 266 Query 1 383 use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
master-bin.000001 266 Query 1 351 use `test`; SET ONE_SHOT TIME_ZONE='UTC'
master-bin.000001 383 Query 1 454 use `test`; delete from t1
master-bin.000001 351 Query 1 468 use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
master-bin.000001 454 Query 1 571 use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
master-bin.000001 468 Query 1 539 use `test`; delete from t1
master-bin.000001 539 Query 1 656 use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
set time_zone='MET';
set time_zone='MET';
insert into t2 (select t from t1);
insert into t2 (select t from t1);
select * from t1;
select * from t1;
...
@@ -72,4 +73,5 @@ t
...
@@ -72,4 +73,5 @@ t
2001-09-09 03:46:40
2001-09-09 03:46:40
1000000000
1000000000
set global time_zone='MET';
set global time_zone='MET';
ERROR HY000: Binary logging and replication forbid changing of the global server time zone
drop table t1, t2;
drop table t1, t2;
sql/log.cc
View file @
28f76c50
...
@@ -1307,7 +1307,7 @@ bool MYSQL_LOG::write(Log_event* event_info)
...
@@ -1307,7 +1307,7 @@ bool MYSQL_LOG::write(Log_event* event_info)
if
(
thd
)
if
(
thd
)
{
{
#if MYSQL_VERSION_ID < 50000
/* NOTE: CHARSET AND TZ REPL WILL BE REWRITTEN SHORTLY */
/*
/*
To make replication of charsets working in 4.1 we are writing values
To make replication of charsets working in 4.1 we are writing values
of charset related variables before every statement in the binlog,
of charset related variables before every statement in the binlog,
...
@@ -1353,7 +1353,6 @@ COLLATION_CONNECTION=%u,COLLATION_DATABASE=%u,COLLATION_SERVER=%u",
...
@@ -1353,7 +1353,6 @@ COLLATION_CONNECTION=%u,COLLATION_DATABASE=%u,COLLATION_SERVER=%u",
if
(
e
.
write
(
file
))
if
(
e
.
write
(
file
))
goto
err
;
goto
err
;
}
}
#endif
if
(
thd
->
last_insert_id_used
)
if
(
thd
->
last_insert_id_used
)
{
{
...
...
sql/set_var.cc
View file @
28f76c50
...
@@ -1913,7 +1913,7 @@ void sys_var_character_set_server::set_default(THD *thd, enum_var_type type)
...
@@ -1913,7 +1913,7 @@ void sys_var_character_set_server::set_default(THD *thd, enum_var_type type)
}
}
}
}
#if defined(HAVE_REPLICATION)
&& (MYSQL_VERSION_ID < 50000)
#if defined(HAVE_REPLICATION)
bool
sys_var_character_set_server
::
check
(
THD
*
thd
,
set_var
*
var
)
bool
sys_var_character_set_server
::
check
(
THD
*
thd
,
set_var
*
var
)
{
{
if
((
var
->
type
==
OPT_GLOBAL
)
&&
if
((
var
->
type
==
OPT_GLOBAL
)
&&
...
@@ -2020,7 +2020,7 @@ void sys_var_collation_database::set_default(THD *thd, enum_var_type type)
...
@@ -2020,7 +2020,7 @@ void sys_var_collation_database::set_default(THD *thd, enum_var_type type)
}
}
}
}
#if defined(HAVE_REPLICATION)
&& (MYSQL_VERSION_ID < 50000)
#if defined(HAVE_REPLICATION)
bool
sys_var_collation_server
::
check
(
THD
*
thd
,
set_var
*
var
)
bool
sys_var_collation_server
::
check
(
THD
*
thd
,
set_var
*
var
)
{
{
if
((
var
->
type
==
OPT_GLOBAL
)
&&
if
((
var
->
type
==
OPT_GLOBAL
)
&&
...
@@ -2372,7 +2372,7 @@ bool sys_var_thd_time_zone::check(THD *thd, set_var *var)
...
@@ -2372,7 +2372,7 @@ bool sys_var_thd_time_zone::check(THD *thd, set_var *var)
String
str
(
buff
,
sizeof
(
buff
),
&
my_charset_latin1
);
String
str
(
buff
,
sizeof
(
buff
),
&
my_charset_latin1
);
String
*
res
=
var
->
value
->
val_str
(
&
str
);
String
*
res
=
var
->
value
->
val_str
(
&
str
);
#if defined(HAVE_REPLICATION)
&& (MYSQL_VERSION_ID < 50000)
#if defined(HAVE_REPLICATION)
if
((
var
->
type
==
OPT_GLOBAL
)
&&
if
((
var
->
type
==
OPT_GLOBAL
)
&&
(
mysql_bin_log
.
is_open
()
||
(
mysql_bin_log
.
is_open
()
||
active_mi
->
slave_running
||
active_mi
->
rli
.
slave_running
))
active_mi
->
slave_running
||
active_mi
->
rli
.
slave_running
))
...
@@ -2736,7 +2736,6 @@ int sql_set_variables(THD *thd, List<set_var_base> *var_list)
...
@@ -2736,7 +2736,6 @@ int sql_set_variables(THD *thd, List<set_var_base> *var_list)
bool
not_all_support_one_shot
(
List
<
set_var_base
>
*
var_list
)
bool
not_all_support_one_shot
(
List
<
set_var_base
>
*
var_list
)
{
{
#if MYSQL_VERSION_ID < 50000
List_iterator_fast
<
set_var_base
>
it
(
*
var_list
);
List_iterator_fast
<
set_var_base
>
it
(
*
var_list
);
set_var_base
*
var
;
set_var_base
*
var
;
while
((
var
=
it
++
))
while
((
var
=
it
++
))
...
@@ -2744,7 +2743,6 @@ bool not_all_support_one_shot(List<set_var_base> *var_list)
...
@@ -2744,7 +2743,6 @@ bool not_all_support_one_shot(List<set_var_base> *var_list)
if
(
var
->
no_support_one_shot
())
if
(
var
->
no_support_one_shot
())
return
1
;
return
1
;
}
}
#endif
return
0
;
return
0
;
}
}
...
...
sql/set_var.h
View file @
28f76c50
...
@@ -49,20 +49,14 @@ public:
...
@@ -49,20 +49,14 @@ public:
const
char
*
name
;
const
char
*
name
;
sys_after_update_func
after_update
;
sys_after_update_func
after_update
;
#if MYSQL_VERSION_ID < 50000
bool
no_support_one_shot
;
bool
no_support_one_shot
;
#endif
sys_var
(
const
char
*
name_arg
)
sys_var
(
const
char
*
name_arg
)
:
name
(
name_arg
),
after_update
(
0
)
:
name
(
name_arg
),
after_update
(
0
)
#if MYSQL_VERSION_ID < 50000
,
no_support_one_shot
(
1
)
,
no_support_one_shot
(
1
)
#endif
{}
{}
sys_var
(
const
char
*
name_arg
,
sys_after_update_func
func
)
sys_var
(
const
char
*
name_arg
,
sys_after_update_func
func
)
:
name
(
name_arg
),
after_update
(
func
)
:
name
(
name_arg
),
after_update
(
func
)
#if MYSQL_VERSION_ID < 50000
,
no_support_one_shot
(
1
)
,
no_support_one_shot
(
1
)
#endif
{}
{}
virtual
~
sys_var
()
{}
virtual
~
sys_var
()
{}
virtual
bool
check
(
THD
*
thd
,
set_var
*
var
);
virtual
bool
check
(
THD
*
thd
,
set_var
*
var
);
...
@@ -507,9 +501,7 @@ class sys_var_collation :public sys_var_thd
...
@@ -507,9 +501,7 @@ class sys_var_collation :public sys_var_thd
public:
public:
sys_var_collation
(
const
char
*
name_arg
)
:
sys_var_thd
(
name_arg
)
sys_var_collation
(
const
char
*
name_arg
)
:
sys_var_thd
(
name_arg
)
{
{
#if MYSQL_VERSION_ID < 50000
no_support_one_shot
=
0
;
no_support_one_shot
=
0
;
#endif
}
}
bool
check
(
THD
*
thd
,
set_var
*
var
);
bool
check
(
THD
*
thd
,
set_var
*
var
);
SHOW_TYPE
type
()
{
return
SHOW_CHAR
;
}
SHOW_TYPE
type
()
{
return
SHOW_CHAR
;
}
...
@@ -529,13 +521,11 @@ public:
...
@@ -529,13 +521,11 @@ public:
sys_var_thd
(
name_arg
)
sys_var_thd
(
name_arg
)
{
{
nullable
=
0
;
nullable
=
0
;
#if MYSQL_VERSION_ID < 50000
/*
/*
In fact only almost all variables derived from sys_var_character_set
In fact only almost all variables derived from sys_var_character_set
support ONE_SHOT; character_set_results doesn't. But that's good enough.
support ONE_SHOT; character_set_results doesn't. But that's good enough.
*/
*/
no_support_one_shot
=
0
;
no_support_one_shot
=
0
;
#endif
}
}
bool
check
(
THD
*
thd
,
set_var
*
var
);
bool
check
(
THD
*
thd
,
set_var
*
var
);
SHOW_TYPE
type
()
{
return
SHOW_CHAR
;
}
SHOW_TYPE
type
()
{
return
SHOW_CHAR
;
}
...
@@ -574,7 +564,7 @@ class sys_var_character_set_server :public sys_var_character_set
...
@@ -574,7 +564,7 @@ class sys_var_character_set_server :public sys_var_character_set
public:
public:
sys_var_character_set_server
(
const
char
*
name_arg
)
:
sys_var_character_set_server
(
const
char
*
name_arg
)
:
sys_var_character_set
(
name_arg
)
{}
sys_var_character_set
(
name_arg
)
{}
#if defined(HAVE_REPLICATION)
&& (MYSQL_VERSION_ID < 50000)
#if defined(HAVE_REPLICATION)
bool
check
(
THD
*
thd
,
set_var
*
var
);
bool
check
(
THD
*
thd
,
set_var
*
var
);
#endif
#endif
void
set_default
(
THD
*
thd
,
enum_var_type
type
);
void
set_default
(
THD
*
thd
,
enum_var_type
type
);
...
@@ -612,7 +602,7 @@ class sys_var_collation_server :public sys_var_collation
...
@@ -612,7 +602,7 @@ class sys_var_collation_server :public sys_var_collation
{
{
public:
public:
sys_var_collation_server
(
const
char
*
name_arg
)
:
sys_var_collation
(
name_arg
)
{}
sys_var_collation_server
(
const
char
*
name_arg
)
:
sys_var_collation
(
name_arg
)
{}
#if defined(HAVE_REPLICATION)
&& (MYSQL_VERSION_ID < 50000)
#if defined(HAVE_REPLICATION)
bool
check
(
THD
*
thd
,
set_var
*
var
);
bool
check
(
THD
*
thd
,
set_var
*
var
);
#endif
#endif
bool
update
(
THD
*
thd
,
set_var
*
var
);
bool
update
(
THD
*
thd
,
set_var
*
var
);
...
@@ -722,9 +712,7 @@ public:
...
@@ -722,9 +712,7 @@ public:
sys_var_thd_time_zone
(
const
char
*
name_arg
)
:
sys_var_thd_time_zone
(
const
char
*
name_arg
)
:
sys_var_thd
(
name_arg
)
sys_var_thd
(
name_arg
)
{
{
#if MYSQL_VERSION_ID < 50000
no_support_one_shot
=
0
;
no_support_one_shot
=
0
;
#endif
}
}
bool
check
(
THD
*
thd
,
set_var
*
var
);
bool
check
(
THD
*
thd
,
set_var
*
var
);
SHOW_TYPE
type
()
{
return
SHOW_CHAR
;
}
SHOW_TYPE
type
()
{
return
SHOW_CHAR
;
}
...
@@ -752,9 +740,7 @@ public:
...
@@ -752,9 +740,7 @@ public:
virtual
int
update
(
THD
*
thd
)
=
0
;
/* To set the value */
virtual
int
update
(
THD
*
thd
)
=
0
;
/* To set the value */
/* light check for PS */
/* light check for PS */
virtual
int
light_check
(
THD
*
thd
)
{
return
check
(
thd
);
}
virtual
int
light_check
(
THD
*
thd
)
{
return
check
(
thd
);
}
#if MYSQL_VERSION_ID < 50000
virtual
bool
no_support_one_shot
()
{
return
1
;
}
virtual
bool
no_support_one_shot
()
{
return
1
;
}
#endif
};
};
...
@@ -797,9 +783,7 @@ public:
...
@@ -797,9 +783,7 @@ public:
int
check
(
THD
*
thd
);
int
check
(
THD
*
thd
);
int
update
(
THD
*
thd
);
int
update
(
THD
*
thd
);
int
light_check
(
THD
*
thd
);
int
light_check
(
THD
*
thd
);
#if MYSQL_VERSION_ID < 50000
bool
no_support_one_shot
()
{
return
var
->
no_support_one_shot
;
}
bool
no_support_one_shot
()
{
return
var
->
no_support_one_shot
;
}
#endif
};
};
...
...
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