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
bc10c6db
Commit
bc10c6db
authored
Nov 26, 2007
by
kaa@polly.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge polly.(none):/home/kaa/src/opt/bug28837/my50-bug29131
into polly.(none):/home/kaa/src/opt/bug28837/my51-bug29131
parents
d9e48751
8fdd9087
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
108 additions
and
2 deletions
+108
-2
mysql-test/r/merge.result
mysql-test/r/merge.result
+37
-0
mysql-test/r/myisam.result
mysql-test/r/myisam.result
+22
-0
mysql-test/t/merge.test
mysql-test/t/merge.test
+22
-0
mysql-test/t/myisam.test
mysql-test/t/myisam.test
+17
-0
storage/myisam/ha_myisam.cc
storage/myisam/ha_myisam.cc
+5
-1
storage/myisammrg/ha_myisammrg.cc
storage/myisammrg/ha_myisammrg.cc
+5
-1
No files found.
mysql-test/r/merge.result
View file @
bc10c6db
...
@@ -879,4 +879,41 @@ CHECK TABLE tm1;
...
@@ -879,4 +879,41 @@ CHECK TABLE tm1;
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.tm1 check status OK
test.tm1 check status OK
DROP TABLE tm1, t1, t2;
DROP TABLE tm1, t1, t2;
CREATE TABLE t1 (id INT NOT NULL, ref INT NOT NULL, INDEX (id)) ENGINE=MyISAM;
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 (id, ref) VALUES (1,3), (2,1), (3,2), (4,5), (4,4);
INSERT INTO t1 SELECT * FROM t2;
INSERT INTO t1 SELECT * FROM t2;
CREATE TABLE t3 (id INT NOT NULL, ref INT NOT NULL, INDEX (id)) ENGINE=MERGE
UNION(t1);
SELECT * FROM t3 AS a INNER JOIN t3 AS b USING (id) WHERE a.ref < b.ref;
id ref ref
4 4 5
4 4 5
4 4 5
4 4 5
SELECT * FROM t3;
id ref
1 3
2 1
3 2
4 5
4 4
1 3
2 1
3 2
4 5
4 4
DELETE FROM a USING t3 AS a INNER JOIN t3 AS b USING (id) WHERE a.ref < b.ref;
SELECT * FROM t3;
id ref
1 3
2 1
3 2
4 5
1 3
2 1
3 2
4 5
DROP TABLE t1, t2, t3;
End of 5.0 tests
End of 5.0 tests
mysql-test/r/myisam.result
View file @
bc10c6db
...
@@ -1794,6 +1794,28 @@ SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
...
@@ -1794,6 +1794,28 @@ SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
a
a
1
1
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (id int NOT NULL, ref int NOT NULL, INDEX (id)) ENGINE=MyISAM;
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 (id, ref) VALUES (1,3), (2,1), (3,2), (4,5), (4,4);
INSERT INTO t1 SELECT * FROM t2;
SELECT * FROM t1 AS a INNER JOIN t1 AS b USING (id) WHERE a.ref < b.ref;
id ref ref
4 4 5
SELECT * FROM t1;
id ref
1 3
2 1
3 2
4 5
4 4
DELETE FROM a USING t1 AS a INNER JOIN t1 AS b USING (id) WHERE a.ref < b.ref;
SELECT * FROM t1;
id ref
1 3
2 1
3 2
4 5
DROP TABLE t1, t2;
End of 5.0 tests
End of 5.0 tests
create table t1 (a int not null, key `a` (a) key_block_size=1024);
create table t1 (a int not null, key `a` (a) key_block_size=1024);
show create table t1;
show create table t1;
...
...
mysql-test/t/merge.test
View file @
bc10c6db
...
@@ -511,4 +511,26 @@ SELECT * FROM tm1;
...
@@ -511,4 +511,26 @@ SELECT * FROM tm1;
CHECK
TABLE
tm1
;
CHECK
TABLE
tm1
;
DROP
TABLE
tm1
,
t1
,
t2
;
DROP
TABLE
tm1
,
t1
,
t2
;
#
# Bug #28837: MyISAM storage engine error (134) doing delete with self-join
#
CREATE
TABLE
t1
(
id
INT
NOT
NULL
,
ref
INT
NOT
NULL
,
INDEX
(
id
))
ENGINE
=
MyISAM
;
CREATE
TABLE
t2
LIKE
t1
;
INSERT
INTO
t2
(
id
,
ref
)
VALUES
(
1
,
3
),
(
2
,
1
),
(
3
,
2
),
(
4
,
5
),
(
4
,
4
);
INSERT
INTO
t1
SELECT
*
FROM
t2
;
INSERT
INTO
t1
SELECT
*
FROM
t2
;
CREATE
TABLE
t3
(
id
INT
NOT
NULL
,
ref
INT
NOT
NULL
,
INDEX
(
id
))
ENGINE
=
MERGE
UNION
(
t1
);
SELECT
*
FROM
t3
AS
a
INNER
JOIN
t3
AS
b
USING
(
id
)
WHERE
a
.
ref
<
b
.
ref
;
SELECT
*
FROM
t3
;
DELETE
FROM
a
USING
t3
AS
a
INNER
JOIN
t3
AS
b
USING
(
id
)
WHERE
a
.
ref
<
b
.
ref
;
SELECT
*
FROM
t3
;
DROP
TABLE
t1
,
t2
,
t3
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
mysql-test/t/myisam.test
View file @
bc10c6db
...
@@ -1146,6 +1146,23 @@ ALTER TABLE t1 ENABLE KEYS;
...
@@ -1146,6 +1146,23 @@ ALTER TABLE t1 ENABLE KEYS;
SELECT
a
FROM
t1
FORCE
INDEX
(
inx
)
WHERE
a
=
1
;
SELECT
a
FROM
t1
FORCE
INDEX
(
inx
)
WHERE
a
=
1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug#28837: MyISAM storage engine error (134) doing delete with self-join
#
CREATE
TABLE
t1
(
id
int
NOT
NULL
,
ref
int
NOT
NULL
,
INDEX
(
id
))
ENGINE
=
MyISAM
;
CREATE
TABLE
t2
LIKE
t1
;
INSERT
INTO
t2
(
id
,
ref
)
VALUES
(
1
,
3
),
(
2
,
1
),
(
3
,
2
),
(
4
,
5
),
(
4
,
4
);
INSERT
INTO
t1
SELECT
*
FROM
t2
;
SELECT
*
FROM
t1
AS
a
INNER
JOIN
t1
AS
b
USING
(
id
)
WHERE
a
.
ref
<
b
.
ref
;
SELECT
*
FROM
t1
;
DELETE
FROM
a
USING
t1
AS
a
INNER
JOIN
t1
AS
b
USING
(
id
)
WHERE
a
.
ref
<
b
.
ref
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
,
t2
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
...
...
storage/myisam/ha_myisam.cc
View file @
bc10c6db
...
@@ -1649,9 +1649,13 @@ int ha_myisam::index_next_same(uchar *buf,
...
@@ -1649,9 +1649,13 @@ int ha_myisam::index_next_same(uchar *buf,
const
uchar
*
key
__attribute__
((
unused
)),
const
uchar
*
key
__attribute__
((
unused
)),
uint
length
__attribute__
((
unused
)))
uint
length
__attribute__
((
unused
)))
{
{
int
error
;
DBUG_ASSERT
(
inited
==
INDEX
);
DBUG_ASSERT
(
inited
==
INDEX
);
ha_statistic_increment
(
&
SSV
::
ha_read_next_count
);
ha_statistic_increment
(
&
SSV
::
ha_read_next_count
);
int
error
=
mi_rnext_same
(
file
,
buf
);
do
{
error
=
mi_rnext_same
(
file
,
buf
);
}
while
(
error
==
HA_ERR_RECORD_DELETED
);
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
return
error
;
return
error
;
}
}
...
...
storage/myisammrg/ha_myisammrg.cc
View file @
bc10c6db
...
@@ -271,8 +271,12 @@ int ha_myisammrg::index_next_same(uchar * buf,
...
@@ -271,8 +271,12 @@ int ha_myisammrg::index_next_same(uchar * buf,
const
uchar
*
key
__attribute__
((
unused
)),
const
uchar
*
key
__attribute__
((
unused
)),
uint
length
__attribute__
((
unused
)))
uint
length
__attribute__
((
unused
)))
{
{
int
error
;
ha_statistic_increment
(
&
SSV
::
ha_read_next_count
);
ha_statistic_increment
(
&
SSV
::
ha_read_next_count
);
int
error
=
myrg_rnext_same
(
file
,
buf
);
do
{
error
=
myrg_rnext_same
(
file
,
buf
);
}
while
(
error
==
HA_ERR_RECORD_DELETED
);
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
return
error
;
return
error
;
}
}
...
...
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