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
dff0a1ac
Commit
dff0a1ac
authored
Oct 16, 2006
by
gkodinov/kgeorge@macbook.gmz
Browse files
Options
Browse Files
Download
Plain Diff
Merge macbook.gmz:/Users/kgeorge/mysql/work/B14019-4.1-opt
into macbook.gmz:/Users/kgeorge/mysql/work/B14019-5.0-opt
parents
ea8a646d
11561638
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
8 deletions
+78
-8
mysql-test/r/func_gconcat.result
mysql-test/r/func_gconcat.result
+0
-5
mysql-test/r/group_by.result
mysql-test/r/group_by.result
+45
-0
mysql-test/t/func_gconcat.test
mysql-test/t/func_gconcat.test
+0
-1
mysql-test/t/group_by.test
mysql-test/t/group_by.test
+24
-0
sql/sql_base.cc
sql/sql_base.cc
+9
-2
No files found.
mysql-test/r/func_gconcat.result
View file @
dff0a1ac
...
@@ -74,11 +74,6 @@ grp group_concat(c order by 1)
...
@@ -74,11 +74,6 @@ grp group_concat(c order by 1)
1 a
1 a
2 b,c
2 b,c
3 C,D,d,d,D,E
3 C,D,d,d,D,E
select grp,group_concat(c order by "c") from t1 group by grp;
grp group_concat(c order by "c")
1 a
2 b,c
3 C,D,d,d,D,E
select grp,group_concat(distinct c order by c) from t1 group by grp;
select grp,group_concat(distinct c order by c) from t1 group by grp;
grp group_concat(distinct c order by c)
grp group_concat(distinct c order by c)
1 a
1 a
...
...
mysql-test/r/group_by.result
View file @
dff0a1ac
...
@@ -775,6 +775,51 @@ select sql_buffer_result max(f1)+1 from t1;
...
@@ -775,6 +775,51 @@ select sql_buffer_result max(f1)+1 from t1;
max(f1)+1
max(f1)+1
3
3
drop table t1;
drop table t1;
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES (1),(2);
SELECT a FROM t1 GROUP BY 'a';
a
1
SELECT a FROM t1 GROUP BY "a";
a
1
SELECT a FROM t1 GROUP BY `a`;
a
1
2
set sql_mode=ANSI_QUOTES;
SELECT a FROM t1 GROUP BY "a";
a
1
2
SELECT a FROM t1 GROUP BY 'a';
a
1
SELECT a FROM t1 GROUP BY `a`;
a
1
2
set sql_mode='';
SELECT a FROM t1 HAVING 'a' > 1;
a
SELECT a FROM t1 HAVING "a" > 1;
a
SELECT a FROM t1 HAVING `a` > 1;
a
2
SELECT a FROM t1 ORDER BY 'a' DESC;
a
1
2
SELECT a FROM t1 ORDER BY "a" DESC;
a
1
2
SELECT a FROM t1 ORDER BY `a` DESC;
a
2
1
DROP TABLE t1;
create table t1 (c1 char(3), c2 char(3));
create table t1 (c1 char(3), c2 char(3));
create table t2 (c3 char(3), c4 char(3));
create table t2 (c3 char(3), c4 char(3));
insert into t1 values ('aaa', 'bb1'), ('aaa', 'bb2');
insert into t1 values ('aaa', 'bb1'), ('aaa', 'bb2');
...
...
mysql-test/t/func_gconcat.test
View file @
dff0a1ac
...
@@ -32,7 +32,6 @@ select grp,group_concat(d order by a desc) from t1 group by grp;
...
@@ -32,7 +32,6 @@ select grp,group_concat(d order by a desc) from t1 group by grp;
select
grp
,
group_concat
(
a
order
by
a
,
d
+
c
-
ascii
(
c
)
-
a
)
from
t1
group
by
grp
;
select
grp
,
group_concat
(
a
order
by
a
,
d
+
c
-
ascii
(
c
)
-
a
)
from
t1
group
by
grp
;
select
grp
,
group_concat
(
a
order
by
d
+
c
-
ascii
(
c
),
a
)
from
t1
group
by
grp
;
select
grp
,
group_concat
(
a
order
by
d
+
c
-
ascii
(
c
),
a
)
from
t1
group
by
grp
;
select
grp
,
group_concat
(
c
order
by
1
)
from
t1
group
by
grp
;
select
grp
,
group_concat
(
c
order
by
1
)
from
t1
group
by
grp
;
select
grp
,
group_concat
(
c
order
by
"c"
)
from
t1
group
by
grp
;
select
grp
,
group_concat
(
distinct
c
order
by
c
)
from
t1
group
by
grp
;
select
grp
,
group_concat
(
distinct
c
order
by
c
)
from
t1
group
by
grp
;
select
grp
,
group_concat
(
distinct
c
order
by
c
desc
)
from
t1
group
by
grp
;
select
grp
,
group_concat
(
distinct
c
order
by
c
desc
)
from
t1
group
by
grp
;
explain
extended
select
grp
,
group_concat
(
distinct
c
order
by
c
desc
)
from
t1
group
by
grp
;
explain
extended
select
grp
,
group_concat
(
distinct
c
order
by
c
desc
)
from
t1
group
by
grp
;
...
...
mysql-test/t/group_by.test
View file @
dff0a1ac
...
@@ -609,6 +609,30 @@ select sql_buffer_result max(f1) is null from t1;
...
@@ -609,6 +609,30 @@ select sql_buffer_result max(f1) is null from t1;
select
sql_buffer_result
max
(
f1
)
+
1
from
t1
;
select
sql_buffer_result
max
(
f1
)
+
1
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
# BUG#14019-4.1-opt
#
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),(
2
);
SELECT
a
FROM
t1
GROUP
BY
'a'
;
SELECT
a
FROM
t1
GROUP
BY
"a"
;
SELECT
a
FROM
t1
GROUP
BY
`a`
;
set
sql_mode
=
ANSI_QUOTES
;
SELECT
a
FROM
t1
GROUP
BY
"a"
;
SELECT
a
FROM
t1
GROUP
BY
'a'
;
SELECT
a
FROM
t1
GROUP
BY
`a`
;
set
sql_mode
=
''
;
SELECT
a
FROM
t1
HAVING
'a'
>
1
;
SELECT
a
FROM
t1
HAVING
"a"
>
1
;
SELECT
a
FROM
t1
HAVING
`a`
>
1
;
SELECT
a
FROM
t1
ORDER
BY
'a'
DESC
;
SELECT
a
FROM
t1
ORDER
BY
"a"
DESC
;
SELECT
a
FROM
t1
ORDER
BY
`a`
DESC
;
DROP
TABLE
t1
;
# End of 4.1 tests
# End of 4.1 tests
#
#
...
...
sql/sql_base.cc
View file @
dff0a1ac
...
@@ -3450,13 +3450,20 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter,
...
@@ -3450,13 +3450,20 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter,
const
char
*
field_name
=
0
;
const
char
*
field_name
=
0
;
const
char
*
table_name
=
0
;
const
char
*
table_name
=
0
;
bool
found_unaliased_non_uniq
=
0
;
bool
found_unaliased_non_uniq
=
0
;
/*
true if the item that we search for is a valid name reference
(and not an item that happens to have a name).
*/
bool
is_ref_by_name
=
0
;
uint
unaliased_counter
;
uint
unaliased_counter
;
LINT_INIT
(
unaliased_counter
);
// Dependent on found_unaliased
LINT_INIT
(
unaliased_counter
);
// Dependent on found_unaliased
*
unaliased
=
FALSE
;
*
unaliased
=
FALSE
;
if
(
find
->
type
()
==
Item
::
FIELD_ITEM
||
find
->
type
()
==
Item
::
REF_ITEM
)
is_ref_by_name
=
(
find
->
type
()
==
Item
::
FIELD_ITEM
||
find
->
type
()
==
Item
::
REF_ITEM
);
if
(
is_ref_by_name
)
{
{
field_name
=
((
Item_ident
*
)
find
)
->
field_name
;
field_name
=
((
Item_ident
*
)
find
)
->
field_name
;
table_name
=
((
Item_ident
*
)
find
)
->
table_name
;
table_name
=
((
Item_ident
*
)
find
)
->
table_name
;
...
@@ -3568,7 +3575,7 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter,
...
@@ -3568,7 +3575,7 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter,
}
}
}
}
else
if
(
!
table_name
&&
(
find
->
eq
(
item
,
0
)
||
else
if
(
!
table_name
&&
(
find
->
eq
(
item
,
0
)
||
find
->
name
&&
item
->
name
&&
is_ref_by_name
&&
find
->
name
&&
item
->
name
&&
!
my_strcasecmp
(
system_charset_info
,
!
my_strcasecmp
(
system_charset_info
,
item
->
name
,
find
->
name
)))
item
->
name
,
find
->
name
)))
{
{
...
...
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