An error occurred fetching the project authors.
  1. 16 Apr, 2006 1 commit
    • unknown's avatar
      WL 2826: Error handling of ALTER TABLE for partitioning · 9a40c5bf
      unknown authored
      After review changes
      
      
      mysql-test/r/ndb_partition_key.result:
        Fixed result file
      sql/ha_ndbcluster.cc:
        Fixed interface to create_handler_files
      sql/ha_ndbcluster.h:
        Fixed interface to create_handler_files
      sql/ha_partition.cc:
        Fixed interface to create_handler_files and made it two-stage for rename
        Removed print_error and now it's used by MySQL Server parts instead
      sql/ha_partition.h:
        Fixed interface to create_handler_files
      sql/mysql_priv.h:
        Fixed error injects
        Externalised Global DDL log mutex
        Some interface changes
      sql/mysqld.cc:
        Moved close of DDL log until all user threads been closed
      sql/sql_base.cc:
        Interface changes
      sql/sql_partition.cc:
        Moved print_error to mysql server part
      sql/sql_table.cc:
        Lots of after review changes
      sql/table.cc:
        Fixed upgrade code
      9a40c5bf
  2. 03 Apr, 2006 1 commit
  3. 01 Apr, 2006 1 commit
  4. 29 Mar, 2006 1 commit
    • unknown's avatar
      Fixed compiler and valgrind warnings · 59eaf292
      unknown authored
      Added missing DBUG_xxx_RETURN statements
      Fixed some usage of not initialized variables (as found by valgrind)
      Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called.
      This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names()
      This will allow Tomas to continue with his work to use namelocks to syncronize things.
      
      Note: valgrind still produces a lot of warnings about using not initialized code and shows memory loss errors when running the ndb tests
      
      
      BitKeeper/etc/ignore:
        added mysql-test/r/*.log
      client/mysqltest.c:
        Change type of variables to get rid of compiler warnings
        More debugging
        Fix memory leak
      mysql-test/mysql-test-run.sh:
        Collect warnings about missing DBUG_RETURN statements
      mysql-test/r/lock_multi.result:
        Add test of new code
      mysql-test/r/ndb_condition_pushdown.result:
        Drop used tables before test
      mysql-test/t/lock_multi.test:
        Add test of new code
      mysql-test/t/ndb_condition_pushdown.test:
        Drop used tables before test
      mysql-test/valgrind.supp:
        Ignore 'safe' warnings from libz (when used with archive)
      sql/event.cc:
        More comments
        Simplify code
        Fixed memory leak found by valgrind
      sql/ha_archive.cc:
        Remove compiler warnings (Wrong handlerton structure and signed/unsigned comparison)
      sql/ha_berkeley.cc:
        Fixed compiler warning
      sql/ha_blackhole.cc:
        Fixed compiler warning
      sql/ha_federated.cc:
        Fixed compiler warning
      sql/ha_heap.cc:
        Fixed compiler warning
      sql/ha_myisam.cc:
        Fixed compiler warning
      sql/ha_myisammrg.cc:
        Fixed compiler warning
      sql/ha_ndbcluster.cc:
        Fixed compiler warnings
      sql/ha_partition.cc:
        Fixed compiler warning
        Fixed error noticed by valgrind in ha_partition::rnd_init()
      sql/handler.cc:
        Fixed compiler warning
      sql/handler.h:
        Fixed compiler warning
      sql/item.cc:
        Fixed compiler warning
      sql/item_xmlfunc.cc:
        Fixed warning from valgrind when calling memcpy with wrong address
      sql/lock.cc:
        More debugging
      sql/log.cc:
        Fixed compiler warning
        Indentation fixes
      sql/log.h:
        Fixed compiler warning
      sql/mysql_priv.h:
        Changed prototype for 'drop_locked_tables'
      sql/opt_range.cc:
        Indentation fix
      sql/password.c:
        Removed compiler warnings
      sql/set_var.cc:
        Fixed compiler warning
      sql/slave.cc:
        Fixed compiler warning
      sql/sp_head.cc:
        Fixed compiler warning
      sql/sql_acl.cc:
        Fixed compiler warning
      sql/sql_analyse.cc:
        Added missing DBUG_RETURN statements
      sql/sql_base.cc:
        Removed de-reference of not initialized pointer
        More comments
        drop_locked_tables() changed to not delete tables used for name locking
        Fixed compiler warnings
      sql/sql_delete.cc:
        Fixed usage of not initialized variable
        (deleted could be referenced in some not common error conditions)
      sql/sql_parse.cc:
        Added missing DBUG_VOID_RETURN
        Simplify code
      sql/sql_partition.cc:
        Fixed usage of wrong variable (noticed by valgrind)
      sql/sql_plugin.cc:
        Removed compiler warning
      sql/sql_show.cc:
        Removed compiler warning
      sql/sql_table.cc:
        Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called.
        This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names()
        This will allow Tomas to continue with his work to use namelocks to syncronize things.
        
        Fixed wrong test of 'table_type' (path_length could otherwise be accessed uninitialized)
        
        Remove compile warnings about not initialized variables.
      sql/sql_yacc.yy:
        Ensure that no_write_to_binlog is properly initialized
        (Was accessed uninitialized by partition code)
      sql/table.cc:
        Removed valgrind warnings (not fatal)
        Removed compiler warnings
      sql/tztime.cc:
        Removed valgrind warning
      storage/ndb/include/ndbapi/NdbIndexStat.hpp:
        Removed compiler warning
      59eaf292
  5. 24 Mar, 2006 1 commit
    • unknown's avatar
      WL 2826: Error handling of ALTER TABLE for partitioning · 3928d962
      unknown authored
      Loads of review comments fixed
      inactivate => deactivate
      table log => ddl log
      Commented on Error Inject Module added
      Put various #defines into enums
      Fixed abort_and_upgrade_lock, removed unnecessary parameter
      Fixed mysqlish method intro's
      Fixed warning statements
      5.1.7 was released still with partition states in clear text
      
      Fixed io_size bug
      Fixed bug in open that TRUNCATED before reading :)
      file_entry => file_entry_buf
      Don't open DDL log until first write call to DDL log
      handler_type => handler_name
      no => num
      
      
      
      sql/ha_partition.cc:
        Loads of review comments fixed
        inactivate => deactivate
        table log => ddl log
      sql/mysql_priv.h:
        Loads of review comments fixed
        inactivate => deactivate
        table log => ddl log
        Commented on Error Inject Module added
        Put various #defines into enums
        Fixed abort_and_upgrade_lock, removed unnecessary parameter
      sql/mysqld.cc:
        Loads of review comments fixed
        inactivate => deactivate
        table log => ddl log
        Commented on Error Inject Module added
        Put various #defines into enums
        Fixed abort_and_upgrade_lock, removed unnecessary parameter
      sql/partition_element.h:
        Loads of review comments fixed
        inactivate => deactivate
        table log => ddl log
        Commented on Error Inject Module added
        Put various #defines into enums
        Fixed abort_and_upgrade_lock, removed unnecessary parameter
      sql/partition_info.h:
        Loads of review comments fixed
        inactivate => deactivate
        table log => ddl log
        Commented on Error Inject Module added
        Put various #defines into enums
        Fixed abort_and_upgrade_lock, removed unnecessary parameter
      sql/share/errmsg.txt:
        Loads of review comments fixed
        inactivate => deactivate
        table log => ddl log
        Commented on Error Inject Module added
        Put various #defines into enums
        Fixed abort_and_upgrade_lock, removed unnecessary parameter
      sql/sql_base.cc:
        Loads of review comments fixed
        inactivate => deactivate
        table log => ddl log
        Commented on Error Inject Module added
        Put various #defines into enums
        Fixed abort_and_upgrade_lock, removed unnecessary parameter
      sql/sql_partition.cc:
        Loads of review comments fixed
        inactivate => deactivate
        table log => ddl log
        Commented on Error Inject Module added
        Put various #defines into enums
        Fixed abort_and_upgrade_lock, removed unnecessary parameter
        Fixed mysqlish method intro's
        Fixed warning statements
      sql/sql_table.cc:
        Loads of review comments fixed
        inactivate => deactivate
        table log => ddl log
        Commented on Error Inject Module added
        Put various #defines into enums
        Fixed abort_and_upgrade_lock, removed unnecessary parameter
        Fixed mysqlish method intro's
        Fixed warning statements
        Fixed io_size bug
        Fixed bug in open that TRUNCATED before reading :)
        file_entry => file_entry_buf
        Don't open DDL log until first write call to DDL log
        handler_type => handler_name
        no => num
      sql/table.cc:
        Loads of review comments fixed
        inactivate => deactivate
        table log => ddl log
        Commented on Error Inject Module added
        Put various #defines into enums
        Fixed abort_and_upgrade_lock, removed unnecessary parameter
        Fixed mysqlish method intro's
        Fixed warning statements
        5.1.7 was released still with partition states in clear text
        
        Fixed io_size bug
        Fixed bug in open that TRUNCATED before reading :)
        file_entry => file_entry_buf
        Don't open DDL log until first write call to DDL log
        handler_type => handler_name
        no => num
      3928d962
  6. 21 Mar, 2006 2 commits
    • unknown's avatar
      BUG#18293 (Values in stored procedures written to binlog unescaped): · 83ba974a
      unknown authored
      Generating character set-independent quoting of strings for the
      binary log when executing statements from inside stored procedure.
      
      
      mysql-test/r/ctype_cp932_binlog.result:
        Result change
      mysql-test/t/ctype_cp932_binlog.test:
        Adding check that string literals are written correctly for multi-byte
        character sets.
      sql/item.cc:
        Cutting out character set-independent string escaping code and putting it
        in a separate function.
      sql/log_event.cc:
        Adding characters set-independent code to separate function.
      sql/mysql_priv.h:
        Adding new function.
      sql/sp_head.cc:
        Escaping string value representing a string item.
      83ba974a
    • unknown's avatar
      Bug#11835 CREATE FUNCTION crashes server · ae7974b1
      unknown authored
       - Update for 5.1
       - Add "have_dlopen"
       - Remove requirement to load udf's only in "opt_plugin_dir" 
      
      
      include/my_global.h:
        Remove duplicate defines
      mysql-test/include/have_udf.inc:
        Use "have_dlopen" to check if we "have udf"
      mysql-test/r/have_udf.require:
        Use "have_dlopen" to check if we "have udf"
      mysql-test/r/udf.result:
        Update for new error message "function"->"symbol"
      sql/item_func.cc:
        Remove "evil" dbug printour that checks args[0] even if arg_count is 0
      sql/mysql_priv.h:
        Add "have_dlopen"
      sql/mysqld.cc:
        Add "have_dlopen"
        Move HAVE_DLOPEN defined to only surround "udf_free" and "udf_init"
      sql/set_var.cc:
        Add "have_dlopen"
      sql/sql_plugin.cc:
        Surround 'dlclose' with HAVE_DLOPEN
      sql/sql_udf.cc:
        Remove the requirement to load udf's only from "opt_plugin_dir".
        Fix spelling error
      ae7974b1
  7. 16 Mar, 2006 1 commit
    • unknown's avatar
      Bug#14575 · 78e37021
      unknown authored
        ¨MySQL server crashes if you try to access to InnoDB table¨
        crash caused by schizophrenic mysqld - 2 memory locations for logically same function
        with conflicting values.
        Fixed by backporting from 5.1 changes to have_xyz_db declarations.
      
      
      sql/mysql_priv.h:
        Backport have_xyz_db changes from 5.1
      sql/mysqld.cc:
        Backport have_xyz_db changes from 5.1
      78e37021
  8. 10 Mar, 2006 1 commit
    • unknown's avatar
      This patch does 1) fix my build breakage 2) Complete the removal of all... · 01d69c4b
      unknown authored
      This patch does 1) fix my build breakage  2) Complete the removal of all symbols which could clash with another parser. 
      
      
      sql/mysql_priv.h:
        Porting update
      sql/mysqld.cc:
        Porting update
      sql/sp.cc:
        Porting update
      sql/sql_lex.cc:
        Porting update
      sql/sql_lex.h:
        Porting update
      sql/sql_parse.cc:
        Porting update
      sql/sql_prepare.cc:
        Portinng update
      sql/sql_trigger.cc:
        Porting update
      sql/sql_view.cc:
        Porting update
      01d69c4b
  9. 04 Mar, 2006 1 commit
    • unknown's avatar
      Remove unused thd->options's flag -- OPTION_UPDATE_LOG · 422d11c2
      unknown authored
      The update log itself was removed back in 5.0. Recommit
      with post-review fixes.
      
      
      sql/log.cc:
        OPTION_UPDATE_LOG was set in all threads but replication ones.
        So, it seems that the check filtered out slow log records from
        replication threads. Now we do it with explicit check.
      sql/mysql_priv.h:
        remove unused define
      sql/mysqld.cc:
        Do not set OPTION_UPDATE_LOG. It is not used anymore.
      sql/set_var.cc:
        We never check for OPTION_UPDATE_LOG. So, we should not bother setting it.
      422d11c2
  10. 02 Mar, 2006 1 commit
    • unknown's avatar
      Fix for BUG#16777: Can not create trigger nor view w/o definer · fad27ebf
      unknown authored
      if --skip-grant-tables specified.
      
      The problem is that there is a check that prevents creating a definer
      with empty host name.
      
      In --skip-grant-tables mode this check prevents the user from creating a
      trigger/view without explicitly specifying its definer. This happens, because
      in --skip-grant-tables mode CURRENT_USER is ''@''. According to Sanja this
      check was implemented intentionally.
      
      However, according to the MySQL manual it is possible to specify empty host
      name (as well as empty user name). Moreover, the behaviour for stored routines
      is different in this aspect -- we allow them to be created with implicit
      definer.
      
      Based on this, we believe it is OK to change the behaviour for views to be
      similar with the behaviour for stored routines.
      
      
      mysql-test/r/skip_grants.result:
        Added a test case for BUG#16777.
      mysql-test/t/skip_grants.test:
        Added a test case for BUG#16777.
      sql/mysql_priv.h:
        Do not check that strlen(host) > 0 in get_default_definer().
      sql/sql_parse.cc:
        Do not check that strlen(host) > 0 in get_default_definer().
      sql/sql_view.cc:
        Do not check that strlen(host) > 0 in get_default_definer().
      fad27ebf
  11. 01 Mar, 2006 2 commits
    • unknown's avatar
      for every deprecated feature say when it will be removed. · a28368f2
      unknown authored
      restore CREATE TABLE ... TYPE=engine until 5.2
      
      
      a28368f2
    • unknown's avatar
      Fix for BUG#16266: Definer is not fully qualified error during replication. · a44a924a
      unknown authored
      The idea of the fix is to extend support of non-SUID triggers for backward
      compatibility. Formerly non-SUID triggers were appeared when "new" server
      is being started against "old" database. Now, they are also created when
      "new" slave receives updates from "old" master.
      
      
      mysql-test/r/rpl_trigger.result:
        Updated the result file with the results of the test for BUG#16266.
      mysql-test/t/rpl_trigger.test:
        Added the test case for BUG#16266.
      sql/mysql_priv.h:
        Added an utility operation to be used from sql_yacc.yy.
      sql/sql_parse.cc:
        Add a utility operation to be used from sql_yacc.yy.
      sql/sql_trigger.cc:
        Extend support of non-SUID triggers.
      sql/sql_view.cc:
        Initialize LEX::definer if DEFINER-clause is missing.
      sql/sql_yacc.yy:
        Extended support of non-SUID triggers.
      mysql-test/std_data/bug16266.000001:
        A new binlog file for testing a patch for BUG#16266.
      a44a924a
  12. 25 Feb, 2006 2 commits
    • unknown's avatar
      WL#2977 and WL#2712 global and session-level variable to set the binlog format (row/statement), · 7cac0ddf
      unknown authored
      and new binlog format called "mixed" (which is statement-based except if only row-based is correct,
      in this cset it means if UDF or UUID is used; more cases could be added in later 5.1 release):
      SET GLOBAL|SESSION BINLOG_FORMAT=row|statement|mixed|default;
      the global default is statement unless cluster is enabled (then it's row) as in 5.1-alpha.
      It's not possible to use SET on this variable if a session is currently in row-based mode and has open temporary tables (because CREATE
      TEMPORARY TABLE was not binlogged so temp table is not known on slave),  or if NDB is enabled (because
      NDB does not support such change on-the-fly, though it will later), of if in a stored function (see below).
      The added tests test the possibility or impossibility to SET, their effects, and the mixed mode,
      including in prepared statements and in stored procedures and functions.
      Caveats:
      a) The mixed mode will not work for stored functions: in mixed mode, a stored function will
      always be binlogged as one call and in a statement-based way (e.g. INSERT VALUES(myfunc()) or SELECT myfunc()).
      b) for the same reason, changing the thread's binlog format inside a stored function is
      refused with an error message.
      c) the same problems apply to triggers; implementing b) for triggers will be done later (will ask
      Dmitri).
      Additionally, as the binlog format is now changeable by each user for his session, I remove the implication
      which was done at startup, where row-based automatically set log-bin-trust-routine-creators to 1
      (not possible anymore as a user can now switch to stmt-based and do nasty things again), and automatically
      set --innodb-locks-unsafe-for-binlog to 1 (was anyway theoretically incorrect as it disabled
      phantom protection).
      Plus fixes for compiler warnings.
      
      
      mysql-test/r/rpl_row_4_bytes.result:
        update
      mysql-test/t/rpl_row_4_bytes.test:
        don't influence next tests
      sql/ha_archive.cc:
        please pay attention to this structure when you change it...
      sql/ha_berkeley.cc:
        please pay attention to this structure when you change it...
      sql/ha_blackhole.cc:
        please pay attention to this structure when you change it...
      sql/ha_federated.cc:
        please pay attention to this structure when you change it...
      sql/ha_heap.cc:
        please pay attention to this structure when you change it...
      sql/ha_innodb.cc:
        please pay attention to this structure when you change it...
      sql/ha_myisam.cc:
        please pay attention to this structure when you change it...
      sql/ha_myisammrg.cc:
        please pay attention to this structure when you change it...
      sql/ha_ndbcluster_binlog.cc:
        no more global 'binlog_row_based'
      sql/ha_partition.cc:
        please pay attention to this structure when you change it...
      sql/handler.cc:
        please pay attention to this structure when you change it...
      sql/handler.h:
        it's good to initialize statically (to get no compiler warning) even if to a null value.
      sql/item_func.cc:
        UDFs require row-based if this is the "mixed" binlog format.
      sql/item_strfunc.cc:
        UUID() requires row-based binlogging if this is the "mixed" binlog format
      sql/log.cc:
        binlog_row_based -> thd->current_stmt_binlog_row_based
      sql/log.h:
        the enum enum_binlog_format moves to log.h from mysqld.cc as we need it in several places.
      sql/log_event.cc:
        binlog_row_based -> thd->current_stmt_binlog_row_based
      sql/log_event.h:
        this global variable not used anymore
      sql/mysql_priv.h:
        these global variables not used anymore
      sql/mysqld.cc:
        simplification in the handling of --binlog-format (but with no user-visible change), thanks to
        the new global system variable.
        RBR does not anymore turn on --log-bin-trust-function-creators and --innodb-locks-unsafe-for-binlog
        as these are global options and RBR is now settable per session.
      sql/partition_info.cc:
        compiler warnings
      sql/set_var.cc:
        new class of thread's variable, to handle the binlog_format (like sys_var_thd_enum except
        that is_readonly() is overriden for more checks before update).
        compiler warnings (ok'd by Serg)
      sql/set_var.h:
        new class for the thread's binlog_format (see set_var.cc)
      sql/share/errmsg.txt:
        some messages for when one can't toggle from one binlog format to another
      sql/sp_head.cc:
        binlog_row_based -> thd->current_stmt_binlog_row_based
      sql/sql_base.cc:
        binlog_row_based -> thd->current_stmt_binlog_row_based
      sql/sql_class.cc:
        When a THD is initialized, we set its current_stmt_binlog_row_based
      sql/sql_class.h:
        new THD::variables.binlog_format (the value of the session variable set by SET
        or inherited from the global value), and THD::current_stmt_binlog_row_based which tells if the
        current statement does row-based or statement-based binlogging. Both members are needed
        as the 2nd one cannot be derived only from the first one (the statement's type plays a role too),
        and the 1st one is needed to reset the 2nd one.
      sql/sql_delete.cc:
        binlog_row_based -> thd->current_stmt_binlog_row_based
      sql/sql_insert.cc:
        binlog_row_based -> thd->current_stmt_binlog_row_based
      sql/sql_load.cc:
        binlog_row_based -> thd->current_stmt_binlog_row_based.
      sql/sql_parse.cc:
        when we are done with a statement, we reset the current_stmt_binlog_row_based to the value
        derived from THD::variables.binlog_format.
      sql/sql_partition.cc:
        compiler warning
      sql/sql_show.cc:
        compiler warning
      sql/sql_table.cc:
        binlog_row_based -> thd->current_stmt_binlog_row_based
      tests/mysql_client_test.c:
        compiler warning
      mysql-test/r/ndb_binlog_basic2.result:
        new result
      mysql-test/r/rpl_switch_stm_row_mixed.result:
        new result
      mysql-test/t/ndb_binlog_basic2.test:
        new test to verify that if cluster is enabled, can't change binlog format on the fly.
      mysql-test/t/rpl_switch_stm_row_mixed.test:
        test to see if one can switch between SBR, RBR, and "mixed" mode, and when one cannot,
        and test to see if the switching, and the mixed mode, work properly (using UUID() to test,
        as using UDFs is not possible in the testsuite for portability reasons).
      7cac0ddf
    • unknown's avatar
      Fixed compiler warnings from gcc 4.0.2: · f5f01b15
      unknown authored
      - Added empty constructors and virtual destructors to many classes and structs
      - Removed some usage of the offsetof() macro to instead use C++ class pointers
      
      
      configure.in:
        Added comment
      ndb/include/ndbapi/NdbDictionary.hpp:
        Fixed compiler warnings from gcc 4.0.2
      sql/field.cc:
        Fixed compiler warnings from gcc 4.0.2
      sql/handler.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/item.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/item_cmpfunc.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/log_event.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/mysql_priv.h:
        Fixed compiler warnings from gcc 4.0.2
        For find_table_in_list I fixed it to use proper C++ class pointers instead of C style pointers
      sql/opt_range.cc:
        Fixed compiler warnings from gcc 4.0.2
      sql/parse_file.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/sp_rcontext.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/spatial.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/sql_base.cc:
        Fixed compiler warnings from gcc 4.0.2
      sql/sql_cache.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/sql_class.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/sql_parse.cc:
        Fixed compiler warnings from gcc 4.0.2
        (Not pretty, but seams to work...)
      sql/sql_select.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/sql_update.cc:
        Fixed compiler warnings from gcc 4.0.2
      sql/table.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/tztime.cc:
        Fixed compiler warnings from gcc 4.0.2
      sql/tztime.h:
        Fixed compiler warnings from gcc 4.0.2
      f5f01b15
  13. 23 Feb, 2006 1 commit
    • unknown's avatar
      Bug#17181 (mysqlslap test server crash): · 7d4c6846
      unknown authored
        Moving assignments to table_map_id for thread-safe handling of
        table shares.
      
      
      sql/ha_ndbcluster_binlog.cc:
        Assign_new_table_id() now takes table share instead of table.
      sql/mysql_priv.h:
        New protptype for assign_new_table_id().
      sql/sql_base.cc:
        Assign_new_table_id() now takes a table share instead of a table.
        Moving call to assign_new_table_id() into get_table_share().
      sql/table.cc:
        Setting default values of table_map_id and table_map_version inside
        alloc_table_share() and init_tmp_table_share().
        Removing the settings from open_table_from_share().
      7d4c6846
  14. 21 Feb, 2006 2 commits
  15. 16 Feb, 2006 3 commits
    • unknown's avatar
      BUG#15408: Partitions: subpartition names are not unique · d047fe77
      unknown authored
      Also, moved some of the code out of handler.h and into partition specific files for better 
      separation.
      Also, moved some of the C funcs into partition_info as formal C++ methods
      
      
      mysql-test/r/partition_mgm_err.result:
        result block for test of bug # 15408
      mysql-test/t/partition_mgm_err.test:
        test for duplicate subpartition names
      sql/Makefile.am:
        adding sql_partition.h, partition_info.cpp, partition_info.h, and partition_element.h to the makefile
      sql/ha_partition.cc:
        using the new members of partition_info
      sql/ha_partition.h:
        using the new members of partition_info
      sql/handler.h:
        moved this code into sql_partition.h
      sql/mysql_priv.h:
        including sql_partition.h also now
      sql/opt_range.cc:
        using the new members of partition_info
      sql/sql_partition.cc:
        moved some of the functions out and into the partition_info class
        using the new members of partition_info
      sql/sql_show.cc:
        using the new members of partition_info
      win/cmakefiles/sql:
        added partition_info.cpp to the sql cmake file
      sql/partition_element.h:
        New BitKeeper file ``sql/partition_element.h''
      sql/partition_info.h:
        New BitKeeper file ``sql/partition_info.h''
      sql/sql_partition.h:
        New BitKeeper file ``sql/sql_partition.h''
      d047fe77
    • unknown's avatar
      Fix for bug #16593 "Deadlock or crash in stress test for case where · e1c8d9c9
      unknown authored
      trigger starts trigger".
      
      In short, the deadlock/crash happened when execution of statement, which used
      stored functions or activated triggers, coincided with alteration of the
      tables used by these functions or triggers (in highly concurrent environment).
      
      Bug was caused by the incorrect handling of tables from prelocked set in
      open_tables() functions in situations when refresh happened. This fix replaces
      old smart but not very robust way of handling tables after refresh (which was
      closing only old tables), with new one which simply closes all tables opened so
      far and restarts open_tables().
      Also fixed handling of temporary tables in close_tables_for_reopen().
      
      No test case present since bug manifests itself only in concurrent environment.
      
      
      sql/mysql_priv.h:
        In order to handle correctly case when table list completely consists from tables
        from prelocked set close_tables_for_reopen() have to accept table list as in/out
        parameter.
      sql/sql_base.cc:
        open_tables():
          Removed part of comment  which was out of date.
          Changed handling of case when refresh happens during opening of tables, now
          instead of having code which decides for each table if it should be closed
          we simply close all tables. Old code also incorrectly handled tables from
          prelocked set in this situation which resulted in bug #16593 "Deadlock or
          crash in stress test for case where triggers starting trigger".
        close_tables_for_reopen():
          Now we correctly handle the case when table list completely consists from
          tables from prelocked set. Also now we simply close all tables instead
          leaving temporary tables non-closed (such approach allows easily handle
          correctly tables from prelocked set).
      sql/sql_prepare.cc:
        In order to handle correctly case when table list completely consists from tables
        from prelocked set close_tables_for_reopen() have to accept table list as in/out
        parameter.
      sql/sql_update.cc:
        In order to handle correctly case when table list completely consists from tables
        from prelocked set close_tables_for_reopen() have to accept table list as in/out
        parameter.
      e1c8d9c9
    • unknown's avatar
      WL#3023 (Use locks in a statement-like manner): · 41f7d138
      unknown authored
        Table maps are now written on aquiring locks to tables and released
        at the end of each logical statement.
      
      
      mysql-test/extra/binlog_tests/ctype_cp932.test:
        Disabling cleanup code
      mysql-test/r/binlog_row_blackhole.result:
        Result change
      mysql-test/r/binlog_row_mix_innodb_myisam.result:
        Result change
      mysql-test/r/binlog_stm_ctype_cp932.result:
        Result change
      mysql-test/r/rpl_row_charset.result:
        Result change
      mysql-test/r/rpl_row_create_table.result:
        Result change
      mysql-test/t/rpl_row_create_table.test:
        Binlog position change
      sql/handler.cc:
        Writing table map after external_lock()
      sql/handler.h:
        Adding class for table operation hooks.
      sql/log.cc:
        Adding binlog_write_table_map() to THD.
        Removing write_table_map() from MYSQL_LOG.
      sql/log.h:
        Minor interface changes to move table map writing.
      sql/log_event.cc:
        Removing pre-allocation of memory for buffers.
        Allowing ULONG_MAX as table id denoting an event to ignore (only used to transfer flags).
        Adding code to collect tables while seeing table maps and lock collected tables
        when seeing a binrow event.
        Debriding code as a result of the above changes.
      sql/log_event.h:
        Minor interface changes.
      sql/mysql_priv.h:
        Adding hooks argument to create_table_from_items().
      sql/parse_file.cc:
        Minor fix to avoid crash in debug printout.
      sql/rpl_rli.h:
        Adding list of tables to lock to RLI structure.
      sql/slave.cc:
        Using list of tables to lock from RLI structure.
      sql/sql_acl.cc:
        Removing redundant pending events flush.
      sql/sql_base.cc:
        Moving pending event flush.
        Using flag to guard to clear statement transaction only if this is the original
        open tables state.
      sql/sql_class.cc:
        Adding flag for open tables state.
        Removing redundant pending events flushes.
        Write a dummy event to indicate that the tables to lock should be emptied
        on the slave.
      sql/sql_class.h:
        Adding open tables state flags.
        Adding binlog_write_table_map() function to THD.
        Changes to select_create() to support new locking scheme.
      sql/sql_insert.cc:
        Adding rollback of statement transaction on error. It can now contain
        events after locking tables.
      sql/sql_load.cc:
        Removing redundant pending event flush.
      sql/sql_table.cc:
        Adding hooks argument to create_table_from_items().
        Calling prelock hook before starting to lock tables.
      sql/sql_update.cc:
        Removing a compiler warning.
      sql/table.h:
        Minor changes.
      41f7d138
  16. 15 Feb, 2006 1 commit
    • unknown's avatar
      WL 2826: Error handling of ALTER TABLE for partitioning · e20cbe27
      unknown authored
      Started writing detailed error handler of
      ALTER TABLE for partitioning.
      Philosophical issue, should one always attempt to make recovery
      automatic or should one rely on manual means also.
      
      
      sql/mysql_priv.h:
        Flag to ensure we can't be killed in a very critical spot
      sql/sql_base.cc:
        Flag to ensure we can't be killed in a very critical spot
      sql/sql_partition.cc:
        Started writing detailed error handler of
        ALTER TABLE for partitioning.
        Philosophical issue, should one always attempt to make recovery
        automatic or should one rely on manual means also.
      e20cbe27
  17. 14 Feb, 2006 1 commit
  18. 13 Feb, 2006 2 commits
    • unknown's avatar
      renamedb.test, renamedb.result: · bc5dc9e0
      unknown authored
        new file
      Many files:
        WL#757 RENAME DATABASE
      
      
      sql/mysql_priv.h:
        WL#757 RENAME DATABASE
      sql/mysqld.cc:
        WL#757 RENAME DATABASE
      sql/sql_db.cc:
        WL#757 RENAME DATABASE
      sql/sql_lex.h:
        WL#757 RENAME DATABASE
      sql/sql_parse.cc:
        WL#757 RENAME DATABASE
      sql/sql_rename.cc:
        WL#757 RENAME DATABASE
      sql/sql_table.cc:
        WL#757 RENAME DATABASE
      sql/sql_yacc.yy:
        WL#757 RENAME DATABASE
      bc5dc9e0
    • unknown's avatar
      Removing unused variable (old have_isam). · d8817c63
      unknown authored
      sql/mysql_priv.h:
        Removing isam option
      sql/mysqld.cc:
        Removing isam option
      sql/set_var.cc:
        Removing isam option.
      d8817c63
  19. 11 Feb, 2006 1 commit
  20. 10 Feb, 2006 1 commit
    • unknown's avatar
      WL 2826: Error handling of ALTER TABLE for partitioning · c6d1dee7
      unknown authored
      Make lots of fixes to handle the most complex case of reorganising
      of partitions where two-phased processes are needed in some cases.
      
      
      sql/ha_partition.cc:
        Rewrote the rename partitions and drop partitions to align with how
        the table log handles things.
      sql/handler.h:
        Added new entry to partition_element to keep track of log entry for
        a partition during ALTER TABLE that reorganises existing partitions.
      sql/mysql_priv.h:
        Converted 'd', 'e' and so forth to constants with somewhat more
        descriptive names
        Added method to inactivate log entries
      sql/sql_partition.cc:
        Fix change of partitions
      sql/sql_table.cc:
        More constants with somewhat descriptive names
        Moved around some methods between internal part and external part
        Added new method to handle inactivation of log entries
      c6d1dee7
  21. 09 Feb, 2006 4 commits
    • unknown's avatar
      WL 2826: Error handling of ALTER TABLE for partitioning · ddb14e0f
      unknown authored
      More work on table logging of ALTER TABLE for partitioning
      
      
      sql/mysql_priv.h:
        More work on table logging of ALTER TABLE for partitioning
      sql/sql_partition.cc:
        More work on table logging of ALTER TABLE for partitioning
      ddb14e0f
    • unknown's avatar
      WL 2826: Error handling of ALTER TABLE for partitioning · 392b82a1
      unknown authored
      A little more complete handling
      
      
      sql/mysql_priv.h:
        Complete flag
      sql/sql_table.cc:
        A little more complete handling
      sql/sql_partition.cc:
        A little more complete handling
      392b82a1
    • unknown's avatar
      WL 2826: Error handling of ALTER TABLE for partitioning · cd653ed9
      unknown authored
      A number of fixes
      
      
      sql/handler.h:
        A numbre of fixes
      sql/mysql_priv.h:
        A numbre of fixes
      sql/share/errmsg.txt:
        A numbre of fixes
      sql/sql_partition.cc:
        A numbre of fixes
      sql/sql_table.cc:
        A numbre of fixes
      cd653ed9
    • unknown's avatar
      WL 2826: Error handling for ALTER TABLE for partitioning · 836912d1
      unknown authored
      Step 14: First version of table log for add/Drop partition
      
      
      sql/ha_partition.cc:
        Moved create partition name code to sql_partition.cc
      sql/handler.h:
        Added entries in partition_info to keep track of table log entries
      sql/mysql_priv.h:
        Moved create partition name code to sql_partition.cc
      sql/sql_partition.cc:
        Moved create partition name code to sql_partition.cc
        First version of table log for add/drop partition
      sql/sql_table.cc:
        Add IO_SIZE to table log header
      836912d1
  22. 08 Feb, 2006 2 commits
    • unknown's avatar
      WL 2826: Error handling for ALTER TABLE for partitioning Step 13 · e5200bc1
      unknown authored
      Lots of compilation fixes
      
      
      sql/mysql_priv.h:
        Lots of compilation fixes
      sql/sql_partition.cc:
        Lots of compilation fixes
      sql/sql_table.cc:
        Lots of compilation fixes
      e5200bc1
    • unknown's avatar
      WL 2826: Error handling for ALTER TABLE for partitioning · 910bf380
      unknown authored
      Most of the code for handling the table log is in place now, except
      the action part at recovery and proper error handling in some places.
      
      
      sql/mysql_priv.h:
        Removed internal methods from external table log interface
        Added and changed interface
      sql/mysqld.cc:
        Added call to execute table log recovery
      sql/sql_table.cc:
        Most of the code for handling the table log is in place now, except
        the action part at recovery and proper error handling in some places.
      910bf380
  23. 07 Feb, 2006 2 commits
    • unknown's avatar
      WL 2826: Step 12 · e09fb5ce
      unknown authored
      More table log code
      
      
      sql/mysql_priv.h:
        Added new call
      sql/sql_table.cc:
        New table log code
      e09fb5ce
    • unknown's avatar
      WL 2826: Step 11 · e4a92796
      unknown authored
      Lots of new code for table log
      
      
      include/my_sys.h:
        Spell error
      sql/mysql_priv.h:
        More structs and methods for table log
      sql/sql_partition.cc:
        lock/unlock global table log mutex
      sql/sql_table.cc:
        Lots of new code for table log
      e4a92796
  24. 06 Feb, 2006 2 commits
    • unknown's avatar
      WL 2826: Step 10 · 84627f5b
      unknown authored
      New methods to read/write/initialise table log
      
      
      sql/mysql_priv.h:
        New methods to read/write/initialise table log
      sql/sql_table.cc:
        New methods to read/write/initialise table log
      84627f5b
    • unknown's avatar
      cleanup · 9aac55c4
      unknown authored
      sql/mysql_priv.h:
        remove reference to variable removed in the previous patch
      9aac55c4
  25. 04 Feb, 2006 1 commit
    • unknown's avatar
      WL 2826: Nineth step · dde234ae
      unknown authored
      Updated error inject scripts
      
      
      dbug/dbug_long.h:
        Updated scripts in dub_long.h as well
      sql/mysql_priv.h:
        Updated error inject scripts
      dde234ae
  26. 03 Feb, 2006 2 commits
    • unknown's avatar
      WL 2826: Seventh step, more fixes for error injects · 7ea92dcc
      unknown authored
      Removed session variables for error injects
      started using DBUG macros for error injects
      
      
      include/my_dbug.h:
        Added new DBUG macros
      sql/sql_class.cc:
        Removed session variables for error injects
      sql/sql_class.h:
        Removed session variables for error injects
      sql/mysql_priv.h:
        Changed ERROR INJECT macros to use DBUG macros
      sql/mysqld.cc:
        Removed session variables for error injects
      sql/set_var.cc:
        Removed session variables for error injects
      7ea92dcc
    • unknown's avatar
      WL #2826: Sixth step, made it work with test cases · e254606f
      unknown authored
      BUILD/SETUP.sh:
        Fixed BUILD scripts
      BUILD/compile-pentium-debug-max:
        Fixed BUILD scripts
      sql/ha_partition.cc:
        Need to handle states differently when creating handler files
      sql/mysql_priv.h:
        Some error inject fixes
      sql/mysqld.cc:
        Some error inject fixes
      sql/set_var.cc:
        Some error inject fixes
      sql/sql_partition.cc:
        Fixing a bug with generate partition syntax
        A number of fixes
      sql/sql_table.cc:
        Fix a few bugs
      sql/table.cc:
        fix
      e254606f