Bug #17127 Partitions: crash if add range to list partition
Submitted: 5 Feb 2006 1:39 Modified: 16 Mar 2006 8:19
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1.7-beta-debug OS:Linux (SUSE 10.0)
Assigned to: Mikael Ronström CPU Architecture:Any

[5 Feb 2006 1:39] Peter Gulutzan
Description:
I make a PARTITION BY LIST table. I add a partition which has
LESS THAN, which is only appropriate for a PARTITION BY RANGE
table. Crash.

How to repeat:

mysql> create table txa (s1 int) partition by list (s1) (partition p1 values in (1));
Query OK, 0 rows affected (0.01 sec)

mysql> alter table txa add partition (partition p2 values less than (2));
ERROR 2013 (HY000): Lost connection to MySQL server during query
[5 Feb 2006 11:14] Valeriy Kravchuk
Thank you for a bug report. Verified just as described on 5.1.7-beta-BK (ChangeSet@1.2130, 2006-02-03 11:59:55+03:00) on SuSE 9.3:

mysql> create table txa (s1 int) partition by list (s1) (partition p1 values in
    -> (1));
Query OK, 0 rows affected (0.01 sec)

mysql> alter table txa add partition (partition p2 values less than (2));
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
Number of processes running now: 0
060201 21:57:49  mysqld restarted

mysql> select version();
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    1
Current database: test

+------------+
| version()  |
+------------+
| 5.1.7-beta |
+------------+
1 row in set (0.01 sec)

In the error log I've got:

Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0x428c58f4, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x81cba26
0xffffe420
(nil)
0x812454e
0x82b13b7
0x81e7e48
0x81ecb1e
0x81ed99f
0x81eeb93
0x40045aa7
0x40240c2e
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and follow
instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x8c620a0 = alter table txa add partition (partition p2 values les
s than (2))
thd->thread_id=1
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.

Number of processes running now: 0
060201 21:57:49  mysqld restarted
060201 21:57:49  InnoDB: Started; log sequence number 0 43655
060201 21:57:50 [Note] /home/openxs/dbs/5.1/libexec/mysqld: ready for connections.

Please, inform if that resolved stack trace is needed.
[14 Mar 2006 17:44] Mikael Ronström
A crash occurred if an attempt to use conflicting values statements in
alter table for partitioning.

Will be in the next 5.1 version (5.1.9?)
[16 Mar 2006 8:19] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented bugfix in 5.1.8 changelog. Closed.