An error occurred fetching the project authors.
  1. 19 Jan, 2006 2 commits
    • unknown's avatar
      Fix the tree: plugin-related changes, necessary for · bd7120f9
      unknown authored
      CSV storage engine to be statically compiled.
      Derived from antony's patch.
      
      
      config/ac-macros/storage.m4:
        don't add objects to the object list if
        we don't have them
      configure.in:
        compile CSV statically
      sql/ha_myisam.cc:
        fix prototype to get rid of THD
      sql/ha_myisam.h:
        fix prototype to get rid of THD
      sql/handler.cc:
        new function for plugins
      sql/handler.h:
        fix prototype to get rid of THD
        declare functions used by plugins
      sql/item.h:
        Don't include all the types and files when not building mysqld
      sql/lock.cc:
        don's assume that handler knows about THD
      sql/mysql_priv.h:
        Don't include all the types and files when not building mysqld
        declare new plugin functions
      sql/sql_class.cc:
        New plugin functions
      sql/sql_class.h:
        Don't include all the types and files when not building mysqld
      sql/sql_lex.h:
        Don't include all the types and files when not building mysqld
      storage/csv/Makefile.am:
        compile CSV into a static lib to be
        linked into mysqld
      storage/csv/ha_tina.cc:
        fix ha_tina to be able to build it static
      storage/csv/ha_tina.h:
        fix prototype to get rid of THD
      bd7120f9
    • unknown's avatar
      WL1019: complete patch. Reapplied patch to the clean · 41536fce
      unknown authored
      tree to get rid of multiple typos in CS comments and
      unify the patch.
      
      
      configure.in:
        CSV is compiled in by default now
      include/my_base.h:
        add new ha_extra flag for the log tables
      mysql-test/include/im_check_os.inc:
        we should only run im tests if csv is on for now: im relies
        on mysqld options available only in csv build.
      mysql-test/include/system_db_struct.inc:
        check log tables structure
      mysql-test/lib/init_db.sql:
        create log tables when running tests.
      mysql-test/mysql-test-run.pl:
        Add old logs flag to IM tests. As IM could only deal with
        old logs (this feature is not needed with log tables)
      mysql-test/r/connect.result:
        update result
      mysql-test/r/csv.result:
        update result
      mysql-test/r/im_utils.result:
        update result
      mysql-test/r/information_schema.result:
        update result
      mysql-test/r/mysqlcheck.result:
        update result
      mysql-test/r/show_check.result:
        update result
      mysql-test/r/system_mysql_db.result:
        update result
      mysql-test/t/connect.test:
        disable test if CSV engine is not in: result depends on the
        presence of CSV-based log tables
      mysql-test/t/csv.test:
        add tests for concurrent insert (the functionality is added
        to CSV in this patch)
      mysql-test/t/information_schema.test:
        disable test if CSV engine is not in: result depends on the
        presence of CSV-based log tables
      mysql-test/t/mysqlcheck.test:
        disable test if CSV engine is not in: result depends on the
        presence of CSV-based log tables
      mysql-test/t/show_check.test:
        disable test if CSV engine is not in: result depends on the
        presence of CSV-based log tables
      mysql-test/t/system_mysql_db.test:
        disable test if CSV engine is not in: result depends on the
        presence of CSV-based log tables
      mysql-test/t/system_mysql_db_fix.test:
        disable test if CSV engine is not in: result depends on the
        presence of CSV-based log tables
      scripts/mysql_create_system_tables.sh:
        new system tables: slow_log and general_log
      scripts/mysql_fix_privilege_tables.sql:
        add new log tables: use an SP to create them for
        non-csv build to work fine.
      sql/ha_myisam.cc:
        move locking-related checks to the hanlder
      sql/ha_myisam.h:
        new function declared
      sql/handler.h:
        new virtual function is added: we should check for handler-related
        locking issues in the handler
      sql/lock.cc:
        from now on we check for handler-related locking issues
        in the handler itself rather then in lock.cc
      sql/log.cc:
        Add log tables support, refactoring: there are log event
        handlers with common interface. They are used by the LOGGER
        class, which is responsible for their initialization, cleanup
        and managment. Logging to the tables provided by one of the
        log event handler types.
      sql/log.h:
        declare new log classes
      sql/log_event.cc:
        convert old logging routines calls to use new API
      sql/mysql_priv.h:
        define common log routines and objects
      sql/mysqld.cc:
        Add support for the log tables. Their initalization, cleanup
        and specific options.
      sql/share/errmsg.txt:
        add new error messages for the log tables
      sql/slave.cc:
        convert old logging routines calls to use new API
      sql/sql_base.cc:
        TABLE objects used by the logger should be skipped
        during refreshes (as log tables are always opened
        and locked). fix table_is_used to skip them.  This
        is needed for FLUSH LOGS to work
      sql/sql_db.cc:
        convert old logging routines calls to use new API
      sql/sql_delete.cc:
        fix TRUNCATE to work with log tables
      sql/sql_parse.cc:
        command_name is now an array of LEX_STRINGs
      sql/sql_prepare.cc:
        convert old logging routines calls to use new API
      sql/sql_show.cc:
        convert old logging routines calls to use new API
      sql/sql_table.cc:
        don't reoped the log tables for admin purposes
      sql/table.cc:
        mark log tables as such during the open
      sql/table.h:
        add log-related info
      storage/csv/ha_tina.cc:
        add support for concurrent insert (see bk commit - 5.1 tree
        (petr:1.1910) for standalone patch), add log tables-specific
        csv table handling.
      storage/csv/ha_tina.h:
        enable concurrent insert for CSV, add log table flag
      mysql-test/r/log_tables.result:
        New BitKeeper file ``mysql-test/r/log_tables.result''
      mysql-test/t/log_tables.test:
        New BitKeeper file ``mysql-test/t/log_tables.test''
      41536fce
  2. 17 Jan, 2006 1 commit
    • unknown's avatar
      WL #2604: Partition Management · 19bbb7cc
      unknown authored
      Optimised version of ADD/DROP/REORGANIZE partitions for
      non-NDB storage engines.
      New syntax to handle REBUILD/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions
      Quite a few bug fixes
      
      
      include/thr_lock.h:
        New method to downgrade locks from TL_WRITE_ONLY
        Possibility to upgrade lock while aborting locks
      mysql-test/r/ndb_autodiscover.result:
        Fix for lowercase and that all NDB tables are now partitioned
      mysql-test/r/ndb_bitfield.result:
        Fix for lowercase and that all NDB tables are now partitioned
      mysql-test/r/ndb_gis.result:
        Fix for lowercase and that all NDB tables are now partitioned
      mysql-test/r/ndb_partition_key.result:
        New test case
      mysql-test/r/partition.result:
        New test case
      mysql-test/r/partition_error.result:
        New test case
      mysql-test/r/partition_mgm_err.result:
        Fix of test case results
      mysql-test/t/disabled.def:
        partition_03ndb still has bug
      mysql-test/t/ndb_partition_key.test:
        New test cases for new functionality and bugs
      mysql-test/t/partition.test:
        New test cases for new functionality and bugs
      mysql-test/t/partition_error.test:
        New test cases for new functionality and bugs
      mysql-test/t/partition_mgm_err.test:
        New test cases for new functionality and bugs
      mysys/thr_lock.c:
        New method to downgrade TL_WRITE_ONLY locks
        Possibility to specify if locks are to be upgraded at abort locks
      sql/ha_archive.cc:
        New handlerton methods
      sql/ha_berkeley.cc:
        New handlerton methods
      sql/ha_blackhole.cc:
        New handlerton methods
      sql/ha_federated.cc:
        New handlerton methods
      sql/ha_heap.cc:
        New handlerton methods
      sql/ha_innodb.cc:
        New handlerton methods
      sql/ha_myisam.cc:
        New handlerton methods
      sql/ha_myisammrg.cc:
        New handlerton methods
      sql/ha_ndbcluster.cc:
        New handlerton methods
        Moved out packfrm and unpackfrm methods
        Adapted many parts to use table_share instead of table->s
        Ensured that .ndb file uses filename and not tablename
        according to new encoding of names (WL 1324)
        All NDB tables are partitioned and set up partition info
        Fixed such that tablenames use tablenames and not filenames in NDB
        NDB uses auto partitioning for ENGINE=NDB tables
        Warning for very large tables
        Set RANGE data
        Set LIST data
        New method to set-up partition info
        Set Default number of partitions flag
        Set linear hash flag
        Set node group array
        Set number of fragments
        Set max rows
        Set tablespace names
        New method to get number of partitions of table to use at open table
      sql/ha_ndbcluster.h:
        Removed partition_flags and alter_table_flags from handler class
        A couple of new and changed method headers
      sql/ha_ndbcluster_binlog.cc:
        Use new method headers
      sql/ha_partition.cc:
        New handlerton methods
        Lots of new function headers
        Use #P# as separator between table name and partition name and
        #SP# as separator between partition name and subpartition name
        Use filename encoding for files both of table name part and of
        partition name parts
        New method to drop partitions based on partition state
        New method to rename partitions based on partition state
        New methods to optimize, analyze, check and repair partitions
        New methods to optimize, analyze, check and repair table
        Helper method to create new partition, open it and external lock
        it, not needed to lock it internally since no one else knows about
        it yet.
        Cleanup method at error for new partitions
        New methods to perform bulk of work at ADD/REORGANIZE partitions
        (change_partitions, copy_partitions)
      sql/ha_partition.h:
        New methods and variables
        A few dropped ones and a few changed ones
      sql/handler.cc:
        Handlerton interface changes
        New flag to open_table_from_share
      sql/handler.h:
        New alter_table_flags
        New partition flags
        New partition states
        More states for default handling
        Lots of new, dropped and changed interfaces
      sql/lex.h:
        Added REBUILD and changed name of REORGANISE to REORGANIZE
      sql/lock.cc:
        Method to downgrade locks
        Able to specify if locks upgraded on abort locks
      sql/log.cc:
        New handlerton methods
      sql/mysql_priv.h:
        Lots of new interfaces
      sql/share/errmsg.txt:
        Lots of new, dropped and changed error messages
      sql/sql_base.cc:
        Adapted to new method headers
        New method to abort and upgrade lock
        New method to close open tables and downgrade lock
        New method to wait for completed table
      sql/sql_lex.h:
        New flags
      sql/sql_partition.cc:
        Return int instead of bool in get_partition_id
        More defaults handling
        Make use of new mem_alloc_error method
        More work on function headers
        Changes to generate partition syntax to cater for intermediate
        partition states
        Lots of new code with large comments describing new features for
        Partition Management:
        ADD/DROP/REORGANIZE/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions
      sql/sql_show.cc:
        Minors
      sql/sql_table.cc:
        Moved a couple of methods
        New methods to copy create lists and key lists
        for use with mysql_prepare_table
        New method to write frm file
        New handling of handlers with auto partitioning
        Fix CREATE TABLE LIKE
        Moved code for ADD/DROP/REORGANIZE partitions
        Use handlerton method for alter_table_flags
      sql/sql_yacc.yy:
        More memory alloc error checks
        New syntax for REBUILD, ANALYZE, CHECK, OPTIMIZE, REPAIR partitions
      sql/table.cc:
        Fix length of extra part to be 4 bytes
        Partition state introduced in frm file
      sql/table.h:
        Partition state introduced
      sql/unireg.cc:
        Partition state introduced
        Default partition
      storage/csv/ha_tina.cc:
        New handlerton methods
      storage/example/ha_example.cc:
        New handlerton methods
      storage/ndb/include/kernel/ndb_limits.h:
        RANGE DATA
      storage/ndb/include/kernel/signaldata/AlterTable.hpp:
        New interfaces in ALTER TABLE towards NDB kernel
      storage/ndb/include/kernel/signaldata/DiAddTab.hpp:
        New section
      storage/ndb/include/kernel/signaldata/DictTabInfo.hpp:
        Lots of new parts of table description
      storage/ndb/include/kernel/signaldata/LqhFrag.hpp:
        tablespace id specified in LQHFRAGREQ
      storage/ndb/include/ndbapi/NdbDictionary.hpp:
        Lots of new methods in NDB dictionary
      storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp:
        Lots of new variables in table description
      storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
        Lots of new variables in table description
      storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
        Lots of new variables in table description
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
        New error insertion
      storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
        a few extra jam's
      storage/ndb/src/ndbapi/NdbBlob.cpp:
        Changes to definition of blob tables
      storage/ndb/src/ndbapi/NdbDictionary.cpp:
        Lots of new stuff in NDB dictionary
      storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
        Lots of new stuff in NDB dictionary
      storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp:
        Lots of new stuff in NDB dictionary
      storage/ndb/test/ndbapi/test_event.cpp:
        removed use of methods no longer in existence
      storage/ndb/tools/restore/Restore.cpp:
        Renamed variable
      19bbb7cc
  3. 04 Jan, 2006 1 commit
    • unknown's avatar
      A fix for Bug#7209 "Client error with "Access Denied" on updates · f577d864
      unknown authored
      when high concurrency": remove HASH::current_record and make it
      an external search parameter, so that it can not be the cause of a 
      race condition under high concurrent load.
      The bug was in a race condition in table_hash_search,
      when column_priv_hash.current_record was overwritten simultaneously
      by multiple threads, causing the search for a suitable grant record
      to fail.
      No test case as the bug is repeatable only under concurrent load.
      
      
      include/hash.h:
        - remove current_record from HASH, instead modify hash_first,
        hash_next to accept HASH_SEARCH_STATE as an IN/OUT parameter
      mysys/hash.c:
        - remove HASH::current_record
        - change declarations of functions that use HASH in read-only mode
          to accept const HASH * instead of HASH *. 
        - implement hash_search; move the old implementation of hash_search
        to hash_first
      mysys/testhash.c:
        - adjust the test case to changed function declarations
      sql/lock.cc:
        - adjust to changed declarations of hash_search, hash_next
      sql/sql_acl.cc:
        - adjust to changed declarations of hash_search, hash_next
      sql/sql_base.cc:
        - adjust to changed declarations of hash_search, hash_nex
      sql/sql_cache.cc:
        - adjust to a changed declaration of hash_replace
      f577d864
  4. 22 Dec, 2005 1 commit
    • unknown's avatar
      BUG#5390 - problems with merge tables · 0040aff9
      unknown authored
      Problem #1: INSERT...SELECT, Version for 5.1.
      Extended the unique table check by a check of lock data.
      Merge sub-tables cannot be detected by doing name checks only.
      
      
      mysql-test/r/create.result:
        BUG#5390 - problems with merge tables
        Removed a duplicate test.
      mysql-test/r/merge.result:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT
        Added test results.
      mysql-test/t/create.test:
        BUG#5390 - problems with merge tables
        Removed a duplicate test.
      mysql-test/t/merge.test:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT
        Added tests.
      sql/lock.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 5.1.
        Added a new function to find a duplicate lock in a list of tables.
      sql/mysql_priv.h:
        Problem #1: INSERT...SELECT, Version for 5.1.
        Added the thread handle to unique_table().
        Added a declaration for the new function.
      sql/sql_base.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 5.1.
        Added the thread handle to unique_table().
        Added a call to the new mysql_lock_have_duplicate(),
        which needs the thread handle, to unique_table().
      sql/sql_delete.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 5.1.
        Added the thread handle to unique_table().
      sql/sql_insert.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 5.1.
        Added the thread handle to unique_table().
      sql/sql_load.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 5.1.
        Added the thread handle to unique_table().
      sql/sql_parse.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 5.1.
        Added the thread handle to unique_table().
      sql/sql_update.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 5.1.
        Added the thread handle to unique_table().
        Replaced a call to find_table_in_local_list() by
        the newly extended unique_table().
      0040aff9
  5. 20 Dec, 2005 1 commit
    • unknown's avatar
      BUG#5390 - problems with merge tables · 5113bdff
      unknown authored
      Problem #1: INSERT...SELECT, Version for 5.0.
      Extended the unique table check by a check of lock data.
      Merge sub-tables cannot be detected by doing name checks only.
      
      
      mysql-test/r/create.result:
        BUG#5390 - problems with merge tables
        Removed a duplicate test.
      mysql-test/r/merge.result:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT
        Added test results.
      mysql-test/t/create.test:
        BUG#5390 - problems with merge tables
        Removed a duplicate test.
      mysql-test/t/merge.test:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT
        Added tests.
      sql/lock.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 5.0.
        Added a new function to find a duplicate lock in a list of tables.
      sql/mysql_priv.h:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 5.0.
        Added the thread handle to unique_table().
        Added a declaration for the new function.
      sql/sql_base.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 5.0.
        Added the thread handle to unique_table().
        Added a call to the new mysql_lock_have_duplicate(),
        which needs the thread handle, to unique_table().
      sql/sql_delete.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 5.0.
        Added the thread handle to unique_table().
      sql/sql_insert.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 5.0.
        Added the thread handle to unique_table().
      sql/sql_load.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 5.0.
        Added the thread handle to unique_table().
      sql/sql_parse.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 5.0.
        Added the thread handle to unique_table().
      sql/sql_update.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 5.0.
        Added the thread handle to unique_table().
        Replaced a call to find_table_in_local_list() by
        the newly extended unique_table().
      5113bdff
  6. 07 Dec, 2005 1 commit
    • unknown's avatar
      BUG#5390 - problems with merge tables · f6cac54b
      unknown authored
      Problem #1: INSERT...SELECT, Version for 4.1.
      INSERT ... SELECT with the same table on both sides (hidden
      below a MERGE table) does now work by buffering the select result.
      The duplicate detection works now after open_and_lock_tables() 
      on the locks.
      I did not find a test case that failed without the change in
      sql_update.cc. I made the change anyway as it should in theory
      fix a possible MERGE table problem with multi-table update.
      
      
      libmysqld/ha_blackhole.cc:
        BUG#5390 - problems with merge tables
        No idea, how the symlink change made it into my patch.
      mysql-test/r/create.result:
        BUG#5390 - problems with merge tables
        Removed a duplicate test.
      mysql-test/r/merge.result:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 4.1.
        Added test results.
      mysql-test/t/create.test:
        BUG#5390 - problems with merge tables
        Removed a duplicate test.
      mysql-test/t/merge.test:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 4.1.
        Added tests.
      sql/lock.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 4.1.
        Added a new function to find a duplicate lock in a list of tables.
      sql/mysql_priv.h:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 4.1.
        Added a declaration for the new function.
      sql/sql_parse.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 4.1.
        Changed the duplicate tables detection for INSERT ... SELECT
        to use the new function, which does also work for MERGE tables.
      sql/sql_update.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT, Version for 4.1.
        Changed the duplicate tables detection for UPDATE
        to use the new function, which does also work for MERGE tables.
      f6cac54b
  7. 29 Nov, 2005 1 commit
    • unknown's avatar
      BUG#5390 - problems with merge tables · 38b7ede9
      unknown authored
      Problem #1: INSERT...SELECT
      INSERT ... SELECT with the same table on both sides (hidden
      below a MERGE table) does now work by buffering the select result.
      The duplicate detection works now after open_and_lock_tables() 
      on the locks.
      I did not find a test case that failed without the change in
      sql_update.cc. I made the change anyway as it should in theory
      fix a possible MERGE table problem with multi-table update.
      
      
      mysql-test/r/create.result:
        BUG#5390 - problems with merge tables
        Removed a duplicate test.
      mysql-test/r/merge.result:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT
        Added test results.
      mysql-test/t/create.test:
        BUG#5390 - problems with merge tables
        Removed a duplicate test.
      mysql-test/t/merge.test:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT
        Added tests.
      sql/lock.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT
        Added a new function to find a duplicate lock in a list of tables.
      sql/mysql_priv.h:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT
        Added a declaration for the new function.
      sql/sql_parse.cc:
        BUG#5390 - problems with merge tables
        Problem #1: INSERT...SELECT
        Changed the duplicate tables detection for INSERT ... SELECT
        to use the new function, which does also work for MERGE tables.
      sql/sql_update.cc:
        BUG#5390 - problems with merge tables
        Changed the duplicate tables detection for UPDATE
        to use the new function, which does also work for MERGE tables.
      38b7ede9
  8. 23 Nov, 2005 1 commit
    • unknown's avatar
      Table definition cache, part 2 · f631b361
      unknown authored
      The table opening process now works the following way:
      - Create common TABLE_SHARE object
      - Read the .frm file and unpack it into the TABLE_SHARE object
      - Create a TABLE object based on the information in the TABLE_SHARE
        object and open a handler to the table object
      
      Other noteworthy changes:
      - In TABLE_SHARE the most common strings are now LEX_STRING's
      - Better error message when table is not found
      - Variable table_cache is now renamed 'table_open_cache'
      - New variable 'table_definition_cache' that is the number of table defintions that will be cached
      - strxnmov() calls are now fixed to avoid overflows
      - strxnmov() will now always add one end \0 to result
      - engine objects are now created with a TABLE_SHARE object instead of a TABLE object.
      - After creating a field object one must call field->init(table) before using it
      
      - For a busy system this change will give you:
       - Less memory usage for table object
       - Faster opening of tables (if it's has been in use or is in table definition cache)
       - Allow you to cache many table definitions objects
       - Faster drop of table
      
      
      mysql-test/mysql-test-run.sh:
        Fixed some problems with --gdb option
        Test both with socket and tcp/ip port that all old servers are killed
      mysql-test/r/flush_table.result:
        More tests with lock table with 2 threads + flush table
      mysql-test/r/information_schema.result:
        Removed old (now wrong) result
      mysql-test/r/innodb.result:
        Better error messages (thanks to TDC patch)
      mysql-test/r/merge.result:
        Extra flush table test
      mysql-test/r/ndb_bitfield.result:
        Better error messages (thanks to TDC patch)
      mysql-test/r/ndb_partition_error.result:
        Better error messages (thanks to TDC patch)
      mysql-test/r/query_cache.result:
        Remove tables left from old tests
      mysql-test/r/temp_table.result:
        Test truncate with temporary tables
      mysql-test/r/variables.result:
        Table_cache -> Table_open_cache
      mysql-test/t/flush_table.test:
        More tests with lock table with 2 threads + flush table
      mysql-test/t/merge.test:
        Extra flush table test
      mysql-test/t/multi_update.test:
        Added 'sleep' to make test predictable
      mysql-test/t/query_cache.test:
        Remove tables left from old tests
      mysql-test/t/temp_table.test:
        Test truncate with temporary tables
      mysql-test/t/variables.test:
        Table_cache -> Table_open_cache
      mysql-test/valgrind.supp:
        Remove warning that may happens becasue threads dies in different order
      mysys/hash.c:
        Fixed wrong DBUG_PRINT
      mysys/mf_dirname.c:
        More DBUG
      mysys/mf_pack.c:
        Better comment
      mysys/mf_tempdir.c:
        More DBUG
        Ensure that we call cleanup_dirname() on all temporary directory paths.
        
        If we don't do this, we will get a failure when comparing temporary table
        names as in some cases the temporary table name is run through convert_dirname())
      mysys/my_alloc.c:
        Indentation fix
      sql/examples/ha_example.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/examples/ha_example.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/examples/ha_tina.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/examples/ha_tina.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/field.cc:
        Update for table definition cache:
        - Field creation now takes TABLE_SHARE instead of TABLE as argument
          (This is becasue field definitions are now cached in TABLE_SHARE)
          When a field is created, one now must call field->init(TABLE) before using it
        - Use s->db instead of s->table_cache_key
        - Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE
        - make_field() takes TABLE_SHARE as argument instead of TABLE
        - move_field() -> move_field_offset()
      sql/field.h:
        Update for table definition cache:
        - Field creation now takes TABLE_SHARE instead of TABLE as argument
          (This is becasue field definitions are now cached in TABLE_SHARE)
          When a field is created, one now must call field->init(TABLE) before using it
        - Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE
        - make_field() takes TABLE_SHARE as argument instead of TABLE
        - move_field() -> move_field_offset()
      sql/ha_archive.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_archive.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_berkeley.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Changed name of argument create() to not hide internal 'table' variable.
        table->s  -> table_share
      sql/ha_berkeley.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_blackhole.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_blackhole.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_federated.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Fixed comments
        Remove index variable and replace with pointers (simple optimization)
        move_field() -> move_field_offset()
        Removed some strlen() calls
      sql/ha_federated.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_heap.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Simplify delete_table() and create() as the given file names are now without extension
      sql/ha_heap.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_innodb.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_innodb.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_myisam.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Remove not needed fn_format()
        Fixed for new table->s structure
      sql/ha_myisam.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_myisammrg.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Don't set 'is_view' for MERGE tables
        Use new interface to find_temporary_table()
      sql/ha_myisammrg.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Added flag HA_NO_COPY_ON_ALTER
      sql/ha_ndbcluster.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Fixed wrong calls to strxnmov()
        Give error HA_ERR_TABLE_DEF_CHANGED if table definition has changed
        drop_table -> intern_drop_table()
        table->s -> table_share
        Move part_info to TABLE
        Fixed comments & DBUG print's
        New arguments to print_error()
      sql/ha_ndbcluster.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
      sql/ha_partition.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        We can't set up or use part_info when creating handler as there is not yet any table object
        New ha_intialise() to work with TDC (Done by Mikael)
      sql/ha_partition.h:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        Got set_part_info() from Mikael
      sql/handler.cc:
        We new use TABLE_SHARE instead of TABLE when creating engine handlers
        ha_delete_table() now also takes database as an argument
        handler::ha_open() now takes TABLE as argument
        ha_open() now calls ha_allocate_read_write_set()
        Simplify ha_allocate_read_write_set()
        Remove ha_deallocate_read_write_set()
        Use table_share (Cached by table definition cache)
      sql/handler.h:
        New table flag: HA_NO_COPY_ON_ALTER (used by merge tables)
        Remove ha_deallocate_read_write_set()
        get_new_handler() now takes TABLE_SHARE as argument
        ha_delete_table() now gets database as argument
      sql/item.cc:
        table_name and db are now LEX_STRING objects
        When creating fields, we have now have to call field->init(table)
        move_field -> move_field_offset()
      sql/item.h:
        tmp_table_field_from_field_type() now takes an extra paramenter 'fixed_length' to allow one to force usage of CHAR
         instead of BLOB
      sql/item_cmpfunc.cc:
        Fixed call to tmp_table_field_from_field_type()
      sql/item_create.cc:
        Assert if new not handled cast type
      sql/item_func.cc:
        When creating fields, we have now have to call field->init(table)
        dummy_table used by 'sp' now needs a TABLE_SHARE object
      sql/item_subselect.cc:
        Trivial code cleanups
      sql/item_sum.cc:
        When creating fields, we have now have to call field->init(table)
      sql/item_timefunc.cc:
        Item_func_str_to_date::tmp_table_field() now replaced by call to
         tmp_table_field_from_field_type() (see item_timefunc.h)
      sql/item_timefunc.h:
        Simply tmp_table_field()
      sql/item_uniq.cc:
        When creating fields, we have now have to call field->init(table)
      sql/key.cc:
        Added 'KEY' argument to 'find_ref_key' to simplify code
      sql/lock.cc:
        More debugging
        Use create_table_def_key() to create key for table cache
        Allocate TABLE_SHARE properly when creating name lock
        Fix that locked_table_name doesn't test same table twice
      sql/mysql_priv.h:
        New functions for table definition cache
        New interfaces to a lot of functions.
        New faster interface to find_temporary_table() and close_temporary_table()
      sql/mysqld.cc:
        Added support for table definition cache of size 'table_def_size'
        Fixed som calls to strnmov()
        Changed name of 'table_cache' to 'table_open_cache'
      sql/opt_range.cc:
        Use new interfaces
        Fixed warnings from valgrind
      sql/parse_file.cc:
        Safer calls to strxnmov()
        Fixed typo
      sql/set_var.cc:
        Added variable 'table_definition_cache'
        Variable table_cache renamed to 'table_open_cache'
      sql/slave.cc:
        Use new interface
      sql/sp.cc:
        Proper use of TABLE_SHARE
      sql/sp_head.cc:
        Remove compiler warnings
        We have now to call field->init(table)
      sql/sp_head.h:
        Pointers to parsed strings are now const
      sql/sql_acl.cc:
        table_name is now a LEX_STRING
      sql/sql_base.cc:
        Main implementation of table definition cache
        (The #ifdef's are there for the future when table definition cache will replace open table cache)
        Now table definitions are cached indepndent of open tables, which will speed up things when a table is in use at once from several places
        Views are not yet cached; For the moment we only cache if a table is a view or not.
        
        Faster implementation of find_temorary_table()
        Replace 'wait_for_refresh()' with the more general function 'wait_for_condition()'
        Drop table is slightly faster as we can use the table definition cache to know the type of the table
      sql/sql_cache.cc:
        table_cache_key and table_name are now LEX_STRING
        'sDBUG print fixes
      sql/sql_class.cc:
        table_cache_key is now a LEX_STRING
        safer strxnmov()
      sql/sql_class.h:
        Added number of open table shares (table definitions)
      sql/sql_db.cc:
        safer strxnmov()
      sql/sql_delete.cc:
        Use new interface to find_temporary_table()
      sql/sql_derived.cc:
        table_name is now a LEX_STRING
      sql/sql_handler.cc:
        TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
      sql/sql_insert.cc:
        TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
      sql/sql_lex.cc:
        Make parsed string a const (to quickly find out if anything is trying to change the query string)
      sql/sql_lex.h:
        Make parsed string a const (to quickly find out if anything is trying to change the query string)
      sql/sql_load.cc:
        Safer strxnmov()
      sql/sql_parse.cc:
        Better error if wrong DB name
      sql/sql_partition.cc:
        part_info moved to TABLE from TABLE_SHARE
        Indentation changes
      sql/sql_select.cc:
        Indentation fixes
        Call field->init(TABLE) for new created fields
        Update create_tmp_table() to use TABLE_SHARE properly
      sql/sql_select.h:
        Call field->init(TABLE) for new created fields
      sql/sql_show.cc:
        table_name is now a LEX_STRING
        part_info moved to TABLE
      sql/sql_table.cc:
        Use table definition cache to speed up delete of tables
        Fixed calls to functions with new interfaces
        Don't use 'share_not_to_be_used'
        Instead of doing openfrm() when doing repair, we now have to call
        get_table_share() followed by open_table_from_share().
        Replace some fn_format() with faster unpack_filename().
        Safer strxnmov()
        part_info is now in TABLE
        Added Mikaels patch for partition and ALTER TABLE
        Instead of using 'TABLE_SHARE->is_view' use 'table_flags() & HA_NO_COPY_ON_ALTER
      sql/sql_test.cc:
        table_name and table_cache_key are now LEX_STRING's
      sql/sql_trigger.cc:
        TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
        safer strxnmov()
        Removed compiler warnings
      sql/sql_update.cc:
        Call field->init(TABLE) after field is created
      sql/sql_view.cc:
        safer strxnmov()
        Create common TABLE_SHARE object for views to allow us to cache if table is a view
      sql/structs.h:
        Added SHOW_TABLE_DEFINITIONS
      sql/table.cc:
        Creation and destruct of TABLE_SHARE objects that are common for many TABLE objects
        
        The table opening process now works the following way:
        - Create common TABLE_SHARE object
        - Read the .frm file and unpack it into the TABLE_SHARE object
        - Create a TABLE object based on the information in the TABLE_SHARE
          object and open a handler to the table object
        
        open_table_def() is written in such a way that it should be trival to add parsing of the .frm files in new formats
      sql/table.h:
        TABLE objects for the same database table now share a common TABLE_SHARE object
        In TABLE_SHARE the most common strings are now LEX_STRING's
      sql/unireg.cc:
        Changed arguments to rea_create_table() to have same order as other functions
        Call field->init(table) for new created fields
      sql/unireg.h:
        Added OPEN_VIEW
      strings/strxnmov.c:
        Change strxnmov() to always add end \0
        This makes usage of strxnmov() safer as most of MySQL code assumes that strxnmov() will create a null terminated string
      f631b361
  9. 19 Nov, 2005 1 commit
    • unknown's avatar
      BUG #14524 · 136c91dd
      unknown authored
      Patch that fixes crashing when partition uses blackole for 
      underlying tables.
      
      
      mysql-test/r/partition.result:
        BUG #14524 New test result
      mysql-test/t/partition.test:
        BUG #14524
        
        New test
      sql/ha_partition.cc:
        BUG# 14524
        
        Added new class var m_no_locks to keep track of the absense of locks. If 
        '0', then lock_count returns 0, which keeps thr_multi_lock from crashing
        in the case of the underlying table being ha_blackhole.
      sql/ha_partition.h:
        BUG #14524
        
        Added new class var m_no_locks to keep track of lock count
      sql/lock.cc:
        BUG #14524
        
        DBUG PRINTs and ENTERs to make tracking the bug easier. I think these are 
        useful regardless of this bug.
      sql/sql_partition.cc:
        BUG #14524
        
        Changed umlaut o to allow fixing bug 14524 using DDD (file would not display
        in DDD)
      136c91dd
  10. 15 Nov, 2005 1 commit
    • unknown's avatar
      Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash · 013b3d8a
      unknown authored
      Version for 5.0.
      It fixes three problems:
      1. The cause of the bug was that we did not check the table version for
       the HANDLER ... READ commands. We did not notice when a table was
       replaced by a new one. This can happen during ALTER TABLE, REPAIR
       TABLE, and OPTIMIZE TABLE (there might be more cases). I call the fix
       for this problem "the primary bug fix".
      2. mysql_ha_flush() was not always called with a locked LOCK_open.
       Though the function comment clearly said it must.
       I changed the code so that the locking is done when required. I call
       the fix for this problem "the secondary fix".
      3. In 5.0 (not in 4.1 or 4.0) DROP TABLE had a possible deadlock flaw in
       concur with FLUSH TABLES WITH READ LOCK. I call the fix for this
       problem "the 5.0 addendum fix".
      
      
      include/my_pthread.h:
        Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
        Added a new macro for the 5.0 addendum fix.
      mysql-test/r/handler.result:
        Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
        The test result.
      mysql-test/t/handler.test:
        Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
        The test case.
      sql/lock.cc:
        Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
        Changed a comment which did confuse me and which is not fully
        correct anymore after the 5.0 addendum fix.
        Added an assertion which would fire without the 5.0 addendum fix.
      sql/mysql_priv.h:
        Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
        Changed a definition for the secondary fix.
      sql/sql_base.cc:
        Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
        Changed function calls for the secondary fix.
      sql/sql_class.cc:
        Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
        Changed a function call for the secondary fix.
      sql/sql_handler.cc:
        Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
        The first two diffs make the primary bug fix.
        The rest is for the secondary fix.
      sql/sql_table.cc:
        Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
        The first diff (four changed places) make the 5.0 addendum fix.
        The other three are changed function calls for the secondary fix.
      013b3d8a
  11. 14 Sep, 2005 1 commit
    • unknown's avatar
      Fix for bug #12704 "Server crashes during trigger execution". · d5303b8a
      unknown authored
      This bug occurs when some trigger for table used by DML statement is created
      or changed while statement was waiting in lock_tables(). In this situation
      prelocking set which we have calculated becames invalid which can easily lead
      to errors and even in some cases to crashes.
      
      With proposed patch we no longer silently reopen tables in lock_tables(),
      instead caller of lock_tables() becomes responsible for reopening tables and
      recalculation of prelocking set.
      
      
      mysql-test/t/trigger.test:
        Added tests for bug #12704 "Server crashes during trigger execution".
        Unfortunately these tests rely on the order in which tables are locked
        by statement so they are non-determenistic and therefore should be disabled.
      sql/lock.cc:
        mysql_lock_tables():
          Now instead of always reopening altered or dropped tables by itself
          mysql_lock_tables() can notify upper level and rely on caller doing this.
      sql/mysql_priv.h:
        Now mysql_lock_tables() can either reopen deleted or altered tables by itself
        or notify caller about such situation through 'need_reopen' argument and rely
        on it in this.
        Also lock_tables() has new 'need_reopen' out parameter through which it
        notifies caller that some tables were altered or dropped so he needs to reopen
        them (and rebuild prelocking set some triggers may change or simply appear).
      sql/sp.cc:
        sp_add_used_routine():
          To be able to restore LEX::sroutines_list to its state right after parsing
          we now adjust  LEX::sroutines_list_own_last/sroutines_list_own_elements when
          we add directly used routine.
        sp_remove_not_own_routines():
          Added procedure for restoring LEX::sroutines/sroutines_list to their state
          right after parsing (by throwing out non-directly used routines).
        sp_cache_routines_and_add_tables_for_view()/sp_update_stmt_used_routines():
          We should use LEX::sroutines_list instead of LEX::sroutines as source of
          routines used by view, since LEX::sroutines is not availiable for view
          on second attempt to open it (see comment in open_tables() about it).
      sql/sp.h:
        sp_remove_not_own_routines():
          Added procedure for restoring LEX::sroutines/sroutines_list to their state
          right after parsing (by throwing out non-directly used routines).
      sql/sp_head.cc:
        Removed assert which is no longer always true.
      sql/sql_base.cc:
        reopen_table():
          When we re-open table and do shallow copy of TABLE object we should adjust
          pointers to it in associated Table_triggers_list object. Removed nil
          operation.
        open_tables():
          Now this function is able to rebuild prelocking set for statement if it is
          needed. It also correctly handles FLUSH TABLES which may occur during its
          execution.
        lock_tables():
          Instead of allowing mysql_lock_tables() to silently reopen altered or dropped
          tables let us notify caller and rely on that it will do reopen itself.
          This solves the problem when trigger suddenly appears or changed during
          mysq_lock_tables().
        close_tables_for_reopen():
          Added routine for properly preparing for reopening of tables and recalculation
          of set of prelocked tables.
      sql/sql_handler.cc:
        Here we let mysql_lock_tables() to reopen dropped or altered tables by itself.
      sql/sql_insert.cc:
        Here we let mysql_lock_tables() to reopen dropped or altered tables by itself.
      sql/sql_lex.cc:
        LEX:
          Added 'sroutines_list_own_last' and 'sroutines_list_own_elements' members
          which are used for keeping state in which 'sroutines_list' was right after
          statement parsing (and for restoring of this list to this state).
      sql/sql_lex.h:
        LEX:
          Added 'sroutines_list_own_last' and 'sroutines_list_own_elements' members
          which are used for keeping state in which 'sroutines_list' was right after
          statement parsing (and for restoring of this list to this state).
          Added chop_off_not_own_tables() method to simplify throwing away list
          of implicitly used (prelocked) tables.
      sql/sql_prepare.cc:
        Now instead of silently reopening altered or dropped tables in
        lock_tables() we notify caller and rely on that the caller will
        reopen tables.
      sql/sql_table.cc:
        Here we let mysql_lock_tables() to reopen dropped or altered tables by itself.
      sql/sql_trigger.cc:
        Added Table_triggers_list::set_table() method to adjust Table_triggers_list
        to new pointer to TABLE instance.
      sql/sql_trigger.h:
        Added Table_triggers_list::set_table() method to adjust Table_triggers_list
        to new pointer to TABLE instance.
      sql/sql_update.cc:
        Now instead of silently reopening altered or dropped tables in
        lock_tables() we notify caller and rely on that the caller will
        reopen tables.
      d5303b8a
  12. 11 Aug, 2005 1 commit
    • unknown's avatar
      Cleanups during review of new code · d83f6908
      unknown authored
      mysql-test/t/sp.test:
        Use --disable_parsing instead of comments
      sql/lock.cc:
        Remove compiler warning
      sql/mysqld.cc:
        Always send valid flag argument to reload_acl_and_cache()
      sql/sp_cache.cc:
        Simple optimization
        Don't use mutex to read 'long' variable
        Indentation fixes
      sql/sp_head.cc:
        Fix comments to use /* */
        Set proc_info to 0 after close_thread_tables()
      sql/sql_base.cc:
        remove not needed test
      sql/sql_parse.cc:
        Always send valid flag argument to reload_acl_and_cache()
        Fixed indentation
        Ensure we get an error if reset_master() fails.
      d83f6908
  13. 02 Aug, 2005 1 commit
    • unknown's avatar
      Fix bug #11934 Two sequential FLUSH TABLES WITH READ LOCK hangs client · 5792c4d1
      unknown authored
      Bug was introduced by cset 1.1659.14.1. Before it server was silently
      ignoring that lock can't be acquired because it already acquired.
      
      This patch makes make_global_read_lock_block_commit() return without error
      if lock already acquired.
      
      
      mysql-test/t/flush_table.test:
        Test case for bug#11934 FLUSH TABLES WITH READ LOCK hangs client.
      mysql-test/r/flush_table.result:
        Test case for bug#11934 FLUSH TABLES WITH READ LOCK hangs client.
      sql/lock.cc:
        Fix bug #11934 Two sequential FLUSH TABLES WITH READ LOCK hangs client.
        Make make_global_read_lock_block_commit() return without error if lock already acquired.
      5792c4d1
  14. 28 Jul, 2005 1 commit
    • unknown's avatar
      After merge fixes · f11418f7
      unknown authored
      mysql-test/r/func_group.result:
        Update results after merge (things moved around when aligning 4.1 and 5.0 tests)
      mysql-test/r/mysqldump.result:
        Update results after merge (things moved around when aligning 4.1 and 5.0 tests)
      mysql-test/r/ps_grant.result:
        Update results after merge (test moved to another file)
      mysql-test/t/mysqldump.test:
        Align with other lines
      sql/lock.cc:
        Removed compiler warning
        Fixed typo during merge
      f11418f7
  15. 27 Jul, 2005 2 commits
    • unknown's avatar
      Missing initialisation of table->s->db in lock_table_name · 9bbcede4
      unknown authored
      Bug #12112
      
      
      9bbcede4
    • unknown's avatar
      Review of new code: · 34b340c4
      unknown authored
      Change argument order to be database, tablename for some functions
      
      
      sql/lock.cc:
        Remove not needed block
      sql/mysql_priv.h:
        Change argument order to be database, tablename (like in most other functions)
      sql/sql_table.cc:
        Change argument order to be database, tablename (like in most other functions)
        Make 'flags' inline
      sql/table.cc:
        Change argument order to be database, tablename (like in most other functions)
      sql/unireg.cc:
        Change argument order to be database, tablename (like in most other functions)
      34b340c4
  16. 26 Jul, 2005 1 commit
    • unknown's avatar
      Review fixes: · 90e41fac
      unknown authored
      Fixed portability problem with bool in C programs
      Moved close_thread_tables out from LOCK_thread_count mutex (safety fix)
      my_sleep() -> pthread_cond_timedwait()
      
      
      include/thr_lock.h:
        bool -> my_bool (bool is not portable in C programs)
      mysys/thr_lock.c:
        bool -> my_bool (bool is not portable in C programs)
      sql/lock.cc:
        Added comment
        Don't use | on bool variable
      sql/mysql_priv.h:
        Added comment
      sql/slave.cc:
        Moved close_thread_tables out from LOCK_thread_count mutex (safety fix)
      sql/sql_base.cc:
        Added comments
        my_sleep() -> pthread_cond_timedwait() to get less code and potentitally faster loop
      BitKeeper/etc/ignore:
        added ac_available_languages_fragment
      90e41fac
  17. 20 Jul, 2005 1 commit
    • unknown's avatar
      Bug #10600 After review fixes · af1dfb61
      unknown authored
      sql/lock.cc:
        Used flags immediately in call
      sql/mysql_priv.h:
        Added RTFC (short for remove_table_from_cache)
        for constants and used hex syntax to clarify it is bits
        in the flags
      sql/sql_base.cc:
        Use flags parameter immediately and use flags immediately in call
        Change to other variant of eternal loop variant
      sql/sql_table.cc:
        Use flags immediately in call
      af1dfb61
  18. 19 Jul, 2005 1 commit
    • unknown's avatar
      A fix and a test case for Bug#10760 and complementary cleanups. · de6f5ae5
      unknown authored
      The idea of the patch
      is that every cursor gets its own lock id for table level locking.
      Thus cursors are protected from updates performed within the same 
      connection. Additionally a list of transient (must be closed at
      commit) cursors is maintained and all transient cursors are closed
      when necessary. Lastly, this patch adds support for deadlock
      timeouts to TLL locking when using cursors.
      + post-review fixes.
      
      
      include/thr_lock.h:
        - add a notion of lock owner to table level locking. When using
          cursors, lock owner can not be identified by a thread id any more, 
          as we must protect cursors from updates issued within the same 
          connection (thread). So, each cursor has its own lock identifier to 
          use with table level locking.
        - extend return values of thr_lock and thr_multi_lock with
          THR_LOCK_TIMEOUT and THR_LOCK_DEADLOCK, since these conditions
          are now possible (see comments to thr_lock.c)
      mysys/thr_lock.c:
        Better support for cursors:
        - use THR_LOCK_OWNER * as lock identifier, not pthread_t.
        - check and return an error for a trivial deadlock case, when an
          update statement is issued to a table locked by a cursor which has 
          been previously opened in the same connection.
        - add support for locking timeouts: with use of cursors, trivial 
          deadlocks can occur. For now the only remedy is the lock wait timeout,
          which is initialized from a new global variable 'table_lock_wait_timeout'
          Example of a deadlock (assuming the storage engine does not downgrade 
          locks):
          con1: open cursor for select * from t1;
          con2: open cursor for select * from t2;
          con1: update t2 set id=id*2;  -- blocked
          con2: update t1 set id=id*2;  -- deadlock
          Lock timeouts are active only if a connection is using cursors.
        - the check in the wait_for_lock loop has been changed from
          data->cond != cond to data->cond != 0. data->cond is zeroed
          in every place it's changed. 
        - added comments
      sql/examples/ha_archive.cc:
        - extend the handlerton with the info about cursor behaviour at commit.
      sql/examples/ha_archive.h:
        - ctor moved to .cc to make use of archive handlerton
      sql/examples/ha_example.cc:
        - add handlerton instance, init handler::ht with it
      sql/examples/ha_example.h:
        - ctor moved to .cc to make use of ha_example handlerton
      sql/examples/ha_tina.cc:
        - add handlerton instance, init handler::ht with it
      sql/examples/ha_tina.h:
        - ctor moved to .cc to make use of CSV handlerton
      sql/ha_berkeley.cc:
        - init handlerton::flags and handler::ht
      sql/ha_berkeley.h:
        - ctor moved to .cc to make use of BerkeleyDB handlerton
      sql/ha_blackhole.cc:
        - add handlerton instance, init handler::ht with it
      sql/ha_blackhole.h:
        - ctor moved to .cc to make use of blackhole handlerton
      sql/ha_federated.cc:
        - add handlerton instance, init handler::ht with it
      sql/ha_federated.h:
        - ctor moved to .cc to make use of federated handlerton
      sql/ha_heap.cc:
        - add handlerton instance, init handler::ht with it
      sql/ha_heap.h:
        - ctor moved to .cc to make use of ha_heap handlerton
      sql/ha_innodb.cc:
        - init handlerton::flags and handler::ht of innobase storage engine
      sql/ha_innodb.h:
        - ctor moved to .cc to make use of archive handlerton
      sql/ha_myisam.cc:
        - add handlerton instance, init handler::ht with it
      sql/ha_myisam.h:
        - ctor moved to .cc to make use of MyISAM handlerton
      sql/ha_myisammrg.cc:
        - init handler::ht in the ctor
      sql/ha_myisammrg.h:
        - ctor moved to .cc to make use of MyISAM MERGE handlerton
      sql/ha_ndbcluster.cc:
        - init handlerton::flags and handler::ht
      sql/handler.cc:
        - drop support for ISAM storage engine, which was removed from 5.0
        - close all "transient" cursors at COMMIT/ROLLBACK. A "transient"
          SQL level cursor is a cursor that uses tables that have a transaction-
          specific state.
      sql/handler.h:
        - extend struct handlerton with flags, add handlerton *ht to every
          handler instance.
      sql/lock.cc:
        - extend mysql_lock_tables to send error to the client if 
          thr_multi_lock returns a timeout or a deadlock error.
      sql/mysqld.cc:
        - add server option --table_lock_wait_timeout (in seconds)
      sql/set_var.cc:
        - add new global variable 'table_lock_wait_timeout' to specify
        a wait timeout for table-level locks of MySQL (in seconds). The default
        timeout is 50 seconds. The timeout is active only if the connection
        has open cursors.
      sql/sql_class.cc:
        - implement Statement_map::close_transient_cursors
        - safety suggests that we need an assert ensuring 
         llock_info->n_cursors is functioning properly, adjust destruction of
         the Statement_map to allow such assert in THD::~THD
      sql/sql_class.h:
        - add support for Cursors registry to Statement map.
      sql/sql_prepare.cc:
        - maintain a list of cursors that must be closed at commit/rollback.
      sql/sql_select.cc:
        - extend class Cursor to support specific at-COMMIT/ROLLBACK behavior.
        If a cursor uses tables of a storage engine that 
        invalidates all open tables at COMMIT/ROLLBACK, it must be closed
        before COMMIT/ROLLBACK is executed.
      sql/sql_select.h:
        - add an own lock_id and commit/rollback status flag to class Cursor
      tests/mysql_client_test.c:
        A test case for Bug#10760 and complementary issues: test a simple
        deadlock case too.
      mysql-test/var:
        New BitKeeper file ``mysql-test/var''
      de6f5ae5
  19. 18 Jul, 2005 1 commit
    • unknown's avatar
      Bug #10600 · 6d29b23b
      unknown authored
      remove_table_from_cache fails to signal other thread and gets
      blocked when other thread also gets blocked
      
      
      include/thr_lock.h:
        Report if any threads was signalled
      mysys/thr_lock.c:
        Report if any threads was signalled
      sql/lock.cc:
        Report if any threads was signalled
        Use new interface for remove_table_from_cache
      sql/mysql_priv.h:
        New interface for remove_table_from_cache
        + mysql_lock_abort_for_thread
      sql/sql_base.cc:
        Use new interface of remove_table_cache
        Rewrote remove_table_from_cache to fix bug
      sql/sql_table.cc:
        Use new interface of remove_table_from_cache
      6d29b23b
  20. 13 Jul, 2005 1 commit
    • unknown's avatar
      Implementation of Monty's idea: Now we can open mysql.proc table for lookup · 11f9e513
      unknown authored
      of stored routines definitions even if we already have some tables open and
      locked. To avoid deadlocks in this case we have to put certain restrictions
      on locking of mysql.proc table.
      
      This allows to use stored routines safely under LOCK TABLES without explicitly
      mentioning mysql.proc in the list of locked tables. It also fixes bug #11554
      "Server crashes on statement indirectly using non-cached function".
      
      
      mysql-test/r/sp-error.result:
        Added test which checks that now we can read stored routines definitions
        under LOCK TABLES even if we have not locked mysql.proc explicitly. Also
        added check for restrictions which this ability puts on mysql.proc locking.
        Updated test for bug #9566 to correspond this new situation.
      mysql-test/r/sp-threads.result:
        Added test for bug #11554 "Server crashes on statement indirectly using
        non-cached function".
      mysql-test/t/sp-error.test:
        Added test which checks that now we can read stored routines definitions
        under LOCK TABLES even if we have not locked mysql.proc explicitly. Also
        added check for restrictions which this ability puts on mysql.proc locking.
        Updated test for bug #9566 to correspond this new situation.
      mysql-test/t/sp-threads.test:
        Added test for bug #11554 "Server crashes on statement indirectly using
        non-cached function".
      sql/lock.cc:
        get_lock_data():
         To be able to open and lock for reading system tables like 'mysql.proc',
         when we already have some tables opened and locked, and avoid deadlocks
         we have to disallow write-locking of these tables with any other tables.
      sql/mysql_priv.h:
        open_table() has new parameter which allows to open table even if some-one
        has done a flush or holding namelock on it.
      sql/share/errmsg.txt:
        Added error message saying that one cannot write-lock some of system tables
        with any other tables.
      sql/sp.cc:
        open_proc_table_for_read()/close_proc_table():
          Added functions to be able open and close mysql.proc table when we already
          have some tables open and locked.
        open_proc_table_for_update():
          Added function to simplify opening of mysql.proc for updates.
        db_find_routine_aux()/db_find_routine()/db_update_routine()/...
          Moved responsibility for opening mysql.proc table from db_find_routine_aux()
          one level up, since this level knows better which type of table access for
          reading of for update it needs.
        sp_function_exists():
          Removed unused function.
      sql/sp.h:
        sp_function_exists():
          Removed unused function.
      sql/sql_base.cc:
        open_table():
          Added new parameter which allows to open table even if some-one has done a
          flush or holding namelock on it.
        open_unireg_entry():
          Mark 'mysql.proc' as a system table which has special restrictions on its
          locking, but thanks to them can be open and locked even if we already have
          some open and locked.
      sql/sql_class.cc:
        Moved THD members holding information about open and locked tables to separate
        Open_tables_state class to be able to save/restore this state easier.
        Added THD::push_open_tables_state()/pop_open_tables_state() methods for
        saving/restoring this state.
      sql/sql_class.h:
        Moved THD members holding information about open and locked tables to separate
        Open_tables_state class to be able to save/restore this state easier.
        Added THD::push_open_tables_state()/pop_open_tables_state() methods for
        saving/restoring this state.
      sql/sql_lex.cc:
        Removed LEX::proc_table member which was not really used.
      sql/sql_lex.h:
        Removed LEX::proc_table member which was not really used.
      sql/sql_table.cc:
        open_table() has new parameter which allows to open table even if some-one
        has done a flush or holding namelock on it.
      sql/table.h:
        Added TABLE_SHARE::system_table indicating that this table is system table
        like 'mysql.proc' and we want to be able to open and read-lock it even when
        we already have some tables open and locked (and because of this we have
        to put some restrictions on write locking it).
      11f9e513
  21. 31 May, 2005 1 commit
    • unknown's avatar
      Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. · cf2188ca
      unknown authored
      1.) Added a new option to mysql_lock_tables() for ignoring FLUSH TABLES.
      Used the new option in create_table_from_items().
      It is necessary to prevent the SELECT table from being reopend.
      It would get new storage assigned for its fields, while the
      SELECT part of the command would still use the old (freed) storage.
      2.) Protected the CREATE TABLE and CREATE TABLE ... SELECT commands
      against a global read lock. This prevents a deadlock in
      CREATE TABLE ... SELECT in conjunction with FLUSH TABLES WITH READ LOCK
      and avoids the creation of new tables during a global read lock.
      3.) Replaced set_protect_against_global_read_lock() and
      unset_protect_against_global_read_lock() by
      wait_if_global_read_lock() and start_waiting_global_read_lock()
      in the INSERT DELAYED handling.
      
      
      mysql-test/r/create.result:
        Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
        Added test results.
      mysql-test/t/create.test:
        Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
        Added tests which do not require concurrency.
      sql/lock.cc:
        Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
        Added a new option to mysql_lock_tables() for ignoring FLUSH TABLES.
        Changed the parameter list.
        Removed two unnecessary functions. Their functionality is included in
        wait_if_global_read_lock() and start_waiting_global_read_lock().
      sql/mysql_priv.h:
        Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
        Changed the declaration of mysql_lock_tables().
        Added definitions for the new options.
      sql/sql_acl.cc:
        Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
        Adjusted mysql_lock_tables() calls to the new argument list.
      sql/sql_base.cc:
        Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
        Adjusted mysql_lock_tables() calls to the new argument list.
      sql/sql_handler.cc:
        Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
        Adjusted mysql_lock_tables() calls to the new argument list.
      sql/sql_insert.cc:
        Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
        Replaced set_protect_against_global_read_lock() and
        unset_protect_against_global_read_lock() by
        wait_if_global_read_lock() and start_waiting_global_read_lock()
        in the INSERT DELAYED handling.
        Adjusted mysql_lock_tables() calls to the new argument list.
      sql/sql_parse.cc:
        Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
        Protected the CREATE TABLE and CREATE TABLE ... SELECT commands
        against a global read lock. This prevents a deadlock in
        CREATE TABLE ... SELECT in conjunction with FLUSH TABLES WITH READ LOCK
        and avoids the creation of new tables during a global read lock.
      sql/sql_table.cc:
        Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
        Adjusted mysql_lock_tables() calls to the new argument list.
        Used the new option in create_table_from_items().
      cf2188ca
  22. 07 May, 2005 1 commit
    • unknown's avatar
      WL 1682: Bitvector for updated/read fields in handler interface · fdde665e
      unknown authored
      Fixed clear issues of bitvector and memory allocation issues
      
      
      sql/bitvector.cc:
        Made bitvector memroot class
      sql/bitvector.h:
        Made bitvector memroot class
      sql/handler.cc:
        Need to add updated fields to read set to ensure that they are
        updated since the update code doesn't update if records haven't
        changed
        Added DBUG printout's
      sql/handler.h:
        Moved clear of bitvector's to reset function
        Introduced ha_reset for this purpose to ensure that it isn't
        necessary to perform this clear in all handlers.
      sql/lock.cc:
        Removed clear that has been moved to ha_reset
      sql/opt_range.cc:
        Changed reset to ha_reset
        Added delete file
      sql/sql_base.cc:
        Removed clear and changed reset to ha_reset
      sql/sql_insert.cc:
        Removed clear and changed reset to ha_reset
      sql/sql_select.cc:
        Made sure delete file is done if needed
      sql/sql_table.cc:
        Added delete file in another place needed
      sql/sql_update.cc:
        Bug for multi-update fixed
      fdde665e
  23. 28 Apr, 2005 1 commit
    • unknown's avatar
      WL 1682: Use bitvector instead of query_id to tell handler which fields · 5d3af2b0
      unknown authored
      to read and write
      Changed Server code, added new interface to handler and changed the
      NDB handler, InnoDB handler and Federated handler that previously used
      query_id
      Bug#10202 fix (one-liner fix for memory leak)
      
      
      mysys/my_bitmap.c:
        Debug code
      sql/field.cc:
        Initialise fieldnr to 0 if not set anywhere else
      sql/field.h:
        Introduce a fieldnr (first field = 1 and last = table->s->fields
        in field object to be able to quickly set appropriate bit in
        read/write set
      sql/ha_federated.cc:
        Changed federated handler to use write set instead of query_id
      sql/ha_innodb.cc:
        Changed InnoDB handler to use write set instead of query_id
      sql/ha_ndbcluster.cc:
        Changed NDB handler to use write set instead of query_id
      sql/ha_ndbcluster.h:
        Changed NDB handler to use write set instead of query_id
      sql/handler.cc:
        Allocate read_set and write_set either in get_new_handler or in
        special routine
        Routines used at destruction of handler object
        plus routine to set all primary key fields in read_set
      sql/handler.h:
        bool to keep track if read/write set allocated or not in handler
        Deallocate read/write set at delete of handler object
        New bitmap's for read/write set
      sql/item.cc:
        Set bits in read or write set (set_query_id = 2 => write_set
        set_query_id = 1 => read_set
      sql/lock.cc:
        Clear bit set when starting a new statement in external lock
      sql/mysql_priv.h:
        changed set_query_id from bool to ulong
      sql/opt_range.cc:
        Set primary key read set in all places where HA_EXTRA_RETRIEVE_PRIMARY_KEY
        is used
      sql/sql_acl.cc:
        set all bits in read set all places where HA_EXTRA_RETRIEVE_ALL_COLS
        are used
      sql/sql_base.cc:
        Clear all bits before start new statement when table locked already
        Set bit in read/write set dependent on set_query_id and fieldnr
        bool -> ulong for set_query_id
        set all bits in read set for SELECT * queries where table is not view
      sql/sql_class.h:
        Added comments + changed type of set_query_id
      sql/sql_insert.cc:
        Use 2 when setup_fields called for fields to updated in UPDATE
        and INSERT statements
        set primary key fields when EXTRA param used
      sql/sql_load.cc:
        Set all bits in write set if no fields specified in LOAD DATA FROM
        INFILE
        Otherwise use 2 to set specific fields to be updated by LOAD DATA...
      sql/sql_select.cc:
        Set primary key read set when EXTRA param specified
        Set fieldnr for temporary tables
        Set number of fields before calling get_new_handler
        and only set all bits if there at least one field in table
      sql/sql_table.cc:
        Set all bits in read set for old table and all bits in write set for
        new table for ALTER TABLE copy method
        Set all bits in read set when EXTRA param used
      sql/sql_udf.cc:
        Set all bits in read set when EXTRA param used
      sql/sql_update.cc:
        Set fields to UPDATE to use 2 for set_query_id
        Set all bits in read set when EXTRA param used
      sql/table.cc:
        Set fieldnr in openfrm
        Reallocate read/write set in openfrm since table->s->fields==0
        at call to get_new_handler
      sql/unireg.cc:
        Fix Bug #10202
      5d3af2b0
  24. 27 Apr, 2005 3 commits
    • unknown's avatar
      Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock · 2cd93843
      unknown authored
      After merge fix.
      
      
      2cd93843
    • unknown's avatar
      Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock · f63c8f53
      unknown authored
      Added protection against global read lock while creating and
      initializing a delayed insert handler.
      Allowed to ignore a global read lock when locking the table
      inside the delayed insert handler.
      Added some minor improvements.
      
      
      sql/lock.cc:
        Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
        Changed mysql_lock_tables() to allow for ignoring global read lock.
        Added functions to set/unset protection against global read lock.
      sql/mysql_priv.h:
        Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
        Changed existing and added new function declarations.
      sql/sql_insert.cc:
        Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
        Added and extended some comments.
        Added a protection against global read lock while a handler is
        created and initialized.
        Moved the unlock of the delayed insert object past its last usage
        in delayed_get_table().
        Changed the table locking in handle_delayed_insert() so that it
        does not wait for global read lock.
      f63c8f53
    • unknown's avatar
      All changes for change to all storage engines being under storage directory. · 25311ea4
      unknown authored
      config/ac-macros/ha_berkeley.m4:
        change for stroage
      config/ac-macros/ha_innodb.m4:
        change for storage
      config/ac-macros/ha_ndbcluster.m4:
        change for storage
      configure.in:
        change for storage
      extra/perror.c:
        change for storage
      libmysqld/Makefile.am:
        change for storage
      mysql-test/mysql-test-run.sh:
        change for storage
      sql/Makefile.am:
        change for storage
      sql/ha_innodb.cc:
        change storage
      sql/ha_myisam.cc:
        change for storage
      sql/ha_myisammrg.cc:
        change for storage
      sql/lock.cc:
        change for storage
      sql/sql_cache.cc:
        change for storage
      storage/heap/Makefile.am:
        change for storage
      storage/innobase/include/Makefile.i:
        change for storage
      storage/myisammrg/myrg_def.h:
        change for storage
      storage/ndb/Makefile.am:
        change for storage
      storage/ndb/config/common.mk.am:
        change for storage
      storage/ndb/config/type_kernel.mk.am:
        change for storage
      storage/ndb/config/type_mgmapiclient.mk.am:
        change for storage
      storage/ndb/config/type_ndbapi.mk.am:
        change for storage
      storage/ndb/config/type_ndbapiclient.mk.am:
        change for storage
      storage/ndb/config/type_ndbapitest.mk.am:
        change for storage
      storage/ndb/config/type_ndbapitools.mk.am:
        change for storage
      storage/ndb/config/type_util.mk.am:
        change for storage
      storage/ndb/docs/Makefile.am:
        change for storage
      storage/ndb/include/Makefile.am:
        change for storage
      storage/ndb/src/Makefile.am:
        change for storage
      storage/ndb/src/common/debugger/Makefile.am:
        change for storage
      storage/ndb/src/common/debugger/signaldata/Makefile.am:
        change for storage
      storage/ndb/src/common/logger/Makefile.am:
        change for storage
      storage/ndb/src/common/mgmcommon/Makefile.am:
        change for storage
      storage/ndb/src/common/portlib/Makefile.am:
        change for storage
      storage/ndb/src/common/transporter/Makefile.am:
        change for storage
      storage/ndb/src/common/util/Makefile.am:
        change for storage
      storage/ndb/src/cw/cpcd/Makefile.am:
        change for storage
      storage/ndb/src/kernel/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/backup/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/cmvmi/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/dbacc/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/dbdict/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/dbdih/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/dblqh/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/dbtc/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/dbtup/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/dbtux/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/dbutil/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/grep/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/ndbcntr/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/ndbfs/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/qmgr/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/suma/Makefile.am:
        change for storage
      storage/ndb/src/kernel/blocks/trix/Makefile.am:
        change for storage
      storage/ndb/src/kernel/error/Makefile.am:
        change for storage
      storage/ndb/src/kernel/vm/Makefile.am:
        change for storage
      storage/ndb/src/mgmapi/Makefile.am:
        change for storage
      storage/ndb/src/mgmclient/Makefile.am:
        change for storage
      storage/ndb/src/mgmsrv/Makefile.am:
        change for storage
      storage/ndb/src/ndbapi/Makefile.am:
        change for storage
      storage/ndb/test/ndbapi/Makefile.am:
        change for storage
      storage/ndb/test/ndbapi/bank/Makefile.am:
        change for storage
      storage/ndb/test/run-test/Makefile.am:
        change for storage
      storage/ndb/test/src/Makefile.am:
        Change for storage
      storage/ndb/test/tools/Makefile.am:
        Change for storage
      storage/ndb/tools/Makefile.am:
        Change for storage
      25311ea4
  25. 03 Apr, 2005 1 commit
    • unknown's avatar
      XID SQL syntax · 2fc4270b
      unknown authored
      minor cleanups
      XA tests
      
      
      include/m_ctype.h:
        minor cleanup
      sql/field.cc:
        minor cleanup
      sql/handler.cc:
        XID SQL syntax
      sql/handler.h:
        XID SQL syntax
      sql/item_sum.h:
        minor cleanup
      sql/lock.cc:
        comments
      sql/sql_class.cc:
        minor cleanup
      sql/sql_lex.h:
        XID SQL syntax
      sql/sql_parse.cc:
        XID SQL syntax
      sql/sql_yacc.yy:
        XID SQL syntax
        cleanups
      2fc4270b
  26. 16 Mar, 2005 2 commits
    • unknown's avatar
      Cleanup during reviews · 284b8b8b
      unknown authored
      Removed some optional arguments
      Fixed portability problem in federated tests
      
      
      client/sql_string.cc:
        update from sql/sql_string.cc
      client/sql_string.h:
        update from sql/sql_string.h
      mysql-test/r/federated.result:
        Fixed error message
      sql/field.cc:
        Cleanup during review
        Remove const in 'const unsigned int'
      sql/field.h:
        Remove const in 'const unsigned int'
      sql/ha_federated.cc:
        Better error string.  Add missing argument to error (before 'errno' was picked up from stack)
      sql/handler.cc:
        Removed compiler warning
      sql/item_func.cc:
        Cleanup during review
      sql/item_sum.cc:
        Cleanup during review
      sql/lock.cc:
        Remove optional arguments
      sql/log_event.cc:
        Remove optional arguments
      sql/mysql_priv.h:
        Remove optional arguments
        cahnge preapre_create_fields to use pointers instead of references
      sql/opt_range.cc:
        Fix arguments so that return value is last
      sql/sql_base.cc:
        Remove optional arguments
      sql/sql_delete.cc:
        Remove optional arguments
      sql/sql_error.cc:
        Remove optional arguments
      sql/sql_help.cc:
        Remove optional arguments
      sql/sql_parse.cc:
        Remove optional arguments
      sql/sql_prepare.cc:
        Remove optional arguments
      sql/sql_rename.cc:
        Remove optional arguments
      sql/sql_select.cc:
        Remove optional arguments
      sql/sql_show.cc:
        Cleanup during review
      sql/sql_string.cc:
        Simple optimization
      sql/sql_table.cc:
        Remove optional arguments
        Fixed indentation
      sql/sql_update.cc:
        Remove optional arguments
      sql/sql_yacc.yy:
        Change references to pointers
      284b8b8b
    • unknown's avatar
      global read lock code now uses a dedicated mutex · 232dc922
      unknown authored
      (otherwise a deadlock when ALTER writes to
      binlog holding LOCK_open, it causes binlog rotation,
      binlog waits for prepared transactions to commit, and commit
      needs LOCK_open to check for global read lock)
      
      
      mysql-test/r/flush.result:
        global read lock code now uses a dedicated mutex
      mysql-test/t/flush.test:
        global read lock code now uses a dedicated mutex
      sql/lock.cc:
        global read lock code now uses a dedicated mutex
      sql/mysql_priv.h:
        global read lock code now uses a dedicated mutex
      sql/mysqld.cc:
        global read lock code now uses a dedicated mutex
      sql/sql_table.cc:
        global read lock code now uses a dedicated mutex
      232dc922
  27. 23 Feb, 2005 1 commit
    • unknown's avatar
      FIx for BUG#8682 "flush_block_commit test hangs on HPUX": · 5941f19b
      unknown authored
      start_waiting_global_read_lock() should wake up all those who are waiting
      for protect_against_global_read_lock to go down to 0: those registered in waiting_for_read_lock
      AND those registered in global_read_lock_blocks_commit.
      
      
      sql/lock.cc:
        start_waiting_global_read_lock() should wake up all those who are waiting
        for protect_against_global_read_lock to go down to 0: those registered in waiting_for_read_lock
        AND those registered in global_read_lock_blocks_commit.
      5941f19b
  28. 20 Jan, 2005 1 commit
    • unknown's avatar
      added variable NDB_MGM to be able to run the management client in tests · 12d1ee54
      unknown authored
          added testcase for Bug#8035
          added option to wait for not-started
          Bug#8035
      
      
      mysql-test/mysql-test-run.sh:
        added variable NDB_MGM to be able to run the management client in tests
      mysql-test/r/ndb_autodiscover.result:
        added testcase for Bug#8035
      mysql-test/t/ndb_autodiscover.test:
        added testcase for Bug#8035
      ndb/tools/waiter.cpp:
        added option to wait for not-started
      sql/lock.cc:
        Bug#8035
      12d1ee54
  29. 06 Jan, 2005 1 commit
    • unknown's avatar
      First stage of table definition cache · acf76e3b
      unknown authored
      Split TABLE to TABLE and TABLE_SHARE (TABLE_SHARE is still allocated as part of table, will be fixed soon)
      Created Field::make_field() and made Field_num::make_field() to call this
      Added 'TABLE_SHARE->db' that points to database name; Changed all usage of table_cache_key as database name to use this instead
      Changed field->table_name to point to pointer to alias. This allows us to change alias for a table by just updating one pointer.
      Renamed TABLE_SHARE->real_name to table_name
      Renamed TABLE->table_name to alias
      Renamed TABLE_LIST->real_name to table_name
      
      
      include/myisam.h:
        Added const before names
      mysql-test/r/group_min_max.result:
        Make results repeatable
      mysql-test/t/group_min_max.test:
        Make results repeatable
      sql/field.cc:
        Created Field::make_field() and made Field_num::make_field() to call this
        Use TABLE_SHARE
        Use sql_strmake() instead of sql_memdup() to simplify code
      sql/field.h:
        Changed table_name to be pointer to table_name. This allows us to change alias for all fields by just changing one pointer.
        Use TABLE_SHARE
      sql/field_conv.cc:
        Use TABLE_SHARE
      sql/filesort.cc:
        Use TABLE_SHARE
      sql/ha_berkeley.cc:
        Use TABLE_SHARE
      sql/ha_heap.cc:
        Use TABLE_SHARE
      sql/ha_innodb.cc:
        Use TABLE_SHARE
      sql/ha_myisam.cc:
        Use TABLE_SHARE
      sql/ha_myisammrg.cc:
        Use TABLE_SHARE
        Change some pointer handling to use const char*
      sql/ha_ndbcluster.cc:
        Use TABLE_SHARE
      sql/handler.cc:
        Use TABLE_SHARE
      sql/item.cc:
        Use TABLE_SHARE
      sql/item_func.cc:
        Use TABLE_SHARE
      sql/item_subselect.cc:
        Use TABLE_SHARE
      sql/item_sum.cc:
        Use TABLE_SHARE
      sql/key.cc:
        Use TABLE_SHARE
      sql/lock.cc:
        Use TABLE_SHARE
      sql/log_event.cc:
        real_name -> table_name
      sql/mysql_priv.h:
        Use TABLE_SHARE
      sql/opt_range.cc:
        Use TABLE_SHARE
      sql/opt_sum.cc:
        Use TABLE_SHARE
      sql/records.cc:
        Use TABLE_SHARE
      sql/repl_failsafe.cc:
        real_name -> table_name
      sql/slave.cc:
        Use TABLE_SHARE
      sql/sp.cc:
        Use TABLE_SHARE
      sql/sp_head.cc:
        real_name -> table_name
      sql/sql_acl.cc:
        Use TABLE_SHARE
        removed unnecessary assert
        fixed indentation
        changed some char * -> const char*
      sql/sql_acl.h:
        changed some char* -> const char*
      sql/sql_base.cc:
        Use TABLE_SHARE
      sql/sql_cache.cc:
        Use TABLE_SHARE
      sql/sql_class.cc:
        Use TABLE_SHARE
      sql/sql_db.cc:
        real_name -> table_name
      sql/sql_delete.cc:
        Use TABLE_SHARE
      sql/sql_derived.cc:
        Use TABLE_SHARE
      sql/sql_handler.cc:
        Use TABLE_SHARE
      sql/sql_help.cc:
        Use TABLE_SHARE
      sql/sql_insert.cc:
        Use TABLE_SHARE
      sql/sql_load.cc:
        Use TABLE_SHARE
      sql/sql_parse.cc:
        Use TABLE_SHARE
      sql/sql_rename.cc:
        real_name -> table_name
      sql/sql_select.cc:
        Use TABLE_SHARE
        table->blob_fields now points to field offsets, not fields
        tmp_table->table_name now points to alias name
      sql/sql_show.cc:
        Use TABLE_SHARE
      sql/sql_table.cc:
        Use TABLE_SHARE
      sql/sql_test.cc:
        Use TABLE_SHARE
      sql/sql_trigger.cc:
        Use TABLE_SHARE
      sql/sql_udf.cc:
        Use TABLE_SHARE
      sql/sql_union.cc:
        real_name -> table_name
      sql/sql_update.cc:
        Use TABLE_SHARE
      sql/sql_view.cc:
        Use TABLE_SHARE
      sql/table.cc:
        Split TABLE to TABLE and TABLE_SHARE
        Changed blob_field to be field offsets instead of pointer to fields
        Only initialize table->s->default_values with default record (not all table->record[#])
        Some indentation changes
      sql/table.h:
        Split TABLE to TABLE and TABLE_SHARE
      sql/tztime.cc:
        real_name -> table_name
      sql/unireg.cc:
        Use TABLE_SHARE
      sql/unireg.h:
        Use TABLE_SHARE
      acf76e3b
  30. 27 Dec, 2004 1 commit
  31. 16 Dec, 2004 1 commit
  32. 09 Dec, 2004 1 commit
    • unknown's avatar
      Added support for a LOCK TABLES...WHERE ENGINE = InnoDB query which sets · 0f99fe72
      unknown authored
      transactional table locks to tables mentioned in the query. These locks
      are released at the end of the transaction automatically.
      This is fix for bugs #5655, #5998 and issue #3762.
      
      
      
      
      innobase/include/lock0lock.h:
        Added a new lock type LOCK_TABLE_TRANSACTIONAL.
      innobase/include/trx0trx.h:
        Added a varible to store the number of transactional table locks
        reserved by the transaction and stored in the trx_locks list.
      innobase/lock/lock0lock.c:
        Added a lock type LOCK_TABLE_TRANSACTIONAL.
      innobase/row/row0mysql.c:
        Added support for a transactional table lock.
      innobase/trx/trx0roll.c:
        Make compiler happy and format function.
      innobase/trx/trx0trx.c:
        Added information about number of explicit and transactional table locks in
        the innodb monitor.
      sql/ha_innodb.cc:
        Added support for a LOCK_TABLE_TRANSACTIONAL table lock (SQLCOM_LOCK_TABLES_TRANSACTIONAL).
        Transactional table locks are taken in the function ::transactional_table_lock().
      sql/ha_innodb.h:
        Added prototype for a function trandactional_table_lock().
      sql/handler.h:
        Added prototype for a virtual function transactional_table_lock().
        Handler does not need to implement this function.
      sql/lock.cc:
        Added a function transactional_lock_tables() to lock all tables in the list
        with transactional table lock. These locks can cause a deadlock and
        this error should be reported back to user.
      sql/mysql_priv.h:
        Added prototype for a function transactional_lock_tables().
      sql/sql_lex.h:
        Added SQLCOM_LOCK_TABLES_TRANSACTIONAL command.
      sql/sql_parse.cc:
        Added SQLCOM_LOCK_TABLES_TRANSACTIONAL command.
      sql/sql_yacc.yy:
        Added parsing rules for a LOCK TABLES...WHERE ENGINE = x;
      0f99fe72
  33. 02 Dec, 2004 1 commit
    • unknown's avatar
      Making FLUSH TABLES WITH READ LOCK killable while it's waiting for running... · 75fa4c00
      unknown authored
      Making FLUSH TABLES WITH READ LOCK killable while it's waiting for running commits to finish. Normally this step is not long but it's still nice to be killable
      (especially in case of bug like BUG#6732 "FLUSH TABLES WITH READ LOCK + COMMIT makes next FLUSH...LOCK hang forever").
      
      
      sql/lock.cc:
        making FLUSH TABLES WITH READ LOCK killable while it's waiting for running commits to finish
      sql/mysql_priv.h:
        prototype change
      sql/sql_parse.cc:
        now it's possible that make_global_read_lock_block_commit fails (killed)
      75fa4c00
  34. 30 Nov, 2004 1 commit
    • unknown's avatar
      two-line fix for BUG#6732 "FLUSH TABLES WITH READ LOCK + COMMIT makes next... · 352ad815
      unknown authored
      two-line fix for BUG#6732 "FLUSH TABLES WITH READ LOCK + COMMIT makes next FLUSH...LOCK hang forever"
      (originally reported as "second run of innobackup hangs forever and can even hang server").
      Plus testcase for the bugfix and comments about global read locks.
      
      
      mysql-test/r/flush_block_commit.result:
        result update
      mysql-test/t/flush_block_commit.test:
        testing bugfix (originally: second run of innobackup hangs)
      sql/lock.cc:
        When we are in start_waiting_global_read_lock(), if we ourselves have
        the global read lock, there is nothing to start. This makes a pair with how 
        wait_if_global_read_lock() behaves when we ourselves have the global read lock.
        Previously, start_waiting_global_read_lock() decremented protect... whereas wait_if_global_read_lock()
        hadn't incremented it => very wrong => hangs.
        Descriptive comments on how global read lock works.
      352ad815
  35. 13 Nov, 2004 1 commit
    • unknown's avatar
      now my_printf_error is not better then my_error, but my_error call is shorter · 8d71bcec
      unknown authored
      used only one implementation of format parser of (printf)
      fixed multistatement
      
      
      include/mysqld_error.h:
        newerror messages
      mysql-test/t/key.test:
        unknown error replaced with real error
      mysys/my_error.c:
        my_error & my_printf_error use my_vsprintf
      sql/field_conv.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/ha_innodb.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/handler.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/item.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/item_cmpfunc.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/item_func.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/item_strfunc.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/lock.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/log.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/parse_file.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/procedure.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/protocol.cc:
        no need reset thd->lex->found_colon to break multiline sequance now, send_error called too late
      sql/repl_failsafe.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/set_var.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/share/czech/errmsg.txt:
        new errors converted from unknown error
      sql/share/danish/errmsg.txt:
        new errors converted from unknown error
      sql/share/dutch/errmsg.txt:
        new errors converted from unknown error
      sql/share/english/errmsg.txt:
        new errors converted from unknown error
      sql/share/estonian/errmsg.txt:
        new errors converted from unknown error
      sql/share/french/errmsg.txt:
        new errors converted from unknown error
      sql/share/german/errmsg.txt:
        new errors converted from unknown error
      sql/share/greek/errmsg.txt:
        new errors converted from unknown error
      sql/share/hungarian/errmsg.txt:
        new errors converted from unknown error
      sql/share/italian/errmsg.txt:
        new errors converted from unknown error
      sql/share/japanese/errmsg.txt:
        new errors converted from unknown error
      sql/share/korean/errmsg.txt:
        new errors converted from unknown error
      sql/share/norwegian-ny/errmsg.txt:
        new errors converted from unknown error
      sql/share/norwegian/errmsg.txt:
        new errors converted from unknown error
      sql/share/polish/errmsg.txt:
        new errors converted from unknown error
      sql/share/portuguese/errmsg.txt:
        new errors converted from unknown error
      sql/share/romanian/errmsg.txt:
        new errors converted from unknown error
      sql/share/russian/errmsg.txt:
        new errors converted from unknown error
      sql/share/serbian/errmsg.txt:
        new errors converted from unknown error
      sql/share/slovak/errmsg.txt:
        new errors converted from unknown error
      sql/share/spanish/errmsg.txt:
        new errors converted from unknown error
      sql/share/swedish/errmsg.txt:
        new errors converted from unknown error
      sql/share/ukrainian/errmsg.txt:
        new errors converted from unknown error
      sql/slave.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sp.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sp_head.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_acl.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_analyse.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_base.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_class.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_db.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_delete.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_handler.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_insert.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_load.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_map.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_parse.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
        multi-row command fixed
      sql/sql_prepare.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
        remover send_error ingected from 4.1
      sql/sql_rename.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_repl.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_select.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_show.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_table.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_trigger.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_udf.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_update.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_view.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_yacc.yy:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/table.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      strings/my_vsnprintf.c:
        * format support added to my_vsprint
      8d71bcec