1. 05 Jun, 2005 1 commit
    • unknown's avatar
      Cleanup during review · b08b3a15
      unknown authored
      Simple optimization for 2 argument usage to function of variable arguments
      Fix stack overrun when using 1+1+1+1+1+1+1+....
      Update crash-me results for 5.0
      Don't call post_open if pre_open() fails (optimization)
      
      
      
      sql-bench/limits/mysql-4.1.cfg:
        Rename: sql-bench/limits/mysql.cfg -> sql-bench/limits/mysql-4.1.cfg
      libmysql/libmysql.c:
        More portable define
      mysql-test/mysql-test-run.sh:
        Write also InnoDB warnings to warnings.log
      mysql-test/t/type_newdecimal.test:
        Don't get errors if innodb is not defined
      mysys/my_alloc.c:
        Cleanup comments
      mysys/thr_lock.c:
        Cleanup comments
      sql/item.h:
        Remove not needed initializer
      sql/item_func.cc:
        Simple optimization for 2 argument usage to function of variable arguments
      sql/mysql_priv.h:
        We use more stackspace with the introduction of int_op() etc.
        This change ensures we don't run out of stack when doing 1+1+1+1...
        (Tested on x86, 32 bit)
      sql/sp_head.cc:
        Don't call post_open if pre_open() fails
      sql/sp_rcontext.cc:
        More comments
        Change so that post_open() doesn't have to be called if pre_open() fails
      sql/sql_parse.cc:
        Fold long lines
      sql/sql_select.cc:
        Simple reorganization to reduce number of if's
        Ensure that table_map is updated for where clause (fixed warning from valgrind)
      b08b3a15
  2. 01 Jun, 2005 1 commit
    • unknown's avatar
      Code cleanups during code reviews · 906b210a
      unknown authored
      Ensure we get error if INSERT IGNORE ... SELECT fails
      Fixed wrong key_part->key_length usage in index_merge
      
      
      client/mysql.cc:
        Code cleanups & simply optimizations
      mysql-test/r/information_schema.result:
        Safety
      mysql-test/t/information_schema.test:
        Safety
      sql/ha_ndbcluster.cc:
        Code cleanups
      sql/item.cc:
        Code cleanups
      sql/item_subselect.cc:
        Code cleanups
      sql/item_sum.cc:
        Code cleanups
      sql/opt_range.cc:
        Made get_index_only_read_time() static (instad of inline) to increase portability (function was not declared before use)
        Simple optimization
        Fixed wrong key_part->key_length usage in index_merge
        Removed not used variable n_used_covered
        Indentation fixes & comment cleanups
      sql/parse_file.cc:
        Code cleanups
      sql/sql_base.cc:
        Code cleanups
      sql/sql_bitmap.h:
        Added missing return
      sql/sql_insert.cc:
        Ensure we get error if INSERT IGNORE ... SELECT fails
      sql/sql_select.cc:
        Code cleanups
      sql/sql_show.cc:
        Safety fix if a LOT of errors are ignored
      sql/sql_update.cc:
        Code cleanups
      sql/table.cc:
        Code cleanups
      sql/table.h:
        Code cleanups
      sql/uniques.cc:
        Code cleanups
      strings/decimal.c:
        Simple optimization
        Code cleanups
      906b210a
  3. 31 May, 2005 8 commits
  4. 30 May, 2005 8 commits
    • unknown's avatar
      One more post-review fix. · d8cec2ab
      unknown authored
      d8cec2ab
    • unknown's avatar
      Fixed bug in multiple-table-delete where some rows was not deleted · e2285c54
      unknown authored
      
      mysql-test/r/delete.result:
        Test case for bug in multiple-table-delete where some rows was not deleted
      mysql-test/t/delete.test:
        Test case for bug in multiple-table-delete where some rows was not deleted
      sql/item_subselect.cc:
        Code cleanup
      sql/opt_range.cc:
        Code cleanup
      sql/sql_delete.cc:
        Fixed bug in multiple-table-delete where some rows was not deleted
        This happend when the first table-to-delete-from was not the the table that was scanned.
        Fixed this by only doing 'delete-on-the-fly' for the first table.
        Fixed also some wrong error handling in multi-table-delete
      e2285c54
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · b6b6c695
      unknown authored
      into mysql.com:/opt/local/work/mysql-5.0-7306-new
      
      
      sql/sql_delete.cc:
        Auto merged
      b6b6c695
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 5cdac990
      unknown authored
      into mysql.com:/opt/local/work/mysql-5.0-7306-new
      
      
      sql/item_subselect.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/opt_range.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_olap.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      5cdac990
    • unknown's avatar
      Preparatory (and the most problematic) patch for Bug#7306 · 78422442
      unknown authored
      "the server side preparedStatement error for LIMIT placeholder",
      which moves all uses of LIMIT clause from PREPARE to OPTIMIZE
      and later steps.
      After-review fixes.
      
      
      mysql-test/r/group_min_max.result:
        Test results fixed for EXPLAINs when using GROUP_MIN_MAX access plan.
      sql/item_subselect.cc:
        Move setting of the internal LIMIT used for IN/ALL/ANY/EXISTS 
        subqueries to one place: Item_exists_subselect::fix_length_and_dec().
        This implies that unit->select_limit_cnt is not set until the item is 
        fixed. This is OK, as now LIMIT values are not used until JOIN::optimize.
      sql/mysql_priv.h:
        setup_tables no longer needs a special flag for the case when
        it's called from JOIN::reinit() (we don't need to call setup_tables
        between two executions of a correlated subquery).
      sql/opt_range.cc:
        Fix a glitch in GROUP_MIN_MAX access plan: we should use table metadata,
        not field data, to evaluate max_used_key_length, which is then
        used for explain.
      sql/sp.cc:
        - setup_tables signature changed.
      sql/sql_base.cc:
        - setup_tables no longer needs a special mode for subqueries.
          Unused checks were removed.
      sql/sql_delete.cc:
        - setup_tables signature changed
      sql/sql_help.cc:
        - setup_tables signature changed
      sql/sql_insert.cc:
        - setup_tables signature changed
      sql/sql_lex.cc:
        Consolidate setting of internal LIMIT for IN/ALL/ANY/EXISTS subqeries
        in one place, and hence remove it from st_select_lex::test_limit().
      sql/sql_lex.h:
        Cleanup signature of st_select_lex_unit::init_prepare_fake_select_lex().
      sql/sql_load.cc:
        - setup_tables signature changed
      sql/sql_olap.cc:
        - setup_tables signature changed
      sql/sql_parse.cc:
        - st_select_lex_unit::set_limit() signature changed
      sql/sql_select.cc:
        Move setting of JOIN::select_limit from JOIN::prepare
        to JOIN::optimize. At prepare, limit is unknown yet.
        Remove excessive cleanups from JOIN::reinit which were overwriting
        join->join_tab[i]->table->used_keys. This fixes the bug which was triggered
        by the change in item_subselect.cc.
      sql/sql_union.cc:
        Class st_select_lex_unit was changed to avoid calls to 
         st_select_lex_unit::set_limit from places where it may be unknown.
        Now unit->select_limit_cnt is set at ::exec(). 
        st_select_lex_unit::init_prepare_fake_select_lex(): 
         - move out set_limit functionality
         - remove a few lines of dead code.
        st_select_lex_unit::prepare():
          - now we don't call set_limit at the time of prepare, so the value  
            of unit->select_limit_cnt may be unknown here. Use sl->select_limit
            instead.
        st_select_lex_unit::exec():
          - cleanup
          - call set_limit explicitly as it has been moved out of 
           init_prepare_fake_select_lex.
      sql/sql_update.cc:
        - setup_tables signature changed
      78422442
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 424fb61d
      unknown authored
      into mysql.com:/home/dlenev/src/mysql-5.0-ttdf
      
      
      424fb61d
    • unknown's avatar
      Added test for bug #5894 "Triggers with altered tables cause corrupt · 02425b7b
      unknown authored
      databases" and basic handling of errors which happen in triggers.
      (The bug itself was fixed by several previous patches).
      Fixed bug in multi-delete which were exposed by these tests.
      
      
      mysql-test/r/trigger.result:
        Added test for bug #5894 "Triggers with altered tables cause corrupt
        databases" and basic handling of errors which happen in triggers.
      mysql-test/t/trigger.test:
        Added test for bug #5894 "Triggers with altered tables cause corrupt
        databases" and basic handling of errors which happen in triggers.
      sql/sql_delete.cc:
        multi_delete::send_eof():
          Fixed bug which were exposed by testing of basic handling of errors
          in triggers. Error which happened in multi_delete::do_deletes() 
          was wiped out by thd->clear_error() and thus never sent to client
          (and this stalled client connection).
      02425b7b
    • unknown's avatar
      Merge mysql.com:/usr/local/bk/mysql-5.0 · 4701bd90
      unknown authored
      into mysql.com:/home/pem/work/mysql-5.0
      
      
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_subselect.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/sp_head.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      4701bd90
  5. 29 May, 2005 2 commits
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0 · 1c7b61e3
      unknown authored
      into  moonbone.local:/work/mysql-5.0-bug-9593
      
      
      sql/sql_select.cc:
        Auto merged
      1c7b61e3
    • unknown's avatar
      Fix bug #9593 "The combination of COUNT, DISTINCT and CONCAT seems to lock the · 73c46d05
      unknown authored
      server"
      Bug appears only on Windows platform. Freeing memory in 
      TMP_TABLE_PARAM::cleanup() allocated by new Copy_fields[0] in 
      setup_copy_fields() results in memory destruction. In test IF used instead 
      of CONCAT because IF have more stable crash.
      
      
      
      sql/sql_select.cc:
        Fix bug #9593 The combination of COUNT, DISTINCT and CONCAT seems to lock the server
      mysql-test/t/count_distinct.test:
        test for bug #9593 The combination of COUNT, DISTINCT and CONCAT seems to lock the server
      mysql-test/r/count_distinct.result:
        Test for bug #9593 The combination of COUNT, DISTINCT and CONCAT seems to lock the server
      73c46d05
  6. 28 May, 2005 2 commits
  7. 27 May, 2005 18 commits
    • unknown's avatar
      merged · 260bfaca
      unknown authored
      
      innobase/row/row0mysql.c:
        Auto merged
      sql/hash_filo.h:
        Auto merged
      260bfaca
    • unknown's avatar
      Comment and test changes per review request by Timour. All tests pass on production with this code. · 63d9bd0c
      unknown authored
      
      mysql-test/r/federated.result:
        added explain results to join test results per Timour's request.
      mysql-test/t/federated.test:
        Added explain to test per Timour's request
      sql/ha_federated.cc:
        better comment to explain why we need table->status set to 0
      63d9bd0c
    • unknown's avatar
      - fixed the "test-force" target in the toplevel Makefile.am for systems on which · b4859c59
      unknown authored
        "." is not in the PATH...
      
      
      Makefile.am:
        - fixed the "test-force" target for systems on which "." is not in the PATH...
      b4859c59
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 1bf54d09
      unknown authored
      into neptunus.(none):/home/msvensson/mysql/mysql-5.0
      
      
      sql/sql_parse.cc:
        Auto merged
      1bf54d09
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/bug9993 · 7e0107d4
      unknown authored
      into neptunus.(none):/home/msvensson/mysql/mysql-5.0
      
      
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      7e0107d4
    • unknown's avatar
      Fixed BUG#8409: Stored procedure crash if function contains FLUSH · 166accff
      unknown authored
        by simply disabling FLUSH for stored functions. (I can't really work.)
      
      
      mysql-test/r/sp-error.result:
        New test case for BUG#8409.
      mysql-test/t/sp-error.test:
        New test case for BUG#8409.
      sql/sql_yacc.yy:
        Disable FLUSH for stored functions.
      166accff
    • unknown's avatar
      ha_innodb.cc: · 32de310a
      unknown authored
        Check in Jan's fix to bug #10746 and also add a note to ::start_stmt() that stored procs in 5.0 call it
      
      
      sql/ha_innodb.cc:
        Check in Jan's fix to bug #10746 and also add a note to ::start_stmt() that stored procs in 5.0 call it
      32de310a
    • unknown's avatar
      Fix for bug #9992: mysql_next_result hangs on error · 8264f9bd
      unknown authored
          set net->no_send_error to 0 before execution of each element of
          multiquery statement to provide the sending of error to client
      
      
      tests/mysql_client_test.c:
        Fix for bug #9992: mysql_next_result hangs on error
            test case
      8264f9bd
    • unknown's avatar
      Fixed BUG#9559: Functions: Numeric Operations using -ve value gives incorrect · d5f4c14b
      unknown authored
                        results.
        Actually a problem when converting decimal to int for user variables.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#9559.
      mysql-test/t/sp.test:
        New test case for BUG#9559.
      sql/item_func.cc:
        Don't set the unsigned flag when converting decimal user var to int.
      d5f4c14b
    • unknown's avatar
    • unknown's avatar
      Merge serg@bk-internal.mysql.com:/home/bk/mysql-4.1/ · 8dcb03f7
      unknown authored
      into serg.mylan:/usr/home/serg/Abk/mysql-4.1
      
      
      sql/ha_innodb.cc:
        Auto merged
      8dcb03f7
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · a985031a
      unknown authored
      into mysql.com:/home/dlenev/src/mysql-5.0-ttdf
      
      
      sql/sp_head.cc:
        Auto merged
      sql/sp_head.h:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      a985031a
    • unknown's avatar
      360d1cd0
    • unknown's avatar
      Fix for trigger.test failure in --debug mode. · d51a5bae
      unknown authored
      We can't have Item_trigger_field as aggregated object inside of
      sp_instr_set_trigger_field class since in this case its destructor
      will be called twice. So instead let us create this Item separately
      and store pointer to it in instruction object.
      
      
      sql/sp_head.cc:
        sp_instr_set_trigger_field:
          We can't have Item_trigger_field as aggregated object since in this
          case its destructor will be called twice, so let us store pointer
          to this Item (Another way to avoid this is to exclude this Item
          from free_list but this can't be done in elegant way in 5.0 and
          will also cause additional problems with Item::cleanup()).
      sql/sp_head.h:
        sp_instr_set_trigger_field:
          We can't have Item_trigger_field as aggregated object since in this
          case its destructor will be called twice, so let us store pointer
          to this Item (Another way to avoid this is to exclude this Item
          from free_list but this can't be done in elegant way in 5.0 and
          will also cause additional problems with Item::cleanup()).
      sql/sql_yacc.yy:
        We can't have Item_trigger_field as aggregated object inside of
        sp_instr_set_trigger_field class since in this case its destructor
        will be called twice. So instead let us create this Item separately
        and store pointer to it in instruction object.
      d51a5bae
    • unknown's avatar
      Add USE_PRAGMA_INTERFACE and USE_PRAGMA_IMPLEMENTATION to files not existsing in 4.1 · 73b4415c
      unknown authored
      
      sql/hash_filo.h:
        USE_PRAGMA_INTERFACE
      sql/sp_cache.cc:
        USE_PRAGMA_IMPLEMENTATION
      sql/sp_cache.h:
        USE_PRAGMA_INTERFACE
      sql/sp_head.cc:
        USE_PRAGMA_IMPLEMENTATION
      sql/sp_head.h:
        USE_PRAGMA_INTERFACE
      sql/sp_pcontext.cc:
        USE_PRAGMA_IMPLEMENTATION
      sql/sp_pcontext.h:
        USE_PRAGMA_INTERFACE
      sql/sp_rcontext.cc:
        USE_PRAGMA_IMPLEMENTATION
      sql/sp_rcontext.h:
        USE_PRAGMA_INTERFACE
      73b4415c
    • unknown's avatar
      Fix rpl_log and rpl_rotate_logs test result · c31094fa
      unknown authored
       - Remove the expected warrnings when "show binary logs" are called on zero size binary log files. 
      
      
      mysql-test/r/rpl_log.result:
        Remove the warnings that is no longer displayed when "show binary logs" is called on zero size log files. 
        Checked against 4.0, no warnings there.
      mysql-test/r/rpl_rotate_logs.result:
        Remove the warnings that is no longer displayed when "show binary logs" is called on zero size log files. 
        Checked against 4.0, no warnings there.
      c31094fa
    • unknown's avatar
      Merge mysql.com:/usr/local/bk/mysql-5.0 · 03787cce
      unknown authored
      into mysql.com:/home/pem/work/mysql-5.0
      
      
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      03787cce
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 9c25429c
      unknown authored
      into neptunus.(none):/home/msvensson/mysql/mysql-5.0
      
      
      9c25429c