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
56aa88b3
Commit
56aa88b3
authored
Oct 16, 2008
by
Gleb Shchepa
Browse files
Options
Browse Files
Download
Plain Diff
merge 5.0-bugteam --> 5.1-bugteam (bug 39844)
parents
7b327a58
c411a11e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
mysql-test/r/order_by.result
mysql-test/r/order_by.result
+16
-0
mysql-test/t/order_by.test
mysql-test/t/order_by.test
+20
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-0
No files found.
mysql-test/r/order_by.result
View file @
56aa88b3
...
...
@@ -1428,6 +1428,22 @@ set session max_sort_length= 2180;
select * from t1 order by b;
ERROR HY001: Out of sort memory; increase server sort buffer size
drop table t1;
#
# Bug #39844: Query Crash Mysql Server 5.0.67
#
CREATE TABLE t1 (a INT PRIMARY KEY);
CREATE TABLE t2 (a INT PRIMARY KEY, b INT);
CREATE TABLE t3 (c INT);
INSERT INTO t1 (a) VALUES (1), (2);
INSERT INTO t2 (a,b) VALUES (1,2), (2,3);
INSERT INTO t3 (c) VALUES (1), (2);
SELECT
(SELECT t1.a FROM t1, t2 WHERE t1.a = t2.b AND t2.a = t3.c ORDER BY t1.a)
FROM t3;
(SELECT t1.a FROM t1, t2 WHERE t1.a = t2.b AND t2.a = t3.c ORDER BY t1.a)
2
NULL
DROP TABLE t1, t2, t3;
CREATE TABLE t2 (a varchar(32), b int(11), c float, d double,
UNIQUE KEY a (a,b,c), KEY b (b), KEY c (c));
CREATE TABLE t1 (a varchar(32), b char(3), UNIQUE KEY a (a,b), KEY b (b));
...
...
mysql-test/t/order_by.test
View file @
56aa88b3
...
...
@@ -847,6 +847,26 @@ set session max_sort_length= 2180;
select
*
from
t1
order
by
b
;
drop
table
t1
;
--
echo
#
--
echo
# Bug #39844: Query Crash Mysql Server 5.0.67
--
echo
#
CREATE
TABLE
t1
(
a
INT
PRIMARY
KEY
);
CREATE
TABLE
t2
(
a
INT
PRIMARY
KEY
,
b
INT
);
CREATE
TABLE
t3
(
c
INT
);
INSERT
INTO
t1
(
a
)
VALUES
(
1
),
(
2
);
INSERT
INTO
t2
(
a
,
b
)
VALUES
(
1
,
2
),
(
2
,
3
);
INSERT
INTO
t3
(
c
)
VALUES
(
1
),
(
2
);
SELECT
(
SELECT
t1
.
a
FROM
t1
,
t2
WHERE
t1
.
a
=
t2
.
b
AND
t2
.
a
=
t3
.
c
ORDER
BY
t1
.
a
)
FROM
t3
;
DROP
TABLE
t1
,
t2
,
t3
;
#
# Bug #35206: select query result different if the key is indexed or not
#
...
...
sql/sql_select.cc
View file @
56aa88b3
...
...
@@ -6863,6 +6863,7 @@ only_eq_ref_tables(JOIN *join,ORDER *order,table_map tables)
{
if
(
specialflag
&
SPECIAL_SAFE_MODE
)
return
0
;
// skip this optimize /* purecov: inspected */
tables
&=
~
PSEUDO_TABLE_BITS
;
for
(
JOIN_TAB
**
tab
=
join
->
map2table
;
tables
;
tab
++
,
tables
>>=
1
)
{
if
(
tables
&
1
&&
!
eq_ref_table
(
join
,
order
,
*
tab
))
...
...
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