Bug #29032 SELECT * FROM REFERENTIAL_CONSTRAINTS crashes the server
Submitted: 11 Jun 2007 21:53 Modified: 13 Jul 2007 13:40
Reporter: Roland Bouman Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Information schema Severity:S1 (Critical)
Version:5.1.19 OS:Linux (Ubuntu Feisty Fawn)
Assigned to: CPU Architecture:Any

[11 Jun 2007 21:53] Roland Bouman
Description:
A select from the information_schema.REFERENTIAL_CONSTRAINTS crashes the server. 

This should be regarded as a highly serious matter, as any user connected to the server has access to information_schema.REFERENTIAL_CONSTRAINTS

How to repeat:
SELECT * FROM information_schema.REFERENTIAL_CONSTRAINTS

Suggested fix:
Please don't crash.

Also, is there a test case for this? Maybe it would be possible to generate a test case for all information schema tables, just a thought.
[11 Jun 2007 22:43] MySQL Verification Team
Thank you for the bug report. I am not able to repeat with current
source server, which CPU machine are you using 32-bit or 64-bit?
and could you please provide your my.cnf. Thanks in advance.

See http://bugs.mysql.com/bug.php?id=27621.

mysql> SELECT * FROM information_schema.REFERENTIAL_CONSTRAINTS\G
*************************** 1. row ***************************
       CONSTRAINT_CATALOG: NULL
        CONSTRAINT_SCHEMA: test
          CONSTRAINT_NAME: child_ibfk_1
UNIQUE_CONSTRAINT_CATALOG: NULL
 UNIQUE_CONSTRAINT_SCHEMA: test
   UNIQUE_CONSTRAINT_NAME: PRIMARY
             MATCH_OPTION: NONE
              UPDATE_RULE: RESTRICT
              DELETE_RULE: CASCADE
               TABLE_NAME: child
    REFERENCED_TABLE_NAME: parent
1 row in set (0.02 sec)

mysql> select version();
+-------------------+
| version()         |
+-------------------+
| 5.1.20-beta-debug | 
+-------------------+
1 row in set (0.00 sec)
[11 Jun 2007 23:51] Roland Bouman
my.cnf

Attachment: my.cnf (application/octet-stream, text), 23.56 KiB.

[11 Jun 2007 23:52] Roland Bouman
You might also want to try with a non-debug compiled binary. Thank you,

Roland
[13 Jun 2007 13:40] MySQL Verification Team
Thank you for the feedback. I still can't repeat, is possible for you
to provide a dump file of your tables with referential constraints?
Thanks in advance.
[13 Jul 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[26 Oct 2007 14:34] Marina Bashtovaya
I've got the same issue - mysql crashes every time when you do select * from referential_constraints (Win XP).
[2 Mar 2008 12:00] Cybula Ɓukasz
I have the same problem. SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS in mysql 5.1.22 on fedora core 8 (x86_64) crashes myslqd with no valueable information in log (backtrace, variables).