An error occurred fetching the project authors.
  1. 24 Aug, 2004 1 commit
  2. 20 Aug, 2004 1 commit
    • unknown's avatar
      Fix for bug#4912 "mysqld crashs in case a statement is executed · 095b686c
      unknown authored
       a second time". The bug was caused by incompatibility of
      negations elimination algorithm and PS: during first statement 
      execute a subtree with negation was replaced with equivalent 
      subtree without NOTs.
      The problem was that although this transformation was permanent, 
      items of the new subtree were created in execute-local memory.
      The patch adds means to check if it is the first execute of a
      prepared statement, and if this is the case, to allocate items
      in memory of the prepared statement.
      The implementation:
      - backports Item_arena from 5.0
      - adds Item_arena::is_stmt_prepare(), 
        Item_arena::is_first_stmt_execute().
      - deletes THD::allocate_temporary_pool_for_ps_preparing(),
        THD::free_temporary_pool_for_ps_preparing(); they
        were redundant.
      and adds a few invariants:
      - thd->free_list never contains junk (= freed items)
      - thd->current_arena is never null. If there is no
        prepared statement, it points at the thd. 
      The rest of the patch contains mainly mechanical changes and
      cleanups.
      
      
      mysql-test/r/ps.result:
        Test results updated (test case for Bug#4912)
      mysql-test/t/ps.test:
        A test case for Bug#4912 "mysqld crashs in case a statement is 
        executed a second time"
      sql/item_cmpfunc.cc:
        current_statement -> current_arena
      sql/item_subselect.cc:
        Statement -> Item_arena, current_statement -> current_arena
      sql/item_subselect.h:
        Item_subselect does not need to save thd->current_statement.
      sql/item_sum.cc:
        Statement -> Item_arena
      sql/item_sum.h:
        Statement -> Item_arena
      sql/mysql_priv.h:
        Statement -> Item_arena
      sql/sql_base.cc:
        current_statement -> current_arena
      sql/sql_class.cc:
        - Item_arena
        - convenient set_n_backup_statement, restore_backup_statement
        (nice idea, Sanja)
      sql/sql_class.h:
        - Item_arena: backport from 5.0
        - allocate_temporary_pool_for_ps_preparing,
          free_temporary_pool_for_ps_preparing removed.
      sql/sql_derived.cc:
        current_statement -> current_arena
      sql/sql_lex.cc:
        current_statement -> current_arena
      sql/sql_parse.cc:
        Deploy invariant that thd->free_list never contains junk items
        (backport from 5.0).
      sql/sql_prepare.cc:
        - backporting Item_arena
        - no need to allocate_temporary_pool_for_ps_preparing().
      sql/sql_select.cc:
        Fix for bug#4912 "mysqld crashs in case a statement is 
        executed a second time": if this is the first execute of
        a prepared statement, negation elimination is
        done in memory of the prepared statement.
      sql/sql_union.cc:
        Backporting Item_arena from 5.0.
      095b686c
  3. 19 Aug, 2004 2 commits
  4. 10 Aug, 2004 1 commit
    • unknown's avatar
      Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server". · 68d7b266
      unknown authored
      Instead of trying to open time zone tables during calculation of CONVERT_TZ() function
      or setting of @@time_zone variable we should open and lock them with the rest of 
      statement's table (so we should add them to global table list) and after that use such 
      pre-opened tables for loading info about time zones.
      
      
      mysql-test/r/timezone2.result:
        Added test for bug #4508
      mysql-test/t/timezone2.test:
        Added test for bug #4508
      scripts/mysql_create_system_tables.sh:
        Added one more test time zone to time zone tables which is needed for test for bug #4508.
      sql/item_create.cc:
        CONVERT_TZ() now is treated as special function.
      sql/item_create.h:
        CONVERT_TZ() now is treated as special function.
      sql/item_timefunc.cc:
        Item_func_convert_tz now uses list of pre-opened time zone tables instead of trying to
        open them ad-hoc. Also it avoid calling of current_thd.
      sql/item_timefunc.h:
        Added comment describing special nature of CONVERT_TZ() function.
        Optimization: Added own fix_fields() method and tz_tables member for caching pointer
        to list of open time zone tables to Item_func_convert_tz class.
      sql/lex.h:
        CONVERT_TZ() now is treated as special function.
      sql/mysql_priv.h:
        Removed function which is no longer used.
      sql/set_var.cc:
        Now my_tz_find() accepts list of pre-opened time zone tables as last argument 
        and no longer needs pointer to current THD.
      sql/set_var.h:
        Exported sys_time_zone, which is now used in sql_yacc.yy for quick finding out if we are
        setting @@time_zone variable.
      sql/sql_base.cc:
        Moved propagation of pointers to open tables from global list to local select lists to
        open_and_lock_tables(), also added implicit usage of time zone tables as condition for
        such propagation.
      sql/sql_lex.cc:
        Added fake_time_zone_tables_list which is used to indicate that time zone tables are
        implicitly used in statement.
        st_select_lex_unit::create_total_list(): if time zone tables are implicitly used in
        statement add them to global tables list.
      sql/sql_lex.h:
        Added LEX::time_zone_tables_used member which is used to indicate that time zone tables 
        are implicitly used in this statement (by pointing to fake_time_zone_table_list) and 
        for holding pointer to those tables after they've been opened.
      sql/sql_parse.cc:
        We should also create global table list if statement uses time zone tables implicitly.
        Added initialization of LEX::time_zone_tables_used to mysql_query_init().
      sql/sql_prepare.cc:
        We should also create global table list if statement uses time zone tables implicitly.
      sql/sql_select.cc:
        Removed functions which are no longer used.
      sql/sql_yacc.yy:
        CONVERT_TZ() and @@time_zone variable are handled in special way since they implicitly 
        use time zone tables.
      sql/tztime.cc:
        Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server".
        If statement uses CONVERT_TZ() function or @@time_zone variable is set then it implicitly
        uses time zone tables. We need to open and lock such tables with all other tables of 
        such statement.
        
        All code responsible for opening table was removed from tz_load_from_db() and function was 
        renamed to tz_load_from_open_tables() (which uses list of pre-opened tables).
        We also have new functions for construction and initialization of table list of time
        zone tables.
        my_tz_find() now always require list of pre-opened time zone tables and no longer needs
        current THD. So we have to pre-open them in my_tz_init().
        Also now we try to open time zone tables only if they were found during startup.
      sql/tztime.h:
        New function for construction of table list of time zone tables my_tz_get_table_list().
        Now my_tz_find() requires list of pre-pened time zone tables instead of current thread.
      68d7b266
  5. 23 Jul, 2004 1 commit
  6. 22 Jul, 2004 1 commit
    • unknown's avatar
      Fixes for bugs in embedded library: · 2cd7e4cd
      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)
      2cd7e4cd
  7. 21 Jul, 2004 1 commit
  8. 04 Jul, 2004 1 commit
    • unknown's avatar
      aggregate functions check during substitution made only for single row subselects (BUG#4400) · cc74326b
      unknown authored
      restoring current senect pointer before PS rexecution (backport from 5.0)
      removed spaces at  lines ends
      
      
      mysql-test/r/subselect.result:
        Aggregate function comparation with ALL/ANY/SOME subselect test
      mysql-test/t/subselect.test:
        Aggregate function comparation with ALL/ANY/SOME subselect test
      sql/item_subselect.cc:
        removed spaces at  lines ends
        aggregate functions check during substitution made only for single row subselects
      sql/item_subselect.h:
        removed spaces at  lines ends
      sql/sql_prepare.cc:
        restoring current senect pointer before PS rexecution (backport from 5.0)
      cc74326b
  9. 25 Jun, 2004 1 commit
    • unknown's avatar
      fixed EXPLAIN behaviour with prepared statements (BUG#4271) · e80cfbc0
      unknown authored
      mysql-test/r/ps.result:
        test of prepared EXPLAIN
      mysql-test/t/ps.test:
        fix layout and table removing of previous tests
        test of prepared EXPLAIN
      sql/sql_prepare.cc:
        explain pave to be prepared, too
        cleanup options after explain execution
      sql/sql_select.cc:
        removed unneed assignment
      e80cfbc0
  10. 24 Jun, 2004 1 commit
    • unknown's avatar
      Fix for Bug#4030 "Client side conversion string -> date type doesn't · 9dde4188
      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
         (prepared statements)" and cleanup.
        - added case labels for TIME/DATE/DATETIME types to send_data_str
        - comments for read_binary_{date,time,datetime}, fetch_result_*, fetch_results.
      libmysqld/Makefile.am:
        - my_time.c added
      sql-common/Makefile.am:
        - my_time.c added to the list of files included into source distribution.
      sql/Makefile.am:
        my_time.c added to the list of mysqld sources.
      sql/field.cc:
        - TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to 
          MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
      sql/item.cc:
        - TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to 
          MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
      sql/item_timefunc.cc:
        - TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to 
          MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
      sql/mysql_priv.h:
        - added typedefs for TIME and timestamp_type
        - removed declarations for str_to_time and str_to_TIME (now this functions
          reside in mysys)
      sql/mysqld.cc:
        - log_10_int moved to mysys (it's used by str_to_TIME and str_to_time)
        - enum values TIMESTAMP_{TIME,DATE,DATETIME} were renamed to
          MYSQL_TIMESTAMP_{TIME,DATE,DATETIME}
      sql/set_var.cc:
        - TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to 
          MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
      sql/set_var.h:
        - fixed timestamp_type usage to be compatible with typedef.
      sql/sql_prepare.cc:
        - TIMESTAMP_{TIME,DATE,DATETIME} were renamed to
          MYSQL_TIMESTAMP_{TIME,DATE,DATETIME}
        - embedded library implementation of set_param_{time,date,datetime} is
        much simplier now, as MYSQL_TIME is the same as TIME.
      sql/sql_yacc.yy:
        - s/\<TIMESTAMP_/MYSQL_TIMESTAMP/gc
      sql/structs.h:
        - declarations for TIME and timestamp_type replaced with typedefs
        - str_to_datetime arguments moved to mysys headers
      sql/time.cc:
        - str_to_time and str_to_TIME moved to mysys
        - TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to 
          MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...} as these names are now
          exported to client.
        - str_to_TIME renamed to str_to_datetime to pair with str_to_time
        - str_to_TIME_with_warn renamed accordingly
      sql/tztime.cc:
        - TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to 
          MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
      tests/client_test.c:
        - a test case for Bug#4030 "Client side conversion string -> date type 
        doesn't work (prepared statements)"
      9dde4188
  11. 23 Jun, 2004 1 commit
  12. 21 Jun, 2004 1 commit
    • unknown's avatar
      Unused variables removed (many files). · de628592
      unknown authored
      sql/item_func.cc:
        Unused variable 'thd' removed.
      sql/item_subselect.cc:
        Unused variable 'type' removed.
      sql/slave.cc:
        Unused variable 'return_val' removed.
      sql/sql_derived.cc:
        Unused variable 'is_subsel' removed.
      sql/sql_parse.cc:
        Unused variables 'pstr' and 'create_info' removed.
      sql/sql_prepare.cc:
        Unused variable 'res' removed.
      sql/time.cc:
        Unused variable 'str_begin' removed.
      de628592
  13. 13 Jun, 2004 1 commit
    • unknown's avatar
      fixed field resolving mode fo INSERT/REPLACE and CRETE with SELECT (BUG#4090) · 6f364111
      unknown authored
      mysql-test/r/subselect.result:
        outer fields resolving in INSERT/REPLACE and CRETE with SELECT
      mysql-test/t/subselect.test:
        outer fields resolving in INSERT/REPLACE and CRETE with SELECT
      sql/sql_parse.cc:
        fixed field resolving mode fo INSERT/REPLACE and CRETE with SELECT
      sql/sql_prepare.cc:
        fixed field resolving mode fo INSERT/REPLACE and CRETE with SELECT
      6f364111
  14. 08 Jun, 2004 1 commit
    • unknown's avatar
      Proposed fix for Bug#4026 "Microseconds part of TIME/DATETIME types · 27eda712
      unknown authored
      is broken (prepared statements)": fixed date handling in many places 
      of prepared statements code.
      
      
      libmysql/libmysql.c:
        Fix for Bug#4026:
        - now buffer_length is defined for any buffer type. Network buffer 
          preallocation cleaned up.
        - added constants for maximum buffer sizes necessary for MYSQL_TYPE_DATE,
          MYSQL_TYPE_TIME, MYSQL_TYPE_DATETIME types.
        - TIME/DATETIME packing/unpacking functions fixed 
        - now result set metadata is always updated from fields sent to COM_EXECUTE.
          This is necessary to make 'SELECT ?' queries work without conversions.
      sql/item.cc:
        - added implementatoin of Item_param::get_date
      sql/item.h:
        - added enum_field_types Item_param::param_type. First step for proper
          handling of placeholders.
        - added get_date() implementation to prevent date -> string -> date 
          conversions when MYSQL_TYPE_DATE/DATETIME parameter is used in temporal 
          context.
      sql/protocol.cc:
        Fix for Bug#4026:
        - PACKET_BUFFET_EXTRA_ALLOC -> PACKET_BUFFER_EXTRA_ALLOC.
          The define itself was moved to .cc as it's used only in protocol.cc
        - fixed Protocol_prep::store_time() call.
      sql/protocol.h:
        - PACKET_BUFFER_EXTRA_ALLOC moved to protocol.cc
      sql/sql_prepare.cc:
        Fix for Bug#4026:
        - MYSQL_TYPE_TIME/DATETIME handling fixed.
        - added initialization for Item_param::param_type in 
          setup_one_conversion_function
      tests/client_test.c:
        Test case for Bug#4026
      27eda712
  15. 07 Jun, 2004 2 commits
    • unknown's avatar
      c4d76f75
    • unknown's avatar
      Post review fixes for "SQL Syntax for Prepared Statements". · 1d4ee7f8
      unknown authored
      mysql-test/r/ps.result:
        Better error message
      mysys/my_error.c:
        Comments added
      sql/item.cc:
        Moved a chunk of code from sql_prepare.cc to Item_param::set_from_user_var
      sql/item.h:
        Moved a chunk of code from sql_prepare.cc to Item_param::set_from_user_var
      sql/item_func.cc:
        Code cleanup
      sql/mysql_priv.h:
        Code cleanup
      sql/sql_class.cc:
        Code cleanup
      sql/sql_parse.cc:
        use user_var_entry::val_str in PREPARE stmt FROM @var.
      sql/sql_prepare.cc:
        Post-review fixes and code cleanup.
      sql/sql_yacc.yy:
        Coding style fixes
      1d4ee7f8
  16. 05 Jun, 2004 1 commit
    • unknown's avatar
      More comments in prepared statements code. · 780fdb02
      unknown authored
      libmysql/libmysql.c:
        Extended comments for mysql_stmt_init, mysql_stmt_prepare, 
        mysql_stmt_result_metadata.
        Few bits of code moved around and cleaned up.
      sql/sql_prepare.cc:
        Commented case with ulonglong length in get_param_length
      780fdb02
  17. 01 Jun, 2004 1 commit
  18. 25 May, 2004 1 commit
  19. 24 May, 2004 2 commits
    • unknown's avatar
      Support for character set conversion in binary protocol: another go · 093d6292
      unknown authored
      after Monty's review.
      - Item_param was rewritten.
      - it turns out that we can't convert string data to character set of
        connection on the fly, because they first should be written to the binary
        log.
        To support efficient conversion we need to rewrite prepared statements
        binlogging code first.
      
      
      include/my_global.h:
        Macro swap(a, b, c) was renamed to resolve name conflict with
        String::swap() method.
      include/my_sys.h:
        Added declaration of escape_string_for_mysql()
      include/mysql_com.h:
        Removed and moved back: a macro which is visible to libmysql user but
        has sence only in prepared statement protocol implementation.
      isam/_search.c:
        swap -> swap_variables
      isam/test2.c:
        swap -> swap_variables
      libmysql/libmysql.c:
        - sub_escape_string moved to mysys/charset.c to be visible in sql/
        - few cleanups
      myisam/mi_test2.c:
        swap -> swap_variables
      mysys/charset.c:
        sub_escape_string was moved from libmysql.c to be able to use it in sql/
        code.
      mysys/my_chsize.c:
        rename: swap -> swap_variables
      mysys/my_compress.c:
        swap -> swap_variables
      mysys/my_handler.c:
        swap -> swap_variables
      sql/field.cc:
        Field::store_time refactored to use TIME_to_string function from time.cc
      sql/item.cc:
        New implementation of Item_param class:
        added support for character sets conversion.
      sql/item.h:
        Item_param:
        - 'state' member introduced instead of many boolean variables.
        - put ltime, int_value and real_value into union to save space.
        - remove unimplemented members
        - set_value renamed to set_str
      sql/item_timefunc.cc:
        Refactored to use functions from time.cc
      sql/lock.cc:
        rename: swap -> swap_variables
      sql/mysql_priv.h:
        - added declarations for TIME_to_ulonglong_*, TIME_to_string functions
        - const specifiers for make_date, make_time, make_datetime arguments
      sql/opt_range.cc:
        rename: swap -> swap_variables
      sql/protocol.cc:
        - added character set conversion support to binary protocol.
        - Protocol::convert changed to point at shared buffer in THD.
          This lets us use one convert buffer for binary and simple protocol.
          The same buffer is used for client->server conversions in prepared
          statements code.
        - string conversion code refactored to Protocol::store_string_aux function.
        - few more comments
      sql/protocol.h:
        - Protocol::convert now points at THD::convert_buffer: we want to share one
          buffer between all protocol implementations.
      sql/sql_class.cc:
        - implementation of THD::convert_string using THD::convert_buffer
          (conversion of strings allocated in the system heap).
      sql/sql_class.h:
        - THD::convert_buffer is shared between THD and network Protocols and
          used for character set conversion of strings.
        - new function to convert String object from one charset to another using
          THD::convert_buffer
      sql/sql_insert.cc:
        A little fix in a comment.
      sql/sql_parse.cc:
        Shrink convert buffer in the end of each statement.
      sql/sql_prepare.cc:
          Many changes:
        - static specifier for set_param_* family of functions.
        - FIELD_TYPE -> MYSQL_TYPE
        - added set_param_binary as handler for BLOB types.
        - added character set support
        - added support for param typecode in mysql_stmt_get_longdata
          (mysql_stmt_send_long_data handler)
        - changes in Item_param deployed
        - few cleanups
      sql/sql_select.cc:
        rename: swap -> swap_variables
      sql/sql_string.cc:
        - String::append rewritten to support character set conversion for
        single-byte encodings.
        - added String::swap method to efficiently exchange two string objects.
      sql/sql_string.h:
        Declraration for String::swap().
      sql/time.cc:
        - function TIME_to_string to convert TIME to String in default MySQL format
        - family of functions TIME_to_ulonglong_*
      tests/client_test.c:
        Test for support for character set conversions in prepared statements
        (binary and text data).
      093d6292
    • unknown's avatar
      Added support for PREPARE stmt1 FROM @var, · c0729cbb
      unknown authored
      Fixed the problem of previous patch with replication,
      More post-review fixes
      
      
      sql/sql_parse.cc:
        Added support for PREPARE stmt1 FROM @var
      sql/sql_prepare.cc:
        Added support for PREPARE stmt1 FROM @var, 
        Fixed the problem of previous patch with replication
        Post-review fixes.
      c0729cbb
  20. 21 May, 2004 1 commit
    • unknown's avatar
      WL#1622 "SQL Syntax for Prepared Statements": Post-review fixes (1 of 2) · e7710af7
      unknown authored
      mysql-test/r/ps.result:
        Added tests for PREPARE stmt1 FROM @var syntax
      mysql-test/t/ps.test:
        Added tests for PREPARE stmt1 FROM @var syntax
      mysys/my_error.c:
        Added support for "%.*s" format
      sql/item.cc:
        Removed one redundant Item_param::set_value function
      sql/item.h:
        Removed one redundant Item_param::set_value function
      sql/mysqld.cc:
        Reformmated the code
      sql/share/czech/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/dutch/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/english/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/estonian/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/french/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/german/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/greek/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/hungarian/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/italian/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/japanese/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/korean/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/norwegian-ny/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/norwegian/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/polish/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/portuguese/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/romanian/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/russian/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/slovak/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/spanish/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/swedish/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/share/ukrainian/errmsg.txt:
        Changed ER_UNKNOWN_STMT_HANDLER format string
      sql/sql_class.h:
        SQL Prepared statements now can't be used by binary protocol commands
      sql/sql_lex.h:
        Added support for PREPARE stmt1 FROM @var syntax.
      sql/sql_parse.cc:
        Added support for PREPARE stmt1 FROM @var syntax.
      sql/sql_prepare.cc:
        Code cleanup
      sql/sql_yacc.yy:
        Added support for PREPARE stmt1 FROM @var syntax.
      e7710af7
  21. 18 May, 2004 1 commit
  22. 15 May, 2004 1 commit
    • unknown's avatar
      Fixes for #3371, #3372, #3374, #3375, #3376 · 05cd698f
      unknown authored
      libmysql/libmysql.c:
        code to fix #3772
        counting of field->max_length moved to mysql_store_stmt_result so
        it will work in libmysqld also
      libmysqld/lib_sql.cc:
        to fix #3771 and #3775
        stmt->affected_rows specifying added
        code getting default values changed so it will add terminating /0 to
        values
      sql/sql_parse.cc:
        to fix #3773
        silly mistake here :\
      sql/sql_prepare.cc:
        to fix #3774 and #3776
        special function for datetime values in embedded server added
        unsigned flag now specified for values in embedded server
      tests/client_test.c:
        this test fails if privilege-checking pars are disabled
        (it's the default for libmysqld)
      05cd698f
  23. 06 May, 2004 1 commit
  24. 05 May, 2004 4 commits
    • unknown's avatar
      WL#1622: Post-merge fixes · 60017fb2
      unknown authored
      60017fb2
    • unknown's avatar
      Fixes for prior commit · cf8463ac
      unknown authored
      mysys/my_getsystime.c:
        Applied Sergei's fixes
      sql/sql_prepare.cc:
        Fix prior commit
      cf8463ac
    • unknown's avatar
      Delete Items created during Prepared Stat (memory leak bug) (Bug #3451) · e75a26ba
      unknown authored
      sql/sql_parse.cc:
        Delete Items created during Prepared Stat (memory leak bug)
      sql/sql_prepare.cc:
        Delete Items created during Prepared Stat (memory leak bug)
      e75a26ba
    • unknown's avatar
      Windows fixes for VC++ compiler compability · bddee0c1
      unknown authored
      myisam/myisam_ftdump.c:
        VC++ compiler compability fix
      mysys/my_getsystime.c:
        Applied Sergei's code for Windows (still subject to changes by him)
      sql/handler.cc:
        VC++ compiler compability fix
      sql/item_geofunc.cc:
        Removed non-used variable
      sql/item_strfunc.cc:
        VC++ compiler compability fix
      sql/opt_range.cc:
        VC++ compiler compability fix
      sql/sql_insert.cc:
        VC++ compiler compability fix
      sql/sql_lex.cc:
        VC++ compiler compability fix
      sql/sql_parse.cc:
        VC++ compiler compability fix
      sql/sql_prepare.cc:
        VC++ compiler compability fix
      sql/sql_union.cc:
        Removed non-used variable and VC++ compiler compability fix
      bddee0c1
  25. 04 May, 2004 1 commit
    • unknown's avatar
      Fix for remaining issues described in Bug #1664 · 6ca75754
      unknown authored
      "mysql_send_long_data() API call is completely broken".
      
      Now we are resetting some members (long_data_supplied/null_value...) of Item_param to its 
      initial state after each execution of prepared statement. We also manipulating 
      Item_param::maybe_null/null_value only via Item_param::set_* setters which makes code a bit 
      more robust.
      
      
      sql/item.cc:
        Now we are assuming that Item_param may be NULL until we know this fact exactly.
        Added non-empty implementation of Item_param::reset() method which should be used
        for restoring Item_param state after each statment execution. (We need to clear 
        long_data_supplied flag, we also clear some other Item_param members here since it
        makes code simpler.)
      sql/item.h:
        Now Item_param::reset() method really does something.
      sql/sql_prepare.cc:
        Now we are calling Item_param::reset() for each parameter after execution for resetting Item_param
        to initial state. So we no longer don't need Prepared_statement::long_data_flag. We also 
        set Item_param::null_value/maybe_null value in Item_param::set_* and reset() methods 
        instead of doing it explicitly in insert_params_* functions (this by the way lowers 
        probability that we will forget to update one of such functions).
      tests/client_test.c:
        Added test for Bug#1664 "mysql_send_long_data() API call is broken".
      6ca75754
  26. 30 Apr, 2004 1 commit
  27. 29 Apr, 2004 1 commit
    • unknown's avatar
      Fix for Bug#3035 "Prepared statement integer inserts": now unsigned · d5237fd0
      unknown authored
      flag is sent to server with placeholder types.
      There were no need to extend the protocol as one additional byte
      was reserved for placeholder code, when placeholder code is in range 0-255.
      So this byte is now used for flags. Post-review fixes added.
      
      
      include/config-win.h:
        added floaststore implementation
      include/my_global.h:
        added floatstore implementation
      include/mysql.h:
        Bug#3035:
        added 'is_unsigned' member
        binary_data wasn't used, removed
        null_field wasn't necessary, removed
      include/mysql_com.h:
        Unused defines were removed.
      libmysql/libmysql.c:
        Function store_param_type was removed - too much for a function, especially
        with bug in it.
        New implementation is inline and takes into account signedness of 
        placeholder.
        Fixed store functions to not perform double network-host order conversion
        on high-byte-first systems (should also fix Bug#3578 "Prepared statement 
        integer conversions work wrong in 64-bit Power Mac G5 CPUs").
        null_field removed.
      sql/sql_prepare.cc:
        Placeholder sign is taken into account when reading data from network.
      tests/client_test.c:
        Test for BUG#3035 added: insert and retrieve minimum and maximum of all
        integer types.
      d5237fd0
  28. 14 Apr, 2004 1 commit
  29. 12 Apr, 2004 2 commits
    • unknown's avatar
      WL#1622 "SQL Syntax for Prepared Statements": post-review fixes: · 756223bb
      unknown authored
        Moved PS name to Statement class, Statement_map now handles name-to-statement resolution.
        Both named and unnamed statements are now executed in one function (sql_prepare.cc:execute_stmt)
        Fixed a problem: Malformed sequence of commands from client could cause server to use previously deleted objects.
        Some code cleanup and small fixes
      
      
      sql/mysql_priv.h:
        WL#1622 "SQL Syntax for Prepared Statements": post-review fixes.
      sql/sql_class.cc:
        WL#1622 "SQL Syntax for Prepared Statements": post-review fixes.
      sql/sql_class.h:
        WL#1622 "SQL Syntax for Prepared Statements": post-review fixes.
      sql/sql_parse.cc:
        WL#1622 "SQL Syntax for Prepared Statements": post-review fixes.
      sql/sql_prepare.cc:
        WL#1622 "SQL Syntax for Prepared Statements": post-review fixes.
      756223bb
    • unknown's avatar
      Fix and testcase for BUG#3367. · 8033292d
      unknown authored
      sql/sql_prepare.cc:
        value_is_set should be true for NULL value, as for non-NULL values.
      8033292d
  30. 09 Apr, 2004 1 commit
    • unknown's avatar
      after review PS fixes · 8ab58393
      unknown authored
      sql/item_cmpfunc.cc:
        merged in one if
      sql/mysql_priv.h:
        removed unused paremeter of check_one_table_access
        declaration of new function for SP share code
      sql/set_var.cc:
        function descriotion added
        unneeded parantses removed
      sql/sql_acl.cc:
        new parameter to limit number of checked tables for check_grant
      sql/sql_acl.h:
        new parameter to limit number of checked tables for check_grant
      sql/sql_delete.cc:
        preparation moved in separate function
      sql/sql_insert.cc:
        preparation moved in separate function
      sql/sql_lex.cc:
        comment style fixed
        unneeded assignment removed
      sql/sql_parse.cc:
        new parameter to limit number of checked tables for check_grant
        table list manipulation removed (because of above)
        new precheck function
      sql/sql_prepare.cc:
        function rewrited to shere code with sql_prepare.cc
        flow control fixed
      sql/sql_show.cc:
        new parameter to limit number of checked tables for check_grant
      sql/sql_update.cc:
        preparation moved in separate function
      sql/table.h:
        flag renamed
      8ab58393
  31. 07 Apr, 2004 3 commits
    • unknown's avatar
      new error for unsupported command in PS · c9d856c8
      unknown authored
      fixed IN subselect with basic constant left expression
      SQLCOM_CREATE_TABLE, SQLCOM_UPDATE_MULTI, SQLCOM_REPLACE_SELECT, SQLCOM_INSERT_SELECT, QLCOM_DELETE_MULTI fixed to be compatible with PS (BUG#3398, BUG#3406)
      fixed multiupdate privelege check (BUG#3408)
      fixed multiupdate tables check (BUG#3411)
      unchecked commands now is rejected by PS protocol to avoid serever crash
      fixed cleunup procedure to be compatible sith DO/SET (BUG#3393)
      
      
      include/mysqld_error.h:
        new error for unsupported command in PS
      mysql-test/r/multi_update.result:
        test sutes (BUG#3408, BUG#3411)
      mysql-test/t/multi_update.test:
        test sutes (BUG#3408, BUG#3411)
      sql/item_cmpfunc.cc:
        fixed IN subselect with basic constant left expression
      sql/mysql_priv.h:
        some function frop sql_parse.h become public
      sql/set_var.cc:
        check for SET command via PS
      sql/set_var.h:
        check for SET command via PS
      sql/share/czech/errmsg.txt:
        new error for unsupported command in PS
      sql/share/danish/errmsg.txt:
        new error for unsupported command in PS
      sql/share/dutch/errmsg.txt:
        new error for unsupported command in PS
      sql/share/english/errmsg.txt:
        new error for unsupported command in PS
      sql/share/estonian/errmsg.txt:
        new error for unsupported command in PS
      sql/share/french/errmsg.txt:
        new error for unsupported command in PS
      sql/share/german/errmsg.txt:
        new error for unsupported command in PS
      sql/share/greek/errmsg.txt:
        new error for unsupported command in PS
      sql/share/hungarian/errmsg.txt:
        new error for unsupported command in PS
      sql/share/italian/errmsg.txt:
        new error for unsupported command in PS
      sql/share/japanese/errmsg.txt:
        new error for unsupported command in PS
      sql/share/korean/errmsg.txt:
        new error for unsupported command in PS
      sql/share/norwegian-ny/errmsg.txt:
        new error for unsupported command in PS
      sql/share/norwegian/errmsg.txt:
        new error for unsupported command in PS
      sql/share/polish/errmsg.txt:
        new error for unsupported command in PS
      sql/share/portuguese/errmsg.txt:
        new error for unsupported command in PS
      sql/share/romanian/errmsg.txt:
        new error for unsupported command in PS
      sql/share/russian/errmsg.txt:
        new error for unsupported command in PS
      sql/share/serbian/errmsg.txt:
        new error for unsupported command in PS
      sql/share/slovak/errmsg.txt:
        new error for unsupported command in PS
      sql/share/spanish/errmsg.txt:
        new error for unsupported command in PS
      sql/share/swedish/errmsg.txt:
        new error for unsupported command in PS
      sql/share/ukrainian/errmsg.txt:
        new error for unsupported command in PS
      sql/sql_lex.cc:
        first table unlincking procedures for CREATE command
      sql/sql_lex.h:
        first table unlincking procedures for CREATE command
      sql/sql_parse.cc:
        used function to exclude first table from list
        SQLCOM_CREATE_TABLE, SQLCOM_UPDATE_MULTI, SQLCOM_REPLACE_SELECT, SQLCOM_INSERT_SELECT, QLCOM_DELETE_MULTI fixed to be compatible with PS (BUG#3398, BUG#3406)
        fixed multiupdate privelege check (BUG#3408)
        fixed multiupdate tables check (BUG#3411)
      sql/sql_prepare.cc:
        fixed a lot of commands to be compatible with PS
        unchecked commands now is rejected to avoid serever crash
      sql/sql_select.cc:
        allow empty result for PS preparing
      sql/sql_union.cc:
        fixed cleunup procedure to be compatible sith DO/SET (BUG#3393)
      sql/sql_update.cc:
        fixed update to use correct tables lists (BUG#3408)
      sql/table.h:
        flag to support multi update tables check (BUG#3408)
      tests/client_test.c:
        removed unsupported tables
        fixed show table test
        added new tests
      c9d856c8
    • unknown's avatar
      after review changes · 08594c47
      unknown authored
      sql/log_event.cc:
        non_cachable_table flag changed to cacheable_table
      sql/repl_failsafe.cc:
        non_cachable_table flag changed to cacheable_table
      sql/slave.cc:
        non_cachable_table flag changed to cacheable_table
      sql/sql_acl.cc:
        non_cachable_table flag changed to cacheable_table
      sql/sql_base.cc:
        non_cachable_table flag changed to cacheable_table
      sql/sql_cache.cc:
        non_cachable_table flag changed to cacheable_table
      sql/sql_help.cc:
        non_cachable_table flag changed to cacheable_table
      sql/sql_insert.cc:
        non_cachable_table flag changed to cacheable_table
      sql/sql_parse.cc:
        non_cachable_table flag changed to cacheable_table
      sql/sql_prepare.cc:
        renamed DEBUG tag
      sql/table.h:
        non_cachable_table flag changed to cacheable_table
      08594c47
    • unknown's avatar