1. 01 Jun, 2006 1 commit
    • unknown's avatar
      bug #16017 (memory leaks in embedded server) · ab1636e1
      unknown authored
      There actually was 3 different problems -
      hash_user_connections wasn't cleaned
      one strdupped database name wasn't freed
      and stmt->mem_root wasn't cleaned as it was
      replased with mysql->field_alloc for result
      For the last one - i made the library using stmt's
      fields to store result if it's the case.
      
      
      include/mysql.h:
        statement pointer added to the advanced_command to be checked in
        embedded server
      include/sql_common.h:
        stmt added to the cli_advanced_command interface
      libmysql/libmysql.c:
        stmt pointer now sent to advanced_command
      libmysqld/embedded_priv.h:
        it's enough to send database name to check_embedded_connection
      libmysqld/lib_sql.cc:
        Now we store result directly in the MYSQL_STMT structure to
        avoid extra copying
      libmysqld/libmysqld.c:
        it's enough to only send database pointer to check_embedded_connection
      sql-common/client.c:
        stmt fake attribute added to cli_advanced_command
      sql/sql_parse.cc:
        hash_user_connections isn't used if no access checks compiled
      ab1636e1
  2. 21 Apr, 2006 1 commit
    • unknown's avatar
      Backport fix for mysql client not using SSl library directly · 11e98e1a
      unknown authored
       - Add function mysql_get_ssl_cipher
       - Use function mysql_get_ssl_cipher from mysql
      
      
      client/mysql.cc:
        Backport fix for mysql client not using SSl library directly
      include/mysql.h:
        Backport fix for mysql client not using SSl library directly
      libmysql/libmysql.def:
        Backport fix for mysql client not using SSl library directly
      libmysqld/libmysqld.def:
        Backport fix for mysql client not using SSl library directly
      sql-common/client.c:
        Backport fix for mysql client not using SSl library directly
      11e98e1a
  3. 18 Apr, 2006 1 commit
    • unknown's avatar
      Bug#17208 SSL: client does not verify server certificate · edfc0149
      unknown authored
       - Add new function 'ssl_verify_server_cert' which is used if we are 
         connecting to the server with SSL. It will compare the hostname in 
         the server's cert against the hostname that we used when connecting 
         to the server. Will reject the connection if hostname does not match.
       - Add new option "OPT_SSL_VERIFY_SERVER_CERT" to be passed to mysql_options
         which will turn on checking of servers cert.
       - Add new argument "ssl-verify-server-cert" to all mysql* clients which 
         will activate the above option.
       - Generate a new server cert with 1024 bits that has "localhost" as the server name.
      
      
      SSL/server-cert.pem:
        Generate a new server cert that has "localhost" as CN, so that we can test to verify the hostname we connected against with the hostname in the cert
      client/client_priv.h:
        Add OPT_SSL_VERIFY_CERT
      client/mysql.cc:
        Pass the variable "opt_ssl_verify_server_cert" to the mysql_options function. It's processed/included by include/sslo...
      edfc0149
  4. 27 Mar, 2006 1 commit
  5. 24 Feb, 2006 1 commit
    • unknown's avatar
      Fixes to embedded server to be able to run tests with it · 988f0be6
      unknown authored
      (Needed for "list of pushes" web page and autopush)
      
      
      include/mysql.h:
        Fix to embedded server to be able to run tests on it
      libmysql/libmysql.c:
        Fix to embedded server to be able to run tests on it
      libmysqld/emb_qcache.cc:
        Fix to embedded server to be able to run tests on it
      libmysqld/embedded_priv.h:
        Fix to embedded server to be able to run tests on it
      libmysqld/lib_sql.cc:
        Fix to embedded server to be able to run tests on it
      libmysqld/libmysqld.c:
        Fix to embedded server to be able to run tests on it
      mysql-test/mysql-test-run.sh:
        Fix to embedded server to be able to run tests on it
      mysql-test/r/binlog.result:
        Updated test for embedded server
      mysql-test/r/ctype_cp932.result:
        Updated test for embedded server
      mysql-test/r/innodb.result:
        Updated test for embedded server
      mysql-test/r/mysqltest.result:
        Updated test for embedded server
      mysql-test/r/query_cache.result:
        Updated test for embedded server
      mysql-test/r/query_cache_notembe...
      988f0be6
  6. 05 Dec, 2005 1 commit
  7. 19 Jul, 2005 1 commit
  8. 16 Jul, 2005 1 commit
    • unknown's avatar
      Restore previous used client charset in mysql_reconnect · e61a8c99
      unknown authored
      Moved mysql_set_character_set function to client.c
      Changed function prototype for mysql_set_character_set (as suggested
      by Konstantin)
      
      
      include/mysql.h:
        Changed function prototype
      libmysql/libmysql.c:
        moved mysql_set_character_set to client.c
      sql-common/client.c:
        moved mysql_set_character_set to client.c
      e61a8c99
  9. 12 Jul, 2005 2 commits
    • unknown's avatar
    • unknown's avatar
      New attempt after Bar's review · 76540337
      unknown authored
      Added api function mysql_get_character_set_info which provides
      information about the current client character set.
      
      
      include/mysql.h:
        Added api function mysql_get_character_set_info which provides
        information about the current client character set.
      libmysql/libmysql.c:
        Added api function mysql_get_character_set_info which provides
        information about the current client character set.
      libmysql/libmysql.def:
        Added api function mysql_get_character_set_info which provides
        information about the current client character set.
      tests/mysql_client_test.c:
        Added api function mysql_get_character_set_info which provides
        information about the current client character set.
      76540337
  10. 06 Jul, 2005 1 commit
    • unknown's avatar
      Make it possible to change reconnect setting with · 8540d2ea
      unknown authored
      mysql_options(..., MYSQL_OPT_RECONNECT, ...). (Bug #11787)
      
      
      client/mysqltest.c:
        Use mysql_options(..., MYSQL_OPT_RECONNECT, ...) to change reconnect
      include/mysql.h:
        Add MYSQL_OPT_RECONNECT option
      sql-common/client.c:
        Allow changing reconnect using MYSQL_OPT_RECONNECT.
      8540d2ea
  11. 01 Jun, 2005 1 commit
  12. 16 May, 2005 1 commit
    • unknown's avatar
      A fix and a test case for Bug#9643 " CURSOR_TYPE_SCROLLABLE dos not work" · 4a429272
      unknown authored
      - check on the client the unsupported feature and return 
      an error message if it's been requested.
      Additionally added API support for STMT_ATTR_PREFETCH_ROWS.
      Post-review fixes.
      
      
      include/errmsg.h:
        Add a new error code for "Not implemented" client-side error message.
      include/mysql.h:
        Add a statement attribute STMT_ATTR_PREFETCH_ROWS - unsigned long
        number of rows to fetch per one COM_FETCH command, used when there
        is a read-only cursor.
        Note, that we don't break compatibility by adding this new member
        because MYSQL_STMT is always allocated inside the client library by
        mysql_stmt_init.
      libmysql/errmsg.c:
        Text for the error message CR_NOT_IMPLEMENTED
      libmysql/libmysql.c:
        Implement support for STMT_ATTR_PREFETCH_ROWS
        Return an error message on attempt to set an attribute of a prepared
        statement which is not implemented yet. We probably should be doing
        it in the server: currently the server just ignores unknown at...
      4a429272
  13. 13 May, 2005 1 commit
  14. 13 Apr, 2005 1 commit
    • unknown's avatar
      BUG#9391 mysqlshow prints incorrect "rows" information · 1d9f3368
      unknown authored
       - Removed use of mysql->extra_info
       - Removed unused function send_records_num
      
      
      VC++Files/winmysqladmin/mysql.h:
        Comment extra_info as not used anymore
      client/mysqlshow.c:
        Remove use of extra info. Instead read number of records in table using SELECT COUNT(*)
      include/mysql.h:
        Comment extra_info as not used anymore
      libmysqld/lib_sql.cc:
        Removed unused function send_records_num
      sql-common/client.c:
        Remove use of extra_info since number of records is not sent in the protocol anymore
      sql/protocol.cc:
        Removed unused function send_records_num
      sql/protocol.h:
        Removed unused function send_records_num
      1d9f3368
  15. 23 Feb, 2005 1 commit
    • unknown's avatar
      WL #2094 Federated Storage Handler · 4cf65ff8
      unknown authored
      This is the first changeset of suggested changes recommended in Kostja's 
      review of my patch, 1.1846, which includes only functionality changes. 
      Style changes/Documentation patch to follow.
      
      
      include/mysql.h:
        removed declaration of cli_fetch_lengths per Kostja's suggestion
      libmysql/libmysql.c:
        moved mysql_fetch_lengths to client.c (for server to access) per Kostja's
        suggestion
      sql-common/client.c:
        added back 'static' to function definition, added mysql_fetch_lengths
      sql/ha_federated.cc:
        changed to use defines as opposed to hardcoded values
      sql/ha_federated.h:
        took out duplicate table_flag, fixed a resolve mistake
      4cf65ff8
  16. 19 Feb, 2005 1 commit
    • unknown's avatar
      WL# 2094, Federated Storage Handler. This patch fixes bug #8599, HPUX compile errors. · 69c74409
      unknown authored
      Testing on hp3750 shows these fixes fix the compile problems on HPUX, but I have 
      a problem where when I run the tests, the test shows that the tables default to MyISAM!
      
      
      include/mysql.h:
        HPUX's compiler does not like 'ulong' - the compile fails due to this.
      sql/ha_federated.h:
        Serg's recommendation to fix bug #8599 (which is a good fix since it's obviously 
        from when I added the method via cut and paste ;). Also caught some comment style issues.
      69c74409
  17. 06 Feb, 2005 1 commit
    • unknown's avatar
      WL# 2094 · cedd40cc
      unknown authored
      This patch contains all that my previous patch (1.1814) contained, with the addition of using cli_fetch_lengths for
      handling binary data (Bar noted this on the review of 1.1814, Guilhem suggested using cli_fetch_lenghts by 
      making available via removal of static in method definition and declaration in mysql.h, but
      Konstantin had some reservations, but he said to commit the patch using this anyway,
      and I suppose this can be discussed. I abandoned 1.1814 because Monty made a couple
      fixes to my code as well as formatting changes, and I thought it would just be easier
      to hand-edit my changes into a fresh clone and then make a patch. 
      
      The reason for using cli_fetch_lengths is so that I can correctly get the length of
      the field I am setting into the field. I was previously using 'strlen' but Bar pointed out this
      won't correctly get the length of binary data and is also less effecient. Upon testing,
      it was in fact verified that binary data in a blob table was being inserted correctly,
      but not being retrieved correctly, all due to not having the correct value for the
      field:
      
      (*field)->store(row[x], strlen(row[x]), &my_charset_bin);
      
      was changed to:
      
      (*field)->store(row[x], lengths[x], &my_charset_bin);
      
      lengths being a unsigned long pointer to the values of the field lengths from a 
      MYSQL_ROW.
      
      Since the server doesn't have the function "mysql_fetch_lengths" available, I tried 
      to use "result->lengths", but this isn't set, so I finally successfully used 
      cli_fetch_lenghts, which does give the correct lengths, and now the binary data gets
      retrieved correctly.
      
      I've also run the code through indent-ex and am using Brian's vimrc to ensure correct formatting!
      
      This code passes the entire test suite, without any errors or warning on both my 
      workstation and build.mysql.com
      
      
      include/mysql.h:
        added cli_fetch_lengths to mysql.h in order to use this function in the federated handler
      mysql-test/r/federated.result:
        - Moved countries to be created and inserted prior to federated test table
        - Added a test of inserting binary values into a blob table
      mysql-test/t/federated.test:
        - Moved order of countries table creation to prior to test table creation
        - Test insertion of binary values in a blob table
      sql-common/client.c:
        removed 'static' to allow cli_fetch_lengths to be used in the federated handler
      sql/ha_federated.cc:
        1. share->scheme that was created in parse_url was not being freed
        2. HASH federated_open_tables was being deleted, but not freed
        3. 'result' from mysql_store_result was not being free in several instances
        4. Fixed the problem where a table scan was being performed after
        index_read_idx, which didn't cause a problem because the result set from
        idx_read_idx was not being freed, but once the result set was properly freed,
        it broke update_row. Now, I'm using the bool 'scan' to determine if I need to
        perform a table scan, which it magically is false when the query is an update
        with an index.
        5. Changed all stings containing the query to perform in mysql_real_query
        calls from string.c_ptr_quick() to string.ptr() per Monty's suggestion
        (better performance)
        6. Fixed various cast/type/truth compile warnings.
        7. Removed 'load_conn_info' and just let 'parse_url' handle it.
        8. Added the use of cli_fetch_lengths, needed to fix binary values being retrieved 
        from the database in rnd_next/convert_row_to_internal_format
        9. Formatting changes by using indent-ex!
      sql/ha_federated.h:
        added scan flag, setting defaults for result and scan_flag
      cedd40cc
  18. 04 Feb, 2005 2 commits
    • unknown's avatar
      Backport of ChangeSet 1.1845 05/02/04 13:53:16 guilhem@mysql.com +1 -0 from 5.0. · 0c22eaa9
      unknown authored
      Proposal to fix this problem: when using libmysqlclient, you must call mysql_server_end() to nicely free memory at the end
      of your program; it however sounds weird to call a function named *SERVER_end* when you're the CLIENT (you're not ending the server, you're ending
      your ability to talk to servers). So here I add two defines which should be more generic names. Our manual
      mentions these functions only for libmysqld API so needs some fixing, and then we can close BUG#8099 and BUG#6149.
      
      
      include/mysql.h:
        Creating synonyms (defines): mysql_library_init for mysql_server_init, mysql_library_end for mysql_server_end;
        these new names are more generic, so suitable when using libmysqlclient as well as libmysqld.
      0c22eaa9
    • unknown's avatar
      Proposal to fix this problem: when using libmysqlclient, you must call... · e5e1758b
      unknown authored
      Proposal to fix this problem: when using libmysqlclient, you must call mysql_server_end() to nicely free memory at the end of your program; it however
      sounds weird to call a function named *SERVER_end* when you're the CLIENT (you're not ending the server, you're ending your ability to talk to servers).
      So here I add two defines which should be more generic names. This was longly discussed with Konstantin, Serg, Brian. The problem started from
      a post on valgrind-users list: http://sourceforge.net/mailarchive/forum.php?thread_id=5778035&forum_id=32038 ; our manual mentions these functions
      only for libmysqld API so needs some fixing, and then we can close BUG#8099 and BUG#6149.
      
      
      include/mysql.h:
        Creating synonyms (defines): mysql_library_init for mysql_server_init, mysql_library_end for mysql_server_end;
        these new names are more generic, so suitable when using libmysqlclient as well as libmysqld.c
      e5e1758b
  19. 17 Dec, 2004 1 commit
    • unknown's avatar
      Truncations patch: a post-review fix. · 1046278e
      unknown authored
      include/mysql.h:
        Adding an option for data truncations feature.
      libmysql/libmysql.c:
        No 'smart' behaviour now for data truncations: they are always
        reported, unless switched off with 
        mysql_options(mysql, MYSQL_REPORT_DATA_TRUNCATION, (my_bool*) &(option=1));
      sql-common/client.c:
        Add support for report-data-truncation variable in my.cnf
      tests/client_test.c:
        A test for MYSQL_REPORT_DATA_TRUNCATION option.
      1046278e
  20. 16 Dec, 2004 1 commit
    • unknown's avatar
      Data truncation reporting implementation (libmysql) + post review · d2d33183
      unknown authored
      fixes. Still to do: 
      -  deploy my_strtoll10 in limbysql.c
      - add mysql_options option to switch MYSQL_DATA_TRUNCATED on and off.
      
      
      include/my_time.h:
        More calls are shared between client and server (libmysql now performs
        more intelligent date->number and number->date conversions).
        TODO: rename those which are not starting with 'my_'
      include/mysql.h:
        MYSQL_BIND:
        - more elaborated comment
        - some of the ex-private members were given public names - 
          it's sometimes convenient to set bind->error to &bind->error_value.
          However Monty questions the idea, so it should be given
          more thought in future.
        - added new members to support data truncation.
        Added new return value of mysql_stmt_fetch, MYSQL_DATA_TRUNCATED.
      libmysql/libmysql.c:
        - added support for data truncation during fetch
        - implementation for is_binary_compatible: now conversion functions
          are used less frequently
        - we now use number_to_datetime and TIME_to_ulonglong for date->number and
          number->date conversions
      sql-common/my_time.c:
        - added implementation of date->number and number->date calls shared 
          between client and server (moved from time.cc).
      sql/field.cc:
        - implemented Field_time::store_time() to better support date->time
          conversions in prepared mode. After-review fixes.
      sql/field.h:
        - Field::store_time now returns int
      sql/mysql_priv.h:
        - removed date->number and number->date conversion functions headers
          (moved to my_time.h)
      sql/time.cc:
        - removed implementation of date->number and number->date conversion
          functions (moved to my_time.c)
      tests/client_test.c:
        - added a test case for data truncation; other test cases adjusted.
        - fixed my_process_stmt_result to set STMT_ATTR_UPDATE_MAX_LENGTH (tables
          are now printed out prettier).
      d2d33183
  21. 10 Nov, 2004 1 commit
  22. 08 Nov, 2004 1 commit
    • unknown's avatar
      mysql.h: · 689c8a9e
      unknown authored
        Adding a prototype for the new function.
      
      
      include/mysql.h:
        Adding a prototype for the new function.
      689c8a9e
  23. 01 Nov, 2004 1 commit
    • unknown's avatar
      Remove support for obsolete 4.1.1 prepared statements C API names: · c8ed8b05
      unknown authored
      having approval for it since 4.1.4, I also have some assurance that
      very few people actually used this: to enable these calls a user
      had to #define HAVE_DEPRECATED_411_API and recompile the client library.
      
      
      include/mysql.h:
        remove defines for obsolete 4.1 prepared statements C API names
      libmysql/libmysql.c:
        Remove #ifdefed implementation of obsolete mysql_prepare call.
      c8ed8b05
  24. 19 Oct, 2004 1 commit
    • unknown's avatar
      Review of all code pushed since last review · da02110d
      unknown authored
      Simple optimzations and cleanups
      Removed compiler warnings and fixed portability issues
      Added client functions 'mysql_embedded()' to allow client to check if we are using embedded server
      Fixes for purify
      
      
      client/mysqlimport.c:
        Remove not used variable
      client/mysqltest.c:
        Remove usage of MAXPATHLEN (all MySQL code uses FN_REFLEN)
        Simplified code
        Remove usage of sprintf("%llu") as this is not portable
      include/mysql.h:
        Added mysql_embedded() to be able to easily check if we are using the embedded server
      innobase/srv/srv0start.c:
        Don't use memcmp() when using purify (to avoid false warnings)
      libmysql/libmysql.c:
        Added mysql_embedded() to be able to easily check if we are using the embedded server
      libmysql/libmysql.def:
        Added mysql_embedded() to be able to easily check if we are using the embedded server
      myisam/myisam_ftdump.c:
        Remove compiler warning
      myisam/myisamchk.c:
        Remove compiler warning
      myisam/rt_test.c:
        #ifdef not used code
      mysys/hash.c...
      da02110d
  25. 25 Aug, 2004 1 commit
    • unknown's avatar
      mysql.h: · 54e7e92c
      unknown authored
        Fix a misleading plural that should be singular.
        Fix other typos while I'm at it.
      
      
      include/mysql.h:
        Fix a misleading plural that should be singular.
        Fix other typos while I'm at it.
      54e7e92c
  26. 19 Aug, 2004 1 commit
    • unknown's avatar
      Fixed symbol name problems that made build fail. · f58750ad
      unknown authored
      include/mysql.h:
        Fixed symbol name change.
      include/mysql_com.h:
        Reverted parts of previous changeset (name changes) to make it build.
      libmysql/libmysql.c:
        Fixed symbol name change.
      sql/sql_parse.cc:
        Fixed symbol name change.
      f58750ad
  27. 03 Aug, 2004 1 commit
    • unknown's avatar
      Port of cursors to be pushed into 5.0 tree: · e14f5a85
      unknown authored
      - client side part is simple and may be considered stable
      - server side part now just joggles with THD state to save execution
        state and has no additional locking wisdom.
        Lot's of it are to be rewritten.
      
      
      include/mysql.h:
        Cursor patch to push into the main tree, client library part (considered 
        stable):
        - new statement attribute STMT_ATTR_CURSOR_TYPE
        - MYSQL_STMT::flags to store statement cursor type
        - MYSQL_STMT::server_status to store server status (i. e. if the server
        was able to open a cursor for this query).
      include/mysql_com.h:
        Cursor patch to push into the main tree, client library part (considered 
        stable):
        - new COMmand, COM_FETCH, to fetch K rows from read-only cursor.
          By design should support scrollable cursors as well.
        - a few new server statuses:
          SERVER_STATUS_CURSOR_EXISTS is sent by server in reply to COM_EXECUTE,
          when cursor was successfully opened for this query
          SERVER_STATUS_LAST_ROW_SENT is sent along with the last row to prevent one
          more round trip just for finding out that all rows were fetched from 
          this cursor (this is server mem savier also).
        - and finally, all possible values of STMT_ATTR_CURSOR_TYPE, 
          while now we support only CURSORT_TYPE_NO_CURSOR and 
          CURSOR_TYPE_READ_ONLY
      libmysql/libmysql.c:
        Cursor patch to push into the main tree, client library part (considered 
        stable):
        - simple additions to mysql_stmt_fetch implementation to read data 
          from an opened cursor: we can read up to iteration count rows per
          one request; read rows are buffered in the same way as rows of
          mysql_stmt_store_result.
        - now send stmt->flags to server to let him now if we wish to have 
          a cursor for this statement.
        - support for setting/getting statement cursor type.
      libmysqld/examples/Makefile.am:
        Testing cursors was originally implemented in C++. Now when these tests
        go into client_test, it's time to convert it to C++ as well.
      libmysqld/lib_sql.cc:
        - cleanup: send_fields flags are now named.
      sql/ha_innodb.cc:
        - cleanup: send_fields flags are now named.
      sql/mysql_priv.h:
        - cursors support: declaration for server-side handler of COM_FETCH
      sql/protocol.cc:
        - cleanup: send_fields flags are now named.
        - we can't anymore assert that field_types[field_pos] is sensible:
          if we have COM_EXCUTE(stmt1), COM_EXECUTE(stmt2), COM_FETCH(stmt1)
          field_types[field_pos] will point to fields of stmt2.
      sql/protocol.h:
        - cleanup: send_fields flag_s_ are now named.
      sql/protocol_cursor.cc:
        - cleanup: send_fields flags are now named.
      sql/repl_failsafe.cc:
        - cleanup: send_fields flags are now named.
      sql/slave.cc:
        - cleanup: send_fields flags are now named.
      sql/sp.cc:
        - cleanup: send_fields flags are now named.
      sql/sp_head.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_acl.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_class.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_class.h:
        - cleanup: send_fields flags are now named.
      sql/sql_error.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_handler.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_help.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_parse.cc:
        Server side support for cursors:
        - handle COM_FETCH
        - enforce assumption that whenever we free thd->free_list, 
          we reset it to zero. This way it's much easier to handle free_list
          in prepared statements implementation.
      sql/sql_prepare.cc:
        Server side support for cursors:
        - implementation of mysql_stmt_fetch (fetch some rows from open cursor).
        - management of cursors memory is quite tricky now.
        - execute_stmt can't be reused anymore in mysql_stmt_execute and 
          mysql_sql_stmt_execute
      sql/sql_repl.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_select.cc:
        Server side support for cursors:
        - implementation of Cursor::open, Cursor::fetch (buggy when it comes to
          non-equi joins), cursor cleanups.
        - -4 -3 -0 constants indicating return value of sub_select and end_send are
          to be renamed to something more readable:
          it turned out to be not so simple, so it should come with the other patch.
      sql/sql_select.h:
        Server side support for cursors:
        - declaration of Cursor class.
        - JOIN::fetch_limit contains runtime value of rows fetched via cursor.
      sql/sql_show.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_table.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_union.cc:
        - if there was a cursor, don't cleanup unit: we'll need it to fetch
          the rest of the rows.
      tests/Makefile.am:
        Now client_test is in C++.
      tests/client_test.cc:
        A few elementary tests for cursors.
      BitKeeper/etc/ignore:
        Added libmysqld/examples/client_test.cc to the ignore list
      e14f5a85
  28. 22 Jul, 2004 1 commit
    • unknown's avatar
      Fixes for bugs in embedded library: · 31516496
      unknown authored
      #4700 (Unsigned value returned as signed)
          just no appropriate checking
      #4701 (Errors returned earlier than expected)
          all errors returned from send_command()
      #4702 (Result isn't freed properly if there's no retrieval)
          flush_use_result has only 'client' version and should
          be made 'virtual'
      
      
      include/mysql.h:
        flush_use_result 'virtual' method added to MYSQL (#4701)
      include/sql_common.h:
        no flush_use_result() now (#4702)
      libmysql/libmysql.c:
        call of the flush_use_result changed (#4702)
      libmysqld/lib_sql.cc:
        now errors returned from emb_advanced_command() or from emb_read_rows()
        depending on if number of returned fields is not 0 (#4701)
        emb_flush_use_result() implementation (#4702)
      sql-common/client.c:
        cli_flush_use_result() implementation (#4702)
      sql/sql_prepare.cc:
        unsigned flag now checked (#4700)
      31516496
  29. 25 Jun, 2004 2 commits
    • unknown's avatar
      After merge fixes · 7828d568
      unknown authored
      include/mysql.h:
        Cleanup
      sql-common/client.c:
        Allow client.c to compile after changes to mysql.h
      sql/opt_range.cc:
        Make bdb.test repeatable (and assume that table scans is a little bit slower)
      sql/sql_handler.cc:
        Fixed typo during merge
      sql/sql_insert.cc:
        Fixed indentation
      7828d568
    • unknown's avatar
      Type of MYSQL_BIND::buffer changed to void * · 8cb3826c
      unknown authored
      8cb3826c
  30. 24 Jun, 2004 1 commit
    • unknown's avatar
      Fix for Bug#4030 "Client side conversion string -> date type doesn't · 04f3836f
      unknown authored
      work (prepared statements)" and after-review fixes:
      - str_to_TIME renamed to str_to_datetime to pair with str_to_time
      - functions str_to_time and str_to_TIME moved to sql-common
      - send_data_str now supports MYSQL_TYPE_TIME, MYSQL_TIME_DATE,
        MYSQL_TIME_DATETIME types of user input buffers.
      - few more comments in the client library
      - a test case added.
      
      
      VC++Files/libmysql/libmysql.dsp:
        new file: my_time.c
      VC++Files/libmysqld/libmysqld.dsp:
        new file: my_time.c
      VC++Files/sql/mysqld.dsp:
        new file: my_time.c
      include/Makefile.am:
        - mysql_time.h added to the list of installed client library headers
      include/mysql.h:
        - declarations for MYSQL_TIME and enum_mysql_timestamp_type moved to 
        mysql_time.h, which is in shared use of client library and mysys.
      libmysql/Makefile.shared:
        - my_time.lo added to the list of libmysql objects
      libmysql/libmysql.c:
        Fix for bug#4030 "Client side conversion string -> date type doesn't work
         (prepa...
      04f3836f
  31. 23 Jun, 2004 1 commit
    • unknown's avatar
      lower_case_table_names=2 (Keep case for table names) was not honored · ebc73d1a
      unknown authored
      with ALTER TABLE and CREATE/DROP INDEX. (Bug #3109)
      Make net_buffer_length visible for mysql clients (Bug #4206)
      
      
      include/mysql.h:
        Make net_buffer_length visible for mysql clients
      libmysql/libmysql.c:
        Make net_buffer_length visible for mysql clients
      mysql-test/mysql-test-run.sh:
        Don't give warning for some common 'safe' warnings
      mysql-test/r/lowercase_table2.result:
        Test name conversion with ALTER TABLE / CREATE INDEX (Bug #3109)
      mysql-test/t/lowercase_table2.test:
        Test name conversion with ALTER TABLE / CREATE INDEX (Bug #3109)
      scripts/mysql_install_db.sh:
        Removed not used variable
      sql/sql_table.cc:
        lower_case_table_names=2 (Keep case for table names) was not honored
        with ALTER TABLE and CREATE/DROP INDEX. (Bug #3109)
      ebc73d1a
  32. 16 Jun, 2004 1 commit
    • unknown's avatar
      Comments and cleanups in client library. · 00584b35
      unknown authored
      include/mysql.h:
        mysql_bind_param -> mysql_stmt_bind_param
      libmysql/libmysql.c:
        - more comments
        - trailing spaces stripped
        - update_statement_metadata moved to appropriate section (from 'Statement
        close and error reporting' section)
        - store_param_type moved to store_ functions
      00584b35
  33. 15 Jun, 2004 1 commit
    • unknown's avatar
      API change: mysql_shutdown() now needs a 2nd parameter, the shutdown level. · 766eef4c
      unknown authored
      Server will however still accept shutdown without specified level; so that old
      mysqladmin can still shut server down.
      I would like your comments on the names of shutdown level which I chose. You
      are welcome to propose better names. Please however check WL#709 before.
      Reason for the names I propose is to be accurate, thus leaving possibility
      for other levels which we may imagine in the future; that's why I have rejected
      names like "fast", "smart", "graceful" so far. My position is that WAIT_ALL_BUFFERS
      or WAIT_CRITICAL_BUFFERS say what the shutdown does, whereas for "smart", "fast" you
      need to remember what it does.
      This should be pushed in 4.1.3 but only after your comments.
      
      
      client/mysqladmin.c:
        2nd parameter for mysql_shutdown()
      include/mysql.h:
        2nd paramater for mysql_shutdown()
      include/mysql_com.h:
        4 types of shutdown
      libmysql/libmysql.c:
        passing the requested shutdown level
      sql/sql_parse.cc:
        check for the shutdown level in dispatch_command(). Though its value is ignored for now.
      tools/mysqlmanager.c:
        2nd parameter to mysql_shutdown
      766eef4c
  34. 05 Jun, 2004 1 commit
    • unknown's avatar
      mysql_stmt_field_count() · 0839550f
      unknown authored
      include/mysql.h:
        mysql_stmt_field_count() declaration
      libmysql/libmysql.c:
        added mysql_stmt_field_count(): 
        we need this function to ease use of mysql_stmt_result_metadata:
        if mysql_stmt_field_count() != 0 mysql_stmt_result_metadata fails
        only if OOM.
      libmysql/libmysql.def:
        declaration for mysql_stmt_field_count()
      0839550f
  35. 04 Jun, 2004 1 commit
    • unknown's avatar
      HAVE_DEPRECATED_411_API macro removed. · c60ee5e6
      unknown authored
      include/mysql.h:
        Removed obsolete define.
      tests/client_test.c:
        Rewritten to use new API.
        Few cleanups.
        A lot of valgrind warnings/errors removed.
      c60ee5e6
  36. 31 May, 2004 1 commit
    • unknown's avatar
      mysql_get_parameter interface fixed · 790686ed
      unknown authored
      include/mysql.h:
        (void) added to the empty parameter's list
      libmysql/libmysql.c:
        (void) added to the empty parameter's list
      790686ed
  37. 26 May, 2004 1 commit
    • unknown's avatar
      Fix to make Windows compilation smoother · 8fd378d6
      unknown authored
      VC++Files/innobase/innobase.dsp:
        non-existent file removed
      client/mysql.cc:
        local opt_max_allowed_packet and opt_net_buffer_length introduced
      client/mysqldump.c:
        local opt_max_allowed_packet and opt_net_buffer_length introduced
      include/mysql.h:
        mysql_get_parameters() interface added
        #define max_allowed_packet added
      include/mysql_com.h:
        these should not be exported
      libmysql/libmysql.c:
        mysql_get_parameters implementations
      libmysql/libmysql.def:
        interface changed
      libmysql_r/Makefile.am:
        MYSQL_CLIENT define added
      libmysqld/lib_sql.cc:
        line moved to be above the '#include "mysql.cc"'
      libmysqld/libmysqld.c:
        mysql_get_parameters implementation (embedded)
      libmysqld/libmysqld.def:
        interface changed
      sql/log_event.cc:
        should be like that in this case
      tools/mysqlmanager.c:
        compiler warns on this line
      8fd378d6