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
436bed4f
Commit
436bed4f
authored
Jan 15, 2007
by
igor@olga.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into olga.mysql.com:/home/igor/mysql-5.0-opt
parents
fcf2b139
0a47b962
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
0 deletions
+86
-0
mysql-test/r/range.result
mysql-test/r/range.result
+43
-0
mysql-test/t/range.test
mysql-test/t/range.test
+43
-0
No files found.
mysql-test/r/range.result
View file @
436bed4f
...
@@ -674,6 +674,49 @@ select a from t1 where a > 'x';
...
@@ -674,6 +674,49 @@ select a from t1 where a > 'x';
a
a
xx
xx
drop table t1;
drop table t1;
CREATE TABLE t1 (
OXID varchar(32) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
OXPARENTID varchar(32) COLLATE latin1_german2_ci NOT NULL DEFAULT 'oxrootid',
OXLEFT int NOT NULL DEFAULT '0',
OXRIGHT int NOT NULL DEFAULT '0',
OXROOTID varchar(32) COLLATE latin1_german2_ci NOT NULL DEFAULT '',
PRIMARY KEY (OXID),
KEY OXNID (OXID),
KEY OXLEFT (OXLEFT),
KEY OXRIGHT (OXRIGHT),
KEY OXROOTID (OXROOTID)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci;
INSERT INTO t1 VALUES
('d8c4177d09f8b11f5.52725521','oxrootid',1,40,'d8c4177d09f8b11f5.52725521'),
('d8c4177d151affab2.81582770','d8c4177d09f8b11f5.52725521',2,3,
'd8c4177d09f8b11f5.52725521'),
('d8c4177d206a333d2.74422679','d8c4177d09f8b11f5.52725521',4,5,
'd8c4177d09f8b11f5.52725521'),
('d8c4177d225791924.30714720','d8c4177d09f8b11f5.52725521',6,7,
'd8c4177d09f8b11f5.52725521'),
('d8c4177d2380fc201.39666693','d8c4177d09f8b11f5.52725521',8,9,
'd8c4177d09f8b11f5.52725521'),
('d8c4177d24ccef970.14957924','d8c4177d09f8b11f5.52725521',10,11,
'd8c4177d09f8b11f5.52725521');
EXPLAIN
SELECT s.oxid FROM t1 v, t1 s
WHERE s.oxrootid = 'd8c4177d09f8b11f5.52725521' AND
v.oxrootid ='d8c4177d09f8b11f5.52725521' AND
s.oxleft > v.oxleft AND s.oxleft < v.oxright;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE v ref OXLEFT,OXRIGHT,OXROOTID OXROOTID 32 const 5 Using where
1 SIMPLE s ALL OXLEFT NULL NULL NULL 5 Range checked for each record (index map: 0x4)
SELECT s.oxid FROM t1 v, t1 s
WHERE s.oxrootid = 'd8c4177d09f8b11f5.52725521' AND
v.oxrootid ='d8c4177d09f8b11f5.52725521' AND
s.oxleft > v.oxleft AND s.oxleft < v.oxright;
oxid
d8c4177d151affab2.81582770
d8c4177d206a333d2.74422679
d8c4177d225791924.30714720
d8c4177d2380fc201.39666693
d8c4177d24ccef970.14957924
DROP TABLE t1;
End of 4.1 tests
End of 4.1 tests
CREATE TABLE t1 (
CREATE TABLE t1 (
id int(11) NOT NULL auto_increment,
id int(11) NOT NULL auto_increment,
...
...
mysql-test/t/range.test
View file @
436bed4f
...
@@ -525,6 +525,49 @@ explain select a from t1 where a > 'x';
...
@@ -525,6 +525,49 @@ explain select a from t1 where a > 'x';
select
a
from
t1
where
a
>
'x'
;
select
a
from
t1
where
a
>
'x'
;
drop
table
t1
;
drop
table
t1
;
#
# Bug #24776: assertion abort for 'range checked for each record'
#
CREATE
TABLE
t1
(
OXID
varchar
(
32
)
COLLATE
latin1_german2_ci
NOT
NULL
DEFAULT
''
,
OXPARENTID
varchar
(
32
)
COLLATE
latin1_german2_ci
NOT
NULL
DEFAULT
'oxrootid'
,
OXLEFT
int
NOT
NULL
DEFAULT
'0'
,
OXRIGHT
int
NOT
NULL
DEFAULT
'0'
,
OXROOTID
varchar
(
32
)
COLLATE
latin1_german2_ci
NOT
NULL
DEFAULT
''
,
PRIMARY
KEY
(
OXID
),
KEY
OXNID
(
OXID
),
KEY
OXLEFT
(
OXLEFT
),
KEY
OXRIGHT
(
OXRIGHT
),
KEY
OXROOTID
(
OXROOTID
)
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin1
COLLATE
=
latin1_german2_ci
;
INSERT
INTO
t1
VALUES
(
'd8c4177d09f8b11f5.52725521'
,
'oxrootid'
,
1
,
40
,
'd8c4177d09f8b11f5.52725521'
),
(
'd8c4177d151affab2.81582770'
,
'd8c4177d09f8b11f5.52725521'
,
2
,
3
,
'd8c4177d09f8b11f5.52725521'
),
(
'd8c4177d206a333d2.74422679'
,
'd8c4177d09f8b11f5.52725521'
,
4
,
5
,
'd8c4177d09f8b11f5.52725521'
),
(
'd8c4177d225791924.30714720'
,
'd8c4177d09f8b11f5.52725521'
,
6
,
7
,
'd8c4177d09f8b11f5.52725521'
),
(
'd8c4177d2380fc201.39666693'
,
'd8c4177d09f8b11f5.52725521'
,
8
,
9
,
'd8c4177d09f8b11f5.52725521'
),
(
'd8c4177d24ccef970.14957924'
,
'd8c4177d09f8b11f5.52725521'
,
10
,
11
,
'd8c4177d09f8b11f5.52725521'
);
EXPLAIN
SELECT
s
.
oxid
FROM
t1
v
,
t1
s
WHERE
s
.
oxrootid
=
'd8c4177d09f8b11f5.52725521'
AND
v
.
oxrootid
=
'd8c4177d09f8b11f5.52725521'
AND
s
.
oxleft
>
v
.
oxleft
AND
s
.
oxleft
<
v
.
oxright
;
SELECT
s
.
oxid
FROM
t1
v
,
t1
s
WHERE
s
.
oxrootid
=
'd8c4177d09f8b11f5.52725521'
AND
v
.
oxrootid
=
'd8c4177d09f8b11f5.52725521'
AND
s
.
oxleft
>
v
.
oxleft
AND
s
.
oxleft
<
v
.
oxright
;
DROP
TABLE
t1
;
--
echo
End
of
4.1
tests
--
echo
End
of
4.1
tests
#
#
...
...
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