Non-desired duplicate keys during import via myOdbc

Non-desired duplicate keys during import via myOdbc

am 25.11.2002 09:14:20 von jdesodt

From: jdesodt@becquet.fr
To: bugs@lists.mysql.com
Subject: Non-desired duplicate keys during import via myOdbc

Description:
I use Ascential Software DataStage engine to replicate databases.
With this soft, I tried to import a text file in a MySql table, via MyOdcb
driver v.2.50.39
The replication needs to clear the table before import.
Once the table is cleared, I got the error message :
[DataStage][SQL Client][ODBC][TCX][MyODBC]Duplicate entry '0-0-0' for key 1
One row is written in the table, with all values to 0.
With some others tables, another row is written with all values like
4325471.

The Odbc trace looks like :
50 74-c9 ENTER SQLPrepare
HSTMT 009A31B8
UCHAR * 0x00433710 [ -3] "INSERT INTO
`myTable`(FINFCH, FINCAT, FINPAG, FINFCA, FIPAPP) VALUES (?,?,?,?,?) \ 0"
SDWORD -3

50 74-c9 EXIT SQLPrepare with return code 0 (SQL_SUCCESS)
HSTMT 009A31B8
UCHAR * 0x00433710 [ -3] "INSERT INTO
`myTable`(FINFCH, FINCAT, FINPAG, FINFCA, FIPAPP) VALUES (?,?,?,?,?) \ 0"
SDWORD -3

50 74-c9 ENTER SQLNumParams
HSTMT 009A31B8
SWORD * 0x0012E610

50 74-c9 EXIT SQLNumParams with return code 0
(SQL_SUCCESS)
HSTMT 009A31B8
SWORD * 0x0012E610 (5)

50 74-c9 ENTER SQLNumResultCols
HSTMT 009A31B8
SWORD * 0x0012E56E

50 74-c9 EXIT SQLNumResultCols with return code -1
(SQL_ERROR)
HSTMT 009A31B8
SWORD * 0x0012E56E

DIAG [S1000] [TCX][MyODBC]Duplicate entry '0-0-0' for key 1
(1062)


How-To-Repeat:
It seems difficult to repeat this bug without the Ascential software...
I can give you all the log file from the Odbc trace.

Fix:
If I could.... ;-)

Synopsis: Non-desired duplicate keys during import via myOdbc
Submitter-Id: jdesodt
Originator: Jacques Desodt
Organization: Becquet
MySQL support: none
Severity: critical
Priority: high
Category: mysql client, myOdbc
Class: sw-bug
Release: mysql-3.23.38

Exectutable: mysqld-nt
Environment: IBM PIII server
System: WinNT
Compiler: VC++ 6.0
Architecture: i



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

Re: Non-desired duplicate keys during import via myOdbc

am 25.11.2002 18:27:32 von Venu

On Mon, 2002-11-25 at 00:14, jdesodt@becquet.fr wrote:
> From: jdesodt@becquet.fr
> To: bugs@lists.mysql.com
> Subject: Non-desired duplicate keys during import via myOdbc
>
> Description:
> I use Ascential Software DataStage engine to replicate databases.
> With this soft, I tried to import a text file in a MySql table, via MyOdcb
> driver v.2.50.39
> The replication needs to clear the table before import.
> Once the table is cleared, I got the error message :
> [DataStage][SQL Client][ODBC][TCX][MyODBC]Duplicate entry '0-0-0' for key 1
> One row is written in the table, with all values to 0.
> With some others tables, another row is written with all values like
> 4325471.

The reason for this is expecting the result set from prepared
statements. Can you please give a try with the latest MyODBC 3.51
version ? because there is a change in using this logic.

If not; you need to wait till MySQL 4.1 actually supports prepares.

--
Regards, Venu
For technical support contracts, go to https://order.mysql.com
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Venu
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer
/_/ /_/\_, /___/\___\_\___/ California, USA
<___/ www.mysql.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-thread13110@lists.mysql.com
To unsubscribe, e-mail