Bug #18603 Invalid CREATE LOGFILE GROUP or CREATE TABLESPACE crashes server
Submitted: 29 Mar 2006 4:01 Modified: 26 Apr 2006 10:35
Reporter: Mike Kruckenberg (Candidate Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:5.1.9-BK, 5.1.7 OS:Linux (Linux)
Assigned to: Tomas Ulin CPU Architecture:Any

[29 Mar 2006 4:01] Mike Kruckenberg
Description:
In setting up disk-based storage for MySQL cluster in version 5.1.7 I attempted to create a logfile without specifying the engine. I know it's incorrect syntax, but would prefer to get a syntax error instead of loosing the connection to the server.

mysql> create logfile group lg1 add undofile 'undofile.dat' initial_size=20M;
ERROR 2013 (HY000): Lost connection to MySQL server during query

Same is true for creating tablespaces:
mysql> create tablespace ts1 add datafile 'datafile.dat' use logfile group lg1 initial_size = 100M;
ERROR 2013 (HY000): Lost connection to MySQL server during query

How to repeat:
Attempt to create a logfile or tablespace and do not specify the engine. The connection also dies if you don't enter the initial_size.

Suggested fix:
Give a syntax error instead of closing the connection.
[29 Mar 2006 16:31] Valeriy Kravchuk
Thank you for a bug report. Verified just as described with 5.1.9-BK ():

openxs@suse:~/dbs/5.1> bin/mysql -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.1.9-beta-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create logfile group lg1 add undofile 'undofile.dat' initial_size=20M;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
Number of processes running now: 0
060329 17:15:59  mysqld restarted

mysql> exit
Bye
openxs@suse:~/dbs/5.1> tail -30 var/suse.err
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xbe5fed98, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x80edba8
0x84a246d
0x825aa6a
0x810d2c6
0x810ee6c
0x8104ca5
0x8104590
0x810371d
0x849d341
0x84d7c4a
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 0x8e6b220 = create logfile group lg1 add undofile 'undofile.dat' i
nitial_size=20M
thd->thread_id=2
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
060329 17:15:59  mysqld restarted
060329 17:15:59  InnoDB: Started; log sequence number 0 43665
060329 17:16:00 [Note] /home/openxs/dbs/5.1/libexec/mysqld: ready for connections.
Version: '5.1.9-beta-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distr
ibution

So, it is a server crash! Can provide a resolved stack trace, if needed.
[29 Mar 2006 17:46] Mike Kruckenberg
> So, it is a server crash! Can provide a resolved stack trace, if needed.

Do you need me to provide a resolved stack trace, or are you offering to provide one back to me? I don't need one.
[30 Mar 2006 9:07] Valeriy Kravchuk
Michael,

No, you surely do not need that resolved stack trace. I can resolve it for the developers who will fix this bug, if they will ask. But as the crash is easily repeatable even on the latest versions, it is not needed even for them, I suppose. Sorry for my misleading phrase.
[24 Apr 2006 9:38] 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/commits/5386
[24 Apr 2006 19:27] MySQL Verification Team
Bug: http://bugs.mysql.com/bug.php?id=19234 was marked as
duplicate of this one.
[26 Apr 2006 5:59] Tomas Ulin
pushed to 5.1.10
[26 Apr 2006 10:35] 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.10 changelog. Closed.