Bug #39730 Query Crash Mysql Server 5.0.67
Submitted: 29 Sep 2008 14:30 Modified: 4 Oct 2008 14:14
Reporter: giovanni silva Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S1 (Critical)
Version:5.0.67 OS:Windows (XP 5.1.2600)
Assigned to: CPU Architecture:Any

[29 Sep 2008 14:30] giovanni silva
Description:
Select Query Crash Mysql Server 5.0.67.

Select:
SELECT 
codigo AS codigo, 
(SELECT nota_fiscal.codigo FROM nota_fiscal INNER JOIN detalhe_nota_fiscal ON nota_fiscal.codigo = detalhe_nota_fiscal.nota_fiscal WHERE detalhe_nota_fiscal.codigo = movimentacao_estoque.detalhe_nota_fiscal AND nota_fiscal.tipo = 'PDV' GROUP BY nota_fiscal.codigo) AS codigonotapdv, 
produto AS produto, 
(select descricao from produto where produto.codigo = movimentacao_estoque.produto) AS descproduto, 
data_validade AS datadevalidade, 
lote AS lote, 
(select unidade_medida.descricao from unidade_medida where unidade_medida.codigo = unidade_medida) AS descunidadedemedida, 
quantidade AS quantidade, 
data_operacao AS dataoperacao, 
tipo AS tipooperacao,
ativo AS ativo
FROM movimentacao_estoque ORDER BY codigo DESC  LIMIT 0 , 200;

Direct Link for SQL SOURCE
 - http://www.codesoftwares.com.br/request.php?1
Link for SQL SOURCE
 - http://www.codesoftwares.com.br/download.php?list.2

Log:
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=9437184
read_buffer_size=65536
max_used_connections=3
max_connections=100
threads_connected=3
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 41216 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 033FA8F8=SELECT 
(SELECT nota_fiscal.codigo FROM nota_fiscal INNER JOIN detalhe_nota_fiscal ON nota_fiscal.codigo = detalhe_nota_fiscal.nota_fiscal WHERE detalhe_nota_fiscal.codigo = movimentacao_estoque.detalhe_nota_fiscal AND nota_fiscal.tipo = 'PDV' GROUP BY nota_fiscal.codigo) AS codigonotapdv, 
(select descricao from produto where produto.codigo = movimentacao_estoque.produto) AS descproduto, 
(select unidade_medida.descricao from unidade_medida where unidade_medida.codigo = unidade_medida) AS descunidadedemedida, 
codigo AS codigo, 
produto AS produto, 
data_validade AS datadevalidade, 
lote AS lote, 
quantidade AS quantidade, 
data_operacao AS dataoperacao, 
tipo AS tipooperacao,
ativo AS ativo
FROM movimentacao_estoque ORDER BY codigo ASC  LIMIT 0 , 200
thd->thread_id=4
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

How to repeat:
It above installs the data base through one of links. It executes the SQL that cause the error (above).
[29 Sep 2008 15:41] MySQL Verification Team
Thank you for the bug report. I couldn't repeat with 5.0.67 and current source server on XP SP3. Could you please provide your my.ini file. Thanks in advance.

1.00000000 | 2008-09-14 10:06:03 | SAIDA        |     1 |
|   1073 |            88 |     421 | AÃUCAR DOCYTO 5KG                          | NULL           | NULL | UNIDADE
1.00000000 | 2008-09-14 10:05:48 | SAIDA        |     1 |
+--------+---------------+---------+--------------------------------------------+----------------+------+--------
-----------+---------------------+--------------+-------+
200 rows in set (0.16 sec)

mysql> show variables like "%version%";
+-------------------------+-------------------------------+
| Variable_name           | Value                         |
+-------------------------+-------------------------------+
| protocol_version        | 10                            |
| version                 | 5.0.67-community              |
| version_comment         | MySQL Community Edition (GPL) |
| version_compile_machine | ia32                          |
| version_compile_os      | Win32                         |
+-------------------------+-------------------------------+
5 rows in set (0.05 sec)

mysql>
[29 Sep 2008 17:37] giovanni silva
Arquivo my.ini

Attachment: my.ini (application/octet-stream, text), 8.99 KiB.

[29 Sep 2008 17:42] giovanni silva
My Machine:
Pentium 4  - 2.4 Ghz
1 GB Ram
Windows XP SP2
[29 Sep 2008 20:32] giovanni silva
Pass the file mysql.ini you're using in the their test.
[3 Oct 2008 21:19] Giuseppe Maxia
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Duplicate of Bug#39844
[4 Oct 2008 14:14] giovanni silva
no solution for this bug?