Problem with libodbc++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • srinivembu
    New Member
    • Oct 2008
    • 7

    #1

    Problem with libodbc++

    Hi,

    I am statically linking libodbc++.a (and also unixODBC libodbc.a) to my multi-threaded CPP application to access MySQL database. The following versions are used :

    libodbc++ = v0.2.3
    unixODBC = v2.2.11
    MySQL connector = v3.51.21r807

    All these 3 packages are configured with '--enable-threads' option during ./configure.

    In my CPP application, when one thread queries bulk records (more than 1 million rows) from MySQL, the other threads does not get database connection and just hangs. The other threads get connection only after the first thread completes its query.

    FYI, MySQL connector is enabled with connection pooling,

    What I am doing wrong. Is there is any special attributes to be enabled to get this done. Any help to resolve this issue will be greatly appreciated.

    Regards,
    Srini.
  • RRick
    Recognized Expert Contributor
    • Feb 2007
    • 463

    #2
    There are a couple of possibilities here. MySql might be hanging or your process might be hanging.

    If this happens with very large queries, how are you storing the data? Is this causing your program to hang? Is your program starved of resources? What's your memory use?

    If you suspect MySql, then you need a simple program that shows the problem. Two programs that query lots of items might be good enough. A MySql forum might have info on this problem?

    Comment

    • srinivembu
      New Member
      • Oct 2008
      • 7

      #3
      I am sure that my process is not hanging, since if the thread1 is alone running, then there is no issues (no memory problems or resource issues) and I am getting the results set.

      Only if the thread2 (for a small simple query) connects at that time, thread2 hangs. Thread2 succeed after thread1 completes its query.

      Comment

      Working...