Hi Sasha,
The patch you sent me seems to have created other problems,
or simply has allowed to find new ones :)
I'm working on isolating exactly which query makes the bdb
tables crash. Full bug report on the way.
So far, it looks like left joins on bdb tables does something weird.
I was using the following query:
SELECT ProductName, tblProduct.ProductID
FROM tblService LEFT JOIN tblPackage ON (tblService.PackageID =
tblPackage.PackageID)
LEFT JOIN tblConfig ON (tblConfig.ServiceID = tblService.ServiceID)
LEFT JOIN tblProduct ON (tblConfig.ProductID = tblProduct.ProductID)
LEFT JOIN tblProductConfig ON (tblProduct.ProductID =
tblProductConfig.ProductID)
WHERE ProductGroupID = '4' AND tblService.ServiceID ='2'
AND ModifyAllow = 'Y' AND DefaultValue IS NULL AND UserConfigFlag = 'Y'
GROUP BY tblProduct.ProductID;
which returned no results (it should have). the query did work before
some of the tables were switched to BDB.
I rewrote it look like:
select p.ProductName,p.ProductID FROM tblProduct p, tblService s,
tblConfig c,tblProductConfig pc,
tblPackage pkg WHERE s.PackageID = pkg.PackageID AND c.ServiceID =
s.ServiceID
AND c.ProductID = p.ProductID AND p.ProductID = pc.ProductID AND
p.ProductGroupID = 4
AND s.ServiceID = 2 AND pc.ModifyAllow = 'Y' AND pc.DefaultValue IS NULL
AND pc.UserConfigFlag = 'Y' GROUP BY p.ProductID;
which returns the expected results.
The error log is reporting the following error, but I haven't pinpointed
exactly what triggers it yet.
010301 21:09:51 bdb: transaction has active cursors
010301 21:09:51 bdb: PANIC: Invalid argument
010301 21:09:51 Aborted connection 16 to db: 'Funio' user: 'funio'
host: `localhost' (Got an error reading communication packets)
The error seems to be showing up after doing a transaction which has
executed successfully (I'll confirm shortly).
Here's the table structure:
CREATE TABLE tblProduct (
ProductID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
ProductName varchar(255) DEFAULT '' NOT NULL,
Status enum('Active','Disabled') DEFAULT 'Active' NOT NULL,
ProductTable varchar(255) DEFAULT '' NOT NULL,
AddCommand text,
RemoveCommand text,
EnableCommand text,
DisableCommand text,
ModifyCommand text,
ProductGroupID int(10) unsigned DEFAULT '0' NOT NULL,
PRIMARY KEY (ProductID),
KEY ProductGroupID (ProductGroupID),
KEY Status (Status)
);
CREATE TABLE tblService (
ServiceID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
UserID int(10) unsigned DEFAULT '0' NOT NULL,
PackageID int(10) unsigned DEFAULT '0' NOT NULL,
StartDate date DEFAULT '-00-00' NOT NULL,
EndDate date DEFAULT '-00-00' NOT NULL,
RebillDate date DEFAULT '-00-00' NOT NULL,
RebillRetryDate date DEFAULT '-00-00' NOT NULL,
Status enum('Active','Disabled','Removed') DEFAULT 'Active' NOT NULL,
ScheduleToBeRemoved enum('Yes','No') DEFAULT 'No' NOT NULL,
ServiceActivationIP char(20),
ServiceActivationTimeStamp char(20),
PRIMARY KEY (ServiceID),
KEY UserID (UserID),
KEY PackageID (PackageID),
KEY StartDate (StartDate),
KEY EndDate (EndDate),
KEY RebillDate (RebillDate),
KEY RebillRetryDate (RebillRetryDate),
KEY Status (Status)
) type=BDB;
CREATE TABLE tblConfig (
ConfigID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
ServiceID int(10) unsigned DEFAULT '0' NOT NULL,
ProductID int(10) unsigned DEFAULT '0' NOT NULL,
Configured enum('Y','N') DEFAULT 'N' NOT NULL,
PRIMARY KEY (ConfigID),
KEY Configured (Configured),
KEY ServiceID (ServiceID),
KEY ProductID (ProductID)
) type=BDB;
CREATE TABLE tblProductConfig (
ProductFieldID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
ProductID int(10) unsigned DEFAULT '0' NOT NULL,
UserConfigFlag enum('Y','N') DEFAULT 'Y' NOT NULL,
RequiredConfigFlag enum('Y','N') DEFAULT 'Y' NOT NULL,
ModifyAllow enum('Y','N') DEFAULT 'Y' NOT NULL,
ProductField text NOT NULL,
DefaultValue text,
ProductFieldCheckRegExp varchar(255),
ProductFieldError varchar(100),
PRIMARY KEY (ProductFieldID),
KEY ProductID (ProductID),
KEY UserConfigFlag (UserConfigFlag),
KEY RequiredConfigFlag (RequiredConfigFlag)
);
CREATE TABLE tblPackage (
PackageID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
PackageName varchar(255),
PackageGroupID int(10) unsigned DEFAULT '0' NOT NULL,
PackageTypeID int(10) unsigned DEFAULT '0' NOT NULL,
PackagePeriod tinyint(3) unsigned,
PackagePrice decimal(10,2),
PackageInstallationFee decimal(10,2),
PackageProfit decimal(10,2),
PackageAnswer text,
Rebill enum('Y','N') DEFAULT 'Y' NOT NULL,
Status enum('Active','Disabled'),
PRIMARY KEY (PackageID),
KEY PackageGroupID (PackageGroupID),
KEY Rebill (Rebill),
KEY PackageTypeID (PackageTypeID)
);
Sasha Pachev wrote:
>
> 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