1. 31 Aug, 2006 2 commits
    • unknown's avatar
      Fix im_instance_conf.imtest failure on AIX and HPUX. · f5e8d19f
      unknown authored
      The problem was in dummy grep on AIX and HPUX.
      
      The fix is to use more portable patterns.
      
      The patch is only for test suite
      (i.e. does not touch server codebase).
      
      
      mysql-test/r/im_instance_conf.result:
        Updated result file.
      mysql-test/t/disabled.def:
        Fix typo.
      mysql-test/t/im_instance_conf.imtest:
        Make grep-pattern aix/hpux-compatible.
      mysql-test/t/im_options.imtest:
        Make grep-pattern aix/hpux-compatible.
      mysql-test/t/im_options-im.opt:
        Speedup IM-tests.
      f5e8d19f
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1 · a418c8f5
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
      
      
      a418c8f5
  2. 30 Aug, 2006 2 commits
    • unknown's avatar
      Post-merge fixes. · 0ec1397d
      unknown authored
      
      mysql-test/lib/mtr_process.pl:
        Apply manually the merge from 5.0
      mysql-test/mysql-test-run.pl:
        Apply manually the merge from 5.0
      mysql-test/r/grant.result:
        A post-merge fix.
      mysql-test/r/im_cmd_line.result:
        A post-merge fix.
      mysql-test/r/im_instance_conf.result:
        A post-merge fix.
      mysql-test/r/sp.result:
        A post-merge fix.
      mysql-test/t/grant.test:
        A post-merge fix.
      mysql-test/t/im_cmd_line.imtest:
        A post-merge fix.
      mysql-test/t/im_instance_conf.imtest:
        A post-merge fix.
      sql/field.cc:
        A post-merge fix.
      sql/item_cmpfunc.cc:
        A post-merge fix.
      sql/sp_head.cc:
        A post-merge fix.
      sql/sp_head.h:
        A post-merge fix.
      0ec1397d
    • unknown's avatar
      Fix for bug #20907 · 62accb04
      unknown authored
      CMake versions > 2.4 allow linking to STATIC or SHARED libraries only.
      
      
      
      libmysql/CMakeLists.txt:
        Fix for Cmake BC problems (as suggested by Elliot)
      62accb04
  3. 29 Aug, 2006 7 commits
    • unknown's avatar
      Merge bodhi.local:/opt/local/work/mysql-5.0-runtime-safemerge · 5fab3969
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
      
      
      BitKeeper/deleted/.del-im_check_os.inc:
        Auto merged
      BitKeeper/deleted/.del-im_options_set.imtest~b53d9d60e5684833:
        Auto merged
      BitKeeper/deleted/.del-im_options_set.result~59278f56be61d921:
        Auto merged
      BitKeeper/deleted/.del-im_options_unset.imtest~768eb186b51d0048:
        Auto merged
      configure.in:
        Auto merged
      BitKeeper/deleted/.del-im_options_unset.result~20a4790cd3c70a4f:
        Auto merged
      include/mysql_com.h:
        Auto merged
      mysql-test/lib/mtr_io.pl:
        Auto merged
      mysql-test/r/im_daemon_life_cycle.result:
        Auto merged
      mysql-test/r/im_life_cycle.result:
        Auto merged
      mysql-test/r/im_utils.result:
        Auto merged
      mysql-test/r/sp-error.result:
        Auto merged
      mysql-test/r/trigger.result:
        Auto merged
      mysql-test/r/type_varchar.result:
        Auto merged
      mysql-test/r/view.result:
        Auto merged
      mysql-test/t/im_daemon_life_cycle.imtest:
        Auto merged
      mysql-test/t/im_life_cycle.imtest:
        Auto merged
      mysql-test/t/im_utils.imtest:
        Auto merged
      mysql-test/t/sp-error.test:
        Auto merged
      mysql-test/t/trigger.test:
        Auto merged
      mysql-test/t/type_varchar.test:
        Auto merged
      mysql-test/t/view.test:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_row.cc:
        Auto merged
      sql/item_strfunc.cc:
        Auto merged
      sql/item_strfunc.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/net_serv.cc:
        Auto merged
      sql/protocol.cc:
        Auto merged
      sql/sp_head.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_cache.cc:
        Auto merged
      sql/sql_cache.h:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_error.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_trigger.h:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Use local. Alik will merge his changes manually.
      mysql-test/lib/mtr_process.pl:
        Use local.
      mysql-test/r/grant.result:
        Use local.
      mysql-test/r/sp.result:
        Use local.
      mysql-test/r/ps.result:
        Manual merge.
      mysql-test/t/grant.test:
        Manual merge.
      mysql-test/t/ps.test:
        Manual merge.
      mysql-test/t/sp.test:
        Manual merge.
      sql/Makefile.am:
        Manual merge.
      sql/field.cc:
        Manual merge.
      sql/mysqld.cc:
        Manual merge.
      sql/share/errmsg.txt:
        Manual merge.
      sql/sp.cc:
        Manual merge.
      sql/sp_head.h:
        Manual merge.
      sql/sql_trigger.cc:
        Manual merge.
      sql/sql_view.cc:
        Manual merge.
      5fab3969
    • unknown's avatar
      A fix for Bug#14897 "ResultSet.getString("table.column") sometimes · 4355ea5a
      unknown authored
      doesn't find the column"
      
      When a user was using 4.1 tables with VARCHAR column and 5.0 server
      and a query that used a temporary table to resolve itself, the
      table metadata for the varchar column sent to client was incorrect:
      MYSQL_FIELD::table member was empty.
      
      The bug was caused by implicit "upgrade" from old VARCHAR to new
      VARCHAR hard-coded in Field::new_field, which did not preserve
      the information about the original table. Thus, the field metadata
      of the "upgraded" field pointed to an auxiliary temporary table
      created for query execution.
      
      The fix is to copy the pointer to the original table to the new field.
      
      
      mysql-test/r/type_varchar.result:
        Update test results (Bug#14897)
      mysql-test/t/type_varchar.test:
        Add a test case for Bug#14897 "ResultSet.getString("table.column") 
        sometimes doesn't find the column"
      sql/field.cc:
        Preserve the original table name when converting fields from 
        old VARCHAR to new VARCHAR.
      mysql-test/std_data/14897.frm:
        New BitKeeper file ``mysql-test/std_data/14897.frm''
      4355ea5a
    • unknown's avatar
      Merge lamia.home:/home/timka/mysql/src/5.0-bug-21456 · 2592d4a1
      unknown authored
      into  lamia.home:/home/timka/mysql/src/5.1-bug-21456
      
      
      mysql-test/r/distinct.result:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      2592d4a1
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0 · c923270f
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17591
      
      
      c923270f
    • unknown's avatar
      Preliminary patch for the following bugs: · 33294b1b
      unknown authored
        - BUG#15934: Instance manager fails to work;
        - BUG#18020: IM connect problem;
        - BUG#18027: IM: Server_ID differs;
        - BUG#18033: IM: Server_ID not reported;
        - BUG#21331: Instance Manager: Connect problems in tests;
      
      The only test suite has been changed
      (server codebase has not been modified).
      
      
      BitKeeper/deleted/.del-im_check_os.inc:
        Rename: mysql-test/include/im_check_os.inc -> BitKeeper/deleted/.del-im_check_os.inc
      mysql-test/include/im_check_env.inc:
        Include only this file from all IM-tests.
      mysql-test/lib/mtr_io.pl:
        Update mtr_get_pid_from_file() to workaround race,
        described in BUG#21884.
      mysql-test/lib/mtr_process.pl:
        Refactor im_start()/im_stop() so that they will be more
        reliable. There are the following user-visible changes:
          - if one of these functions fails, the test suite
            is aborted;
          - mtr_im_stop() now determines whether the component is
            alive or not not only by checking PID, but also by trying
            to connect to the component;
          - after starting IM, the test suite waits for it to start
            accepting client connections and to start all its guarded
            mysqld instances;
          - a lot of debug-logs have been added in order to simplify
            investigation of future failures.
      mysql-test/mysql-test-run.pl:
        1. Get rid of kill_and_cleanup();
        2. Move im_start()/im_stop() to mtr_process.pl;
        3. Change default IM port to 9311 so that it does not interfere
           with default slave port;
      mysql-test/r/im_daemon_life_cycle.result:
        Updated result file.
      mysql-test/r/im_life_cycle.result:
        Updated result file.
      mysql-test/r/im_options_set.result:
        Updated result file.
      mysql-test/r/im_options_unset.result:
        Updated result file.
      mysql-test/r/im_utils.result:
        Updated result file.
      mysql-test/t/im_daemon_life_cycle.imtest:
        Updated IM-test.
      mysql-test/t/im_life_cycle.imtest:
        Updated IM-test.
      mysql-test/t/im_options_set.imtest:
        Updated IM-test.
      mysql-test/t/im_options_unset.imtest:
        Updated IM-test.
      mysql-test/t/im_utils.imtest:
        Updated IM-test.
      33294b1b
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0 · b2d1f7a4
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17591
      
      
      mysql-test/r/view.result:
        Manual merge.
      mysql-test/t/view.test:
        Manual merge.
      b2d1f7a4
    • unknown's avatar
      BUG#17591: Updatable view not possible with trigger or stored function · 7a5a2544
      unknown authored
      When a view was used inside a trigger or a function, lock type for
      tables used in a view was always set to READ (thus making the view
      non-updatable), even if we were trying to update the view.
      
      The solution is to set lock type properly.
      
      
      mysql-test/r/view.result:
        Add result for bug#17591: Updatable view not possible with trigger
        or stored function.
      mysql-test/t/view.test:
        Add test case for bug#17591: Updatable view not possible with trigger
        or stored function.
      sql/sql_view.cc:
        Move the code that sets requested lock type before the point where
        we exit from mysql_make_view() when we process a placeholder for
        prelocked table.
      7a5a2544
  4. 25 Aug, 2006 9 commits
    • unknown's avatar
      Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1 · e454fb0c
      unknown authored
      into  zim.(none):/home/brian/mysql/arch-5.1
      
      
      BUILD/compile-alpha-cxx:
        Auto merged
      BUILD/compile-alpha-debug:
        Auto merged
      BUILD/compile-dist:
        Auto merged
      BUILD/compile-ia64-debug-max:
        Auto merged
      CMakeLists.txt:
        Auto merged
      client/mysql.cc:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/sql_plugin.cc:
        Auto merged
      storage/csv/ha_tina.cc:
        Auto merged
      BUILD/FINISH.sh:
        Innodbase config still needed.
      e454fb0c
    • unknown's avatar
      Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1-arch · 9f9c3364
      unknown authored
      into  zim.(none):/home/brian/mysql/arch-5.1
      
      
      sql/handler.cc:
        Auto merged
      9f9c3364
    • unknown's avatar
      Cleanup of unused variables. · ac11ba6c
      unknown authored
      Fixed "discover" in the handler API.
      
      Fixed problem where handlerton was not zero'ed. I need to look around, I suspect this problem is more widespread. 
      
      
      sql/ha_innodb.h:
        Unused variable
      sql/ha_ndbcluster.cc:
        Added "discover" to handlerton.
      sql/handler.cc:
        Added plugin loop and correctly now use handler API.
      sql/handler.h:
        Removed unused variable. Added discover to handler API
      sql/mysqld.cc:
        Removed unused variables.
      sql/sql_plugin.cc:
        Fixed DBUG Enter comment (obvious cut paste mistake)
      storage/csv/ha_tina.cc:
        Found that if we don't bzero handlerton, that things can go boom!
        
        This probably needs to be fixed for all handlers
      ac11ba6c
    • unknown's avatar
      Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · 3cd6015c
      unknown authored
      into  example.com:/work/mysql-5.0-runtime
      
      
      3cd6015c
    • unknown's avatar
      Fix for bug#21795: SP: sp_head::is_not_allowed_in_function() contains · 133d2aa5
      unknown authored
      erroneous check
      
      Problem: Actually there were two problems in the server code. The check
      for SQLCOM_FLUSH in SF/Triggers were not according to the existing
      architecture which uses sp_get_flags_for_command() from sp_head.cc .
      This function was also missing a check for SQLCOM_FLUSH which has a
      problem combined with prelocking. This changeset fixes both of these
      deficiencies as well as the erroneous check in
      sp_head::is_not_allowed_in_function() which was a copy&paste error.
      
      
      mysql-test/r/sp-error.result:
        update result
      mysql-test/r/trigger.result:
        update result
      mysql-test/t/sp-error.test:
        FLUSH can create a problem with prelocking, hence it's disabled.
        There is a better way to check this than a check in the parser.
        Now we use sp_get_flags_for_command() and the error returned is
        different.
      mysql-test/t/trigger.test:
        FLUSH can create a problem with prelocking, hence it's disabled.
        There is a better way to check this than a check in the parser.
        Now we use sp_get_flags_for_command() and the error returned is
        different.
      sql/sp_head.cc:
        FLUSH and RESET are not allowed inside a SF/Trigger.
        Because they don't imply a COMMIT sp_head::HAS_COMMIT_OR_ROLLBACK
        cannot be used. Two new flags were introduced for that reason.
      sql/sp_head.h:
        Don't check m_type as this check is erroneous. This is probably
        a copy and paste error when moving code from somewhere else. Another
        fact which supports this was prefixing the enum value with the name
        of class sp_head.
        
        Adding two new flags HAS_SQLCOM_RESET and HAS_SQLCOM_FLUSH. The values
        are 2048 and 4096 because in the 5.1 branch there are already new flags
        which are with values up-to 1024.
      sql/sql_parse.cc:
        FLUSH can cause a problem with prelocking in SF/Trigger and
        therefore is already disabled. RESET is also disabled because
        is handled by the same code as FLUSH. We won't allow RESET inside
        SF/Trigger at that stage without thorough analysis. The check for
        them is already done in the parser by calling
        is_not_allowed_in_function()
      sql/sql_yacc.yy:
        By listing SQLCOM_FLUSH as command which implies COMMIT
        in sp_get_flags_for_command() the check in sql_yacc.yy is
        obsolete.
      133d2aa5
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · 1b6d9589
      unknown authored
      into  alik.:/mnt/raid/alik/MySQL/devel/5.0-rt-bug16899
      
      
      1b6d9589
    • unknown's avatar
      6df61606
    • unknown's avatar
      Comment cleanup after push of bug#21166. · 5d37fce9
      unknown authored
      5d37fce9
    • unknown's avatar
      fix for windows build · cf9d738b
      unknown authored
      
      CMakeLists.txt:
        add for federated
      libmysqld/CMakeLists.txt:
        ha_heap.cc and ha_myisam.cc are removed
        add for federated
      sql/CMakeLists.txt:
        add for federated
      sql/handler.cc:
        fix for fussy compilers
      storage/heap/CMakeLists.txt:
        add ha_heap.cc
      storage/myisammrg/CMakeLists.txt:
        add ha_myisammrg.cc
      cf9d738b
  5. 24 Aug, 2006 5 commits
    • unknown's avatar
      Fix for bug#21416 SP: Recursion level higher than zero needed for non-recursive call · 807ecdf4
      unknown authored
      The following procedure was not possible if max_sp_recursion_depth is 0
      create procedure show_proc() show create procedure show_proc;
        
      Actually there is no recursive call but the limit is checked.
        
      Solved by temporarily increasing the thread's limit just before the fetch from cache
      and decreasing after that.
      
      
      mysql-test/r/sp.result:
        update result
      mysql-test/t/sp.test:
        Test for bug #21416 SP: Recursion level higher than zero needed for non-recursive call
      sql/sp.cc:
        Increase the max_sp_recursion_depth temporarily for SHOW CREATE PROCEDURE call.
        This call is in fact not recursive but is counted as such. Outcome, it will work
        always but if max_sp_recursion_depth is reached we are going to cache one more
        sp_head instance.
      807ecdf4
    • unknown's avatar
      Polishing (was the part of original patch for BUG#16899): · 2f0a610f
      unknown authored
      Changed trigger-handling code so that there will be the one
      place for generate statement string for replication log
      and for trigger file.
      
      
      sql/sql_trigger.cc:
        Changed trigger-handling code so that there will be the one
        place for generate statement string for replication log
        and for trigger file.
      sql/sql_trigger.h:
        Changed trigger-handling code so that there will be the one
        place for generate statement string for replication log
        and for trigger file.
      2f0a610f
    • unknown's avatar
      Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 43dbfa66
      unknown authored
      into  mysql.com:/home/cps/mysql/trees/mysql-5.1-virgin
      
      
      43dbfa66
    • unknown's avatar
      after merge fix · 8eeac5a7
      unknown authored
      8eeac5a7
    • unknown's avatar
      BUG#21166: Prepared statement causes signal 11 on second execution · 965a3970
      unknown authored
      Changes in an item tree done by optimizer weren't properly
      registered and went unnoticed, which resulted in preliminary freeing
      of used memory.
      
      
      mysql-test/r/ps.result:
        Add result for bug#21166: Prepared statement causes signal 11
        on second execution.
      mysql-test/t/ps.test:
        Add test case for bug#21166: Prepared statement causes signal 11
        on second execution.
      sql/item.cc:
        Move Item::transform() and Item_default_value::transform() from
        item.h here and use THD::change_item_tree() instead of plain
        assignment.
        Change Item_field::set_no_const_sub() to be used with Item::walk()
        instead of Item::transform().
      sql/item.h:
        Move definition of Item::transform() and Item_default_value::transform()
        to item.cc.
        Change Item::set_no_const_sub() to be used with Item::walk()
        instead of Item::transform().
      sql/item_cmpfunc.cc:
        Use Item::walk() to execute Item::set_no_const_sub().
        Use THD::change_item_tree() instead of plain assignment.
      sql/item_func.cc:
        Add assert and comment to Item_func::traverse_cond().
      sql/item_row.cc:
        Use THD::change_item_tree() instead of plain assignment.
      sql/item_strfunc.cc:
        Move Item_func_make_set::transform() from item_strfunc.h here and use
        THD::change_item_tree() instead of plain assignment.
      sql/item_strfunc.h:
        Move definition of Item_func_make_set::transform() to item_strfunc.cc.
      965a3970
  6. 23 Aug, 2006 10 commits
    • unknown's avatar
      This is a cleanup of warnings that windows is complaining about. · 4ec86b1c
      unknown authored
      
      client/mysql.cc:
        Windows warnings clean up
      server-tools/instance-manager/parse.cc:
        Cleanedup warning
      sql/field.cc:
        Removed unused variables
      sql/filesort.cc:
        Removed unused variables
      sql/ha_innodb.cc:
        Removed unused variables
      sql/ha_partition.cc:
        Fixing warning
      sql/partition_element.h:
        Fixing declaration for warnings
      4ec86b1c
    • unknown's avatar
      This patch removes need for a innodb to have its own configure. · fb47d658
      unknown authored
      
      BitKeeper/deleted/.del-configure.in:
        Delete: storage/innobase/configure.in
      BUILD/FINISH.sh:
        Removed work for Innodb's configure
      BUILD/autorun.sh:
        Removed pieces for Innodb's build
      storage/innobase/Makefile.am:
        Removed ib_config.h needs
      storage/innobase/include/Makefile.i:
        Expanded includes.
      storage/innobase/include/univ.i:
        Removed ib_config need
      storage/innobase/plug.in:
        Added support taken from configure.in for building Innodb
      fb47d658
    • unknown's avatar
      Fix for BUG#16899: Possible buffer overflow in handling of DEFINER-clause · f96ee72f
      unknown authored
        
      User name (host name) has limit on length. The server code relies on these
      limits when storing the names. The problem was that sometimes these limits
      were not checked properly, so that could lead to buffer overflow.
      
      The fix is to check length of user/host name in parser and if string is too
      long, throw an error.
      
      
      mysql-test/r/grant.result:
        Updated result file.
      mysql-test/r/sp.result:
        Updated result file.
      mysql-test/r/trigger.result:
        Updated result file.
      mysql-test/r/view.result:
        Updated result file.
      mysql-test/t/grant.test:
        Added test for BUG#16899.
      mysql-test/t/sp.test:
        Added test for BUG#16899.
      mysql-test/t/trigger.test:
        Added test for BUG#16899.
      mysql-test/t/view.test:
        Added test for BUG#16899.
      sql/mysql_priv.h:
        Added prototype for new function.
      sql/share/errmsg.txt:
        Added new resources.
      sql/sql_acl.cc:
        Remove outdated checks.
      sql/sql_parse.cc:
        Add a new function for checking string length.
      sql/sql_yacc.yy:
        Check length of user/host name.
      f96ee72f
    • unknown's avatar
      Merge lamia.home:/home/timka/mysql/src/4.1-bug-21456 · e3181c59
      unknown authored
      into  lamia.home:/home/timka/mysql/src/5.0-bug-21456
      
      
      mysql-test/r/distinct.result:
        Merge the fix for BUG#21456
      mysql-test/t/distinct.test:
        Merge the fix for BUG#21456
      sql/sql_select.cc:
        Merge the fix for BUG#21456
      e3181c59
    • unknown's avatar
      Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 9a770f53
      unknown authored
      into  example.com:/work/mysql-5.1-runtime
      
      
      9a770f53
    • unknown's avatar
      Fix for bug #20665 All commands supported in Stored Procedures · 7a37eeae
      unknown authored
      should work in Prepared Statements. Post-review changeset.
      
      Problem: There are some commands which are avaiable to be executed in SP
               but cannot be prepared. This patch fixes this and makes it possible
               prepare these statements.
      
      Changes: The commands later are made available in PS. RESET has been forbidden
               in SF/Trigger.
      
      Solution: All current server commands where checked and those missing (see later)
                we added. Tests for all of the commands with repeated executions were
                added - testing with SP, SF and PS.
      
      SHOW BINLOG EVENTS
      SHOW (MASTER | SLAVE) STATUS
      SHOW (MASTER | BINARY) LOGS
      SHOW (PROCEDURE | FUNCTION) CODE (parsable only in debug builds)
      SHOW CREATE (PROCEDURE | FUNCTION | EVENT | TABLE | VIEW)
      SHOW (AUTHORS | CONTRIBUTORS | WARNINGS | ERRORS)
      CHANGE MASTER
      RESET (MASTER | SLAVE | QUERY CACHE)
      SLAVE (START | STOP)
      CHECKSUM (TABLE | TABLES)
      INSTALL PLUGIN
      UNINSTALL PLUGIN
      CACHE INDEX
      LOAD INDEX INTO CACHE
      GRANT
      REVOKE
      KILL
      (CREATE | RENAME | DROP) DATABASE
      (CREATE | RENAME | DROP) USER
      FLUSH (TABLE | TABLES | TABLES WITH READ LOCK | HOSTS | PRIVILEGES |
             LOGS | STATUS | MASTER | SLAVE | DES_KEY_FILE | USER_RESOURCES)
      
      
      mysql-test/r/ps.result:
        update result
      mysql-test/r/ps_1general.result:
        update result
      mysql-test/r/ps_grant.result:
        update result
      mysql-test/r/sp-dynamic.result:
        update result
      mysql-test/t/ps.test:
        Add more statements, probably all currently missing which are possible in
        a SP but not preparable.
        Every statement is tested in a SP, in a SF and attempted to prepare.
      mysql-test/t/ps_1general.test:
        - Enable some of the statements, which are already possible in SP.
        - 1295 -> ER_UNSUPPORTED_PS
      mysql-test/t/ps_grant.test:
        Enable statements already possible in SP.
      sql/sp_head.cc:
        - Reorder to keep some alphabet order.
        - Add missing SHOW_SCHEDULER_STATUS.
      sql/sql_prepare.cc:
        Add possibility to prepare statements, which are already allowed in SP.
      7a37eeae
    • unknown's avatar
      Bug #21456: SELECT DISTINCT(x) produces incorrect results when using order by · 2baf2fdf
      unknown authored
      GROUP BY/DISTINCT pruning optimization must be done before ORDER BY 
      optimization because ORDER BY may be removed when GROUP BY/DISTINCT
      sorts as a side effect, e.g. in 
        SELECT DISTINCT <non-key-col>,<pk> FROM t1
        ORDER BY <non-key-col> DISTINCT
      must be removed before ORDER BY as if done the other way around
      it will remove both.
      
      
      mysql-test/r/distinct.result:
        Test for BUG#21456.
      mysql-test/t/distinct.test:
        Test for BUG#21456.
      sql/sql_select.cc:
        Bug #21456: SELECT DISTINCT(x) produces incorrect results when using order by
        
        GROUP BY/DISTINCT pruning optimization must be done before ORDER BY 
        optimization because ORDER BY may be removed when GROUP BY/DISTINCT
        sorts as a side effect.
      2baf2fdf
    • unknown's avatar
      Merge mysql.com:/home/cps/mysql/trees/mysql-5.0-virgin · d08dd523
      unknown authored
      into  mysql.com:/home/cps/mysql/trees/mysql-5.1-virgin
      
      
      storage/csv/ha_tina.cc:
        merge later
      mysql-test/r/csv.result:
        manual merge
      mysql-test/t/csv.test:
        manual merge
      d08dd523
    • unknown's avatar
      Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.1 · 118677a2
      unknown authored
      into  mysql.com:/home/cps/mysql/trees/mysql-5.1-virgin
      
      
      sql/mysql_priv.h:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      sql/sql_view.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      sql/table.h:
        Auto merged
      sql/handler.cc:
        manual merge
      118677a2
    • unknown's avatar
      Bug#8153 (Stored procedure with subquery and continue handler, wrong result) · 09e9b2f6
      unknown authored
      Implemented code review comments
      Test cleanup
      
      
      sql/protocol.cc:
        Bug#8153 (Stored procedure with subquery and continue handler, wrong result)
        
        Implemented code review comments
      09e9b2f6
  7. 22 Aug, 2006 5 commits
    • unknown's avatar
      This changest: · 977cd20a
      unknown authored
      Plugins now when compiled or not compiled work correctly with status variables. 
      Status variables from plugins now set their own names (removed bit where plugin name was pre-appended this broke Innodb and Cluster)
      A few Makefile cleanups. 
      
      
      sql/ha_innodb.cc:
        Cleanup to make status variables directly in engine
      sql/ha_ndbcluster.cc:
        Engine interface now has variables for status
      sql/handler.cc:
        handler now makes sure to init status variables
      sql/mysqld.cc:
        Removed status variable hacks
      sql/sql_delete.cc:
        Removed include file that was not required
      storage/myisam/Makefile.am:
        Cleaned up line lengths and addded additional include to not install.
      storage/myisam/ha_myisam.cc:
        Removed double plugin include
      977cd20a
    • unknown's avatar
      Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · 5e1039b2
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.0-8153
      
      
      mysql-test/r/sp.result:
        Auto merged
      mysql-test/t/sp.test:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      5e1039b2
    • unknown's avatar
      Update result file for "grant" to 5.1 version · a649c631
      unknown authored
      
      mysql-test/r/grant.result:
        Update result file format to 5.1 version
      a649c631
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0 · b5cbed72
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21051-2
      
      
      include/mysql_com.h:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      b5cbed72
    • unknown's avatar
      BUG#21051: RESET QUERY CACHE very slow when query_cache_type=0 · 877477f1
      unknown authored
      There were two problems: RESET QUERY CACHE took a long time to complete
      and other threads were blocked during this time.
      
      The patch does three things:
        1 fixes a bug with improper use of test-lock-test_again technique.
            AKA Double-Checked Locking is applicable here only in few places.
        2 Somewhat improves performance of RESET QUERY CACHE.
            Do my_hash_reset() instead of deleting elements one by one.  Note
            however that the slowdown also happens when inserting into sorted
            list of free blocks, should be rewritten using balanced tree.
        3 Makes RESET QUERY CACHE non-blocking.
            The patch adjusts the locking protocol of the query cache in the
            following way: it introduces a flag flush_in_progress, which is
            set when Query_cache::flush_cache() is in progress.  This call
            sets the flag on enter, and then releases the lock.  Every other
            call is able to acquire the lock, but does nothing if
            flush_in_progress is set (as if the query cache is disabled).
            The only exception is the concurrent calls to
            Query_cache::flush_cache(), that are blocked until the flush is
            over.  When leaving Query_cache::flush_cache(), the lock is
            acquired and the flag is reset, and one thread waiting on
            Query_cache::flush_cache() (if any) is notified that it may
            proceed.
      
      
      include/mysql_com.h:
        Add comment for NET::query_cache_query.
      sql/net_serv.cc:
        Use query_cache_init_query() for initialization of
        NET::query_cache_query if query cache is used.
        Do not access net->query_cache_query without a lock.
      sql/sql_cache.cc:
        Fix bug with accessing query_cache_size, Query_cache_query::wri and
        thd->net.query_cache_query before acquiring the lock---leave
        double-check locking only in safe places.
        Wherever we check that cache is usable (query_cache_size > 0) we now
        also check that flush_in_progress is false, i.e. we are not in the
        middle of cache flush.
        Add Query_cache::not_in_flush_or_wait() method and use it in
        Query_cache::flush_cache(), so that threads doing cache flush will
        wait it to finish, while other threads will bypass the cache as if
        it is disabled.
        Extract Query_cache::free_query_internal() from Query_cache::free_query(),
        which does not removes elements from the hash, and use it together with
        my_hash_reset() in Query_cache::flush_cache().
      sql/sql_cache.h:
        Add declarations for new members and methods.
        Make is_cacheable() a static method.
        Add query_cache_init_query() function.
      sql/sql_class.cc:
        Use query_cache_init_query() for initialization of
        NET::query_cache_query.
      877477f1