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
66a5dfa6
Commit
66a5dfa6
authored
19 years ago
by
elliot@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/users/emurphy/src/mysql-5.1-new
parents
29941c07
36936ecd
Branches unavailable
Tags unavailable
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
mysql-test/r/blackhole.result
mysql-test/r/blackhole.result
+25
-0
mysql-test/t/blackhole.test
mysql-test/t/blackhole.test
+17
-0
sql/ha_blackhole.h
sql/ha_blackhole.h
+1
-0
No files found.
mysql-test/r/blackhole.result
View file @
66a5dfa6
...
...
@@ -110,16 +110,41 @@ master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query 1 # use `test`; drop table t1,t2
master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=blackhole
master-bin.000001 # Query 1 # use `test`; delete from t1 where a=10
master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; update t1 set a=11 where a=15
master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; insert into t1 values(1)
master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; insert ignore into t1 values(1)
master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; replace into t1 values(100)
master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; create table t2 (a varchar(200)) engine=blackhole
master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
master-bin.000001 # Execute_load_query 1 # use `test`; load data infile '../../std_data/words.dat' into table t2 ;file_id=1
master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; alter table t1 add b int
master-bin.000001 # Query 1 # use `test`; alter table t1 drop b
master-bin.000001 # Query 1 # use `test`; create table t3 like t1
master-bin.000001 # Query 1 # use `test`; insert into t1 select * from t3
master-bin.000001 # Query 1 # use `test`; COMMIT
master-bin.000001 # Query 1 # use `test`; replace into t1 select * from t3
master-bin.000001 # Query 1 # use `test`; COMMIT
drop table t1,t2,t3;
reset master;
create table t1 (a int) engine=blackhole;
set autocommit=0;
start transaction;
insert into t1 values(1);
commit;
start transaction;
insert into t1 values(2);
rollback;
set autocommit=1;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=blackhole
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(1)
master-bin.000001 # Query 1 # use `test`; COMMIT
This diff is collapsed.
Click to expand it.
mysql-test/t/blackhole.test
View file @
66a5dfa6
...
...
@@ -127,3 +127,20 @@ show binlog events;
drop
table
t1
,
t2
,
t3
;
# End of 4.1 tests
# Test that a transaction which is rolled back does not go into binlog
# and that a transaction which is committed does
reset
master
;
create
table
t1
(
a
int
)
engine
=
blackhole
;
set
autocommit
=
0
;
start
transaction
;
insert
into
t1
values
(
1
);
commit
;
start
transaction
;
insert
into
t1
values
(
2
);
rollback
;
set
autocommit
=
1
;
--
replace_result
$VERSION
VERSION
--
replace_column
2
# 5 #
show
binlog
events
;
This diff is collapsed.
Click to expand it.
sql/ha_blackhole.h
View file @
66a5dfa6
...
...
@@ -84,4 +84,5 @@ class ha_blackhole: public handler
THR_LOCK_DATA
**
store_lock
(
THD
*
thd
,
THR_LOCK_DATA
**
to
,
enum
thr_lock_type
lock_type
);
bool
has_transactions
()
{
return
1
;
}
};
This diff is collapsed.
Click to expand it.
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