Bug #46295 | Create index can create crash if running out of table records | ||
---|---|---|---|
Submitted: | 20 Jul 2009 2:47 | Modified: | 10 Aug 2009 11:19 |
Reporter: | Clint Alexander | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S2 (Serious) |
Version: | mysql-5.1.34 ndb-7.0.6 | OS: | Linux |
Assigned to: | Jonas Oreland | CPU Architecture: | Any |
Tags: | assertion, cluster, errno: 4247 |
[20 Jul 2009 2:47]
Clint Alexander
[21 Jul 2009 5:31]
Clint Alexander
Some more relevent information: [shell]# uname -a Linux ndbd01.in-my.net 2.6.18-128.1.16.el5 #1 SMP Tue Jun 30 06:07:26 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux I also wrote a php script (don't ask...) to recreate the error here and pull out the "SHOW WARNINGS", which I did not include in the original report. SHOW WARNINGS: Error 1296 Got error 4247 'Illegal index/trigger create/drop/alter request' from NDB Error 1005 Can't create table 'aa_search.phpbb_search_matches_2540' (errno: 4247) Error 1296 Got error 4025 'Node failure caused abort of transaction' from ndb. Releasing global schema lock Here is that script in the event that it helps... ------------------------------ #!/usr/bin/php -f <?php $dbhost="localhost"; $dbuser="root"; $dbpass=""; $dbname="some_database"; $conn = mysql_connect ($dbhost, $dbuser); if (!$conn) { print "Unable to connect to Database\n"; exit; } $db = mysql_select_db($dbname, $conn); if (!$db) { print "Unable to select datbase $dbname\n"; exit; } for ($i=1; $i<=2890; $i++) { // this should die on or around 2540 $table_name = "search_matches_".$i; $query = " CREATE TABLE IF NOT EXISTS `".$table_name."` ( `col1` int(11) NOT NULL auto_increment, `col2` int(11) NOT NULL, `col3` int(11) NOT NULL, `col4` int(11) NOT NULL, `col5` int(11) NOT NULL, `col6` int(11) NOT NULL, `col7` int(11) NOT NULL, `col8` int(11) NOT NULL, PRIMARY KEY (`col1`), KEY `col2` (`col2`), KEY `col2_2` (`col2`,`col3`), KEY `col2_3` (`col2`,`col4`), KEY `col2_4` (`col2`,`col5`), KEY `col2_5` (`col2`,`col6`), KEY `col2_6` (`col2`,`col7`) ) ENGINE=NDBCLUSTER;"; $result = mysql_query ($query, $conn); if (mysql_error()) { print "While creating table $table_name:\n"; print "MySQL Error: " . mysql_error() . "\n"; $query = "show warnings;"; $result = mysql_query ($query, $conn); while ($row = mysql_fetch_array($result)) { echo "Error Level: ".$row["Code"] echo "Error Message: ".$row["Message"] echo "\n"; } break; } }
[21 Jul 2009 6:58]
Clint Alexander
After node fails, an attempt to do an --initial start takes over an hour during which time I could not create a table on any of the 4 SQL node: mysql> use db1; mysql> create table `testme` ( `text` varchar (100) ) ENGINE=NDBCLUSTER; ERROR 1005 (HY000): Can't create table 'db1.testme' (errno: 711) mysql>
[21 Jul 2009 7:05]
Clint Alexander
I noticed the WHILE loop at the bottom of my php script didn't copy correctly (end of lines are cropped)... Here's a replacement while ($row = mysql_fetch_array($result)) { echo "Error Level: ".$row["Code"]."\n"; echo "Error Message: ".$row["Message"]."\n"; echo "\n"; }
[27 Jul 2009 9:59]
Sveta Smirnova
Thank you for the report. Verified almost as described with exception I get error 787 instead of 4247. To repeat having 4 NDB nodes are required.
[30 Jul 2009 9:42]
Bugs System
Same OS version, same MySQL Cluster version, same bug: Forced node shutdown completed. Caused by error 2301: 'Assertion(Internal error, programming error or missing error message, please report a bug). Temporary error, restart node' ...after few table creation...
[10 Aug 2009 9:01]
Jonas Oreland
7.0.7
[10 Aug 2009 11:19]
Jon Stephens
Documented bugfix in the NDB-7.0.7 changelog as follows: Creating an index when the cluster had run out of table records could cause mysqld to crash.
[17 Aug 2009 14:08]
Jon Stephens
Corrected changelog entry per Jonas' comment.