An error occurred fetching the project authors.
  1. 26 Jun, 2004 1 commit
    • unknown's avatar
      after merge fixed · 7eb1afab
      unknown authored
      mysql-test/r/flush_table.result:
        after merge fixed
        duplicated tests removed
      mysql-test/t/flush_table.test:
        after merge fixed
        duplicated tests removed
      sql/sql_yacc.yy:
        alias is not db-qualified
      7eb1afab
  2. 25 Jun, 2004 3 commits
    • unknown's avatar
      release cursors in return_zero_rows · 00567fe6
      unknown authored
      sql/opt_range.cc:
        incorrect fix removed. range optimizer is made slightly more stable vs. compiler optimizations
      00567fe6
    • unknown's avatar
      Added missing root user to mysql.user on windows. (Bug #4242) · 4e664e3e
      unknown authored
      Set default max_allowed_packet to be able to read help tables even if an my.cnf file with this option is present. (Bug #3938)
      Don't use default arguments for ha_rnd_init()
      Simple code cleanups since last pull
      
      
      
      scripts/fill_func_tables.sh:
        Change mode to -rw-rw-r--
      scripts/make_win_src_distribution.sh:
        Safer remove of SCCS directories
      scripts/mysql_create_system_tables.sh:
        Added missing root user to mysql.user on windows. (Bug #4242)
      scripts/mysql_install_db.sh:
        Set default max_allowed_packet to be able to read help tables even if an my.cnf file with this option is present. (Bug #3938)
      sql/filesort.cc:
        Don't use default arguments for ha_rnd_init()
      sql/ha_berkeley.cc:
        Better to use #ifdef than // to disable code
        Removed not needed setting of active_index (It's set in index_end)
      sql/ha_berkeley.h:
        Don't use default arguments for ha_rnd_init()
      sql/ha_heap.h:
        Don't use default arguments for ha_rnd_init()
      sql/ha_innodb.h:
        Don't use default arguments for ha_rnd_init()
      sql/ha_isam.h:
        Don't use default arguments for ha_rnd_init()
      sql/ha_isammrg.h:
        Don't use default arguments for ha_rnd_init()
      sql/ha_myisam.cc:
        Fixed wrong previous patch (New code used 'and' between two conditions when it should be 'or' as in original code)
      sql/ha_myisam.h:
        Don't use default arguments for ha_rnd_init()
      sql/ha_myisammrg.h:
        Don't use default arguments for ha_rnd_init()
      sql/ha_ndbcluster.h:
        Don't use default arguments for ha_rnd_init()
      sql/handler.cc:
        Code cleanup
      sql/handler.h:
        Keep bool variables together (better alignment)
      sql/records.cc:
        Don't use default arguments for ha_rnd_init()
      sql/sql_select.cc:
        Don't use default arguments for ha_rnd_init()
      4e664e3e
    • 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
  3. 24 Jun, 2004 3 commits
  4. 23 Jun, 2004 3 commits
    • unknown's avatar
      followup to handler cleanup · ebf9c723
      unknown authored
      mysql-test/r/bdb.result:
        bug#4000
      mysql-test/t/bdb.test:
        bug#4000
      sql/sql_select.cc:
        cleanup
      ebf9c723
    • unknown's avatar
      handler interface cleanups: · 9a554b47
      unknown authored
        more logical table/index_flags
        return  HA_ERR_WRONG_COMMAND instead of abstract methods where appropriate
        max_keys and other limits renamed to max_supported_keys/etc
        max_keys/etc are now wrappers to max_supported_keys/etc 
        ha_index_init/ha_rnd_init/ha_index_end/ha_rnd_end are now wrappers to real {index,rnd}_{init,end} to enforce strict pairing
      
      
      include/myisam.h:
        increasing myisam_max_temp_file_length
      include/my_base.h:
        handler interface cleanup
      myisam/mi_static.c:
        warning removed
      mysql-test/Makefile.am:
        followup
      mysql-test/r/fulltext.result:
        fulltext indexes are not ordered
      mysql-test/r/rpl_user_variables.result:
        followup
      sql/field.cc:
        index_flags
      sql/filesort.cc:
        rnd_init -> ha_rnd_init
        rnd_end -> ha_rnd_end
      sql/ha_berkeley.cc:
        cleanup
      sql/ha_berkeley.h:
        table/index_flags revamped
      sql/ha_heap.cc:
        ensure index is accessed only after index_init (esp. important for temp tables)
      sql/ha_heap.h:
        table/index_flags revamped
      sql/ha_innodb.cc:
        don't workaround MySQL sloppiness
      sql/ha_innodb.h:
        table/index_flags revamped
      sql/ha_isam.h:
        table/index_flags revamped
      sql/ha_isammrg.h:
        table/index_flags revamped
      sql/ha_myisam.cc:
        ensure index is accessed only after index_init (esp. important for temp tables)
      sql/ha_myisam.h:
        table/index_flags revamped
      sql/ha_myisammrg.h:
        table/index_flags revamped
      sql/handler.cc:
        handler interface cleanups
      sql/handler.h:
        handler interface cleanups:
          more logical table/index_flags
          return  HA_ERR_WRONG_COMMAND instead of abstract methods
          max_keys and other limits renamed to max_supported_keys/etc
          max_keys/etc are now wrappers to max_supported_keys/etc 
          ha_index_init/ha_rnd_init/ha_index_end/ha_rnd_end are now wrappers to enforce strict pairing
      sql/item_subselect.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/lex.h:
        renamed to avoid conflicts
      sql/opt_range.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
        table/index_flags cleanup
      sql/opt_range.h:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/opt_sum.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
        table/index_flags cleanup
      sql/records.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/sql_acl.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/sql_cache.cc:
        cleanup
      sql/sql_delete.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/sql_handler.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/sql_help.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/sql_insert.cc:
        table/index_flags cleanup
      sql/sql_select.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
        table/index_flags cleanup
      sql/sql_table.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
        table/index_flags cleanup
      sql/sql_update.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/sql_yacc.yy:
        INDEX -> INDEX_SYM
      sql/table.cc:
        table/index_flags cleanup
      9a554b47
    • unknown's avatar
      A fix (Bug #4237: Server crash with a subquery SELECT). · ac82d8bb
      unknown authored
      Original test case was too big to add it.
      Unfortunately I didn't manage to reduce it.
      
      
      sql/sql_select.cc:
        a fix (Bug #4237: Server crash with a subquery SELECT).
      ac82d8bb
  5. 22 Jun, 2004 1 commit
    • unknown's avatar
      Fixed BUG#3486: FOUND_ROWS() fails inside stored procedure [and prepared statement]. · 3df8b829
      unknown authored
      mysql-test/r/ps.result:
        New test case for BUG#3486.
      mysql-test/t/ps.test:
        New test case for BUG#3486.
      sql/item_create.cc:
        Create an Item_func_found_rows() at parse time, not an Item_int.
      sql/item_func.cc:
        Added val_int() method for new Item_func_found_rows class.
      sql/item_func.h:
        New class Item_func_found_rows for FOUND_ROWS() function.
      sql/sql_select.cc:
        Don't reset thd->limit_found_rows too early, or FOUND_ROWS() wont work.
      3df8b829
  6. 21 Jun, 2004 2 commits
  7. 18 Jun, 2004 2 commits
    • unknown's avatar
      WL#1264 "Per-thread time zone support infrastructure". · 6aaccbcb
      unknown authored
      Added basic per-thread time zone functionality (based on public
      domain elsie-code). Now user can select current time zone
      (from the list of time zones described in system tables).
      All NOW-like functions honor this time zone, values of TIMESTAMP
      type are interpreted as values in this time zone, so now
      our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH
      LOCAL TIME ZONE (or proper PostgresSQL type).
        
      WL#1266 "CONVERT_TZ() - basic time with time zone conversion 
      function".
        
      Fixed problems described in Bug #2336 (Different number of warnings 
      when inserting bad datetime as string or as number). This required
      reworking of datetime realted warning hadling (they now generated 
      at Field object level not in conversion functions).
        
      Optimization: Now Field class descendants use table->in_use member
      instead of current_thd macro.
      
      
      include/my_global.h:
        Added macro for reading of 32-bit ints stored in network order from
        unaligned memory location.
      include/mysqld_error.h:
        Added error-code for invalid timestamp warning and error-code
        for wrong or unknown time zone specification.
      libmysqld/Makefile.am:
        Added main per-thread time zone support file to libmysqld
      libmysqld/lib_sql.cc:
        Added initialization of time zones infrastructure to embedded server.
      mysql-test/r/connect.result:
        Updated test result since now mysql database contains more
        system tables.
      mysql-test/r/date_formats.result:
        Now when truncation occurs during conversion to datetime value we are producing Warnings 
        instead of Notes. Also we are giving more clear warnings about this in some cases.
      mysql-test/r/func_sapdb.result:
        New warnings about truncation occured during conversion to datetime value added due
        their better handling.
      mysql-test/r/func_time.result:
        New warnings about truncation occured during conversion to datetime value added due
        their better handling.
      mysql-test/r/select.result:
        New warnings about truncation occured during conversion to datetime value added due
        their better handling. Also tweaked test a bit to made it less ambigious for reader.
      mysql-test/r/system_mysql_db.result:
        Updated test result because new system tables holding time zone descriptions were 
        added.
      mysql-test/r/timezone.result:
        Updated timezone.test to use new system variable which shows system time zone.
        Added test of warning which is produced if someone tries to store non-existing (due 
        falling into spring time-gap) datetime value into TIMESTAMP field.
      mysql-test/r/type_datetime.result:
        Separated and extended test of values and warnings produced for bad values stored in 
        DATETTIME fields.
      mysql-test/r/type_time.result:
        Now we are producing more consistent warning when we are truncating datetime value while
        storing it in TIME field.
      mysql-test/r/type_timestamp.result:
        Separated and extended test of values and warnings produced for bad
        values stored in TIMESTAMP fields.
      mysql-test/t/select.test:
        Updated test to make it less ambigous for reader.
      mysql-test/t/timezone.test:
        Updated timezone.test to use new system variable which shows system time zone.
        Added test of warning which is produced if someone tries to store non-existing (due 
        falling into spring time-gap) datetime value into TIMESTAMP field.
      mysql-test/t/type_datetime.test:
        Separated and extended test of values and warnings produced for bad
        values stored in DATETTIME fields.
      mysql-test/t/type_timestamp.test:
        Separated and extended test of values and warnings produced for bad
        values stored in TIMESTAMP fields.
      scripts/mysql_create_system_tables.sh:
        Added creation of tables with time zone descriptions.
        Also added descriptions of time zones used in tests.
      scripts/mysql_fix_privilege_tables.sql:
        Added mysql.time_zone* tables family.
      sql/Makefile.am:
        Added files implementing time zone support to server, also added
        rules for building of mysql_tzinfo_to_sql converter and test_time
        test.
      sql/field.cc:
        Now we are using per-thread time zone for TIMESTAMP <-> whatever conversion.
        Fixed generation of warnings for datetime types (DATETIME/TIMESTAMP/DATE/...) and
        any other Field to datetime conversion (now we are generating warnings no in lower
        level functions like in str_to_TIME() but in Field methods. This allows generate
        better and more consistent warnings and to reuse code of str_to_TIME() outside of
        server).
        
        Added 3rd parameter to set_warning() method to be able to not increment cut fields
        but still produce a warning. Also added set_datetime_warning() family of auxiliary 
        methods which allow easier generate datetime related warnings.
        Also replaced occurences of current_thd with table->in_use member, added
        asserts for catching all places there we need to set table->in_use
        accordingly. Renamed fix_datetime() function to number_to_TIME() and
        moved it to sql/time.cc there it fits better.
      sql/field.h:
        Added comment about places where we can use table->in_use member
        instead of current_thd.
        Added 3rd parameter to Field::set_warning() method and set_datetime_warning()
        family of methods.
      sql/field_conv.cc:
        Field::set_warning() method with 2 arguments was replaced with more 
        generic set_warning() method with 3 arguments.
      sql/ha_berkeley.cc:
        Now we set table->in_use for temporary tables so we have to use
        table->tmp_table for checking if table is temporary.
      sql/item.cc:
        Replaced calls to str_to_time() and str_to_TIME() funcs with their warning
        generating analogs.
      sql/item_create.cc:
        Added creation of CONVERT_TZ function as FUNC_ARG3.
      sql/item_create.h:
        Added creation of CONVERT_TZ function as FUNC_ARG3.
      sql/item_timefunc.cc:
        Added support of per-thread time zone to NOW-like and FROM_UNIXTIME,
        UNIX_TIMESTAMP functions. 
        Added support for CONVERT_TZ function.
        Removed call to str_to_timestamp function which caused non-optimal
        behavior in certain cases. Replaced calls to str_to_time() function 
        with its warning generating analog.
      sql/item_timefunc.h:
        Added support of per-thread time zone to NOW-like and
        FROM_UNIXTIME, UNIX_TIMESTAMP functions.
        Added support of CONVERT_TZ function.
      sql/lex.h:
        Added support of CONVERT_TZ function.
      sql/log.cc:
        Added support for replication of statements depending on time zone.
      sql/mysql_priv.h:
        Now including headers with per-thread time zone support functions
        and classes. Added portable replacement of time_t - my_time_t type. 
        Added time zone as one of query distinguishing parameters for
        query cache. 
        Fixed declarations of str_to_TIME, str_to_time and 
        my_system_gmt_sec (former my_gmt_sec) since now they have one more
        out parameter which informs about wrong datetime value or data 
        truncation during conversion.
        Added warning generating version of str_to_TIME() and str_to_time()
        functions.
        Thrown away str_to_datetime/timestamp functions since they are not
        needed any longer. Added number_to_TIME function.
      sql/mysqld.cc:
        Added per-thread time zone support initialization.
        Added new startup parameter --default-time-zone.
      sql/set_var.cc:
        Added support for per-thread time_zone variable.
        Renamed old timezone variable to system_time_zone.
      sql/set_var.h:
        Added support for per-thread time_zone variable.
      sql/share/czech/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/danish/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/dutch/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/english/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/estonian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/french/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/german/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/greek/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/hungarian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/italian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/japanese/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/korean/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/norwegian-ny/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/norwegian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/polish/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/portuguese/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/romanian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/russian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/serbian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/slovak/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/spanish/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/swedish/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/share/ukrainian/errmsg.txt:
        Added error message for barking when incorrect time zone name or
        specifiaction is provided and for warning about invalid TIMESTAMP
        values (e.g. falling into the spring time-gap).
      sql/slave.cc:
        In order to support replication of statements using time zones in 4.1 we should 
        ensure that both master and slave have same default time zone.
      sql/sql_base.cc:
        Now we are setting TABLE::in_use member for all tables (which assume
        calls to Field::store or val_ methods).
      sql/sql_cache.cc:
        Added time zone as one more query distinguishing parameter
        for query cache.
      sql/sql_class.cc:
        Added THD::time_zone_used variable indicating that this query
        uses per thread time zone.
      sql/sql_class.h:
        Added per-thread time zone variable. Added THD::time_zone_used
        variable indicating that this query uses per thread time zone
        so if this is updating query the time zone should be logged to 
        binlog.
      sql/sql_insert.cc:
        We should set TABLE::in_use member pointing to thread which is called
        INSERT DELAYED and not to worker thread.
      sql/sql_load.cc:
        Field::set_warning() now has one more argument now.
      sql/sql_parse.cc:
        Resetting THD::time_zone_used variable in the end of query
        processing.
      sql/sql_select.cc:
        Now we are setting TABLE::in_use member for all tables (which assume
        calls to Field::store or val_ methods).
      sql/sql_show.cc:
        Now using per thread time zone for extended show tables.
      sql/time.cc:
        Added support for per-thread time zones for TIMESTAMP type and
        reworked generation of warnings for TIMESTAMP and DATETIME types.
        (Introduced new TIME_to_timestamp() function. Removed hours 
        normalisation from former my_gmt_sec() since it was not working 
        and not used anywhere now, but breaks parameter constness, added
        to this function generation of warning if we are falling in spring 
        time-gap. Removed str_to_timestamp and str_to_datetime functions 
        which are no longer used. Moved fix_datetime function from
        sql/field.cc to this file as number_to_TIME() function. Added
        out parameter for str_to_TIME and str_to_time functions which
        indicates if value was truncated during conversion, removed direct 
        generation of warnings from this functions.)
      sql/unireg.cc:
        Now we are setting TABLE::in_use member for all tables (which assume
          calls to Field::store or val_ methods).
      BitKeeper/etc/ignore:
        Added sql/test_time sql/mysql_tzinfo_to_sql libmysqld/tztime.cc to the ignore list
      6aaccbcb
    • unknown's avatar
      Fixed some byte order bugs with prepared statements on machines with high-byte-first. (Bug #4173) · 7d52eabb
      unknown authored
      Fixed problem with NULL and derived tables (Bug #4097)
      Cleanup of new pushed code
      
      
      BitKeeper/etc/ignore:
        added mysql-test/ndb/ndbcluster
      client/mysqltest.c:
        simple cleanup
      innobase/os/os0file.c:
        fix for netware
      libmysql/libmysql.c:
        Fixed some byte order bugs with prepared statements on machines with
        high-byte-first. (Bug #4173)
      myisam/ft_boolean_search.c:
        Comment cleanup
      myisam/mi_check.c:
        Removed not needed check (check is done in check_index())
      myisam/mi_unique.c:
        crc must be of type ha_checksum.
      myisam/myisamchk.c:
        Portability fix.
      mysql-test/mysql-test-run.sh:
        Simple cleanup
      mysql-test/r/subselect.result:
        Test problem with NULL and derived tables (Bug #4097)
      mysql-test/t/subselect.test:
        Test problem with NULL and derived tables (Bug #4097)
      sql/mysqld.cc:
        Remove not used defines
      sql/sql_select.cc:
        Fixed problem with NULL and derived tables (Bug #4097)
        Indentation fixes
      sql/sql_string.cc:
        Code cleanup
      sql/sql_yacc.yy:
        Allow one to use DROP PREPARE ...
      7d52eabb
  8. 09 Jun, 2004 1 commit
    • unknown's avatar
      do not unlock tables early if we have subquery in HAVING clause (BUG#3984) · 07b5fdbc
      unknown authored
      mysql-test/r/subselect_innodb.result:
        test of unlocking innodb tables and subquery in HAVING clause
      mysql-test/t/subselect_innodb.test:
        test of unlocking innodb tables and subquery in HAVING clause
      sql/item_subselect.cc:
        mark SELECT with subquery in HAVING clause
      sql/sql_lex.cc:
        mark SELECT with subquery in HAVING clause
      sql/sql_lex.h:
        mark SELECT with subquery in HAVING clause
      sql/sql_select.cc:
        do not unlock tables early if we have subquery in HAVING clause
      07b5fdbc
  9. 06 Jun, 2004 1 commit
  10. 02 Jun, 2004 1 commit
    • unknown's avatar
      after merge fixes · b94f62f7
      unknown authored
      innobase/os/os0file.c:
        after merge fix
      sql/ha_innodb.cc:
        after merge fix
      sql/sql_select.cc:
        after merge fix (The patch for 4.0 didn't make sence in 4.1)
      b94f62f7
  11. 28 May, 2004 1 commit
    • unknown's avatar
      a fix. · 0cb0e7f5
      unknown authored
      (Bug#3738: SQL_CALC_FOUND_ROWS ignores WHERE if LIMIT used,
       Bug#3845: wrong FOUND_ROWS result)
      
      
      0cb0e7f5
  12. 25 May, 2004 1 commit
  13. 24 May, 2004 2 commits
    • unknown's avatar
      Fix for sporadically failures of innodb.test on Darwin 7.3 · 69859967
      unknown authored
      which occured because we were not lowering case of file names 
      for temporary tables altough handler assumes so if 
      lower_case_table_names==2. Now we are lowering case for them.
      
      
      sql/sql_select.cc:
        Now we are lowering case of file names for temporary tables.
      sql/sql_table.cc:
        Now we are lowering case of file names for temporary tables.
      69859967
    • 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
  14. 19 May, 2004 1 commit
    • unknown's avatar
      after review changes · 9fb55cef
      unknown authored
      mysql-test/r/derived.result:
        explain of hidden subselect changed according to review
      mysql-test/r/subselect.result:
        explain of hidden subselect changed according to review
      mysql-test/r/union.result:
        explain of hidden subselect changed according to review
      sql/sql_class.h:
        we bo not need sign for now
      sql/sql_lex.h:
        we do not need sign for now
      9fb55cef
  15. 16 May, 2004 1 commit
    • unknown's avatar
      key_cmp -> key_cmp_if_same · 70f79563
      unknown authored
      New records_in_range() interface (similar to read_range())
      Macros for faster bitmap handling
      Simplify read_range() code (#WL1786)
      New general key_cmp() function to compare keys
      
      
      
      
      heap/hp_hash.c:
        New records_in_range() interface
      include/heap.h:
        New records_in_range() interface
      include/my_base.h:
        Moved 'key_range' here so that all table handlers can use it
      include/my_bitmap.h:
        Make some bitmap functions inline for faster usage in one thread
      include/myisam.h:
        New records_in_range() interface
      include/myisammrg.h:
        New records_in_range() interface
      myisam/mi_range.c:
        New records_in_range() interface
      myisam/mi_test2.c:
        New records_in_range() interface
      myisam/rt_test.c:
        New records_in_range() interface
        Indentation fixes
      myisam/sp_test.c:
        New records_in_range() interface
        Indentation fixes
      myisammrg/myrg_range.c:
        New records_in_range() interface
      mysys/my_bitmap.c:
        Make some bitmap functions inline for faster usage in one thread
      sql/examples/ha_example.cc:
        New records_in_range() interface
      sql/field.cc:
        Fixed indentation
      sql/ha_berkeley.cc:
        New records_in_range() interface
      sql/ha_berkeley.h:
        New records_in_range() interface
      sql/ha_heap.cc:
        New records_in_range() interface
      sql/ha_heap.h:
        New records_in_range() interface
      sql/ha_innodb.cc:
        New records_in_range() interface
      sql/ha_innodb.h:
        New records_in_range() interface
      sql/ha_isam.cc:
        New records_in_range() interface
      sql/ha_isam.h:
        New records_in_range() interface
      sql/ha_myisam.cc:
        New records_in_range() interface
      sql/ha_myisam.h:
        New records_in_range() interface
      sql/ha_myisammrg.cc:
        New records_in_range() interface
      sql/ha_myisammrg.h:
        New records_in_range() interface
      sql/ha_ndbcluster.cc:
        New records_in_range() interface
      sql/ha_ndbcluster.h:
        New records_in_range() interface
      sql/handler.cc:
        Simplify read_range() interface:
        - Add 'eq_range' to read_range_first
        - Remove 'eq_range' parameer from read_range_next()
        - Trust values from index_next_same()
        - Simplfy compare_key() by moving key_comparision to key.cc (as this code can be reused from other places)
      sql/handler.h:
        Move key_range to my_base.h to be used by external table handlers
        Simplify read_range() interface
        New records_in_range() interface
      sql/key.cc:
        Rename key_cmp() to key_cmp_if_same() to make it more descriptive
        Add new key_cmp() function usable from range and handler code.
      sql/mysql_priv.h:
        Prototypes for new functions
      sql/opt_range.cc:
        New records_in_range() interface
        Simplify cmp_prev()
        (We can in 5.0 simplify cmp_next() the same way)
      sql/opt_range.h:
        Added key_part_info to QUICK_SELECT to be able to use key_cmp() in get_next()
      sql/opt_sum.cc:
        key_cmp -> key_cmp_if_same
      sql/sql_acl.cc:
        key_cmp -> key_cmp_if_same
      sql/sql_select.cc:
        key_cmp -> key_cmp_if_same
      70f79563
  16. 15 May, 2004 1 commit
    • unknown's avatar
      bad old merge fixed · b40430e0
      unknown authored
      mysql-test/r/order_by.result:
        buggy results bug#3681
      mysql-test/t/order_by.test:
        test for bug#3681
      b40430e0
  17. 14 May, 2004 3 commits
  18. 13 May, 2004 1 commit
  19. 12 May, 2004 1 commit
  20. 10 May, 2004 1 commit
  21. 07 May, 2004 1 commit
    • unknown's avatar
      keep old engine & JOIN if we changed subquery Item (Bug #3646) · e54ca13b
      unknown authored
      mysql-test/r/subselect.result:
        ALL/ANY test
      mysql-test/t/subselect.test:
        ALL/ANY test
      sql/item_subselect.cc:
        keep old engine & JOIN if we changed subquery Item, which allow avoid second all SELECT items fix_fields call with pervios clean up (because of second setup_tables which remove table->key_use and maybe something else)
        keep list when we change Item in SELECT list
        processing inserted max/min function (now JOIN::prepare will be called only once)
        methods of changing item for subselect engines
      sql/item_subselect.h:
        change item & results procedure
      sql/item_sum.cc:
        Item_sum_hybrid::clear moved to .cc file (to keep .h clean and to make inserving/removing debug info easy)
      sql/item_sum.h:
        Item_sum_hybrid::clear moved to .cc file (to keep .h clean and to make inserving/removing debug info easy)
      sql/sql_lex.cc:
        note about new method
      sql/sql_lex.h:
        method for changing result of UNION JOINs
      sql/sql_select.cc:
        method for changing result in JOIN
      sql/sql_select.h:
        method for changing result in JOIN
      sql/sql_union.cc:
        method for changing result in JOIN
      e54ca13b
  22. 06 May, 2004 3 commits
    • unknown's avatar
      EXPLAIN UNION using same routing which used for execution which allow return... · 1a4f499c
      unknown authored
      EXPLAIN UNION using same routing which used for execution which allow return correct bug messages (Bug #3639)
      EXPLAIN of hidden SELECT of UNION
      
      
      mysql-test/r/derived.result:
        explain of hidden select
      mysql-test/r/subselect.result:
        explain of hidden select
      mysql-test/r/union.result:
        explain of hidden select
        correct error messages on explain
      mysql-test/t/subselect.test:
        show eliminated costants in WHERE clause
      mysql-test/t/union.test:
        correct error messages on EXPLAIN with union
      sql/item.cc:
        fixed name constructing for global ORDER BY items
      sql/sql_class.h:
        select ID can be negative (for hidden SELECTs)
        removed unused field
      sql/sql_lex.cc:
        new flag of UNION EXPLAIN
      sql/sql_lex.h:
        new flag of UNION EXPLAIN
        select ID can be negative (for hidden SELECTs)
      sql/sql_select.cc:
        EXPLAIN UNION using same routing which used for execution
        explain for hidden SELECT of UNION
      sql/sql_union.cc:
        EXPLAIN UNION using same routing which used for execution
      1a4f499c
    • unknown's avatar
      WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again). · bfe2425a
      unknown authored
      HEAP: Copies the key count to a backup variable and sets the key count to zero.
      That way, no HEAP function will ever try to touch any index.
      Re-enabling is done by copying back the backup variable.
      To avoid memory leak at table close, disable deletes all index trees.
      Re-enabling must be done with empty indexes and data anyway. Otherwise,
      the indexes would need to be repaired, wich HEAP is not capable of.
      MyISAM: Only the key_map is cleared and set.
      Re-enabling must be done with empty indexes and data. Otherwise, repair needs
      to be done which will enable all keys persistently.
      The former implementation disabled only non-unique keys and maked this persistent.
      The new implementation additionally can disable all keys, but only without
      making this persistent. Re-enabling all keys can be done without repair,
      if data file and indexes are empty.
      
      
      heap/heapdef.h:
        WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
        Pulled hp_clear_keys() out of hp_clear().
      heap/hp_clear.c:
        WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
        Pulled hp_clear_keys() out of hp_clear().
        Added the new functions for disabling and enabling keys and to ask for the key state.
      include/heap.h:
        WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
        Added a new HP_SHARE element to save the key count while keys are disabled.
        Added declarations for the new functions.
      myisam/mi_open.c:
        WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
        Added the new functions for disabling and enabling keys and to ask for the key state.
      myisam/myisamdef.h:
        WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
        Added declarations for the new functions.
      sql/ha_heap.cc:
        WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
        Pulled set_keys_for_scanning() out of open().
        Added the new functions for disabling and enabling keys and to ask for the key state.
      sql/ha_heap.h:
        WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
        Added declarations for the new functions.
      sql/ha_myisam.cc:
        WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
        Extended disable_indexes() for all keys and no save.
        The argument is now 'mode' as it must handle different cases.
        Extended enable_indexes() for no save.
        The new feature needs the new argument 'mode' with the same semantics as in disable_indexes().
        Added indexes_are_disabled() to ask for the key state.
        Extended the existing call to enable_indexes() by the new argument.
      sql/ha_myisam.h:
        WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
        Modified the declarations of dis-/enable_indexes() for the new argument.
        Added the declaration of the new function to ask for the key state.
      sql/handler.h:
        WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
        Added declarations for the operation modes for the key switching functions.
        Modified the declarations of dis-/enable_indexes() for the new argument.
        Added the declaration of the new function to ask for the key state.
      sql/sql_select.cc:
        WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
        In create_myisam_from_heap() take notice of disabled keys
        and disable them in the new table before copying the data.
      sql/sql_table.cc:
        WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
        Modified the calls of dis-/enable_indexes() for the new argument.
      bfe2425a
    • unknown's avatar
      Fixed wrong key usage which caused wrong result for some "WHERE... · d91477ce
      unknown authored
      Fixed wrong key usage which caused wrong result for some "WHERE primary_key=constant" queries where MySQL could use 'only index' (Bug #3666)
      The bug was introduced in a patch in the 4.1.2 source tree.
      
      
      mysql-test/r/key.result:
        New result
      mysql-test/t/key.test:
        Added test case for bug in key read
      sql/sql_select.cc:
        Fixed wrong key usage which caused wrong result for some "WHERE primary_key=constant" queries where MySQL could use 'only index' (Bug #3666)
      d91477ce
  23. 05 May, 2004 2 commits
    • unknown's avatar
      after merge fixes · 000f76cf
      unknown authored
      client/mysqldump.c:
        Fixed problem with multiple tables (--skip-quote didn't work properly for second table)
      myisam/myisamchk.c:
        after merge fix
      000f76cf
    • unknown's avatar
      Fixed crashing bug with alter table when table was in use (Bug #3643) · 68d07cbc
      unknown authored
      We didn't use 'only index' for tables of type 'const'. (Bug #3497)
      
      
      mysql-test/r/func_str.result:
        New testfin
      mysql-test/r/key.result:
        New test
      mysql-test/r/key_primary.result:
        Update after "We didn't use 'only index' for tables of type 'const'" fix.
      mysql-test/r/null_key.result:
        Update after "We didn't use 'only index' for tables of type 'const'" fix.
      mysql-test/r/subselect.result:
        Update after "We didn't use 'only index' for tables of type 'const'" fix.
      mysql-test/t/func_str.test:
        Updated bug texts
        Added test for conversion of long string value to integer (Bug #3472)
      mysql-test/t/key.test:
        Test of key read with primary key (Bug #3497)
      sql/item.cc:
        Added assert
      sql/sql_base.cc:
        Fixed crashing bug with alter table when table was in use (Bug #3643)
      sql/sql_load.cc:
        Indentation fixes
      sql/sql_select.cc:
        We didn't use 'only index' for tables of type 'const'. (Bug #3497)
      68d07cbc
  24. 04 May, 2004 2 commits
    • unknown's avatar
      repetable test replaced with inline function · aaff8391
      unknown authored
      aaff8391
    • unknown's avatar
      Fix to handle unsigned data in prepared statements (Bug #3447) · 030587a7
      unknown authored
      Fixed security problem that password was temporarly reset when someone changed GRANT for a user. (Bug #3404)
      Fixed problem with PROCEDURE analyse() and impossible WHERE (Bug #2238)
      Don't auto-repair tables in mysqlcheck if table type doesn't support 'check' command.
      
      
      Docs/mysqld_error.txt:
        Updated error values
      client/mysqlcheck.c:
        Don't cause auto-repair on 'note' (Tables that doesn't support 'check')
      libmysql/libmysql.c:
        Fix to handle unsigned data in prepared statements (Bug #3447)
      mysql-test/r/analyse.result:
        Test of analyze + impossible where (Bug #2238)
      mysql-test/r/bdb.result:
        Update results
      mysql-test/r/ctype_ujis.result:
        Update results
      mysql-test/r/isam.result:
        Update results
      mysql-test/r/repair.result:
        Update results
      mysql-test/t/analyse.test:
        Test of analyze + impossible where (Bug #2238)
      mysql-test/t/ctype_ujis.test:
        Added test for LIKE (Bug #3438)
      sql/sql_acl.cc:
        Fixed security problem that password was temporarly reset when someone changed GRANT for a user. (Bug #3404)
      sql/sql_select.cc:
        Fixed problem with PROCEDURE analyse() and impossible WHERE (Bug #2238)
      sql/sql_table.cc:
        Changed 'error' to 'note' when table doesn't support admin command.
      sql/sql_update.cc:
        Indentaion cleanup
      tests/client_test.c:
        Added test for handling unsigned/signed strings with prepared statements
      030587a7
  25. 02 May, 2004 1 commit
    • unknown's avatar
      fixed zero result case for group functions in subquery (Bug #3505) · 748db216
      unknown authored
      fixed LIMIT 0 for zero rows optimisation
      
      
      mysql-test/r/subselect.result:
        test case for bugreport
      mysql-test/t/subselect.test:
        test case for bugreport
      sql/sql_select.cc:
        cleanup sum function on reinit
        take in account LIMIT if zero result optimisation case
        do not forgot sum function in zero result case for subqueries
      748db216