Bug #8164 subquery with INFORMATION_SCHEMA.COLUMNS, 100 % CPU
Submitted: 27 Jan 2005 14:25 Modified: 4 Mar 2005 16:20
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:5.0 OS:
Assigned to: Sergei Glukhov CPU Architecture:Any

[27 Jan 2005 14:25] Matthias Leich
I have a test case derived from the NIST data dictionary tests, which causes 100 % CPU
endless loop. It is a simple subquery containing INFORMATION_SCHEMA.COLUMNS.
Please have a look into the attached test case.

BTW: I assume that this bug is is not harmless, because
        - many common data dictionary views use subqueries
        - some customers like to program their own data dictionary based on
          the DD provided by the DBMs (They will need subqueries.) 

My environment:
   - Intel PC with Linux(SuSE 9.1)
   - MySQL compiled from source
        Version 5.0 ChangeSet@1.1824, 2005-01-26

How to repeat:
Please use my test file ML1.test , copy it to mysql-test/t
  ./mysql-test-run ML1
[27 Jan 2005 14:27] Matthias Leich
test case with some statement variations

Attachment: ML1.test (application/test, text), 1.21 KiB.

[27 Jan 2005 14:42] Matthias Leich
INFORMATION_SCHEMA.TABLES shows the same bad properties like
[30 Jan 2005 14:50] Dean Ellis
Verified against 5.0.3.

Lockup occurs if test is execute within a database.  Without an active database:

ERROR 1194 (HY000): Table 'B' is marked as crashed and should be repaired
[24 Feb 2005 9:01] Alexander Barkov
Ok to push after extendint the test.
See internal info.
[3 Mar 2005 15:06] 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:

[4 Mar 2005 16:20] Paul DuBois
Noted in 5.0.3 changelog.