Bug #5328 ERROR IN VB WITH MANY mysql_open AND mysql_close
Submitted: 31 Aug 2004 22:03 Modified: 29 Mar 2011 18:28
Reporter: Roberto Spadim (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.1.3 OS:Windows (WINDOWS XP)
Assigned to: CPU Architecture:Any

[31 Aug 2004 22:03] Roberto Spadim
Description:
ERROR OCURRED WITH VIOLATION EXCEPTION!
visual c debugger result:

REGISTERS:
 EAX = 000000C8 EBX = 03334EA4 ECX = 03334EA4 EDX = 03334EA4
 ESI = 00000000 EDI = 03334F6D EIP = 038B46CA ESP = 0012F254
 EBP = 0012F320 EFL = 00000202 CS = 001B DS = 0023 ES = 0023 SS = 0023
 FS = 003B GS = 0000 OV=0 UP=0 EI=1 PL=0 ZR=0 AC=0 PE=0 CY=0

 00000358 = ??

 ST0 = -0.00126221649488613e+2466 ST1 = -3.52510357662553639e+3498
 ST2 = -1.54536454219457440e+3533 ST3 = +2.04807575047867449e+0419
 ST4 = +1.00000000000000000e+0001 ST5 = +3.82307056770833319e+0004
 ST6 = +3.82307056712962948e+0004 ST7 = +2.90000000000000000e+0001
 CTRL = 137F STAT = 0100 TAGS = FFFF EIP = 00000000 CS = 0000 DS = 0000
 EDO = 00000000

CALL STACK
=>LIBMYSQL! 038b46ca()
VBA6! 0fc02030()
VBA6! 0fc01ff3()
VB6! 0047b936()
001e55c8()
VB6! 0047b90f()
VB6! 00445601()
VB6! 004454c7()
VBA6! 0fb67d6f()
VBA6! 0fc09b04()
VB6! 0047b936()
00233900()
VB6! 0047b90f()
VB6! 004066d3()
VB6! 00406545()
VB6! 004ac97b()
VB6! 0040521a()
VB6! 00408555()
VB6! 00403882()
VB6! 00405fac()
VB6! 00405b87()
USER32! 77d23a5f()
USER32! 77d23b2e()
USER32! 77d23d6a()
USER32! 77d241fd()
VB6! 0047ac2e()
MSO97RT! 3078d224()
MSO97RT! 306c3498()
0824448b()

DISASSEMBLY
038B46C0   push        ebx
038B46C1   mov         ebx,dword ptr [esp+0Ch]
038B46C5   push        esi
038B46C6   mov         esi,dword ptr [esp+0Ch]
=>038B46CA   mov         al,byte ptr [esi+358h]
038B46D0   test        al,al
038B46D2   push        edi
038B46D3   mov         edi,dword ptr [esp+18h]
038B46D7   je          038B4714
038B46D9   mov         al,byte ptr [esi+397h]
038B46DF   test        al,al
038B46E1   je          038B4714

Unhandled exception in VB6.EXE(LIBMYSQL.DLL): 0xC0000005: Access Violation

How to repeat:
error ocurring when open and close are very often (1 second diff)

mysql_close handle
mysql_real_connect(handle, msHostname, msUsername, msPassword, msDbName, mlPortNum, "", mlFlags)

Suggested fix:
?!!?
[1 Sep 2004 16:23] MySQL Verification Team
Please provide us more details: how many couple of connect/close
that happens or if possible the VB code for I to try to test the same
with a C/C++ application.

Thanks in advance
[2 Sep 2004 2:29] Roberto Spadim
I found the problem
my class have a sub(void function) that close database
the problem was that closing database without close recordset(queries with SELECT) was crashing my application i made a event and raised it when database was closing and all recordset(queries) are been closed
after making it just one error ocurred, when mysql_real_query is called with a blank SQL "" so i make it don't use when blank
it's the mysql implementation for vb, i will send the sources to you (myvbsql)
just a minute to pack it and send
[14 Feb 2005 22:54] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[29 Mar 2011 18:28] Roberto Spadim
VB problem, not MYSQL, thanks, closed