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
77f46e9c
Commit
77f46e9c
authored
Feb 22, 2005
by
lars@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/bkroot/mysql-5.0 into mysql.com:/home/bk/mysql-5.0
parents
cdadc990
c60e6763
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
90 additions
and
10 deletions
+90
-10
client/mysqldump.c
client/mysqldump.c
+4
-1
mysql-test/r/mysqldump.result
mysql-test/r/mysqldump.result
+36
-0
mysql-test/r/rpl_charset.result
mysql-test/r/rpl_charset.result
+7
-0
mysql-test/t/rpl_charset.test
mysql-test/t/rpl_charset.test
+16
-4
sql/log_event.cc
sql/log_event.cc
+12
-4
sql/mysql_priv.h
sql/mysql_priv.h
+4
-0
sql/mysqld.cc
sql/mysqld.cc
+2
-1
sql/set_var.cc
sql/set_var.cc
+6
-0
sql/sql_error.cc
sql/sql_error.cc
+3
-0
No files found.
client/mysqldump.c
View file @
77f46e9c
...
...
@@ -493,7 +493,8 @@ static void write_header(FILE *sql_file, char *db_name)
"
);
}
fprintf
(
sql_file
,
"/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='%s%s%s' */;
\n
"
,
"/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='%s%s%s' */;
\n
"
"/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
\n
"
,
path
?
""
:
"NO_AUTO_VALUE_ON_ZERO"
,
compatible_mode_normal_str
[
0
]
==
0
?
""
:
","
,
compatible_mode_normal_str
);
check_io
(
sql_file
);
...
...
@@ -522,6 +523,8 @@ static void write_footer(FILE *sql_file)
"/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
\n
"
"/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
\n
"
"/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
\n
"
);
fprintf
(
sql_file
,
"/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
\n
"
);
fputs
(
"
\n
"
,
sql_file
);
check_io
(
sql_file
);
}
...
...
mysql-test/r/mysqldump.result
View file @
77f46e9c
This diff is collapsed.
Click to expand it.
mysql-test/r/rpl_charset.result
View file @
77f46e9c
...
...
@@ -246,3 +246,10 @@ SET TIMESTAMP=1000000000;
SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30;
INSERT INTO t1 (c1, c2) VALUES (', ',', ');
drop table t1;
create table `t1` (
`pk` varchar(10) not null default '',
primary key (`pk`)
) engine=myisam default charset=latin1;
set @p=_latin1 'test';
update t1 set pk='test' where pk=@p;
drop table t1;
mysql-test/t/rpl_charset.test
View file @
77f46e9c
...
...
@@ -63,10 +63,10 @@ connection master;
set
character_set_client
=
latin1
,
collation_connection
=
latin1_german1_ci
;
truncate
table
t1
;
insert
into
t1
(
b
)
values
(
@@
collation_connection
);
insert
into
t1
(
b
)
values
(
LEAST
(
"M
l
ler"
,
"Muffler"
));
insert
into
t1
(
b
)
values
(
LEAST
(
"M
ül
ler"
,
"Muffler"
));
set
collation_connection
=
latin1_german2_ci
;
insert
into
t1
(
b
)
values
(
@@
collation_connection
);
insert
into
t1
(
b
)
values
(
LEAST
(
"M
l
ler"
,
"Muffler"
));
insert
into
t1
(
b
)
values
(
LEAST
(
"M
ül
ler"
,
"Muffler"
));
--
disable_query_log
select
"--- --master--"
as
""
;
--
enable_query_log
...
...
@@ -90,7 +90,7 @@ select * from mysqltest2.t1 order by a;
# which provokes error messages (like 'Illegal mix of collation') when
# we replay the master's INSERT/etc statements.
connection
master
;
set
@
a
=
_cp850
'M
l
ler'
collate
cp850_general_ci
;
set
@
a
=
_cp850
'M
ül
ler'
collate
cp850_general_ci
;
truncate
table
t1
;
insert
into
t1
(
b
)
values
(
collation
(
@
a
));
--
disable_query_log
...
...
@@ -145,7 +145,7 @@ CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255));
SET
CHARACTER_SET_CLIENT
=
koi8r
,
CHARACTER_SET_CONNECTION
=
cp1251
,
CHARACTER_SET_RESULTS
=
koi8r
;
INSERT
INTO
t1
(
c1
,
c2
)
VALUES
(
'
, '
,
', '
);
INSERT
INTO
t1
(
c1
,
c2
)
VALUES
(
'
îÕ, ÚÁ ÒÙÂÁÌËÕ'
,
'îÕ, ÚÁ ÒÙÂÁÌËÕ'
);
select
hex
(
c1
),
hex
(
c2
)
from
t1
;
sync_slave_with_master
;
select
hex
(
c1
),
hex
(
c2
)
from
t1
;
...
...
@@ -157,3 +157,15 @@ connection master;
drop
table
t1
;
sync_slave_with_master
;
#
# BUG#6676: Derivation of variables must be correct on slave
#
connection
master
;
create
table
`t1`
(
`pk`
varchar
(
10
)
not
null
default
''
,
primary
key
(
`pk`
)
)
engine
=
myisam
default
charset
=
latin1
;
set
@
p
=
_latin1
'test'
;
update
t1
set
pk
=
'test'
where
pk
=@
p
;
drop
table
t1
;
sync_slave_with_master
;
sql/log_event.cc
View file @
77f46e9c
...
...
@@ -1450,7 +1450,6 @@ int Query_log_event::exec_event(struct st_relay_log_info* rli)
thd
->
query_id
=
next_query_id
();
VOID
(
pthread_mutex_unlock
(
&
LOCK_thread_count
));
thd
->
variables
.
pseudo_thread_id
=
thread_id
;
// for temp tables
mysql_log
.
write
(
thd
,
COM_QUERY
,
"%s"
,
thd
->
query
);
DBUG_PRINT
(
"query"
,(
"%s"
,
thd
->
query
));
if
(
ignored_error_code
((
expected_error
=
error_code
))
||
...
...
@@ -1535,9 +1534,13 @@ START SLAVE; . Query: '%s'", expected_error, thd->query);
goto
end
;
}
/* If the query was not ignored, it is printed to the general log */
if
(
thd
->
net
.
last_errno
!=
ER_SLAVE_IGNORED_TABLE
)
mysql_log
.
write
(
thd
,
COM_QUERY
,
"%s"
,
thd
->
query
);
compare_errors:
/*
/*
If we expected a non-zero error code, and we don't get the same error
code, and none of them should be ignored.
*/
...
...
@@ -3470,7 +3473,12 @@ int User_var_log_event::exec_event(struct st_relay_log_info* rli)
0 can be passed as last argument (reference on item)
*/
e
.
fix_fields
(
thd
,
0
,
0
);
e
.
update_hash
(
val
,
val_len
,
type
,
charset
,
DERIVATION_NONE
);
/*
A variable can just be considered as a table with
a single record and with a single column. Thus, like
a column value, it could always have IMPLICIT derivation.
*/
e
.
update_hash
(
val
,
val_len
,
type
,
charset
,
DERIVATION_IMPLICIT
);
free_root
(
thd
->
mem_root
,
0
);
rli
->
inc_event_relay_log_pos
();
...
...
sql/mysql_priv.h
View file @
77f46e9c
...
...
@@ -254,6 +254,10 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset;
/* The rest of the file is included in the server only */
#ifndef MYSQL_CLIENT
/* If set to 0, then the thread will ignore all warnings with level notes.
Set by executing SET SQL_NOTES=1 */
#define OPTION_SQL_NOTES (1L << 31)
/* Bits for different SQL modes modes (including ANSI mode) */
#define MODE_REAL_AS_FLOAT 1
#define MODE_PIPES_AS_CONCAT 2
...
...
sql/mysqld.cc
View file @
77f46e9c
...
...
@@ -5782,7 +5782,8 @@ static void mysql_init_variables(void)
language_ptr
=
language
;
mysql_data_home
=
mysql_real_data_home
;
thd_startup_options
=
(
OPTION_UPDATE_LOG
|
OPTION_AUTO_IS_NULL
|
OPTION_BIN_LOG
|
OPTION_QUOTE_SHOW_CREATE
);
OPTION_BIN_LOG
|
OPTION_QUOTE_SHOW_CREATE
|
OPTION_SQL_NOTES
);
protocol_version
=
PROTOCOL_VERSION
;
what_to_log
=
~
(
1L
<<
(
uint
)
COM_TIME
);
refresh_version
=
flush_version
=
1L
;
/* Increments on each reload */
...
...
sql/set_var.cc
View file @
77f46e9c
...
...
@@ -459,6 +459,9 @@ static sys_var_thd_bit sys_log_binlog("sql_log_bin",
static
sys_var_thd_bit
sys_sql_warnings
(
"sql_warnings"
,
0
,
set_option_bit
,
OPTION_WARNINGS
);
static
sys_var_thd_bit
sys_sql_notes
(
"sql_notes"
,
0
,
set_option_bit
,
OPTION_SQL_NOTES
);
static
sys_var_thd_bit
sys_auto_is_null
(
"sql_auto_is_null"
,
0
,
set_option_bit
,
OPTION_AUTO_IS_NULL
);
...
...
@@ -653,6 +656,7 @@ sys_var *sys_variables[]=
&
sys_sql_max_join_size
,
&
sys_sql_mode
,
&
sys_sql_warnings
,
&
sys_sql_notes
,
&
sys_storage_engine
,
#ifdef HAVE_REPLICATION
&
sys_sync_binlog_period
,
...
...
@@ -927,6 +931,8 @@ struct show_var_st init_vars[]= {
{
sys_sort_buffer
.
name
,
(
char
*
)
&
sys_sort_buffer
,
SHOW_SYS
},
{
sys_sql_mode
.
name
,
(
char
*
)
&
sys_sql_mode
,
SHOW_SYS
},
{
sys_storage_engine
.
name
,
(
char
*
)
&
sys_storage_engine
,
SHOW_SYS
},
{
"sql_notes"
,
(
char
*
)
&
sys_sql_notes
,
SHOW_BOOL
},
{
"sql_warnings"
,
(
char
*
)
&
sys_sql_warnings
,
SHOW_BOOL
},
#ifdef HAVE_REPLICATION
{
sys_sync_binlog_period
.
name
,(
char
*
)
&
sys_sync_binlog_period
,
SHOW_SYS
},
{
sys_sync_replication
.
name
,
(
char
*
)
&
sys_sync_replication
,
SHOW_SYS
},
...
...
sql/sql_error.cc
View file @
77f46e9c
...
...
@@ -106,6 +106,9 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level,
MYSQL_ERROR
*
err
=
0
;
DBUG_ENTER
(
"push_warning"
);
if
(
level
==
MYSQL_ERROR
::
WARN_LEVEL_NOTE
&&
!
(
thd
->
options
&
OPTION_SQL_NOTES
))
return
(
0
);
if
(
thd
->
query_id
!=
thd
->
warn_id
)
mysql_reset_errors
(
thd
);
thd
->
got_warning
=
1
;
...
...
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