Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
Subject: mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Subject: Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
Subject: MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Subject: Re: Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
New connection without reason

New connection without reason

2007-12-03       - By Jess Balint

 Back
Reply:     1     2  

Mauricio -

Do you have control over whether Clarion is using a separate connection
to execute the "select last_insert_id()" query? The driver doesn't have
any direct control of which connection is used for a specific query. If
you have some code that you can share, it might help reveal the problem.

Jess

On Mon, Dec 03, 2007 at 09:01:22AM -0300, Mauricio Bruns wrote:
> Hi,
>
> I'm using myodbc 3.51.22, mysql 4.1.20 and Clarion. I don't know why,
> but sometimes, without reason it (myodbc, mysql or clarion) creates a
> new connection between two queries that couldn't be separate. For
> example I do "INSERT INTO ...." (in a autoinc table) and after I do
> "SELECT last_insert_id()", but each query was executed in their own
> connection, than the second query return 0. Do you think that it could
> be myodbc error?
> Here is some part of mysql log:
>
> C:\Arquivos de programas\MySQL\MySQL Server 4.1\bin\mysqld-nt, Version:
> 4.1.22-community-nt-log. started with:
> TCP Port: 3306, Named Pipe: MySQL
> Time                 Id Command    Argument
> 071129 14:52:17          1 Connect     root@(protected) on Test
>              1 Query       SET SQL_AUTO_IS_NULL = 0
>              1 Query       SELECT @@(protected)
>              1 Query       SET SESSION TRANSACTION ISOLATION LEVEL
> REPEATABLE READ
>              1 Query       SELECT * FROM Empresa WHERE 0 = 1
>              1 Query       SELECT
> CodEmpresa,NomeEmpresa,CodSistema,NrUsuarios,DriverBD,AliqPis,AliqCofins
,AliqCS,AliqIRF,VlrMinimoIRF,AliqIRLucro,PrazoIRJ,PrazoICMS,PrazoIPI,PrazoPIS
,PrazoCofins,PrazoCS,PrazoFP,PrazoFGTS,PrazoINSS,VlrMinimoICMSDifer
,CodFilialPadrao,SeImpressoraFilial,CodClienteINSS,CodClienteIRF,CodClientePCC
,CodClienteISS,MetPrevisaoFluxo
> FROM Empresa WHERE 0 = 1
> ...
>              1 Query       INSERT INTO NotaPed
> (NrCadDoc,CodEmpresa,CodFilial,TipoDocto,NrNota,SerieNF,CodCliente,NrPedido
,NrAtendimento)
> VALUES (117286,1,5,1,15188,'3',23574,6344,214)
>              1 Query       Begin
>              1 Query       INSERT INTO DocIte
> (NrCadDoc,CodEmpresa,CodFilial,TipoDocto,NrNota,SerieNF,CodCliente,NrSeqIte
,CodProduto,CodVariante,CodTamanho,CodQualidade,UnidMedida,QtdePecas,QtdeMovto
,PesoLiquido,PesoBruto,PrecoUnitario,PrecoUnitarioLiq,TipoOperFat,CodNatFiscal
,CodProced,CodICMS,CodIPI,IncidePIS,IncideCofins,IncideCSLL,AliqICMS,CodClaFis
,TaxaIPI,VlrProduto,VlrSeguro,VlrDespAces,VlrIpiNContrib,VlrBonif,VlrBonif2
,VlrFrete,VlrFreteCalc,VlrOutDespesas,VlrISS,VlrIRF,VlrFunRural,VlrICMS
,VlrICMSSubs,VlrICMSDifer,VlrIPI,VlrIPIDesp,VlrPIS,VlrCofins,VlrCSLL,VlrPCC
,VlrINSS,VlrTaxaImportacao,VlrImpostosCobr,VlrServicoPago,VlrContabil
,VlrComissao,VlrComissaoAdic,VlrEncFinanc,CodColecao,CodLocal,CodLocalDest
,CodCusto,CodAplic,NrLoteProd,NrVolume,NrAtendimento,NrPedido,NrSeqPed,NrOrcam
,NrSeqOrc,NrOrdem,NrSeqProd,QtdePerda,SitEstoque,TipoOperEtq,CodMensNF
,CodFuncionario,CodProdutoCli,DescProduto,Observ,QtdeGrade1,QtdeGrade2
,QtdeGrade3,QtdeGrade4,QtdeGrade5,QtdeGrade6,QtdeGrade7,QtdeGrade8,QtdeGrade9
,QtdeGrade10,QtdeGrade11,QtdeGrade12)
> VALUES (117286,1,5,1,15188,'3',23574,1,'20120174','','','','PC',0,1.000
> ,0.000     ,0.000     ,23.000000        ,23.000000
> ,'P','510202','0','00','90','S','S','S',17.00    ,'          ',0.00
> ,23.00    ,0.00    ,0.00    ,0.00    ,0.00    ,0.00    ,0.00    ,0.00
> ,0.00    ,0.00    ,0.00    ,0.00    ,3.91    ,0.00    ,0.00    ,0.00
> ,0.00    ,0.00    ,0.00    ,0.00    ,0.00    ,0.00    ,0.00    ,0.00
> ,0.00    ,0.00    ,1.15    ,0.00    ,0.00
> ,8,0,0,0,0,'',0,214,6344,1,0,0,0,0,0.000
> ,'N','N',0,0,'','T-SHIRT','',0,0,0,0,0,0,0,0,0,0,0,0)
>            131 Connect     root@(protected) on Test
>            131 Query       SET SQL_AUTO_IS_NULL = 0
>            131 Query       SET SESSION TRANSACTION ISOLATION LEVEL
> REPEATABLE READ
>            131 Query       Select last_insert_id()
>              1 Query       Commit
> ...
>
> Thanks in advance,
> Mauricio Bruns
>
>
> --
> MySQL ODBC Mailing List
> For list archives: http://lists.mysql.com/myodbc
> To unsubscribe:    http://lists.mysql.com/myodbc?unsub=jbalint@(protected)

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe:    http://lists.mysql.com/myodbc?unsub=mysql@(protected)