Permalink
Commits on Aug 17, 2010
  1. Bump version to 0.0.7

    committed Aug 17, 2010
  2. make async querying work.

    From mysql 5.1 documentation:
    
    http://dev.mysql.com/doc/refman/5.1/en/threaded-clients.html
    
    * Two threads can't send a query to the MySQL server at the same time on the same connection. In particular, you have to ensure that between calls to mysql_query() and mysql_store_result() no other thread is using the same connection.
    * Many threads can access different result sets that are retrieved with mysql_store_result().
    
    * If you use mysql_use_result(), you must ensure that no other thread is using the same connection until the result set is closed. However, it really is best for threaded clients that share the same connection to use mysql_store_result()
    
    So, create a pthread mutex around  calls to mysql_real_query. Only support mysql_store_result for async mode.
    ssinghi committed with Aug 17, 2010
  3. make async querying work.

    From mysql 5.1 documentation:
    
    http://dev.mysql.com/doc/refman/5.1/en/threaded-clients.html
    
    * Two threads can't send a query to the MySQL server at the same time on the same connection. In particular, you have to ensure that between calls to mysql_query() and mysql_store_result() no other thread is using the same connection.
    * Many threads can access different result sets that are retrieved with mysql_store_result().
    
    * If you use mysql_use_result(), you must ensure that no other thread is using the same connection until the result set is closed. However, it really is best for threaded clients that share the same connection to use mysql_store_result()
    
    So, create a pthread mutex around  calls to mysql_real_query. Only support mysql_store_result for async mode.
    ssinghi committed with Aug 17, 2010
Commits on Aug 16, 2010
  1. Change connectError test code, because on my openSUSE error message is:

    Access denied for user ''@'localhost' to database 'mysql'
    committed Aug 16, 2010
Commits on Aug 15, 2010
  1. use threadsafe mysqlclient

    ssinghi committed with Aug 15, 2010
  2. add a failing async test

    ssinghi committed with Aug 15, 2010
Commits on Aug 14, 2010
  1. allow reconnecting after failed connect.

    If connecting fails, then set _conn = NULL so that other commands also fail with not connected error. Also, from mysql documentation: "If you call mysql_sqlstate()  after mysql_real_connect()  fails, mysql_sqlstate() might not return a useful value". We don't need to keep a connection object which has failed.
    ssinghi committed with Aug 14, 2010
  2. query function maps to API mysql_query, and realQuery to mysql_real_q…

    …uery.
    
    There seems to be no advantage of mysql_query over mysql_real_query, but the library should consistently map the MySQL C API
    ssinghi committed with Aug 14, 2010
Commits on Aug 13, 2010
  1. Rewrite tests for async queries

    committed Aug 13, 2010
  2. Tested with Node version v0.1.103

    committed Aug 13, 2010
Commits on Aug 12, 2010
  1. fix include mysql.h Path. fix segmentation faults. By default directl…

    …y return results.
    
    The mysql header files are usually present in include folder and prefixing mysql doesn't work.
    Date fields  can be null, and it was failing with 'Bus error', as null cannot be converted to String.
    with mysql_use_result a new query cannot be executed until all the results from the previous query has been extracted. so, mysql_store_result should be default.
    ssinghi committed Aug 12, 2010
Commits on Jul 20, 2010
Commits on Jul 18, 2010
Commits on Jul 14, 2010
  1. Add node-waf build to README

    committed Jul 14, 2010