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
fb05a697
Commit
fb05a697
authored
Jul 15, 2004
by
guilhem@mysql.com
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
2fd11169
836d9887
Changes
5
Expand all
Hide 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 @
fb05a697
This diff is collapsed.
Click to expand it.
mysql-test/r/rpl_timezone.result
View file @
fb05a697
...
...
@@ -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 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 266 Query 1 383 use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
master-bin.000001 383 Query 1 454 use `test`; delete from t1
master-bin.000001 454 Query 1 571 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 351 Query 1 468 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';
insert into t2 (select t from t1);
select * from t1;
...
...
@@ -72,4 +73,5 @@ t
2001-09-09 03:46:40
1000000000
set global time_zone='MET';
ERROR HY000: Binary logging and replication forbid changing of the global server time zone
drop table t1, t2;
sql/log.cc
View file @
fb05a697
...
...
@@ -1307,7 +1307,7 @@ bool MYSQL_LOG::write(Log_event* event_info)
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
of charset related variables before every statement in the binlog,
...
...
@@ -1353,7 +1353,6 @@ COLLATION_CONNECTION=%u,COLLATION_DATABASE=%u,COLLATION_SERVER=%u",
if
(
e
.
write
(
file
))
goto
err
;
}
#endif
if
(
thd
->
last_insert_id_used
)
{
...
...
sql/set_var.cc
View file @
fb05a697
...
...
@@ -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
)
{
if
((
var
->
type
==
OPT_GLOBAL
)
&&
...
...
@@ -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
)
{
if
((
var
->
type
==
OPT_GLOBAL
)
&&
...
...
@@ -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
*
res
=
var
->
value
->
val_str
(
&
str
);
#if defined(HAVE_REPLICATION)
&& (MYSQL_VERSION_ID < 50000)
#if defined(HAVE_REPLICATION)
if
((
var
->
type
==
OPT_GLOBAL
)
&&
(
mysql_bin_log
.
is_open
()
||
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)
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
);
set_var_base
*
var
;
while
((
var
=
it
++
))
...
...
@@ -2744,7 +2743,6 @@ bool not_all_support_one_shot(List<set_var_base> *var_list)
if
(
var
->
no_support_one_shot
())
return
1
;
}
#endif
return
0
;
}
...
...
sql/set_var.h
View file @
fb05a697
...
...
@@ -49,20 +49,14 @@ class sys_var
const
char
*
name
;
sys_after_update_func
after_update
;
#if MYSQL_VERSION_ID < 50000
bool
no_support_one_shot
;
#endif
sys_var
(
const
char
*
name_arg
)
:
name
(
name_arg
),
after_update
(
0
)
#if MYSQL_VERSION_ID < 50000
,
no_support_one_shot
(
1
)
#endif
{}
sys_var
(
const
char
*
name_arg
,
sys_after_update_func
func
)
:
name
(
name_arg
),
after_update
(
func
)
#if MYSQL_VERSION_ID < 50000
,
no_support_one_shot
(
1
)
#endif
{}
virtual
~
sys_var
()
{}
virtual
bool
check
(
THD
*
thd
,
set_var
*
var
);
...
...
@@ -507,9 +501,7 @@ class sys_var_collation :public sys_var_thd
public:
sys_var_collation
(
const
char
*
name_arg
)
:
sys_var_thd
(
name_arg
)
{
#if MYSQL_VERSION_ID < 50000
no_support_one_shot
=
0
;
#endif
}
bool
check
(
THD
*
thd
,
set_var
*
var
);
SHOW_TYPE
type
()
{
return
SHOW_CHAR
;
}
...
...
@@ -529,13 +521,11 @@ class sys_var_character_set :public sys_var_thd
sys_var_thd
(
name_arg
)
{
nullable
=
0
;
#if MYSQL_VERSION_ID < 50000
/*
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.
*/
no_support_one_shot
=
0
;
#endif
}
bool
check
(
THD
*
thd
,
set_var
*
var
);
SHOW_TYPE
type
()
{
return
SHOW_CHAR
;
}
...
...
@@ -574,7 +564,7 @@ class sys_var_character_set_server :public sys_var_character_set
public:
sys_var_character_set_server
(
const
char
*
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
);
#endif
void
set_default
(
THD
*
thd
,
enum_var_type
type
);
...
...
@@ -612,7 +602,7 @@ class sys_var_collation_server :public sys_var_collation
{
public:
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
);
#endif
bool
update
(
THD
*
thd
,
set_var
*
var
);
...
...
@@ -722,9 +712,7 @@ class sys_var_thd_time_zone :public sys_var_thd
sys_var_thd_time_zone
(
const
char
*
name_arg
)
:
sys_var_thd
(
name_arg
)
{
#if MYSQL_VERSION_ID < 50000
no_support_one_shot
=
0
;
#endif
}
bool
check
(
THD
*
thd
,
set_var
*
var
);
SHOW_TYPE
type
()
{
return
SHOW_CHAR
;
}
...
...
@@ -752,9 +740,7 @@ class set_var_base :public Sql_alloc
virtual
int
update
(
THD
*
thd
)
=
0
;
/* To set the value */
/* light check for PS */
virtual
int
light_check
(
THD
*
thd
)
{
return
check
(
thd
);
}
#if MYSQL_VERSION_ID < 50000
virtual
bool
no_support_one_shot
()
{
return
1
;
}
#endif
};
...
...
@@ -797,9 +783,7 @@ class set_var :public set_var_base
int
check
(
THD
*
thd
);
int
update
(
THD
*
thd
);
int
light_check
(
THD
*
thd
);
#if MYSQL_VERSION_ID < 50000
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