An error occurred fetching the project authors.
  1. 31 Aug, 2004 1 commit
    • unknown's avatar
      after review patch · 1dc52f07
      unknown authored
      mysql-test/r/negation_elimination.result:
        new tests of negation elimination
      mysql-test/t/negation_elimination.test:
        new tests of negation elimination
      sql/item.h:
        test of boolean functions added
      sql/item_cmpfunc.cc:
        NOT subtree is already checked, so wee need to return just argument
      sql/item_cmpfunc.h:
        test of boolean functions added
      sql/mysql_priv.h:
        'place' to detect WHERE clause
      sql/sql_parse.cc:
        function for creation negated expression
      sql/sql_select.cc:
        removed unused function
      sql/sql_select.h:
        removed unused function
      sql/sql_yacc.yy:
        'place' to detect WHERE clause
      1dc52f07
  2. 29 Aug, 2004 1 commit
    • unknown's avatar
      NOT elimination moved in parsing (suggested by Monty) · f45c482a
      unknown authored
      sql/item_cmpfunc.cc:
        NOT elimination moved in parsing (we do not need fix fields in it and PS processing)
      sql/item_cmpfunc.h:
        NOT elimination moved in parsing (we do not need fix fields in it and PS processing)
      sql/sql_select.cc:
        NOT elimination moved in parsing (we do not need fix fields in it and PS processing)
      sql/sql_yacc.yy:
        NOT elimination moved in parsing
      f45c482a
  3. 26 Aug, 2004 1 commit
    • unknown's avatar
      Portability fixes · 44b2807e
      unknown authored
      Fixed bug in end space handle for WHERE text_column="constant"
      
      
      heap/hp_hash.c:
        Optimzations (no change of logic)
      libmysql/libmysql.c:
        Added missing casts (portability fix)
      myisam/mi_key.c:
        Changed macro to take arguments and not depend on local variables
        Simple indentation fixes ?
      mysql-test/r/connect.result:
        Added test for setting empty password
      mysql-test/r/create_select_tmp.result:
        TYPE -> ENGINE
      mysql-test/r/ctype_utf8.result:
        Combine drop's
      mysql-test/r/endspace.result:
        Added more tests to test end space behaviour
      mysql-test/r/having.result:
        Added missing DROP TABLE
      mysql-test/r/type_blob.result:
        Added more tests to ensure that fix for BLOB usage is correct
      mysql-test/r/type_timestamp.result:
        Add test from 4.0
      mysql-test/t/connect.test:
        Added test for setting empty password
      mysql-test/t/create_select_tmp.test:
        TYPE -> ENGINE
      mysql-test/t/ctype_utf8.test:
        Combine drop's
      mysql-test/t/endspace.test:
        Added more tests to test end space behaviour
      mysql-test/t/having.test:
        Added missing DROP TABLE
      mysql-test/t/type_blob.test:
        Added more tests to ensure that fix for BLOB usage is correct
      mysql-test/t/type_timestamp.test:
        Add test from 4.0
      sql/field.cc:
        Removed not used variable
        Portability fix (cast)
        Simplified Field_str::double()
        Simple indentation cleanups
      sql/field.h:
        Removed not needed class variable
      sql/item_cmpfunc.cc:
        Indentation fix
      sql/item_strfunc.cc:
        Use on stack variable for Item_str_func::val() instead of str_value.
        This makes it safe to use str_value inside the Item's val function.
        Cleaned up LEFT() usage, thanks to the above change
      sql/item_sum.cc:
        Indentation cleanups
      sql/protocol.cc:
        Added missing cast
      sql/sql_acl.cc:
        Indentatin cleanups.
        Added missing cast
        Simple optimization of get_sort()
      sql/sql_select.cc:
        Don't use 'ref' to search on text field that is not of type BINARY (use 'range' instead).
        The reson is that for 'ref' we use 'index_next_same' to read the next possible row. 
        For text fields, rows in a ref may not come in order, like for 'x', 'x\t' 'x ' (stored in this order) which causes a search for 'column='x ' to fail
      sql/tztime.cc:
        Simple cleanup
      strings/ctype-bin.c:
        Comment fixes
      strings/ctype-mb.c:
        Changed variable names for arguments
      44b2807e
  4. 24 Aug, 2004 2 commits
    • unknown's avatar
      Fix for Bug#5034 "prepared "select 1 into @arg15", second · 49bd559e
      unknown authored
      execute crashes server": we were deleting lex->result
      after each execute, but prepared statements assumed that
      it's left intact.
      The fix adds cleanup() method to select_result hierarchy,
      so that result objects can be reused.
      Plus we now need to delete result objects more wisely.
      
      
      mysql-test/r/ps.result:
        Test results fixed: test case for bug#5034
      mysql-test/t/ps.test:
        A test case for bug#5034, few followups
      sql/sql_class.cc:
        - fix warning in THD::THD
        - implementation of cleanup() for select_result hierarchy
        - select_export::send_eof was identical to 
          select_dump::send_eof: moved to the base class select_to_file.
        - Statement::end_statement() to end lex, free items, and
          delete possible select_result
      sql/sql_class.h:
        - select_result::cleanup() declaration
        -
      sql/sql_insert.cc:
        - implementation of select_insert::cleanup(): currently
          we always create a new instance of select_insert/
          select_create on each execute.
      sql/sql_lex.cc:
        - with more complicated logic of freeing lex->result it's 
          easier to have it non-zero only if it points to a valid
          result.
      sql/sql_lex.h:
        Now st_lex::st_lex is not empty.
      sql/sql_parse.cc:
        mysql_execute_command():
        - delete select_result *result only if it was created in
          this function.
        - use end_statement() to cleanup lex and thd in the end of
          each statement.
        - no need to save THD::lock if this is explain. This save
          apparently left from times when derived tables were 
          materialized here, not in open_and_lock_tables.
      sql/sql_prepare.cc:
        - call result->cleanup() in reset_stmt_for_execute
        - now Statement is responsible for freeing its lex->result.
      sql/sql_select.cc:
        handle_select():
        - don't delete result, it might be needed
          for next executions
        - result is never null
      49bd559e
    • unknown's avatar
      Portablity fixes & simple optimizations · 20f24a42
      unknown authored
      sql/ha_ndbcluster.cc:
        Added missing cast
      sql/item.cc:
        Portability fix (for windows)
      sql/lock.cc:
        Cleanup + more comments
      sql/sql_class.cc:
        Portability fix + more comments
      sql/sql_select.cc:
        Portability fix
      sql/sql_table.cc:
        Simpler handling of auto_increment in ALTER TABLE
      20f24a42
  5. 23 Aug, 2004 5 commits
    • unknown's avatar
      Fix for bug #5134: WHERE x = 'bar' AND x LIKE BINARY 'bar' returns wrong results(for 4.1 tree) · 21fa1273
      unknown authored
      mysql-test/r/binary.result:
        Fix for bug #5134: WHERE x = 'bar' AND x LIKE BINARY 'bar' returns wrong results
      mysql-test/t/binary.test:
        Fix for bug #5134: WHERE x = 'bar' AND x LIKE BINARY 'bar' returns wrong results
      sql/sql_select.cc:
        Fix for bug #5134: WHERE x = 'bar' AND x LIKE BINARY 'bar' returns wrong results
      21fa1273
    • unknown's avatar
      Fix for bug #5134: WHERE x = 'bar' AND x LIKE BINARY 'bar' returns · 6d9046c6
      unknown authored
      wrong results
      
      
      6d9046c6
    • unknown's avatar
      Changed %lx -> 0x%lx (for easier comparison of debug files) · f7d0dfd9
      unknown authored
      Cosmetic cleanups
      Don't call 'delete_elements' on copy_funcs as this causes elements to be freed twice
      
      
      mysys/hash.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/list.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/mf_iocache.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/mf_keycache.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
        Changed debug messages to be more consistent with other mysys files.
      mysys/mf_keycaches.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/my_alloc.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/my_fopen.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/my_fstream.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/my_getwd.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/my_lib.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/my_lwrite.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/my_malloc.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/my_pread.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/my_read.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/my_realloc.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/my_write.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/safemalloc.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/thr_alarm.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/thr_lock.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/thr_mutex.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/tree.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      mysys/typelib.c:
        Changed %lx -> 0x%lx (for easier comparison of debug files)
      sql/examples/ha_archive.cc:
        Changed to return error number for some functions (instead of -1)
        Updated function comments & some other minor cleanups
        Ensure that free_share() and gzclose() are always called
        Use 'TRUE' and 'FALSE' instead of 'true' and 'false'
        Removed some compiler warnings
      sql/examples/ha_archive.h:
        Fixed to use new prototypes for records_in_range
      sql/sql_select.cc:
        Don't call 'delete_elements' on copy_funcs
      f7d0dfd9
    • unknown's avatar
      better for for bug#4767 · e66e0c1a
      unknown authored
      e66e0c1a
    • unknown's avatar
      Fix for bug#5088: · 34c8e46d
      unknown authored
       * When executing EXPLAIN, do the same as for the query: convert join type to JT_CONST if keyuse array covers all key parts and all of them are constants.
       * In remove_const, don't remove conditions that depend on some-const-table and current-table.
      
      
      mysql-test/r/join_outer.result:
        Testcase for bug#5088
      mysql-test/t/join_outer.test:
        Testcase for bug#5088
      34c8e46d
  6. 20 Aug, 2004 3 commits
    • 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
    • unknown's avatar
      sql_select.cc: compilation failure fixed · 91df1608
      unknown authored
      
      sql/sql_select.cc:
        why cannot I compare (type) to (const type) ?????
      91df1608
    • unknown's avatar
      Fix for bug#4302 "ambiguos order by when renamed column is identical to another in result" · f9c3cb5f
      unknown authored
      When in find_item_in_list() we are looking for item we should take into account unaliased 
      names of the fields but only if item with such aliased name is not found.
      Also we should ignore aliases when looking for fully specified field.
      
      
      mysql-test/r/order_by.result:
        Fixed wrong (non-standard) test results
        Added test case for bug #4302
        Added tests for other ambiguos and potentially ambigous cases in order by clause
      mysql-test/t/order_by.test:
        Fixed wrong (non-standard) test results
        Added test case for bug #4302
        Added tests for other ambiguos and potentially ambigous cases in order by clause
      sql/sql_select.cc:
        We should ignore only not_found_item errors when searching for item in find_order_in_list() 
        to be able to catch ambiguities.
      f9c3cb5f
  7. 19 Aug, 2004 1 commit
  8. 12 Aug, 2004 2 commits
    • unknown's avatar
      fixed Bug #4358 Problem with HAVING clause that uses alias · 7e5247aa
      unknown authored
             from the select list and TEXT field 
      
      make setup_copy_fields to insert Item_copy_string for blobs in 
      the beginning of the copy_funcs (push_back instead of push_front)
      
      the thing is that Item_copy_string::copy for function can call 
      Item_copy_string::val_int for blob via Item_ref.
      But if Item_copy_string::copy for blob isn't called before, 
      it's value will be wrong.
      
      So all the Item_copy_string::copy for blobs should be called before 
      Item_copy_string::copy for functions.
      
      
      mysql-test/r/having.result:
        added test case for
        Bug #4358 Problem with HAVING clause that uses
                    alias from the select list and TEXT field
      mysql-test/t/having.test:
        added test case for
        Bug #4358 Problem with HAVING clause that uses
                    alias from the select list and TEXT field
      sql/sql_select.cc:
        make setup_copy_fields to insert Item_copy_string for blobs in 
        the beginning of the copy_funcs (push_back instead of push_front)
        
        the thing is that Item_copy_string::copy for function can call 
        Item_copy_string::val_int for blob via Item_ref.
        But if Item_copy_string::copy for blob isn't called before, 
        it's value will be wrong.
        
        So all the Item_copy_string::copy for blobs should be called before 
        Item_copy_string::copy for functions.
        
        fixed 
        Bug #4358 Problem with HAVING clause that
                   uses alias from the select list and TEXT field
      7e5247aa
    • unknown's avatar
      olap.test, olap.result: · 090bc713
      unknown authored
        Added test case for bug #4767.
      item_sum.cc:
        Added a correct setting of the maybe_null flag for a copy of 
        an Item_sum object where the argument was a field of an inner table
        in an outer join read from a temporary table.
        It's part of the fix for bug #4767.
      sql_select.cc:
        Made change_refs_to_tmp_fields work correctly
        for test case of bug #4767 where Item_sum::get_tmp_table_item
        failed to build a correct copy of an Item_sum object referring
        to a field in a temporary table.
        It looks like a hack yet.
      
      
      sql/sql_select.cc:
        Made change_refs_to_tmp_fields work correctly
        for test case of bug #4767 where Item_sum::get_tmp_table_item
        failed to build a copy of an Item_sum object referring
        to a field in  a temporary table.
        It looks like a hack yet.
      sql/item_sum.cc:
        Added a correct setting of maybe_null flag for copy of a
        Item_sum object where there argument is a field of nullable table
        read from the temporary table.
        It's part of the fix for bug #4767.
      mysql-test/r/olap.result:
        Added test case for bug #4767.
      mysql-test/t/olap.test:
        Added test case for bug #4767.
      090bc713
  9. 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
  10. 09 Aug, 2004 1 commit
    • unknown's avatar
      bug#4497 - Serious regression if disk based TMP table is used. · 63ae5d0b
      unknown authored
      Solved performance problems by enabling write buffer.
      
      
      
      sql/sql_select.cc:
        bug#4497 - Serious regression if disk based TMP table is used.
        Solved performance problems by enabling write buffer.
        Supplied no test case, as it required too much data to see the performance regression.
      63ae5d0b
  11. 07 Aug, 2004 2 commits
    • unknown's avatar
      cleanup · 91f20a16
      unknown authored
      mysql-test/r/select_found.result:
        explain added
      mysql-test/t/select_found.test:
        cleanup. 5000-char long line removed :)
      sql/sql_select.cc:
        reverted
      91f20a16
    • unknown's avatar
      bug#4881 - crash in ALTER .. RENAME if rename fails · 978e1ba0
      unknown authored
      sql/sql_select.cc:
        typos in comments
        harmless (hopefully) bug in optimizer fixed
      978e1ba0
  12. 21 Jul, 2004 1 commit
    • unknown's avatar
      fixed ORDER BY ? · cb35648e
      unknown authored
      new tests to ensure that prepared statement *really* work
      (and that MySQL not picks up some number from arbitrary location
      that happens to match the parameter's value)
      
      
      mysql-test/include/ps_query.inc:
        new tests to ensure that prepared statement *really* work
        (and that MySQL not picks up some number from arbitrary location
        that happens to match the parameter's value)
      mysql-test/r/ps_2myisam.result:
        results updated
      mysql-test/r/ps_3innodb.result:
        results updated
      mysql-test/r/ps_4heap.result:
        results updated
      mysql-test/r/ps_5merge.result:
        results updated
      mysql-test/r/ps_6bdb.result:
        results updated
      sql/sql_select.cc:
        don't shortcut - it backfires!
        (in particular - when itemptr is Item_param :)
      cb35648e
  13. 08 Jul, 2004 1 commit
    • unknown's avatar
      New handler::index_flags() definition to make it easy to check the full used... · a23fbc06
      unknown authored
      New handler::index_flags() definition to make it easy to check the full used key and a specific key part.
      Added key part to optimize_range() to fix problems when using fields in key parts.
      
      
      
      sql/examples/ha_archive.h:
        New handler::index_flags() definition
      sql/examples/ha_example.h:
        New handler::index_flags() definition
      sql/field.cc:
        New optimize_range() definition
      sql/field.h:
        New optimize_range() definition
      sql/ha_berkeley.cc:
        New handler::index_flags() definition
      sql/ha_berkeley.h:
        New handler::index_flags() definition
      sql/ha_heap.h:
        New handler::index_flags() definition
      sql/ha_innodb.h:
        New handler::index_flags() definition
      sql/ha_isam.h:
        New handler::index_flags() definition
      sql/ha_isammrg.h:
        New handler::index_flags() definition
      sql/ha_myisam.h:
        New handler::index_flags() definition
      sql/ha_myisammrg.h:
        New handler::index_flags() definition
      sql/ha_ndbcluster.cc:
        New handler::index_flags() definition
      sql/ha_ndbcluster.h:
        New handler::index_flags() definition
      sql/handler.h:
        New handler::index_flags() definition
      sql/log.cc:
        Fixed compiler warnings
      sql/log_event.cc:
        Fixed compiler warnings (and renamed short variable name)
      sql/opt_range.cc:
        New handler::index_flags() definition
      sql/opt_sum.cc:
        New handler::index_flags() definition
      sql/set_var.cc:
        Removed compiler warnings
      sql/sql_db.cc:
        Removed compiler warnings
      sql/sql_select.cc:
        New handler::index_flags() definition
      sql/sql_show.cc:
        Removed compiler warnings
      sql/sql_update.cc:
        Removed compiler warnings
      sql/table.cc:
        New handler::index_flags() definition
      a23fbc06
  14. 30 Jun, 2004 1 commit
  15. 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
  16. 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
  17. 24 Jun, 2004 3 commits
  18. 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
  19. 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
  20. 21 Jun, 2004 2 commits
  21. 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
  22. 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
  23. 06 Jun, 2004 1 commit