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
c5209fcb
Commit
c5209fcb
authored
Aug 01, 2007
by
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/ram/work/b29928.new/b29928.new.5.0
into mysql.com:/home/ram/work/b29928.new/b29928.new.5.1
parents
bd77d3e1
7fb417d0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
17 deletions
+42
-17
mysql-test/r/mysqlbinlog.result
mysql-test/r/mysqlbinlog.result
+7
-0
mysql-test/t/mysqlbinlog.test
mysql-test/t/mysqlbinlog.test
+23
-2
sql/item_func.cc
sql/item_func.cc
+1
-10
sql/log_event.cc
sql/log_event.cc
+7
-4
sql/sql_class.cc
sql/sql_class.cc
+1
-1
sql/sql_class.h
sql/sql_class.h
+3
-0
No files found.
mysql-test/r/mysqlbinlog.result
View file @
c5209fcb
...
@@ -319,6 +319,13 @@ INSERT INTO t1 VALUES ('0123456789');
...
@@ -319,6 +319,13 @@ INSERT INTO t1 VALUES ('0123456789');
flush logs;
flush logs;
DROP TABLE t1;
DROP TABLE t1;
# Query thread_id=REMOVED exec_time=REMOVED error_code=REMOVED
# Query thread_id=REMOVED exec_time=REMOVED error_code=REMOVED
flush logs;
create table t1(a int);
insert into t1 values(connection_id());
flush logs;
drop table t1;
1
drop table t1;
End of 5.0 tests
End of 5.0 tests
flush logs;
flush logs;
End of 5.1 tests
End of 5.1 tests
mysql-test/t/mysqlbinlog.test
View file @
c5209fcb
...
@@ -219,6 +219,27 @@ flush logs;
...
@@ -219,6 +219,27 @@ flush logs;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
exec
$MYSQL_BINLOG
--
hexdump
--
local
-
load
=
$MYSQLTEST_VARDIR
/
tmp
/
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000012
|
grep
'Query'
|
sed
's/[0-9]\{1,\}/REMOVED/g'
--
exec
$MYSQL_BINLOG
--
hexdump
--
local
-
load
=
$MYSQLTEST_VARDIR
/
tmp
/
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000012
|
grep
'Query'
|
sed
's/[0-9]\{1,\}/REMOVED/g'
#
# Bug #29928: incorrect connection_id() restoring from mysqlbinlog out
#
flush
logs
;
create
table
t1
(
a
int
);
insert
into
t1
values
(
connection_id
());
let
$a
=
`select a from t1`
;
flush
logs
;
--
exec
$MYSQL_BINLOG
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000014
>
$MYSQLTEST_VARDIR
/
tmp
/
bug29928
.
sql
drop
table
t1
;
connect
(
con1
,
localhost
,
root
,
,
test
);
connection
con1
;
--
exec
$MYSQL
test
<
$MYSQLTEST_VARDIR
/
tmp
/
bug29928
.
sql
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
bug29928
.
sql
let
$b
=
`select a from t1`
;
disconnect
con1
;
connection
default
;
let
$c
=
`select $a=$b`
;
--
echo
$c
drop
table
t1
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
#
#
...
@@ -226,7 +247,7 @@ DROP TABLE t1;
...
@@ -226,7 +247,7 @@ DROP TABLE t1;
#
#
flush
logs
;
flush
logs
;
--
error
1
--
error
1
--
exec
$MYSQL_BINLOG
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
00001
4
>/
dev
/
null
2
>/
dev
/
null
--
exec
$MYSQL_BINLOG
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
00001
6
>/
dev
/
null
2
>/
dev
/
null
--
exec
$MYSQL_BINLOG
--
force
-
if
-
open
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
00001
4
>/
dev
/
null
2
>/
dev
/
null
--
exec
$MYSQL_BINLOG
--
force
-
if
-
open
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
00001
6
>/
dev
/
null
2
>/
dev
/
null
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
sql/item_func.cc
View file @
c5209fcb
...
@@ -649,16 +649,7 @@ bool Item_func_connection_id::fix_fields(THD *thd, Item **ref)
...
@@ -649,16 +649,7 @@ bool Item_func_connection_id::fix_fields(THD *thd, Item **ref)
{
{
if
(
Item_int_func
::
fix_fields
(
thd
,
ref
))
if
(
Item_int_func
::
fix_fields
(
thd
,
ref
))
return
TRUE
;
return
TRUE
;
value
=
thd
->
variables
.
pseudo_thread_id
;
/*
To replicate CONNECTION_ID() properly we should use
pseudo_thread_id on slave, which contains the value of thread_id
on master.
*/
value
=
((
thd
->
slave_thread
)
?
thd
->
variables
.
pseudo_thread_id
:
thd
->
thread_id
);
return
FALSE
;
return
FALSE
;
}
}
...
...
sql/log_event.cc
View file @
c5209fcb
...
@@ -1479,8 +1479,9 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
...
@@ -1479,8 +1479,9 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
ulong
query_length
,
bool
using_trans
,
ulong
query_length
,
bool
using_trans
,
bool
suppress_use
,
THD
::
killed_state
killed_status_arg
)
bool
suppress_use
,
THD
::
killed_state
killed_status_arg
)
:
Log_event
(
thd_arg
,
:
Log_event
(
thd_arg
,
((
thd_arg
->
tmp_table_used
?
LOG_EVENT_THREAD_SPECIFIC_F
:
0
)
((
thd_arg
->
tmp_table_used
||
thd_arg
->
thread_specific_used
)
?
|
(
suppress_use
?
LOG_EVENT_SUPPRESS_USE_F
:
0
)),
LOG_EVENT_THREAD_SPECIFIC_F
:
0
)
|
(
suppress_use
?
LOG_EVENT_SUPPRESS_USE_F
:
0
),
using_trans
),
using_trans
),
data_buf
(
0
),
query
(
query_arg
),
catalog
(
thd_arg
->
catalog
),
data_buf
(
0
),
query
(
query_arg
),
catalog
(
thd_arg
->
catalog
),
db
(
thd_arg
->
db
),
q_len
((
uint32
)
query_length
),
db
(
thd_arg
->
db
),
q_len
((
uint32
)
query_length
),
...
@@ -2912,8 +2913,10 @@ Load_log_event::Load_log_event(THD *thd_arg, sql_exchange *ex,
...
@@ -2912,8 +2913,10 @@ Load_log_event::Load_log_event(THD *thd_arg, sql_exchange *ex,
List
<
Item
>
&
fields_arg
,
List
<
Item
>
&
fields_arg
,
enum
enum_duplicates
handle_dup
,
enum
enum_duplicates
handle_dup
,
bool
ignore
,
bool
using_trans
)
bool
ignore
,
bool
using_trans
)
:
Log_event
(
thd_arg
,
!
thd_arg
->
tmp_table_used
?
:
Log_event
(
thd_arg
,
0
:
LOG_EVENT_THREAD_SPECIFIC_F
,
using_trans
),
(
thd_arg
->
tmp_table_used
||
thd_arg
->
thread_specific_used
)
?
LOG_EVENT_THREAD_SPECIFIC_F
:
0
,
using_trans
),
thread_id
(
thd_arg
->
thread_id
),
thread_id
(
thd_arg
->
thread_id
),
slave_proxy_id
(
thd_arg
->
variables
.
pseudo_thread_id
),
slave_proxy_id
(
thd_arg
->
variables
.
pseudo_thread_id
),
num_fields
(
0
),
fields
(
0
),
num_fields
(
0
),
fields
(
0
),
...
...
sql/sql_class.cc
View file @
c5209fcb
...
@@ -394,7 +394,7 @@ THD::THD()
...
@@ -394,7 +394,7 @@ THD::THD()
count_cuted_fields
=
CHECK_FIELD_IGNORE
;
count_cuted_fields
=
CHECK_FIELD_IGNORE
;
killed
=
NOT_KILLED
;
killed
=
NOT_KILLED
;
db_length
=
col_access
=
0
;
db_length
=
col_access
=
0
;
query_error
=
tmp_table_used
=
0
;
query_error
=
tmp_table_used
=
thread_specific_used
=
0
;
hash_clear
(
&
handler_tables_hash
);
hash_clear
(
&
handler_tables_hash
);
tmp_table
=
0
;
tmp_table
=
0
;
used_tables
=
0
;
used_tables
=
0
;
...
...
sql/sql_class.h
View file @
c5209fcb
...
@@ -1406,6 +1406,9 @@ public:
...
@@ -1406,6 +1406,9 @@ public:
bool
in_lock_tables
;
bool
in_lock_tables
;
bool
query_error
,
bootstrap
,
cleanup_done
;
bool
query_error
,
bootstrap
,
cleanup_done
;
bool
tmp_table_used
;
bool
tmp_table_used
;
/** is set if some thread specific value(s) used in a statement. */
bool
thread_specific_used
;
bool
charset_is_system_charset
,
charset_is_collation_connection
;
bool
charset_is_system_charset
,
charset_is_collation_connection
;
bool
charset_is_character_set_filesystem
;
bool
charset_is_character_set_filesystem
;
bool
enable_slow_log
;
/* enable slow log for current statement */
bool
enable_slow_log
;
/* enable slow log for current statement */
...
...
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