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
4c6e14ce
Commit
4c6e14ce
authored
Oct 04, 2007
by
aelkin/elkin@koti.dsl.inet.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/BARE/5.0
into koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/5.1-merge
parents
3745968d
2b42750a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
3 deletions
+40
-3
client/mysql.cc
client/mysql.cc
+11
-0
mysql-test/r/mysql.result
mysql-test/r/mysql.result
+2
-0
mysql-test/t/mysql.test
mysql-test/t/mysql.test
+9
-0
sql/sql_parse.cc
sql/sql_parse.cc
+10
-1
sql/sql_repl.cc
sql/sql_repl.cc
+8
-2
No files found.
client/mysql.cc
View file @
4c6e14ce
...
@@ -1082,6 +1082,17 @@ static int read_and_execute(bool interactive)
...
@@ -1082,6 +1082,17 @@ static int read_and_execute(bool interactive)
if
(
!
interactive
)
if
(
!
interactive
)
{
{
line
=
batch_readline
(
status
.
line_buff
);
line
=
batch_readline
(
status
.
line_buff
);
/*
Skip UTF8 Byte Order Marker (BOM) 0xEFBBBF.
Editors like "notepad" put this marker in
the very beginning of a text file when
you save the file using "Unicode UTF-8" format.
*/
if
(
!
line_number
&&
(
uchar
)
line
[
0
]
==
0xEF
&&
(
uchar
)
line
[
1
]
==
0xBB
&&
(
uchar
)
line
[
2
]
==
0xBF
)
line
+=
3
;
line_number
++
;
line_number
++
;
if
(
!
glob_buffer
.
length
())
if
(
!
glob_buffer
.
length
())
status
.
query_start_line
=
line_number
;
status
.
query_start_line
=
line_number
;
...
...
mysql-test/r/mysql.result
View file @
4c6e14ce
...
@@ -178,5 +178,7 @@ ERROR at line 1: DELIMITER cannot contain a backslash character
...
@@ -178,5 +178,7 @@ ERROR at line 1: DELIMITER cannot contain a backslash character
1
1
1
1
1
1
This is a file starting with UTF8 BOM 0xEFBBBF
This is a file starting with UTF8 BOM 0xEFBBBF
End of 5.0 tests
End of 5.0 tests
WARNING: --server-arg option not supported in this configuration.
WARNING: --server-arg option not supported in this configuration.
mysql-test/t/mysql.test
View file @
4c6e14ce
...
@@ -282,6 +282,15 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug21412.sql;
...
@@ -282,6 +282,15 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug21412.sql;
#
#
--
exec
$MYSQL
test
-
e
"/*! \C latin1 */ select 1;"
--
exec
$MYSQL
test
-
e
"/*! \C latin1 */ select 1;"
#
# Bug#29323 mysql client only accetps ANSI encoded files
#
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
bug29323
.
sql
select
"This is a file starting with UTF8 BOM 0xEFBBBF"
;
EOF
--
exec
$MYSQL
<
$MYSQLTEST_VARDIR
/
tmp
/
bug29323
.
sql
2
>&
1
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
bug29323
.
sql
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
#
#
...
...
sql/sql_parse.cc
View file @
4c6e14ce
...
@@ -2055,7 +2055,16 @@ mysql_execute_command(THD *thd)
...
@@ -2055,7 +2055,16 @@ mysql_execute_command(THD *thd)
if
(
check_global_access
(
thd
,
SUPER_ACL
|
REPL_CLIENT_ACL
))
if
(
check_global_access
(
thd
,
SUPER_ACL
|
REPL_CLIENT_ACL
))
goto
error
;
goto
error
;
pthread_mutex_lock
(
&
LOCK_active_mi
);
pthread_mutex_lock
(
&
LOCK_active_mi
);
res
=
show_master_info
(
thd
,
active_mi
);
if
(
active_mi
!=
NULL
)
{
res
=
show_master_info
(
thd
,
active_mi
);
}
else
{
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
0
,
"the master info structure does not exist"
);
send_ok
(
thd
);
}
pthread_mutex_unlock
(
&
LOCK_active_mi
);
pthread_mutex_unlock
(
&
LOCK_active_mi
);
break
;
break
;
}
}
...
...
sql/sql_repl.cc
View file @
4c6e14ce
...
@@ -369,7 +369,6 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
...
@@ -369,7 +369,6 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
name
=
0
;
// Find first log
name
=
0
;
// Find first log
linfo
.
index_file_offset
=
0
;
linfo
.
index_file_offset
=
0
;
thd
->
current_linfo
=
&
linfo
;
if
(
mysql_bin_log
.
find_log_pos
(
&
linfo
,
name
,
1
))
if
(
mysql_bin_log
.
find_log_pos
(
&
linfo
,
name
,
1
))
{
{
...
@@ -378,6 +377,10 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
...
@@ -378,6 +377,10 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
goto
err
;
goto
err
;
}
}
pthread_mutex_lock
(
&
LOCK_thread_count
);
thd
->
current_linfo
=
&
linfo
;
pthread_mutex_unlock
(
&
LOCK_thread_count
);
if
((
file
=
open_binlog
(
&
log
,
log_file_name
,
&
errmsg
))
<
0
)
if
((
file
=
open_binlog
(
&
log
,
log_file_name
,
&
errmsg
))
<
0
)
{
{
my_errno
=
ER_MASTER_FATAL_ERROR_READING_BINLOG
;
my_errno
=
ER_MASTER_FATAL_ERROR_READING_BINLOG
;
...
@@ -1359,7 +1362,6 @@ bool mysql_show_binlog_events(THD* thd)
...
@@ -1359,7 +1362,6 @@ bool mysql_show_binlog_events(THD* thd)
name
=
0
;
// Find first log
name
=
0
;
// Find first log
linfo
.
index_file_offset
=
0
;
linfo
.
index_file_offset
=
0
;
thd
->
current_linfo
=
&
linfo
;
if
(
mysql_bin_log
.
find_log_pos
(
&
linfo
,
name
,
1
))
if
(
mysql_bin_log
.
find_log_pos
(
&
linfo
,
name
,
1
))
{
{
...
@@ -1367,6 +1369,10 @@ bool mysql_show_binlog_events(THD* thd)
...
@@ -1367,6 +1369,10 @@ bool mysql_show_binlog_events(THD* thd)
goto
err
;
goto
err
;
}
}
pthread_mutex_lock
(
&
LOCK_thread_count
);
thd
->
current_linfo
=
&
linfo
;
pthread_mutex_unlock
(
&
LOCK_thread_count
);
if
((
file
=
open_binlog
(
&
log
,
linfo
.
log_file_name
,
&
errmsg
))
<
0
)
if
((
file
=
open_binlog
(
&
log
,
linfo
.
log_file_name
,
&
errmsg
))
<
0
)
goto
err
;
goto
err
;
...
...
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