hi,
I wish to provide some more information too regarding MySQL
Server hangup.
Once after I execute the C sample program, WinMySQLAdmin tool
and query commands from *mysql>* console never responds.
During this time if I try to start mysqld from another console
produce the following error message;
C:\>mysqld --debug
Can't start server: Bind on TCP/IP port: No error
040223 19:18:22 Do you already have another mysqld server
running on port: 3306?
040223 19:18:22 Aborting
040223 19:18:23 mysqld: Shutdown Complete
What could make the server become inactive or hangup while
executing Client C API functions.
thank you
Expecting your valuable reply.
regards,
Arun.
--- Arunachalam <[EMAIL PROTECTED]> wrote: > Hi,
>
> I have written in intermediate, on the appropriate position in this
> discussion, please go thru in full.
>
> --- Michael Widenius <[EMAIL PROTECTED]> wrote: >
> > hi!
> >
> > >>>>> "A" == Arunachalam <[EMAIL PROTECTED]> writes:
>
> > A> As per my searching I have found the right C API in libmysql.lib from
> > A> MySQL 5.0.0, (i have doubt: Is any eariler version 4.0.xx provides this???)
> > A> C API routines are: mysql_prepare(), mysql_bind_param(), mysql_execute(),
> > A> mysql_stmt_affected_rows(), mysql_fetch(), mysql_stmt_close()...
> >
> > You should probablty use MySQL 4.1 instead of MySQL 5.0 for testing
> > this as we make more often releases for 4.1 than for 5.0 (until 4.1 is
> > production ready).
>
>
> I didn't find the API's what I have specified above in MySQL 4.1.1 in
> *libmysql.dll*, but those API's are provided by *mysqlclient.lib* in
> this version.
>
> I have created COBOL specific *libmysql.lib* from existing *libmysql.dll*
> becaz libmysql is Dynamic Access Library - right.
>
> (what I have did to convert libmysql.dll file into COBOL compiler
> specific *libmysql.lib* is by using an utility *pexports.exe*, i have
> convert given libmysql.dll into libmysql.def file then by using LIB.EXE
> of COBOL compiler convert libmysql.def into libmysql.lib file.)
>
>
>
> > A> I have installed MySQL 5.0.0-alpha for Windows and I have properly linked
> > A> thelibmysql.lib into my COBOL compiler... To verify the Parameter Passing
> > A> mechanism to the API routines i have taken the sample C code from MySQL
> > A> manual (URL: * http://www.mysql.com/doc/en/mysql_execute.html * )
> >
> > A> When I compiled this sample coding using VC++, it ask for *typelib.h* header
> > A> file, it is not given with insatllation pack, under the Mysql folder
> > A> (C:/MySQL/Include), I have searched on the net and include it accordingly.
> >
> > Thanks for notifying us about this. typelib.h should be included in
> > the MySQL folder and we will do that for next MySQL windows release.
> > (4.1.2)
> >
> > A> After that i have made changes in some variable names becaz of it follows
> > A> other header files variable name as such.
> >
> > What changes did you have to make ?
> > Including typelib.h should be enough.
>
> When I try to first compile this program in VC++ it notify the mismatch
> variable as
>
> MYSQL_BIND bind[3];
> which is already used by <winsock.h> header file, so I have change this variable
> into *Pbind* like this. (I have doubt: after your discussion i once again compiled
> it with previous name(i.e, bind) it never produce any error).
>
> The variable mysql used in other API's to be changed to *&mysql*, I have changed
> this after meeting the following errors;
>
> D:\vcprojects\mysql\src\source.c(41) : error C2115: 'function' : incompatible types
> D:\vcprojects\mysql\src\source.c(41) : warning C4024: 'mysql_query' : different
> types for formal
> and actual parameter 1
> D:\vcprojects\mysql\src\source.c(44) : error C2115: 'function' : incompatible types
> D:\vcprojects\mysql\src\source.c(44) : warning C4024: 'mysql_error' : different
> types for formal
> and actual parameter 1
> D:\vcprojects\mysql\src\source.c(48) : error C2115: 'function' : incompatible types
> D:\vcprojects\mysql\src\source.c(58) : warning C4024: 'mysql_prepare' : different
> types for
> formal
> and actual parameter 1
> D:\vcprojects\mysql\src\source.c(62) : error C2115: 'function' : incompatible types
>
> > I will ask our windows team to verify that the example works ok with
> > VC++
> >
> > A> Upon all the changes I can able to execute succcessfully the coding and it
> > A> does the function properly on the MySQL server database.
> >
> > A> The PROBLEM I met is, Once this sample code executed and inserted data to
> > A> the Database the server get's hanged - why???????????????
>
>
> After the discussion with you only i came to listen mysqld.trace, but it's content
> cann't be understand by me, herewith I have attached that file for your reference.
> anyhow i understand that there is some Memory alloca/dealloc problem hangs up my
> MySQL server.
>
>
> > This shouldn't happen.
> > Can you please describe exactly what you mean with a 'hang' ?
> >
> > - Does the connection in your test program stop respoding ?
> Yes, if I run the client C program again, the console ouput stay blank
> with out any message.
>
> > - Can you connect to mysqld with other clients ?
> No, WinMySQLAdmin tool won't allow me to right click on it
> mysql -u user -ppass also stay as such when i try it from console
>
> > - Does the MySQL server take all cpu
> No, I can work with other application with out any trouble.
>
> I hope I have given here enough information to identify my trouble, suggest me
> in detail ASAP please...
>
> Thanks a lot...
>
> Regards,
> Arun.
>
> ________________________________________________________________________
> Yahoo! India Insurance Special: Be informed on the best policies, services, tools
> and more.
> Go to: http://in.insurance.yahoo.com/licspecial/index.html
> > --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
________________________________________________________________________
Yahoo! India Insurance Special: Be informed on the best policies, services, tools and
more.
Go to: http://in.insurance.yahoo.com/licspecial/index.html
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]