[Mono-list] MySQL Data Provider for MySQL (Mono 0.17)

Daniel Morgan danmorg@sc.rr.com
Sat, 4 Jan 2003 15:11:48 -0500


I just read the 4.0 docs of MySQL.

Apparently, mysql_connect is deprecated.  mysql_real_connect should be used
instead.

http://www.mysql.com/documentation/mysql/bychapter/manual_Installing.html#Up
grading-from-3.23

http://www.mysql.com/documentation/mysql/bychapter/manual_Clients.html#mysql
_real_connect

So, the MySQL provider in Mono will have to be modified to use
mysql_real_connect somehow.

I wonder how the MySQL provider could handle two different versions of a
client library.
I also wonder how in C# how the runtime could gracefully handle when a
native function is not found in a library.  Currently, the provider calls
mysql_thread_end() when Closing a connection, but if the client library
doesn't have mysql_thread_end, mono crashes.

Any ideas?

-----Original Message-----
From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com]On
Behalf Of Rolf Tollerud
Sent: Saturday, January 04, 2003 12:41 PM
To: danmorg@sc.rr.com; mono-list@ximian.com
Subject: SV: [Mono-list] MySQL Data Provider for MySQL (Mono 0.17)


Thanks Morgan that could very well be the problem because I am using
MySQL4.07!

-----Ursprungligt meddelande-----
Från: Daniel Morgan [mailto:danmorg@sc.rr.com]
Skickat: den 4 januari 2003 10:28
Till: Steven Balthazor; 'Rolf Tollerud'; mono-list@ximian.com
Ämne: RE: [Mono-list] MySQL Data Provider for MySQL (Mono 0.17)


Hmmm...   I'm not sure.

What version of the MySQL client library are you using?  Where did you
get it?

The MySQL provider in mono was built for the Production version of MySQL
3.23.xx.

I wonder if there is a tracing or debugging mechanism in mono we could
use to see what it is doing.

-----Original Message-----
From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com]On
Behalf Of Steven Balthazor
Sent: Friday, January 03, 2003 3:36 PM
To: 'Rolf Tollerud'; mono-list@ximian.com
Subject: RE: [Mono-list] MySQL Data Provider for MySQL (Mono 0.17)


I had a similar problem (if I remember correctly).  To get it to compile
correctly on Linux I had to add a link from /usr/lib/libmysqlclient.so
to /usr/lib/libmySQL.so e.g.: ln -s libmysqlclient.so libmySQL.so

Cheers,
Steven Balthazor

-----Original Message-----
From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com] On
Behalf Of Rolf Tollerud
Sent: Friday, January 03, 2003 1:02 PM
To: mono-list@ximian.com
Subject: [Mono-list] MySQL Data Provider for MySQL (Mono 0.17)


When I try to run MySqlTest (which compiles just fine) on windows XP I
get following error messages:

(mono MySqlTest.exe)

** (MySqlTest.exe:3924): WARNING **: Failed to load function
mysql_connect from libmySQL

** (MySqlTest.exe:3924): WARNING **: Failed to load function
mysql_connect from libmySQL

Unhandled Exception: System.NullReferenceException: Object reference not
set to an instance of an object in <0x00025> 06
Mono.Data.MySql.MySql:Connect
(intptr,string,string,string,string,uint,string,uint)
in <0x003e6> 00 Mono.Data.MySql.MySqlConnection:Open ()
in <0x00057> 00 Test.Mono.Data.MySql.MySqlTest:Main (string[])

Why will it not load mysql_connect? Apparently its loads all the other
functions from libmySQL.dll..




_______________________________________________
Mono-list maillist  -  Mono-list@ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list




_______________________________________________
Mono-list maillist  -  Mono-list@ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list