On Wednesday 28 February 2001 22:04, [EMAIL PROTECTED] wrote:
>Hi folks, I'm having a hard time using bdb tables. Here are the
>details...
>
>I've create a few BDB tables, which are causing me great amounts
>of grief. The tables worked fine for a while, then suddenly
>started crashing mysqld. I decided to drop the offending
>database, and re-create it. No problem so far. Right after
>I run the offending queries (see below), mysqld dies. Any subsequent
>connection attempt to mysqld hangs, and the server is basically
>dead (requiring a killall -9 mysqld). There is a file called
>log.0000000001 that appeared, as well as an error message (see below).
>
>I can replicate this error quite easily, as it happens each time the
>query
>is run.
>
>
>CREATE TABLE tblCharge (
> ChargeID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
> ServiceID int(10) unsigned DEFAULT '0' NOT NULL,
> ChargeDate date DEFAULT '0000-00-00' NOT NULL,
> ChargeAmount decimal(20,2) DEFAULT '0.00' NOT NULL,
> FedTaxes decimal(20,2) DEFAULT '0.00' NOT NULL,
> ProvTaxes decimal(20,2) DEFAULT '0.00' NOT NULL,
> ChargeStatus enum('New','Auth','Unauth','Sale','Denied','Refund')
>DEFAULT 'New' NOT NULL,
> ChargeAuthorizationMessage text,
> ChargeComment text,
> ChargeTimeStamp varchar(20),
> PRIMARY KEY (ChargeID),
> KEY ServiceID (ServiceID),
> KEY ChargeDate (ChargeDate)
>) type=BDB;
>
>
>
>Query #1:
>BEGIN;
>INSERT INTO tblCharge
>VALUES(NULL,1,CURRENT_DATE(),1,1,1,'New',NULL,NULL,UNIX_TIMESTAMP(NOW()));
>COMMIT;
>
>Query #2
>BEGIN;
>UPDATE tblCharge SET ChargeAuthorizationMessage = 'blablabla' WHERE
>ChargeID = 1;
>COMMIT;
>
>Query #3
>BEGIN;
>INSERT INTO tblCharge
>VALUES(NULL,1,CURRENT_DATE(),1,1,1,'New',NULL,NULL,UNIX_TIMESTAMP(NOW()));
>
><CRASH HERE>
I do have a patch for it now. From what I understood in the code, this is
actually a more correct way to do things, but I would like to get Monty's
approval to be sure. After the patch, MySQL still passes our test suite,
which is a good sign. So if you are in dire straits, go ahead and apply it,
otherwise, wait until 3.23.34 - if there is something wrong with the current
fix, it will be corrected by then. Here it is:
--- 1.33/sql/field.cc Wed Feb 7 19:43:54 2001
+++ 1.34/sql/field.cc Thu Mar 1 11:49:05 2001
@@ -4075,8 +4075,8 @@
const char *Field_blob::unpack(char *to, const char *from)
{
memcpy(to,from,packlength);
+ ulong length=get_length(from);
from+=packlength;
- ulong length=get_length();
if (length)
memcpy_fixed(to+packlength, &from, sizeof(from));
else
--
MySQL Development Team
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sasha Pachev <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/
/_/ /_/\_, /___/\___\_\___/ Provo, Utah, USA
<___/
---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php