From: Date: September 1 2005 12:06am Subject: bk commit into 4.1 tree (andrey:1.2407) BUG#12913 List-Archive: http://lists.mysql.com/internals/29137 X-Bug: 12913 Message-Id: <20050831220600.4400F2E7DA@andrey.hristov.com> Below is the list of changes that have just been committed into a local 4.1 repository of andrey. When andrey 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.2407 05/09/01 00:05:52 andrey@lmy004. +3 -0 fix for bug#12913 (Simple SQL can crash server or connection) (not initialized member leads to server crash) sql/sql_table.cc 1.302 05/09/01 00:05:47 andrey@lmy004. +1 -0 copy the interval pointer too or a bit later dereferencing of this pointer being 0x0 will crash the server (see bug #12913) mysql-test/t/create.test 1.58 05/09/01 00:05:47 andrey@lmy004. +7 -0 test for bug#12913 (Simple SQL can crash server or connection) mysql-test/r/create.result 1.85 05/09/01 00:05:47 andrey@lmy004. +5 -0 result of test for bug #12913 # 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: andrey # Host: lmy004. # Root: /work/mysql-4.1-bug12913 --- 1.301/sql/sql_table.cc 2005-08-30 21:24:33 +02:00 +++ 1.302/sql/sql_table.cc 2005-09-01 00:05:47 +02:00 @@ -649,6 +649,7 @@ sql_field->decimals= dup_field->decimals; sql_field->flags= dup_field->flags; sql_field->unireg_check= dup_field->unireg_check; + sql_field->interval= dup_field->interval; it2.remove(); // Remove first (create) definition select_field_pos--; break; --- 1.84/mysql-test/r/create.result 2005-08-30 14:19:10 +02:00 +++ 1.85/mysql-test/r/create.result 2005-09-01 00:05:47 +02:00 @@ -587,6 +587,11 @@ Field Type Null Key Default Extra f2 varchar(86) YES NULL DROP TABLE t1,t2; +CREATE TABLE t12913 (f1 ENUM ('a','b')) AS SELECT 'a' AS f1; +SELECT * FROM t12913; +f1 +a +DROP TABLE t12913; create database mysqltest; use mysqltest; drop database mysqltest; --- 1.57/mysql-test/t/create.test 2005-08-30 14:19:23 +02:00 +++ 1.58/mysql-test/t/create.test 2005-09-01 00:05:47 +02:00 @@ -502,6 +502,13 @@ DROP TABLE t1,t2; # +# Bug#12913 Simple SQL can crash server or connection +# +CREATE TABLE t12913 (f1 ENUM ('a','b')) AS SELECT 'a' AS f1; +SELECT * FROM t12913; +DROP TABLE t12913; + +# # Bug#11028: Crash on create table like # create database mysqltest;