Hi!
I tried with 3.23.47, and the script did not fail.
The assertion failure means that adding of a foreign key constraint fails
because of some error number which should not happen.
You could modify and recompile MySQL so that mysql/innobase/dict0crea.c,
line 1237, would print the error code:
printf("Error code %lu\n", error);
But this may also be a compiler bug. Please try with a binary from
www.mysql.com and with a freshly created empty database. Does it still fail?
Regards,
Heikki
Innobase Oy
---
See http://www.innodb.com for the latest news about InnoDB
Order commercial MySQL/InnoDB support at https://order.mysql.com/
>Hi!
>At run of a script there is an error and the server falls. The script,
>the log file and my configuration follow.Client output:
>#mysql -p USTAT < test.sqlPassword:
>ERROR 2013 at line 22: Lost connection to MySQL server during query
>-------------------------- begin script --------------------------
>drop table if exists CARDS;create table CARDS (
> NUM SMALLINT unsigned not null,
> FIRM VARCHAR(132) not null default '',
> NAME VARCHAR(80) not null default '',
> CEMAIL VARCHAR(80) not null default '',
> NOTES VARCHAR(255) not null default '', primary key (NUM)
>) TYPE = InnoDB;drop table if exists DOMAINS;create table DOMAINS(
> ID MEDIUMINT unsigned not null,
> NUM SMALLINT unsigned not null, index DOMAINS_NUM (NUM),
> DOMAIN VARCHAR(80) not null,
> foreign key (NUM) references CARDS(NUM), primary key (ID)
>) TYPE = InnoDB;drop table if exists LOGINS;create table LOGINS(
> ID MEDIUMINT unsigned not null,
> NUM SMALLINT unsigned not null, index LOGINS_NUM(NUM),
> LOGIN CHAR(33) not null, index LOGINS_LOGIN(LOGIN),
> MAXSES TINYINT unsigned not null default 0,
> MAXDAY MEDIUMINT unsigned not null default 0,
> MAXWEEK MEDIUMINT unsigned not null default 0,
> MAXMON MEDIUMINT unsigned not null default 0,
> MAXTOTAL INT unsigned not null default 0,
> foreign key (NUM) references CARDS(NUM), primary key (ID)
>) TYPE = InnoDB;
-------------------------- end script --------------------------
>-------------------------- begin error log --------------------------
>011214 14:28:38 mysqld restarted011214 14:28:39 InnoDB: Started
>/usr/libexec/mysqld: ready for connections
>InnoDB: Assertion failure in thread 12299 in file dict0crea.c line 1237
>InnoDB: We intentionally generate a memory trap.
>InnoDB: Send a detailed bug report to [EMAIL PROTECTED] got
signal 11;
mysql> drop table if exists CARDS;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> create table CARDS (
-> NUM SMALLINT unsigned not null,
-> FIRM VARCHAR(132) not null default '',
-> NAME VARCHAR(80) not null default '',
-> CEMAIL VARCHAR(80) not null default '',
-> NOTES VARCHAR(255) not null default '', primary key
(NUM)
-> ) TYPE = InnoDB;
Query OK, 0 rows affected (0.01 sec)
mysql>
mysql> drop table if exists DOMAINS;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> create table DOMAINS(
-> ID MEDIUMINT unsigned not null,
-> NUM SMALLINT unsigned not null, index DOMAINS_NUM (NUM),
-> DOMAIN VARCHAR(80) not null,
-> foreign key (NUM) references CARDS(NUM), primary key (ID)
-> ) TYPE = InnoDB;
Query OK, 0 rows affected (0.04 sec)
mysql>
mysql> drop table if exists LOGINS;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> create table LOGINS(
-> ID MEDIUMINT unsigned not null,
-> NUM SMALLINT unsigned not null, index LOGINS_NUM(NUM),
-> LOGIN CHAR(33) not null, index LOGINS_LOGIN(LOGIN),
-> MAXSES TINYINT unsigned not null default 0,
-> MAXDAY MEDIUMINT unsigned not null default 0,
-> MAXWEEK MEDIUMINT unsigned not null default 0,
-> MAXMON MEDIUMINT unsigned not null default 0,
-> MAXTOTAL INT unsigned not null default 0,
-> foreign key (NUM) references CARDS(NUM), primary key (ID)
-> ) TYPE = InnoDB;
Query OK, 0 rows affected (0.05 sec)
mysql>
mysql> show table status from test like 'DOMAINS';
+---------+--------+------------+------+----------------+-------------+---------
--------+--------------+-----------+----------------+-------------+-------------
+------------+----------------+-------------------------------------------------
----+
| Name | Type | Row_format | Rows | Avg_row_length | Data_length | Max_data
_length | Index_length | Data_free | Auto_increment | Create_time | Update_time
| Check_time | Create_options | Comment
|
+---------+--------+------------+------+----------------+-------------+---------
--------+--------------+-----------+----------------+-------------+-------------
+------------+----------------+-------------------------------------------------
----+
| DOMAINS | InnoDB | Dynamic | 0 | 0 | 16384 |
NULL | 16384 | 0 | NULL | NULL | NULL
| NULL | | InnoDB free: 137216 kB; (NUM) REFER test/CARDS(N
UM) |
+---------+--------+------------+------+----------------+-------------+---------
--------+--------------+-----------+----------------+-------------+-------------
+------------+----------------+-------------------------------------------------
----+
1 row in set (0.00 sec)
mysql> show table status from test like 'LOGINS';
+--------+--------+------------+------+----------------+-------------+----------
-------+--------------+-----------+----------------+-------------+-------------+
------------+----------------+--------------------------------------------------
---+
| Name | Type | Row_format | Rows | Avg_row_length | Data_length | Max_data_
length | Index_length | Data_free | Auto_increment | Create_time | Update_time |
Check_time | Create_options | Comment
|
+--------+--------+------------+------+----------------+-------------+----------
-------+--------------+-----------+----------------+-------------+-------------+
------------+----------------+--------------------------------------------------
---+
| LOGINS | InnoDB | Fixed | 0 | 0 | 16384 |
NULL | 32768 | 0 | NULL | NULL | NULL |
NULL | | InnoDB free: 137216 kB; (NUM) REFER test/CARDS(NU
M) |
+--------+--------+------------+------+----------------+-------------+----------
-------+--------------+-----------+----------------+-------------+-------------+
------------+----------------+--------------------------------------------------
---+
1 row in set (0.01 sec)
mysql>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php