Description:
We attempted to upgrade from mm.mysql (v2.0) to connector J (v3.1), but found that for certain insert queries, the backslash escape of single quotes was not recognized, resulting in a java.sql.SQLException: No value specified for parameter 1.
This occurred only on some TEXT columns within some tables, and only for certain rows in those tables. Changing the content within those rows could eliminate the problem.
We are running MySQL v4.0.25 on Redhat Linux v2.6.9-34.ELsmp
We use UTF-8 encoding. Our application uses JDK v1.5.
How to repeat:
***** Table:
CREATE TABLE `Studies` (
`UId` varchar(16) NOT NULL default '',
`NCTId` varchar(31) NOT NULL default '',
`OrgName` varchar(255) NOT NULL default '',
`OrgStudyId` varchar(31) NOT NULL default '',
`ProviderName` varchar(255) NOT NULL default '',
`ProviderStudyId` varchar(31) NOT NULL default '',
`LeadSponsor` varchar(255) NOT NULL default '',
`IsINDStudy` varchar(15) NOT NULL default '',
`INDNumber` varchar(31) NOT NULL default '',
`INDSerialNumber` varchar(31) NOT NULL default '',
`INDGrantor` varchar(255) NOT NULL default '',
`BriefTitle` text NOT NULL,
`OfficialTitle` text NOT NULL,
`BriefSummary` text NOT NULL,
`DetailedDescription` text NOT NULL,
`Purpose` varchar(31) NOT NULL default '',
`IntDesignType` varchar(31) NOT NULL default '',
`IntDesignAllocation` varchar(31) NOT NULL default '',
`IntDesignMasking` varchar(31) NOT NULL default '',
`IntDesignControl` varchar(31) NOT NULL default '',
`IntDesignAssignment` varchar(31) NOT NULL default '',
`IntDesignEndpoint` varchar(31) NOT NULL default '',
`ObsDesignType` varchar(31) NOT NULL default '',
`ObsDesignDuration` varchar(31) NOT NULL default '',
`ObsDesignSelection` varchar(31) NOT NULL default '',
`ObsDesignTiming` varchar(31) NOT NULL default '',
`Phase` varchar(31) NOT NULL default '',
`Criteria` text NOT NULL,
`Gender` varchar(15) NOT NULL default '',
`MinAgeQuantity` varchar(15) NOT NULL default '',
`MinAgeUnits` varchar(15) NOT NULL default '',
`MaxAgeQuantity` varchar(15) NOT NULL default '',
`MaxAgeUnits` varchar(15) NOT NULL default '',
`TakesHealthy` varchar(15) NOT NULL default '',
`TakesPatients` varchar(15) NOT NULL default '',
`ExpectedEnrollment` varchar(15) NOT NULL default '',
`StartDate` varchar(31) NOT NULL default '',
`EndDate` varchar(31) NOT NULL default '',
`LastFollowUpDate` varchar(31) NOT NULL default '',
`LastDataEntryDate` varchar(31) NOT NULL default '',
`OverallStatus` varchar(31) NOT NULL default '',
`VerificationDate` varchar(31) NOT NULL default '',
`IrbApproved` varchar(31) NOT NULL default '',
`OvrConFirstName` varchar(63) NOT NULL default '',
`OvrConMiddleName` varchar(31) NOT NULL default '',
`OvrConLastName` varchar(63) NOT NULL default '',
`OvrConDegrees` varchar(31) NOT NULL default '',
`OvrConRole` varchar(63) NOT NULL default '',
`OvrConPhone` varchar(31) NOT NULL default '',
`OvrConExtension` varchar(15) NOT NULL default '',
`OvrConEMail` varchar(255) NOT NULL default '',
`OvrConBkpFirstName` varchar(63) NOT NULL default '',
`OvrConBkpMiddleName` varchar(31) NOT NULL default '',
`OvrConBkpLastName` varchar(63) NOT NULL default '',
`OvrConBkpDegrees` varchar(31) NOT NULL default '',
`OvrConBkpRole` varchar(63) NOT NULL default '',
`OvrConBkpPhone` varchar(31) NOT NULL default '',
`OvrConBkpExtension` varchar(15) NOT NULL default '',
`OvrConBkpEMail` varchar(255) NOT NULL default '',
`MeetsReqs` varchar(15) NOT NULL default '',
`AutoDeemed` varchar(15) NOT NULL default '',
`IrbApprovalNumber` varchar(31) NOT NULL default '',
`IrbBoardName` varchar(255) NOT NULL default '',
`IrbAffiliation` varchar(255) NOT NULL default '',
`IrbChairName` varchar(255) NOT NULL default '',
`IrbAddress` text NOT NULL,
`IrbPhone` varchar(31) NOT NULL default '',
`IrbExtension` varchar(15) NOT NULL default '',
`IrbEmail` varchar(255) NOT NULL default '',
`IrbApprovalStatus` varchar(31) NOT NULL default '',
UNIQUE KEY `UId` (`UId`),
KEY `NCTId` (`NCTId`),
KEY `OrgName` (`OrgName`),
KEY `IrbApprovalStatus` (`IrbApprovalStatus`)
) TYPE=MyISAM
***** Query:
INSERT INTO Studies VALUES ('S0000O6S00000039', '', 'NLM', '000sql-error', 'NLM_DES', 'S0000O6S', 'Boehringer Ingelheim Pharmaceuticals', 'No', '', '', '', 'Profile of depressive symptoms in Parkinsons Disease', 'Profile of depressive symptoms in Parkinsons Disease single quote \' here', 'To explore or establish the relationship between cognitive, mood and motor symptoms in PD to scores on depression rating scales in a naturalistic setting.\n\n', 'This is a multi-national, multicenter, prospective observational study in which 8 European countries participate. Patients with idiopathic PD as defined by the criteria of the United Kingdom Parkinsons Disease Society Brain Bank (UK-PDS-BB) and a score on the Mini Mental State Examination (MMSE) of ?24 are included. The UPDRS is used to quantify ADL function, motor symptoms, and complications of therapy. Depression is diagnosed according to the DSM IV criteria. The depression rating scales used are the Hospital Anxiety and Depression rating Scale (HADS), the Hamilton Depression Rating Scale (HAMD-17), and the Beck Depression Inventory (BDI-1A). The Frontal Assessment Battery (FAB) is used to assess frontal function. The target patient number in this study will be 1000 patients with an inclusion period of 6 months. \n\n\nStudy Hypothesis:\n\nComparison(s):\n', 'Observational', '', '', '', '', '', '', '', '', '', '', 'Phase 4', 'Inclusion_Criteria:\r\n\r\nObservation criteria:\r\nare able to provide written informed consent in accordance with Good Clinical Practice (GCP) and local legislation\r\nhave idiopathic Parkinsons disease according to the United Kingdom Parkinsons Disease Society Brain Bank Diagnostic Criteria for Parkinsons disease\r\nshow no impairment of cognitive function (MMSE score ?24)\r\nare with or without symptoms of depression (full range)\r\nare stable on anti-Parkinson/anti-depressive treatment for at least 1 month before entering the study\r\nare or are not on concomitant antidepressant Tx \r\nare in the on state during the observation period\r\ndid not previously undergo PD surgery\r\n', 'Both', '18', 'Years', 'N/A', 'N/A', 'No', 'None', '1000', '2006-04', '2007-04', '', '', 'Recruiting', '2006-06', 'None', 'Boehringer Ingelheim', '', 'Study Coordinator', '', '', '', '', 'clintriage@rdg.boehringer-ingelheim.com', '', '', '', '', '', '', '', '', 'None', 'None', '05-213', 'Medisch Ethische Commissie Academisch Ziekenhuis Maastricht', 'Academisch Ziekenhuis Maastricht, The Netherlands', 'De Die-Smulders,MD, PhD', 'PO box 5800,Maastricht,6202 AZ,Netherlands', '+31 (0)43 3872040', '', 'MECsecretariaat@ctcm.azu.nl', 'None')