MySql/InnoDB crashes after a Select...order by DESC... LIMIT...

MySql/InnoDB crashes after a Select...order by DESC... LIMIT...

am 10.09.2002 12:55:45 von rafarife

Description:
Hello,

I am working with mysqld-max-nt under windows 2000 and unsing InnoDb tables.

After running the following select:

Select cod,nom from grupos where cod <'005' order by cod desc limit 1

mysqld crashes.

Also it crashes whith limit 10, limit 50, or whatever limit you indicate.

However, the following selects run ok:
Select cod,nom from grupos where cod <'005' order by cod desc (without limit)
Select * from grupos where cod <’D01’ order by cod desc limit 1
Select * from grupos where strcmp(cod,’005')<0 order by cod desc limit 1
Select * from grupos where cod < 005 order by cod desc limit 1
Select * from grupos where cod <5 order by cod desc limit 1

This error only occurs with InnoDb tables and MySql 4.0.3 (with Mysql 3.23.52 it runs ok).
With MyIsam tables it runs ok even under mysql 4.0.3

Table definition and data.
CREATE TABLE grupos (
Cod char(3) NOT NULL default '',
Nom varchar(40) NOT NULL default '',
CVt varchar(9) NOT NULL default '',
CCm varchar(9) NOT NULL default '',
Garantia tinyint(4) unsigned NOT NULL default '0',
Fam char(2) NOT NULL default '',
LineaProducto char(3) NOT NULL default '',
PRIMARY KEY (Cod),
UNIQUE KEY Nombre (Nom,Cod)
) TYPE=InnoDB;

--
-- Dumping data for table 'grupos'
--

INSERT INTO grupos VALUES ('001','COMP. UHF L. BLANCA BAJA II R-134/600/12','','',0,'AA','');
INSERT INTO grupos VALUES ('002','COMP. UHF AIRE ACONDICIONADO','','',0,'AA','');
INSERT INTO grupos VALUES ('003','COMP. ASPERA LINEA BLANCA R134/600/12','','',0,'AB','');
INSERT INTO grupos VALUES ('004','COMP. ASPERA AIRE ACONDICIONADO','','',0,'AB','');
INSERT INTO grupos VALUES ('005','COMP. DANFOSS','','',0,'AC','');
INSERT INTO grupos VALUES ('006','CONTROLES REFRIG. Y ELECTRONICA DANFOSS','','',0,'AC','');
INSERT INTO grupos VALUES ('007','INDUSTRIAL DANFOSS','','',0,'AC','');
INSERT INTO grupos VALUES ('008','CALEFACCION Y AIRE ACONDICIONADO DANFOSS','','',0,'AC','');
INSERT INTO grupos VALUES ('009','ELECTRICIDAD DANFOSS','','',0,'AC','');
INSERT INTO grupos VALUES ('010','COMP. MT/MTZ HASTA 160','','',0,'AD','');
INSERT INTO grupos VALUES ('011','REPUESTO BITZER','','',0,'AE','');
INSERT INTO grupos VALUES ('012','COMP./UNID. BITZER HASTA 7,5 CV OCTAGON','','',0,'AE','');
INSERT INTO grupos VALUES ('013','COMPRESORES SCROLL/UNIDADES','','',0,'AE','');
INSERT INTO grupos VALUES ('014','REPUESTO FRASCOLD','','',0,'AF','');

Thanks in advance,
Rafa.

P.D: Sorry for my english.

How-To-Repeat:
Select cod,nom from grupos where cod <'005' order by cod desc limit 1,
Fix:
-

Synopsis: MySql/InnoDB crashes after a Select...order by DESC... LIMIT...

Submitter-Id:
Originator: Rafa
Organization: Pecomark
MySQL support: none
Severity: non-critical
Priority: medium
Category: mysqld-max-nt
Class: sw-bug
Release: mysqld 4.0.3 beta(InnoDB)

Exectutable: mysqld-max-nt
Environment: Pentium III-MMX, 500 MHZ, 540 MB
System: Windows 2000
Compiler: -
Architecture: i


____________________________________________________________ ______
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

------------------------------------------------------------ ---------
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 bugs-thread12517@lists.mysql.com
To unsubscribe, e-mail

Re: MySql/InnoDB crashes after a Select...order by DESC... LIMIT...

am 10.09.2002 13:13:27 von Jocelyn Fournier

Hi,

I confirm the problem under MySQL 4.0.4-beta and Linux.

020910 13:03:01 InnoDB: Assertion failure in thread 2016308 in file
btr0pcur.c line 203
InnoDB: We intentionally generate a memory trap.
InnoDB: Send a detailed bug report to mysql@lists.mysql.com
mysqld got signal 11;

key_buffer_size=268431360
read_buffer_size=520192
sort_buffer_size=524280
max_used_connections=320
max_connections=320
threads_connected=143
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections =
588537 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x72595ff8
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xb93fe498, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:

0x8095267 _Z15handle_segfaulti + 487
0x826469a pthread_sighandler + 138
0x818032e btr_pcur_restore_position + 1230
0x815bafe sel_restore_position_for_mysql + 46
0x8158cef row_search_for_mysql + 3199
0x80faee8 _ZN11ha_innobase13general_fetchEPcjj + 120
0x80fb0d8 _ZN11ha_innobase10index_prevEPc + 40
0x80ebc17 _ZN17QUICK_SELECT_DESC8get_nextEv + 359
0x80f081c _Z8rr_quickP14st_read_record + 28
0x80c5f44 _Z21join_init_read_recordP13st_join_table + 100
0x80c5376 _Z10sub_selectP4JOINP13st_join_tableb + 86
0x80c05d9 _Z9do_selectP4JOINP4ListI4ItemEP8st_tableP9Procedure + 265
0x80ba962
_Z12mysql_selectP3THDP13st_table_listR4ListI4ItemEPS4_P8st_o rderS9_S7_S9_mP1
3select_result + 5250
0x80b94cf _Z13handle_selectP3THDP6st_lexP13select_result + 175
0x809eff9 _Z21mysql_execute_commandv + 649
0x80a355c _Z11mysql_parseP3THDPcj + 316
0x809dfcf _Z16dispatch_command19enum_server_commandP3THDPcj + 1119
0x809db5d _Z10do_commandP3THD + 109
0x809d458 _Z21handle_one_connectionPv + 888
0x8261c8e pthread_start_thread + 222
0x82989aa thread_start + 4


New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://www.mysql.com/doc/U/s/Using_stack_trace.html and follow
instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x71f6a790 is invalid pointer
thd->thread_id=1091852

Regards,
Jocelyn
----- Original Message -----
From:
To:
Sent: Tuesday, September 10, 2002 12:55 PM
Subject: MySql/InnoDB crashes after a Select...order by DESC... LIMIT...


> Description:
> Hello,
>
> I am working with mysqld-max-nt under windows 2000 and unsing InnoDb
tables.
>
> After running the following select:
>
> Select cod,nom from grupos where cod <'005' order by cod desc limit 1
>
> mysqld crashes.
>
> Also it crashes whith limit 10, limit 50, or whatever limit you
indicate.
>
> However, the following selects run ok:
> Select cod,nom from grupos where cod <'005' order by cod desc (without
limit)
> Select * from grupos where cod <’D01’ order by cod desc limit 1
> Select * from grupos where strcmp(cod,’005')<0 order by cod desc limit
1
> Select * from grupos where cod < 005 order by cod desc limit 1
> Select * from grupos where cod <5 order by cod desc limit 1
>
> This error only occurs with InnoDb tables and MySql 4.0.3 (with Mysql
3.23.52 it runs ok).
> With MyIsam tables it runs ok even under mysql 4.0.3
>
> Table definition and data.
> CREATE TABLE grupos (
> Cod char(3) NOT NULL default '',
> Nom varchar(40) NOT NULL default '',
> CVt varchar(9) NOT NULL default '',
> CCm varchar(9) NOT NULL default '',
> Garantia tinyint(4) unsigned NOT NULL default '0',
> Fam char(2) NOT NULL default '',
> LineaProducto char(3) NOT NULL default '',
> PRIMARY KEY (Cod),
> UNIQUE KEY Nombre (Nom,Cod)
> ) TYPE=InnoDB;
>
> --
> -- Dumping data for table 'grupos'
> --
>
> INSERT INTO grupos VALUES ('001','COMP. UHF L. BLANCA BAJA II
R-134/600/12','','',0,'AA','');
> INSERT INTO grupos VALUES ('002','COMP. UHF AIRE
ACONDICIONADO','','',0,'AA','');
> INSERT INTO grupos VALUES ('003','COMP. ASPERA LINEA BLANCA
R134/600/12','','',0,'AB','');
> INSERT INTO grupos VALUES ('004','COMP. ASPERA AIRE
ACONDICIONADO','','',0,'AB','');
> INSERT INTO grupos VALUES ('005','COMP. DANFOSS','','',0,'AC','');
> INSERT INTO grupos VALUES ('006','CONTROLES REFRIG. Y ELECTRONICA
DANFOSS','','',0,'AC','');
> INSERT INTO grupos VALUES ('007','INDUSTRIAL DANFOSS','','',0,'AC','');
> INSERT INTO grupos VALUES ('008','CALEFACCION Y AIRE ACONDICIONADO
DANFOSS','','',0,'AC','');
> INSERT INTO grupos VALUES ('009','ELECTRICIDAD DANFOSS','','',0,'AC','');
> INSERT INTO grupos VALUES ('010','COMP. MT/MTZ HASTA
160','','',0,'AD','');
> INSERT INTO grupos VALUES ('011','REPUESTO BITZER','','',0,'AE','');
> INSERT INTO grupos VALUES ('012','COMP./UNID. BITZER HASTA 7,5 CV
OCTAGON','','',0,'AE','');
> INSERT INTO grupos VALUES ('013','COMPRESORES
SCROLL/UNIDADES','','',0,'AE','');
> INSERT INTO grupos VALUES ('014','REPUESTO FRASCOLD','','',0,'AF','');
>
> Thanks in advance,
> Rafa.
>
> P.D: Sorry for my english.
>
> How-To-Repeat:
> Select cod,nom from grupos where cod <'005' order by cod desc limit 1,
> Fix:
> -
>
> Synopsis: MySql/InnoDB crashes after a Select...order by DESC...
LIMIT...
>
> Submitter-Id:
> Originator: Rafa
> Organization: Pecomark
> MySQL support: none
> Severity: non-critical
> Priority: medium
> Category: mysqld-max-nt
> Class: sw-bug
> Release: mysqld 4.0.3 beta(InnoDB)
>
> Exectutable: mysqld-max-nt
> Environment: Pentium III-MMX, 500 MHZ, 540 MB
> System: Windows 2000
> Compiler: -
> Architecture: i
>
>
> ____________________________________________________________ ______
> The NEW Netscape 7.0 browser is now available. Upgrade now!
http://channels.netscape.com/ns/browsers/download.jsp
>
> Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/
>
> ------------------------------------------------------------ ---------
> 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 bugs-thread12517@lists.mysql.com
> To unsubscribe, e-mail
>
>
>
>


------------------------------------------------------------ ---------
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 bugs-thread12518@lists.mysql.com
To unsubscribe, e-mail

Re: MySql/InnoDB crashes after a Select...order by DESC... LIMIT...

am 11.09.2002 23:45:27 von Heikki Tuuri

Rafa,

----- Original Message -----
From:
Newsgroups: mailing.database.mysql
Sent: Tuesday, September 10, 2002 1:46 PM
Subject: MySql/InnoDB crashes after a Select...order by DESC... LIMIT...


> Hello,
>
> I am working with mysqld-max-nt under windows 2000 and unsing InnoDb
tables.
>
> After running the following select:
>
> Select cod,nom from grupos where cod <'005' order by cod desc limit 1
>
> mysqld crashes.
>
> Also it crashes whith limit 10, limit 50, or whatever limit you
indicate.
>
> However, the following selects run ok:
> Select cod,nom from grupos where cod <'005' order by cod desc (without
limit)
> Select * from grupos where cod <’D01’ order by cod desc limit 1
> Select * from grupos where strcmp(cod,’005')<0 order by cod desc
limit 1
> Select * from grupos where cod < 005 order by cod desc limit 1
> Select * from grupos where cod <5 order by cod desc limit 1
>
> This error only occurs with InnoDb tables and MySql 4.0.3 (with Mysql
3.23.52 it runs ok).
> With MyIsam tables it runs ok even under mysql 4.0.3
>
> I enclose the file grupos.sql with the table definition and data.

thank you for a very detailed bug report.

The bug, assertion failure in btr0pcur.ic, happened because InnoDB did not
store the cursor position in this case. The cursor needs to move downward in
the alphabetical order.

I have now pushed the fix to the 4.0 source tree.

> Thanks in advance,
> Rafa.
>
> P.D: Sorry for my english.

Best regards,

Heikki
Innobase Oy

sql query



------------------------------------------------------------ ---------
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
To unsubscribe, e-mail
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

MySQL-Front Discontinued

am 12.09.2002 00:02:00 von gjensen

I went to http://www.anse.de/mysqlfront/ today ... the notice posted on the
site says "MySQL-Front - This project has been discontinued".

Too bad ... Ansgar Becker developed a truly useful, powerful MySQL database
management tool for us Windoze users.


------------------------------------------------------------ ---------
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
To unsubscribe, e-mail
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Re: MySQL-Front Discontinued

am 12.09.2002 00:22:19 von Gabriele Carioli

Hi.

> Too bad ... Ansgar Becker developed a truly useful,
> powerful MySQL database management tool for us Windoze
> users.

The support forum is still active:

http://mysqlfront.venturemedia.de/

According to the moderator, Ansgar is neither going to make it
commercial nor willing to make it open source.

I wonder why.


------------------------------------------------------------ ---------
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
To unsubscribe, e-mail
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php