>Description:
        There is an apparent bug in the optimiser which causes it
to go into an infinite loop when presented with complex queries.
I know the problem is in the optimiser becaues the query in question
still hangs the thread (and effectively the server) in a cpu-intensive
loop with just an "explain ..." I can demonstrate the bug on:

        FreeBSD 2.2.7   x86     MySQL-3.21.33b  MIT-pthreads
        FreeBSD 3.0.0   x86     MySQL-3.21.33b  MIT-pthreads
        FreeBSD 3.0.0   x86     3.22.14b-gamma  MIT-pthreads
        FreeBSD 3.0.0   x86     3.22.14b-gamma  native pthreads

I have not tried other combinations.

The query which provokes this is addmittedly very complex, but is
automatically generated and so difficult to alter. My intention
with such a query would be to calculate the cost of the query by
multiplying up the "rows" field returned by the "explain", then reject
the query if too expensive.

>How-To-Repeat:

sql script recreating the problem ftp'd to
ftp://www.mysql.com/pub/mysql/secret/billh.sql

>Fix:
        

>Submitter-Id:  [EMAIL PROTECTED]
>Originator:    Bill Hails
>Organization:
 Yahoo! Europe
>MySQL support: none
>Synopsis:      explain hangs, multiple versions/platforms
>Severity:      serious
>Priority:      high
>Category:      mysql
>Class:         sw-bug
>Release:       mysql-3.22.14b-gamma (Source distribution)
>Server: /usr/local/bin/mysqladmin  Ver 7.8 Distrib 3.22.14b-gamma, for 
>unknown-freebsd3.0.0 on i386
TCX Datakonsult AB, by Monty

Server version          3.22.14b-gamma-log
Protocol version        10
Connection              localhost via TCP/IP
TCP port                3306
Uptime:                 18 sec

Threads: 1  Questions: 1  Slow queries: 0  Opens: 6  Flush tables: 1  Open tables: 2
>Environment:
        
System: FreeBSD db1.europe.yahoo.com 3.0.0-19990112-SNAP FreeBSD 3.0.0-19990112-SNAP 
#0: Sat Jan 16 04:39:51 GMT 1999     
[EMAIL PROTECTED]:/usr/src/sys/compile/DB1  i386


Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: gcc version 2.7.2.1
Compilation info: CC='gcc'  CFLAGS=''  CXX='gcc'  CXXFLAGS=''  LDFLAGS=''
Configure command: ./configure  --with-unix-socket-path=/var/tmp/mysql.sock 
--with-low-memory --with-mit-threads=yes
Perl: This is perl, version 5.005_02 built for i386-freebsd
-----------------------------------------------------------
Send a mail to [EMAIL PROTECTED] with
unsubscribe mysql [EMAIL PROTECTED]
in the body of the message to unsubscribe from this list.

Reply via email to