MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Olav.Sandstaa Date:April 30 2009 8:34am
Subject:bzr commit into mysql-6.0-falcon-team branch (Olav.Sandstaa:2696) Bug#42752
View as plain text  
#At file:///home/olav/mysql/develop/falcon-bug42752/ based on revid:hky@stripped

 2696 Olav.Sandstaa@stripped	2009-04-30
      Fix for Bug#42752 Error when creating Falcon temporary table with a key
      
      The cause for this bug was that the schema name contained a "." (like: 
      mysql.1) and when creating an index using this schema name in the create
      index statement the schema name was un-qouted which lead to the Falcon
      parser issuing an error.
      
      The fix adds qoutes around the schema name in Falcon's create index
      statements.
      
      A test case for the bug is included.

    added:
      mysql-test/suite/falcon/r/falcon_bug_42752.result
      mysql-test/suite/falcon/t/falcon_bug_42752.test
    modified:
      storage/falcon/ha_falcon.cpp
=== added file 'mysql-test/suite/falcon/r/falcon_bug_42752.result'
--- a/mysql-test/suite/falcon/r/falcon_bug_42752.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/r/falcon_bug_42752.result	2009-04-30 08:34:47 +0000
@@ -0,0 +1,8 @@
+*** Bug #42752 ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+CREATE TEMPORARY TABLE t1 (s1 INTEGER, KEY(s1));
+SELECT count(*) FROM t1;
+count(*)
+0
+DROP TABLE t1;

=== added file 'mysql-test/suite/falcon/t/falcon_bug_42752.test'
--- a/mysql-test/suite/falcon/t/falcon_bug_42752.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_42752.test	2009-04-30 08:34:47 +0000
@@ -0,0 +1,31 @@
+--source include/have_falcon.inc
+
+#
+# Bug #42752 Error when creating Falcon temporary table with a key
+#
+--echo *** Bug #42752 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation                                --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+# ----------------------------------------------------- #
+# --- Test                                          --- #
+# ----------------------------------------------------- #
+CREATE TEMPORARY TABLE t1 (s1 INTEGER, KEY(s1));
+
+# ----------------------------------------------------- #
+# --- Check                                         --- #
+# ----------------------------------------------------- #
+SELECT count(*) FROM t1;
+
+# ----------------------------------------------------- #
+# --- Final cleanup                                 --- #
+# ----------------------------------------------------- #
+DROP TABLE t1;

=== modified file 'storage/falcon/ha_falcon.cpp'
--- a/storage/falcon/ha_falcon.cpp	2009-03-31 18:19:17 +0000
+++ b/storage/falcon/ha_falcon.cpp	2009-04-30 08:34:47 +0000
@@ -960,7 +960,7 @@ int StorageInterface::createIndex(const 
 		{
 		KEY *key = srvTable->key_info + indexId;
 		const char *unique = (key->flags & HA_NOSAME) ? "unique " : "";
-		gen.gen("create %sindex \"%s\" on %s.\"%s\" ", unique, indexDesc.name, schemaName, tableName);
+		gen.gen("create %sindex \"%s\" on \"%s\".\"%s\" ", unique, indexDesc.name, schemaName, tableName);
 		genKeyFields(key, &gen);
 		
 		ret = storageTable->createIndex(&indexDesc, gen.getString());


Attachment: [text/bzr-bundle] bzr/olav.sandstaa@sun.com-20090430083447-9upxr4ke8zo843xi.bundle
Thread
bzr commit into mysql-6.0-falcon-team branch (Olav.Sandstaa:2696) Bug#42752Olav.Sandstaa30 Apr
  • Re: bzr commit into mysql-6.0-falcon-team branch (Olav.Sandstaa:2696)Bug#42752Kevin Lewis30 Apr