[Mono-list] Pooling=false in connectionString cause Unhandled Exception: System.EntryPointNotFoundException: CreateSemaphore

enzo enzo.arlati at libero.it
Sun Aug 26 15:52:53 EDT 2007

Using a simpe program ( the code is reported at the botom ) which simply 
connect to a mysql database a perform a simple select works well if the 
option Pooling in the connectionString is false
If i set it to true ( as string connectionString = 
ID=test;Password=test;Pooling=true"; ) I got an unhandled exception like 

$ mono test1-mysql.exe

Unhandled Exception: System.EntryPointNotFoundException: CreateSemaphore
  at (wrapper managed-to-native) 
  at MySql.Data.Common.Semaphore..ctor (Int32 initialCount, Int32 
maximumCount) [0x00000]
  at (wrapper remoting-invoke-with-check) 
MySql.Data.Common.Semaphore:.ctor (int,int)
  at MySql.Data.MySqlClient.MySqlPool..ctor 
(MySql.Data.MySqlClient.MySqlConnectionString settings) [0x00000]
  at MySql.Data.MySqlClient.MySqlPoolManager.GetPool 
(MySql.Data.MySqlClient.MySqlConnectionString settings) [0x00000]
  at MySql.Data.MySqlClient.MySqlConnection.Open () [0x00000]

I using mono 1.2.3 on fedora 7 using mysql 5.0.37 and the program was 
build using this command:

$ mcs test1-mysql.cs  -r:System.Data.dll  

Why this problem with pooling enabled ?

Regards, Enzo

=== sample source code test1-mysql.cs ===

 using System;
 using System.Data;
 using MySql.Data.MySqlClient;
public class Test
    public static void Main(string[] args)

       string connectionString = "Server=localhost;Database=test;" +
                                 "User ID=test;Password=test;" +

       IDbConnection dbcon;
       dbcon = new MySqlConnection(connectionString);
       IDbCommand dbcmd = dbcon.CreateCommand();

       string sql = "select \"aa\" firstname, \"bbb\" name ";
       dbcmd.CommandText = sql;
       IDataReader reader = dbcmd.ExecuteReader();
            string firstname = (string) reader["firstname"];
            string name = (string) reader["name"];
            Console.WriteLine("firstname: " +  firstname + " name: " + 
       // clean up
       reader = null;
       dbcmd = null;
       dbcon = null;


REPLY TO: perl -e 'print qq^VVCWCQJUVD00YQVWKVBPG^^qq^3898m08970Yp584299l93^ '
  VOIP SKYPE:earlati - VOIP SIP: sip:earlati at ekiga.net
  AIM:earlati - ICQ:321489699 - MSN:enzo.arlati at libero.it
  http: http://earlati.freehostia.com
trusted computing,  who is it ? -->  http://www.p2pforum.it/counter/click.php?id=21 

More information about the Mono-list mailing list