• unknown's avatar
    Fixed bug #2248 "mysql_fetch without prior mysql_execute hangs" · 94f215cb
    unknown authored
    Done clean-up in prep stmt API functions:
    1) Removed some checks that were performed only in debug version
    were making debug version more tolerable to user errors than 
    production (and thus caused problems for example masking some
    bugs). 
    2) Also removed some other checks to make prep stmt API 
    consistent with the rest of C API (this also in line with 
    general politics - make checks in only those places where 
    errors are very common and hard to spot).
    
    
    include/mysql.h:
      Removed CHECK_EXTRA_ARGUMENTS define since it is no longer used 
      anywhere.
    libmysql/libmysql.c:
      Added check that will cause mysql_fetch() to bark then it is 
      used without calling mysql_execute() before.
      Removed checks that were performed only in debug version and
      caused problems since they were making debug version more 
      tolerable to user errors than production. Also removed some
      other checks to make prep stmt API consistent in this regard 
      with the rest of C API (this also in line with general politics -
      make checks in only those places where errors are very common 
      and hard to spot).
    tests/client_test.c:
      Updated tests to reflect removal of some checks in prep stmt API.
      Removed lines that caused bug #2473 to pop up, should be added 
      as separate test with the fix for this bug.
      Added test for bug#2248 "mysql_fetch without prior mysql_execute 
      hangs"
    94f215cb
libmysql.c 84.3 KB