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
4352a6f0
Commit
4352a6f0
authored
Feb 22, 2004
by
guilhem@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
parents
ae6599d5
5afaf4ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
1 deletion
+72
-1
mysql-test/r/rpl_optimize.result
mysql-test/r/rpl_optimize.result
+27
-0
mysql-test/t/rpl_optimize.test
mysql-test/t/rpl_optimize.test
+43
-0
sql/sql_base.cc
sql/sql_base.cc
+2
-1
No files found.
mysql-test/r/rpl_optimize.result
0 → 100644
View file @
4352a6f0
slave stop;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
slave start;
create table t1 (a int not null auto_increment primary key, b int, key(b));
INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
INSERT INTO t1 (a) SELECT null FROM t1;
update t1 set b=(a/2*rand());
delete from t1 order by b limit 10000;
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
drop table t1;
mysql-test/t/rpl_optimize.test
0 → 100644
View file @
4352a6f0
# Test for BUG#1858 "OPTIMIZE TABLE done by a client
# thread stops the slave SQL thread".
# You can replace OPTIMIZE by REPAIR.
source
include
/
master
-
slave
.
inc
;
create
table
t1
(
a
int
not
null
auto_increment
primary
key
,
b
int
,
key
(
b
));
INSERT
INTO
t1
(
a
)
VALUES
(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
),(
9
),(
10
);
INSERT
INTO
t1
(
a
)
SELECT
null
FROM
t1
;
INSERT
INTO
t1
(
a
)
SELECT
null
FROM
t1
;
INSERT
INTO
t1
(
a
)
SELECT
null
FROM
t1
;
INSERT
INTO
t1
(
a
)
SELECT
null
FROM
t1
;
INSERT
INTO
t1
(
a
)
SELECT
null
FROM
t1
;
INSERT
INTO
t1
(
a
)
SELECT
null
FROM
t1
;
INSERT
INTO
t1
(
a
)
SELECT
null
FROM
t1
;
INSERT
INTO
t1
(
a
)
SELECT
null
FROM
t1
;
INSERT
INTO
t1
(
a
)
SELECT
null
FROM
t1
;
INSERT
INTO
t1
(
a
)
SELECT
null
FROM
t1
;
INSERT
INTO
t1
(
a
)
SELECT
null
FROM
t1
;
INSERT
INTO
t1
(
a
)
SELECT
null
FROM
t1
;
INSERT
INTO
t1
(
a
)
SELECT
null
FROM
t1
;
save_master_pos
;
# a few updates to force OPTIMIZE to do something
update
t1
set
b
=
(
a
/
2
*
rand
());
delete
from
t1
order
by
b
limit
10000
;
connection
slave
;
sync_with_master
;
optimize
table
t1
;
connection
master
;
save_master_pos
;
connection
slave
;
# Bug was that when the INSERT terminated on slave,
# the slave SQL thread got killed by OPTIMIZE.
sync_with_master
;
# won't work if slave SQL thread stopped
connection
master
;
# cleanup
drop
table
t1
;
connection
slave
;
sync_with_master
;
# If the machine is so fast that slave syncs before OPTIMIZE
# starts, this test wil demonstrate nothing but will pass.
sql/sql_base.cc
View file @
4352a6f0
...
...
@@ -2364,7 +2364,8 @@ bool remove_table_from_cache(THD *thd, const char *db, const char *table_name,
if
(
table
->
db_stat
)
result
=
1
;
/* Kill delayed insert threads */
if
(
in_use
->
system_thread
&&
!
in_use
->
killed
)
if
((
in_use
->
system_thread
&
SYSTEM_THREAD_DELAYED_INSERT
)
&&
!
in_use
->
killed
)
{
in_use
->
killed
=
1
;
pthread_mutex_lock
(
&
in_use
->
mysys_var
->
mutex
);
...
...
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