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
38cf7dee
Commit
38cf7dee
authored
Apr 03, 2007
by
igor@olga.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge olga.mysql.com:/home/igor/mysql-4.1-opt
into olga.mysql.com:/home/igor/mysql-5.0-opt
parents
a87e5ac3
0e14d4c7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
mysql-test/r/order_by.result
mysql-test/r/order_by.result
+25
-0
mysql-test/t/order_by.test
mysql-test/t/order_by.test
+6
-0
No files found.
mysql-test/r/order_by.result
View file @
38cf7dee
...
...
@@ -964,6 +964,31 @@ x1 x2
4
1
2
SELECT a, a IN (1,2) FROM t1 ORDER BY a IN (1,2);
a a IN (1,2)
3 0
4 0
2 1
1 1
SELECT a FROM t1 ORDER BY a IN (1,2);
a
3
4
2
1
SELECT a+10 FROM t1 ORDER BY a IN (1,2);
a+10
13
14
12
11
SELECT a, IF(a IN (1,2), a, a+10) FROM t1
ORDER BY IF(a IN (3,4), a, a+10);
a IF(a IN (1,2), a, a+10)
3 13
4 14
1 1
2 2
DROP TABLE t1;
create table t1 (a int not null, b int not null, c int not null);
insert t1 values (1,1,1),(1,1,2),(1,2,1);
...
...
mysql-test/t/order_by.test
View file @
38cf7dee
...
...
@@ -658,6 +658,12 @@ SELECT IF(a IN (1,2), a, '') as x1, IF(a NOT IN (1,2), a, '') as x2
SELECT
IF
(
a
IN
(
1
,
2
),
a
,
''
)
as
x1
,
IF
(
a
NOT
IN
(
1
,
2
),
a
,
''
)
as
x2
FROM
t1
GROUP
BY
x1
,
IF
(
a
NOT
IN
(
1
,
2
),
a
,
''
);
# The remaining queries are for better coverage
SELECT
a
,
a
IN
(
1
,
2
)
FROM
t1
ORDER
BY
a
IN
(
1
,
2
);
SELECT
a
FROM
t1
ORDER
BY
a
IN
(
1
,
2
);
SELECT
a
+
10
FROM
t1
ORDER
BY
a
IN
(
1
,
2
);
SELECT
a
,
IF
(
a
IN
(
1
,
2
),
a
,
a
+
10
)
FROM
t1
ORDER
BY
IF
(
a
IN
(
3
,
4
),
a
,
a
+
10
);
DROP
TABLE
t1
;
# End of 4.1
...
...
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