Bug #14480 | CREATE ... SELECT may crash the server + write wrong data to frm file | ||
---|---|---|---|
Submitted: | 30 Oct 2005 0:58 | Modified: | 20 Nov 2005 4:54 |
Reporter: | Sergey Petrunya | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.1/5.0 BK | OS: | Linux (Linux) |
Assigned to: | Sergey Petrunya | CPU Architecture: | Any |
[30 Oct 2005 0:58]
Sergey Petrunya
[30 Oct 2005 1:29]
MySQL Verification Team
[New Thread 1156033456 (LWP 6595)] mysqld: unireg.cc:701: bool make_empty_rec(int, db_type, unsigned int, List<create_field>&, unsigned int, unsigned int, long unsigned int): Assertion `data_offset == ((null_fields + null_count + 7) / 8)' failed. Program received signal SIGABRT, Aborted. [Switching to Thread 1156033456 (LWP 6595)] 0xffffe410 in ?? () (gdb) bt full #0 0xffffe410 in ?? () No symbol table info available. #1 0x44e76a7c in ?? () No symbol table info available. #2 0x00000006 in ?? () No symbol table info available. #3 0x40214b75 in abort () from /lib/tls/libc.so.6 No symbol table info available. #4 0x4020c903 in __assert_fail () from /lib/tls/libc.so.6 No symbol table info available. #5 0x081df7fb in make_empty_rec <cut> 051029 23:28:47 [Note] /home/miguel/dbs/5.0/libexec/mysqld: ready for connections. Version: '5.0.16-debug' socket: '/tmp/mysql.sock' port: 3306 Source distribution [New Thread 1132456880 (LWP 6611)] mysqld: unireg.cc:780: bool make_empty_rec(THD*, int, db_type, unsigned int, List<create_field>&, unsigned int, long unsigned int): Assertion `data_offset == ((null_count + 7) / 8)' failed. Program received signal SIGABRT, Aborted. [Switching to Thread 1132456880 (LWP 6611)] 0xffffe410 in ?? () (gdb)
[31 Oct 2005 6:28]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/31669
[7 Nov 2005 6:18]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/32030
[8 Nov 2005 7:57]
Sergey Petrunya
The fix has been pushed into 4.1.16 tree Bug description for the changelog: a "CREATE TABLE tbl (...) SELECT ..." could crash the server and/or write invalid data into tbl.frm file.
[9 Nov 2005 4:12]
Paul DuBois
Noted in 4.1.16 changelog.
[9 Nov 2005 6:29]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/32097
[9 Nov 2005 11:42]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/32107
[9 Nov 2005 13:39]
Sergey Petrunya
During the merge (to 5.0) had to make this fix also (in both 4.1 and 5.0) : If one specifes a default value in create_list, it is now actually used. Example: create table t1 (a int); insert into t1 values(1); create table t2 ( a1 int default 3) select a1 from t1; BEFORE THE FIX: mysql> show create table t2\G *************************** 1. row *************************** Table: t2 Create Table: CREATE TABLE `t2` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 1 row in set (0.00 sec) AFTER THE FIX: mysql> show create table t2\G *************************** 1. row *************************** Table: t2 Create Table: CREATE TABLE `t2` ( `a` int(11) default '3' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 1 row in set (0.00 sec)
[20 Nov 2005 4:54]
Paul DuBois
Noted in 5.0.17 changelog.