forum.vmspython.org Forum Index forum.vmspython.org
Forum system
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MySQL C/C++ API.

 
Post new topic   Reply to topic    forum.vmspython.org Forum Index -> MySQL for OpenVMS
View previous topic :: View next topic  
Author Message
mohcine



Joined: 15 Dec 2008
Posts: 12

PostPosted: Mon Dec 15, 2008 8:05 pm    Post subject: MySQL C/C++ API. Reply with quote

Hi,

I try to install successfully MYSQL for OpenVMS.
I would like to use the C/C++ API but unfortunately without success.
I have prepared a test program named test2.c with basic MySQL C API used.
When i try to run it, the program crash when it call mysql_init routine.
*********************************************************
Here after the crash dump:

TEST> run DIR_EXE:TEST2.exe
Bienvenue dans mon jeu de plus ou moins!

1- Jouer
2- Scores

2
Liste des scores du jeu:

%SYSTEM-F-ACCVIO, access violation, reason mask=04, virtual address=0000000000000000, PC=0000
000000072961, PS=0000001B
%TRACE-F-TRACEBACK, symbolic stack dump follows
image module routine line rel PC abs PC
TEST2 MY_THR_INIT my_thread_global_init
28019 0000000000000031 0000000000072961
TEST2 MY_INIT my_init 28185 0000000000000300 000000000006B210
TEST2 LIBMYSQL mysql_server_init 72338 0000000000000080 000000000004BEA0
TEST2 CLIENT mysql_init 71995 0000000000003EC0 0000000000044960
TEST2 0 00000000000402B0 00000000000402B0
TEST2 0 00000000000400C0 00000000000400C0
PTHREAD$RTL THD_THREAD thdBase 244123 0000000000005BF0 FFFFFFFF845436B0
PTHREAD$RTL THD_INIT pthread_main 243913 00000000000006C0 FFFFFFFF844FA6C0
0 FFFFFFFF80B57700 FFFFFFFF80B57700
DCL 0 000000000006BA90 000000007AE27A90
%TRACE-I-END, end of TRACE stack dump
TEST>
*********************************************************

Could any one help me to solve this problem?

Thanks.
Mohcine
Back to top
View user's profile Send private message
WillemGrooters



Joined: 15 Apr 2006
Posts: 36

PostPosted: Wed Dec 17, 2008 9:43 pm    Post subject: Reply with quote

Quote:
%SYSTEM-F-ACCVIO, access violation, reason mask=04, virtual address=0000000000000000, PC=0000
000000072961, PS=0000001B


The code is trying to read something from address 0.

This is always a programming error. Be sure to have all your pointers refer a valid address (non-zero), your variables are all initialized and properly passed (By reference or by value). Check at the v=given locations if all is valid:
MY_THR_INIT.C, routine my_thread_global_init, line 28019
MY_INIT.C, routine my_init, line 28185
CLIENT.C, routine mySql_init, line 71995

I'm not familiar with the MySQL API but guessing that you'll have to pass some data to mysql_server_init, and THAT should be propely setup.

Build your code /DEBUG/NOOPTIMIZE and walk it through (line by line). Set breakpoints on each of the routines mentioned and check the parameters before calling.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vmspython.org Forum Index -> MySQL for OpenVMS All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group