MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:timour Date:September 12 2005 5:28am
Subject:bk commit into 5.0 tree (timour:1.1964) BUG#13067
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of timka. When timka 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
  1.1964 05/09/12 08:28:53 timour@stripped +3 -0
  Fix for BUG#13067 "JOIN ... USING is case sensitive".

  sql/sql_base.cc
    1.299 05/09/12 08:28:50 timour@stripped +1 -1
    Correctly compare field names with respect to case sensitivity.

  mysql-test/t/select.test
    1.75 05/09/12 08:28:50 timour@stripped +12 -0
    Test for BUG#13067

  mysql-test/r/select.result
    1.90 05/09/12 08:28:50 timour@stripped +10 -0
    Test for BUG#13067

# 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:	timour
# Host:	lamia.home
# Root:	/home/timka/mysql/src/5.0-dbg

--- 1.298/sql/sql_base.cc	2005-09-09 10:10:53 +03:00
+++ 1.299/sql/sql_base.cc	2005-09-12 08:28:50 +03:00
@@ -3414,7 +3414,7 @@
   {
     if (find_length != curr_str->length())
       continue;
-    if (!strncmp(find, curr_str->ptr(), find_length))
+    if (!my_strcasecmp(system_charset_info, find, curr_str->ptr()))
       return TRUE;
   }
   return FALSE;

--- 1.89/mysql-test/r/select.result	2005-09-08 11:29:49 +03:00
+++ 1.90/mysql-test/r/select.result	2005-09-12 08:28:50 +03:00
@@ -2912,3 +2912,13 @@
 SELECT id,t3.id FROM (t1 JOIN t2 ON (t2.id=t1.id)) LEFT JOIN t3 USING (id);
 ERROR 23000: Column 'id' in from clause is ambiguous
 drop table t1, t2, t3;
+create table t1 (a int(10),b int(10));
+create table t2 (a int(10),b int(10));
+insert into t1 values (1,10),(2,20),(3,30);
+insert into t2 values (1,10);
+select * from t1 inner join t2 using (A);
+a	b	b
+1	10	10
+select * from t1 inner join t2 using (a);
+a	b	b
+1	10	10

--- 1.74/mysql-test/t/select.test	2005-09-08 11:29:49 +03:00
+++ 1.75/mysql-test/t/select.test	2005-09-12 08:28:50 +03:00
@@ -2487,3 +2487,15 @@
 SELECT id,t3.id FROM (t1 JOIN t2 ON (t2.id=t1.id)) LEFT JOIN t3 USING (id);
 
 drop table t1, t2, t3;
+
+#
+# Bug #13067 JOIN xxx USING is case sensitive
+#
+
+create table t1 (a int(10),b int(10));
+create table t2 (a int(10),b int(10));
+insert into t1 values (1,10),(2,20),(3,30);
+insert into t2 values (1,10);
+# both queries should produce the same result
+select * from t1 inner join t2 using (A);
+select * from t1 inner join t2 using (a);
Thread
bk commit into 5.0 tree (timour:1.1964) BUG#13067timour12 Sep