Below is the list of changes that have just been committed into a local
5.0 repository of kgeorge. When kgeorge does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-10-16 13:24:54+03:00, gkodinov@stripped +5 -0
Merge macbook.gmz:/Users/kgeorge/mysql/work/B14019-4.1-opt
into macbook.gmz:/Users/kgeorge/mysql/work/B14019-5.0-opt
MERGE: 1.1616.2752.1
mysql-test/r/func_gconcat.result@stripped, 2006-10-16 13:13:11+03:00, gkodinov@stripped +0 -0
Auto merged
MERGE: 1.27.1.21
mysql-test/r/group_by.result@stripped, 2006-10-16 13:24:47+03:00, gkodinov@stripped +17 -17
merge 4.1->5.0
MERGE: 1.38.1.15
mysql-test/t/func_gconcat.test@stripped, 2006-10-16 13:13:11+03:00, gkodinov@stripped +0 -0
Auto merged
MERGE: 1.23.1.15
mysql-test/t/group_by.test@stripped, 2006-10-16 13:24:48+03:00, gkodinov@stripped +24 -23
merge 4.1->5.0
MERGE: 1.36.1.8
sql/sql_base.cc@stripped, 2006-10-16 13:13:12+03:00, gkodinov@stripped +0 -0
Auto merged
MERGE: 1.145.1.128
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: gkodinov
# Host: macbook.gmz
# Root: /Users/kgeorge/mysql/work/B14019-5.0-opt/RESYNC
--- 1.353/sql/sql_base.cc 2006-10-16 13:25:08 +03:00
+++ 1.354/sql/sql_base.cc 2006-10-16 13:25:08 +03:00
@@ -3450,13 +3450,20 @@ find_item_in_list(Item *find, List<Item>
const char *field_name=0;
const char *table_name=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;
LINT_INIT(unaliased_counter); // Dependent on found_unaliased
*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;
table_name= ((Item_ident*) find)->table_name;
@@ -3568,7 +3575,7 @@ find_item_in_list(Item *find, List<Item>
}
}
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,
item->name,find->name)))
{
--- 1.73/mysql-test/r/group_by.result 2006-10-16 13:25:08 +03:00
+++ 1.74/mysql-test/r/group_by.result 2006-10-16 13:25:08 +03:00
@@ -775,6 +775,51 @@ select sql_buffer_result max(f1)+1 from
max(f1)+1
3
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 t2 (c3 char(3), c4 char(3));
insert into t1 values ('aaa', 'bb1'), ('aaa', 'bb2');
--- 1.60/mysql-test/t/group_by.test 2006-10-16 13:25:08 +03:00
+++ 1.61/mysql-test/t/group_by.test 2006-10-16 13:25:09 +03:00
@@ -609,6 +609,30 @@ select sql_buffer_result max(f1) is null
select sql_buffer_result max(f1)+1 from 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
#
--- 1.61/mysql-test/r/func_gconcat.result 2006-10-16 13:25:09 +03:00
+++ 1.62/mysql-test/r/func_gconcat.result 2006-10-16 13:25:09 +03:00
@@ -74,11 +74,6 @@ grp group_concat(c order by 1)
1 a
2 b,c
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;
grp group_concat(distinct c order by c)
1 a
--- 1.46/mysql-test/t/func_gconcat.test 2006-10-16 13:25:09 +03:00
+++ 1.47/mysql-test/t/func_gconcat.test 2006-10-16 13:25:09 +03:00
@@ -32,7 +32,6 @@ select grp,group_concat(d order by a des
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(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 desc) from t1 group by grp;
explain extended select grp,group_concat(distinct c order by c desc) from t1 group by grp;
| Thread |
|---|
| • bk commit into 5.0 tree (gkodinov:1.2299) | kgeorge | 16 Oct |