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
5dfa294b
Commit
5dfa294b
authored
Jun 03, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/mnt/gentoo64/work/test-5.0-opt-mysql
parents
57b1ab50
e3a5404d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
4 deletions
+31
-4
mysql-test/r/user_var.result
mysql-test/r/user_var.result
+23
-2
mysql-test/t/user_var.test
mysql-test/t/user_var.test
+8
-2
No files found.
mysql-test/r/user_var.result
View file @
5dfa294b
...
...
@@ -317,8 +317,11 @@ SHOW COUNT(*) WARNINGS;
SHOW COUNT(*) ERRORS;
@@session.error_count
1
create table t1(f1 int);
insert into t1 values(1),(1),(2),(3),(4),(1),(3),(1);
create table t1(f1 int, f2 varchar(2), f3 float, f4 decimal(2,1));
insert into t1 values
(1, "a", 1.5, 1.6), (1, "a", 1.5, 1.6), (2, "b", 2.5, 2.6),
(3, "c", 3.5, 3.6), (4, "d", 4.5, 4.6), (1, "a", 1.5, 1.6),
(3, "c", 3.5, 3.6), (1, "a", 1.5, 1.6);
select @a:=f1, count(f1) from t1 group by 1 desc;
@a:=f1 count(f1)
4 1
...
...
@@ -331,4 +334,22 @@ select @a:=f1, count(f1) from t1 group by 1 asc;
2 1
3 2
4 1
select @a:=f2, count(f2) from t1 group by 1 desc;
@a:=f2 count(f2)
a 4
b 1
c 2
d 1
select @a:=f3, count(f3) from t1 group by 1 desc;
@a:=f3 count(f3)
1.5 4
2.5 1
3.5 2
4.5 1
select @a:=f4, count(f4) from t1 group by 1 desc;
@a:=f4 count(f4)
4.6 1
3.6 2
2.6 1
1.6 4
drop table t1;
mysql-test/t/user_var.test
View file @
5dfa294b
...
...
@@ -226,8 +226,14 @@ SHOW COUNT(*) ERRORS;
#
# Bug#28494: Grouping by Item_func_set_user_var produces incorrect result.
#
create
table
t1
(
f1
int
);
insert
into
t1
values
(
1
),(
1
),(
2
),(
3
),(
4
),(
1
),(
3
),(
1
);
create
table
t1
(
f1
int
,
f2
varchar
(
2
),
f3
float
,
f4
decimal
(
2
,
1
));
insert
into
t1
values
(
1
,
"a"
,
1.5
,
1.6
),
(
1
,
"a"
,
1.5
,
1.6
),
(
2
,
"b"
,
2.5
,
2.6
),
(
3
,
"c"
,
3.5
,
3.6
),
(
4
,
"d"
,
4.5
,
4.6
),
(
1
,
"a"
,
1.5
,
1.6
),
(
3
,
"c"
,
3.5
,
3.6
),
(
1
,
"a"
,
1.5
,
1.6
);
select
@
a
:=
f1
,
count
(
f1
)
from
t1
group
by
1
desc
;
select
@
a
:=
f1
,
count
(
f1
)
from
t1
group
by
1
asc
;
select
@
a
:=
f2
,
count
(
f2
)
from
t1
group
by
1
desc
;
select
@
a
:=
f3
,
count
(
f3
)
from
t1
group
by
1
desc
;
select
@
a
:=
f4
,
count
(
f4
)
from
t1
group
by
1
desc
;
drop
table
t1
;
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