Windows 2000/XP 2013 user defined function crash.
am 27.05.2005 21:37:57 von TimmermansE------_=_NextPart_001_01C562F3.9549ACA3
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
My simple function works when one row is selected but crashes when more
selected.
=20
SELECT TEST1(CMT, 'A') FROM PROD.IPR limit 1
=20
TEST1(CMT, 'A')=20
=20
testvalue =20
=20
1 row in set (0.00 sec)
=20
SELECT TEST1(CMT, 'A') FROM PROD.IPR limit 2
//
ERROR 2013 (HY000): Lost connection to MySQL server during query
=20
C:\PROGRA~1\MYSQL\MYSQLS~1.0>mysqld --defaults-file=3Dmy.ini --console
050527 11:21:00 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
050527 11:21:00 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 773267422.
InnoDB: Doing recovery: scanned up to log sequence number 0 773267432
InnoDB: Last MySQL binlog file position 0 0, file name
050527 11:21:00 InnoDB: Started; log sequence number 0 773267432
050527 11:21:00 InnoDB: Starting recovery for XA transactions...
050527 11:21:00 InnoDB: 0 transactions in prepared state after recovery
050527 11:21:00 [Note] MYSQLD: ready for connections.
Version: '5.0.4-beta' socket: '' port: 3306 Official MySQL binary
=20
DROP DATABASE IF EXISTS PROD;
//
CREATE DATABASE PROD CHARACTER SET latin1 COLLATE latin1_swedish_ci;
//
DROP TABLE PROD.IPR
//
CREATE TABLE PROD.IPR (
acid INTEGER(8) NOT NULL,
iprtype VARCHAR(10) NOT NULL,
iprid VARCHAR(40) NULL,
iprno INTEGER(9) NULL,
iprcrop VARCHAR(60) NULL,
iprname VARCHAR(240) NULL,
issued DATETIME NULL,
expired DATETIME NULL,
cno INTEGER(8) NULL,
citno INTEGER(8) NULL,
cmt VARCHAR(240) NULL,
site VARCHAR(8) NULL,
userid CHAR(10) NULL,
created DATETIME NULL,
modified DATETIME NULL,
INDEX ndx_fk_ipr_acit (citno),
INDEX ndx_fk_ipr_coop (cno),
INDEX ndx_fk_ipr_site (site(8)),
INDEX oth_ipr_crop (iprcrop(60)),
INDEX oth_ipr_iprid (iprid(40)),
INDEX oth_ipr_iprno (iprno),
INDEX pk_ipr (acid,iprtype(10),created),
UNIQUE INDEX uniq_ipr (acid,iprtype(10),iprid(40))
)
ENGINE =3D INNODB;
//
USE PROD
//
insert into PROD.IPR ( CREATED, MODIFIED, ACID, IPRTYPE, IPRID, IPRNO,
IPRCROP, IPRNAME, ISSUED, EXPIRED, CNO, CITNO, CMT, SITE, USERID) VALUES
( '2003-11-05 15:31:46',NULL,123709,'CSR','ETII',NULL,'BARLEY','Eugene
Test IPR ID','2003-11-02 00:00:00','2003-11-04
00:00:00',2175903,14739,NULL,'DBMU','DBMUET '),=20
( '2002-07-02 00:00:00','2002-09-13
00:00:00',17226,'CSR','GP-294',294,'wheat',NULL,'1989-05-01
00:00:00',NULL,2072497,14181,NULL,'PGRC','DBMUET '),=20
( '2000-12-11 00:00:00','2002-09-13
00:00:00',37223,'CSR','CV-330',330,'OAT',NULL,'1991-07-01
00:00:00','1995-12-30 00:00:00',NULL,87,NULL,'PGRC','DBMUET '),=20
( '2000-11-22 00:00:00','2002-09-13
00:00:00',35861,'CSR','CV-576',576,'wheat',NULL,'1976-09-01
00:00:00','1982-12-30 00:00:00',NULL,78,NULL,'PGRC','DBMUET '),=20
( '2000-11-20 00:00:00','2002-09-13
00:00:00',35640,'CSR','CV-155',155,'OAT',NULL,'1958-11-01
00:00:00','1965-12-30 00:00:00',NULL,69,NULL,'PGRC','DBMUET '),=20
( '2000-11-20 00:00:00','2002-09-13
00:00:00',35639,'CSR','CV-224',224,'OAT',NULL,'1969-05-01
00:00:00','1975-12-30 00:00:00',NULL,66,NULL,'PGRC','DBMUET '),=20
( '2000-11-20 00:00:00','2002-09-13
00:00:00',35637,'CSR','CV-56',56,'OAT',NULL,'1926-10-10
00:00:00','1930-12-30 00:00:00',NULL,64,NULL,'PGRC','DBMUET ');
//
drop function PROD.test1
//
create FUNCTION PROD.test1( indate VARCHAR(240), informat VARCHAR(240))
RETURNS VARCHAR(240)=20
BEGIN
declare return_value VARCHAR(240);
set return_value :=3D 'testvalue';
return return_value;
END;
//
SELECT TEST1(CMT, 'A') FROM PROD.IPR limit 1
//
+-----------------+
| TEST1(CMT, 'A') |
+-----------------+
| testvalue |
+-----------------+
1 row in set (0.00 sec)
=20
SELECT TEST1(CMT, 'A') FROM PROD.IPR limit 2
//
ERROR 2013 (HY000): Lost connection to MySQL server during query
=20
=20
=20
------_=_NextPart_001_01C562F3.9549ACA3--