An error occurred fetching the project authors.
  1. 29 Mar, 2006 1 commit
  2. 13 Mar, 2006 1 commit
    • unknown's avatar
      WL#3154 "Enable REPAIR for CSV tables". · ecba6dc6
      unknown authored
      This is the first commit. Cleanups are
      likely to follow after the merge.
      
      
      mysql-test/r/csv.result:
        update result
      mysql-test/t/csv.test:
        add tests for CSV REPAIR/RESTORE.
      storage/csv/ha_tina.cc:
        add repair/check and a meta-file processing for it
      storage/csv/ha_tina.h:
        add new functions required for tina repair/check
      ecba6dc6
  3. 06 Mar, 2006 1 commit
    • unknown's avatar
      Fix Bug#17600: Invalid data logged into mysql.slow_log · 5fd44f2c
      unknown authored
      Recommit with post-review fixes.
      
      
      mysql-test/r/log_tables.result:
        update result
      mysql-test/t/log_tables.test:
        add a test
      sql/log.cc:
        Fix NULL handling in log tables
      storage/csv/ha_tina.cc:
         Explicitly check fo NULLs, when writing a row.
         We should not hope, that the null field was
         cleaned up.
         Though usually we do call Field::reset() or
         restore_row(), before calling Field::set_null(),
         this depency is neither documented nor enforced
         by other means.
      mysql-test/t/log_tables-master.opt:
        New BitKeeper file ``mysql-test/t/log_tables-master.opt''
      5fd44f2c
  4. 14 Feb, 2006 1 commit
    • unknown's avatar
      BUG#17117: header fille "plugin.h" does not have a namespace prefix · 9236e3c2
      unknown authored
      plugin.h has been moved into include/mysql/plugin.h
      
      
      include/mysql/plugin.h:
        Rename: include/plugin.h -> include/mysql/plugin.h
      include/Makefile.am:
        plugin.h has been moved into include/mysql/plugin.h
      include/myisam.h:
        plugin.h has been moved into include/mysql/plugin.h
      plugin/fulltext/plugin_example.c:
        plugin.h has been moved into include/mysql/plugin.h
      sql/sql_plugin.h:
        plugin.h has been moved into include/mysql/plugin.h
      storage/csv/ha_tina.cc:
        plugin.h has been moved into include/mysql/plugin.h
      storage/example/ha_example.cc:
        plugin.h has been moved into include/mysql/plugin.h
      storage/myisam/ftdefs.h:
        plugin.h has been moved into include/mysql/plugin.h
      9236e3c2
  5. 08 Feb, 2006 1 commit
    • unknown's avatar
      The handlerton structures for archive and CSV had not been updated. Nicht so... · 9f5962ed
      unknown authored
      The handlerton structures for archive and CSV had not been updated. Nicht so gute. I also fixed CSV to use fast alter table and put in a test in archive in case someone tries to do the same there (hint... it won't work). 
      
      
      mysql-test/r/archive.result:
        New results
      mysql-test/r/csv.result:
        New results
      mysql-test/t/archive.test:
        Adding test for new fast alter table
      mysql-test/t/csv.test:
        Adding test for new fast alter table
      sql/ha_archive.cc:
        Updating handlerton to remove warnings.
      storage/csv/ha_tina.cc:
        Updating handlerton to remove warnings, and updated CSV to handle fast alter table.
      storage/csv/ha_tina.h:
        New method.
      9f5962ed
  6. 28 Jan, 2006 1 commit
    • unknown's avatar
      WL#1359 NDB: Add table handler and table information available from SQL commands · f57e0d8e
      unknown authored
      add a FILES table that allows the user to run SQL queries on the files used
      to store their tables.
      
      Currently supports NDB
      
      
      sql/ha_berkeley.cc:
        Add fill_files_table
      sql/ha_blackhole.cc:
        Add fill_files_table
      sql/ha_federated.cc:
        Add fill_files_table
      sql/ha_heap.cc:
        Add fill_files_table
      sql/ha_innodb.cc:
        Add fill_files_table
      sql/ha_myisam.cc:
        Add fill_files_table
      sql/ha_myisammrg.cc:
        Add fill_files_table
      sql/ha_ndbcluster.cc:
        Add fill_files_table and implementation for NDB disk data DATAFILES and UNDOFILES
      sql/ha_partition.cc:
        Add fill_files_table
      sql/handler.h:
        Add fill_files_table to handlerton
      sql/log.cc:
        Add fill_files_table
      sql/mysql_priv.h:
        Add schema_table_store_record as a function that handlertons can call to store rows in INFORMATION_SCHEMA.FILES
      sql/sql_show.cc:
        implement the INFORMATION_SCHEMA.FILES table.
        
        Eventually this may move to PERFORMANCE_SCHEMA.
        
        It currently exists to allow users to query disk usage for NDB disk data tables.
      storage/csv/ha_tina.cc:
        Add fill_files_table
      f57e0d8e
  7. 22 Jan, 2006 1 commit
  8. 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
  9. 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
  10. 11 Jan, 2006 1 commit
    • unknown's avatar
      wl2723 - ndb opt. nr · 641ce5e9
      unknown authored
      mysql-test/t/rpl_multi_engine.test:
        merge fix
      libmysqld/sql_tablespace.cc:
        New BitKeeper file ``libmysqld/sql_tablespace.cc''
      mysql-test/r/ndb_basic_disk.result:
        New BitKeeper file ``mysql-test/r/ndb_basic_disk.result''
      mysql-test/t/ndb_basic_disk.test:
        New BitKeeper file ``mysql-test/t/ndb_basic_disk.test''
      sql/sql_tablespace.cc:
        New BitKeeper file ``sql/sql_tablespace.cc''
      storage/ndb/src/kernel/blocks/OptNR.txt:
        New BitKeeper file ``storage/ndb/src/kernel/blocks/OptNR.txt''
      storage/ndb/src/kernel/vm/mem.txt:
        New BitKeeper file ``storage/ndb/src/kernel/vm/mem.txt''
      storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp:
        New BitKeeper file ``storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp''
      storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp:
        New BitKeeper file ``storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp''
      storage/ndb/tools/ndb_error_reporter:
        New BitKeeper file ``storage/ndb/tools/ndb_error_reporter''
      641ce5e9
  11. 21 Dec, 2005 2 commits
    • unknown's avatar
      plugin version changes · c3c43e12
      unknown authored
      include/plugin.h:
        relocate version
      sql/handler.cc:
        no version checks here
      sql/handler.h:
        version is kinda short
      sql/sql_show.cc:
        version is a short, rearrange and show all
      storage/csv/ha_tina.cc:
        rearrange version
      storage/example/ha_example.cc:
        rearrange version
      c3c43e12
    • unknown's avatar
      Finalize storage engine plugins · 613dd50a
      unknown authored
      Give BerkeleyDB savepoints
      Remove "enum db_type" from most of the code
      
      
      storage/example/ha_example.h:
        Rename: sql/examples/ha_example.h -> storage/example/ha_example.h
      storage/csv/ha_tina.h:
        Rename: sql/examples/ha_tina.h -> storage/csv/ha_tina.h
      config/ac-macros/storage.m4:
        if hton name is "no", then we don't install it as a builtin
      configure.in:
        pluggable changes
      include/plugin.h:
        version field
      mysql-test/r/bdb.result:
        savepoint results copied from innodb test
      mysql-test/r/information_schema.result:
        PLUGINS information schema
      mysql-test/r/information_schema_db.result:
        PLUGINS information schema
      mysql-test/t/bdb.test:
        savepoint test copied from innodb test
      sql/Makefile.am:
        tina and example are not here anymore
      sql/authors.h:
        minor tweek
      sql/ha_archive.cc:
        remove unwanted handlerton entries
      sql/ha_berkeley.cc:
        remove unwanted handlerton entries
        support for savepoints
        changes to show logs
      sql/ha_blackhole.cc:
        remove unwanted handlerton entries
      sql/ha_federated.cc:
        remove unwanted handlerton entries
      sql/ha_heap.cc:
        remove unwanted handlerton entries
      sql/ha_innodb.cc:
        remove unwanted handlerton entries
        changes for show status
      sql/ha_myisam.cc:
        remove unwanted handlerton entries
      sql/ha_myisammrg.cc:
        remove unwanted handlerton entries
      sql/ha_ndbcluster.cc:
        remove unwanted handlerton entries
        changes to stat_print
      sql/ha_partition.cc:
        remove unwanted handlerton entries
        bye bye enum db_type
      sql/ha_partition.h:
        bye bye enum db_type
      sql/handler.cc:
        remove unwanted handlerton entries
        bye bye enum db_type
      sql/handler.h:
        remove unwanted handlerton entries
        bye bye enum db_type
        changes to stat_print_fn
      sql/item_sum.cc:
        bye bye enum db_type
      sql/log.cc:
        remove unwanted handlerton entries
      sql/mysql_priv.h:
        bye bye enum db_type
      sql/mysqld.cc:
        bye bye enum db_type
        reorder plugin initialization
      sql/set_var.cc:
        bye bye enum db_type
      sql/set_var.h:
        bye bye enum db_type
      sql/sql_base.cc:
        bye bye enum db_type
      sql/sql_cache.cc:
        bye bye enum db_type
      sql/sql_class.h:
        bye bye enum db_type
      sql/sql_delete.cc:
        bye bye enum db_type
      sql/sql_insert.cc:
        bye bye enum db_type
      sql/sql_lex.h:
        show plugin
      sql/sql_parse.cc:
        bye bye enum db_type
      sql/sql_partition.cc:
        bye bye enum db_type
      sql/sql_plugin.cc:
        loadable storage engines
      sql/sql_plugin.h:
        loadable storage engines
      sql/sql_rename.cc:
        bye bye enum db_type
      sql/sql_select.cc:
        bye bye enum db_type
      sql/sql_show.cc:
        SHOW PLUGIN
        PLUGINS information schema
        changes to show engines
      sql/sql_table.cc:
        bye bye enum db_type
      sql/sql_view.cc:
        bye bye enum db_type
      sql/sql_view.h:
        bye bye enum db_type
      sql/sql_yacc.yy:
        bye bye enum db_type
      sql/table.cc:
        bye bye enum db_type
      sql/table.h:
        bye bye enum db_type
      sql/unireg.cc:
        bye bye enum db_type
      storage/csv/ha_tina.cc:
        make tina into a loadable plugin
      storage/example/ha_example.cc:
        make into a plugin
      storage/csv/Makefile.am:
        New BitKeeper file ``storage/csv/Makefile.am''
      storage/example/Makefile.am:
        New BitKeeper file ``storage/example/Makefile.am''
      613dd50a
  12. 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
  13. 17 Nov, 2005 1 commit
    • unknown's avatar
      BUG#13406 - incorrect amount of "records deleted" in CSV. · f2af624e
      unknown authored
      Fallback to row-wise delete if number or rows in the table is unknown
      
      
      mysql-test/r/csv.result:
        BUG#13406 - incorrect amount of "records deleted"
      mysql-test/t/csv.test:
        BUG#13406 - incorrect amount of "records deleted"
      sql/examples/ha_tina.cc:
        BUG#13406 - incorrect amount of "records deleted".
        Fallback to row-wise delete if number or rows in the table is unknown
      sql/examples/ha_tina.h:
        BUG#13406 - incorrect amount of "records deleted".
        Fallback to row-wise delete if number or rows in the table is unknown
      f2af624e
  14. 07 Nov, 2005 1 commit
    • unknown's avatar
      Make storage engines "pluggable", handlerton work · 6b3a9cae
      unknown authored
      Makefile.am:
        Changes to autoconf subst
      config/ac-macros/ha_berkeley.m4:
        simplify
      config/ac-macros/ha_ndbcluster.m4:
        simplify
      config/ac-macros/ha_partition.m4:
        simplify
      configure.in:
        strip configure of storage engine specific cruft and simplify
      extra/Makefile.am:
        changes to autoconf/automake subst
      libmysqld/Makefile.am:
        only compile storage engines if required.
        make find object file a little smarter
      libmysqld/examples/Makefile.am:
        changes to autoconf subst
      mysql-test/Makefile.am:
        remove storage engine specific cruft
      mysql-test/r/ps_1general.result:
        cannot gaurantee order of results from 'show storage engines'
      mysql-test/r/show_check.result:
        fix test - frm file fails to be deleted if it is invalid
      mysql-test/r/sql_mode.result:
        isam does not exist, test may need to be redone/fixed in 5.0
      mysql-test/r/warnings.result:
        isam no longer exists
      mysql-test/t/ps_1general.test:
        cannot gaurantee order of results from 'show storage engines'
      mysql-test/t/show_check.test:
        fix test - frm file fails to be deleted if it is invalid
      mysql-test/t/sql_mode.test:
        isam does not exist, test may need to be redone/fixed in 5.0
      mysql-test/t/system_mysql_db_fix.test:
        change isam to myisam
      mysql-test/t/view.test:
        change isam to myisam
      mysql-test/t/warnings.test:
        isam no longer exists
      sql/Makefile.am:
        Make storage engines "pluggable" stage 1
        only compile storage engines if included
      sql/examples/ha_example.cc:
        handlerton work
      sql/examples/ha_example.h:
        handlerton work
      sql/examples/ha_tina.cc:
        handlerton work
      sql/examples/ha_tina.h:
        handlerton work
      sql/ha_archive.cc:
        handlerton work
      sql/ha_archive.h:
        handlerton work
      sql/ha_berkeley.cc:
        handlerton work
      sql/ha_berkeley.h:
        handlerton work
      sql/ha_blackhole.cc:
        handlerton work
      sql/ha_federated.cc:
        handlerton work
      sql/ha_federated.h:
        handlerton work
      sql/ha_heap.cc:
        handlerton work
      sql/ha_innodb.cc:
        handlerton work
      sql/ha_innodb.h:
        handlerton work
      sql/ha_myisam.cc:
        handlerton work
      sql/ha_myisammrg.cc:
        handlerton work
      sql/ha_ndbcluster.cc:
        handlerton work
      sql/ha_ndbcluster.h:
        handlerton work
      sql/ha_partition.cc:
        handlerton work
      sql/handler.cc:
        start removing storage engine specific cruft
      sql/handler.h:
        start removing storage engine specific cruft
        db_type for binlog handlerton
        handlerton flag for not-user-selectable storage engines
      sql/lex.h:
        start removing storage engine specific cruft
      sql/log.cc:
        handlerton work
        give binlog handlerton a 'real' db_type
      sql/mysql_priv.h:
        start removing storage engine specific cruft
      sql/mysqld.cc:
        start removing storage engine specific cruft
      sql/set_var.cc:
        start removing storage engine specific cruft
      sql/sp_head.cc:
        start removing storage engine specific cruft
      sql/sql_class.cc:
        start removing storage engine specific cruft
      sql/sql_class.h:
        start removing storage engine specific cruft
      sql/sql_lex.h:
        start removing storage engine specific cruft
      sql/sql_manager.cc:
        start removing storage engine specific cruft
      sql/sql_manager.h:
        start removing storage engine specific cruft
      sql/sql_parse.cc:
        start removing storage engine specific cruft
      sql/sql_partition.cc:
        start removing storage engine specific cruft
      sql/sql_prepare.cc:
        start removing storage engine specific cruft
      sql/sql_show.cc:
        start removing storage engine specific cruft
      sql/sql_table.cc:
        changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
        start removing storage engine specific cruft
      sql/sql_update.cc:
        changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
      sql/sql_yacc.yy:
        start removing storage engine specific cruft
        test if we should throw error
      sql/table.cc:
        changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
      sql/table.h:
        changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
      sql/unireg.cc:
        changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
      storage/ndb/include/kernel/kernel_types.h:
        added my_config.h
      storage/ndb/include/ndb_global.h.in:
        added my_config.h
      storage/ndb/include/ndb_types.h.in:
        added my_config.h
      config/ac-macros/storage.m4:
        New BitKeeper file ``config/ac-macros/storage.m4''
      sql/handlerton.cc.in:
        New BitKeeper file ``sql/handlerton.cc.in''
      6b3a9cae
  15. 05 Nov, 2005 2 commits
    • unknown's avatar
      Fix Bug#14672 Bug in deletion · b0829011
      unknown authored
      mysql-test/r/csv.result:
        correct result file
      mysql-test/t/csv.test:
        Add test for a bug
      sql/examples/ha_tina.cc:
        Add O_APPEND flag to my_open. We should always add rows to the end of file
      b0829011
    • unknown's avatar
      Fix Bug#13894 Server crashes on update of CSV table · 1b65c704
      unknown authored
      mysql-test/r/csv.result:
        update result file
      mysql-test/t/csv.test:
        Add test for a bug
      sql/examples/ha_tina.cc:
        sort function should return reverted values for chains to be sorted in
        the right orded. don't do a strange memmove
      1b65c704
  16. 04 Oct, 2005 1 commit
    • unknown's avatar
      Final patch for 5.0 for simplifying storage engine code. We now have just one... · ed35cecd
      unknown authored
      Final patch for 5.0 for simplifying storage engine code. We now have just one set of ifdefs. I may also remove the code for creating new handlers.
      May changes were to simplify storage engine setup and support for legacy call to show storage engines.
      
      
      mysql-test/r/ps_1general.result:
        Fixed test results for new listing order
      sql/examples/ha_tina.cc:
        Removed dead code
      sql/examples/ha_tina.h:
        Removed dead code
      sql/ha_archive.cc:
        Capitalized sotrage engine name and moved disabled code.
      sql/ha_berkeley.cc:
        Moved deisabled code
      sql/ha_federated.cc:
        Removed disabled code
      sql/ha_innodb.cc:
        Removed disabled message
      sql/ha_ndbcluster.cc:
        Removed disabled message
      sql/handler.cc:
        Added in legacy support for sotrage engine listing (ala Serg's request). Removed handlertons variables and we now have simplified ha_init code.
      sql/handler.h:
        No longer need handlertons array.
      ed35cecd
  17. 03 Oct, 2005 1 commit
    • unknown's avatar
      Next big patch for loadable storage engines! · 5655d31d
      unknown authored
      Handlerton array is now created instead of using sys_table_types_st. All storage engines can now have inits and giant ifdef's are now gone for startup. No compeltely clean yet, handlertons will next be merged with sys_table_types. Federated and archive now have real cleanup if their inits fail. 
      
      
      sql/examples/ha_archive.cc:
        Modifications for new ha_init code. The init method now checks for errors and will not start up if the errors occur.
      sql/examples/ha_archive.h:
        Change for new init method.
      sql/examples/ha_example.cc:
        New handlerton pieces.
      sql/examples/ha_tina.cc:
        New handlerton pieces.
      sql/ha_berkeley.cc:
        New handlerton pieces, plus changes for ha_init changes. I'm not happy with our current "skip" setup.
      sql/ha_berkeley.h:
        Change in init return.
      sql/ha_blackhole.cc:
        Changes for new handlerton pieces.
      sql/ha_federated.cc:
        Changes for new handlerton and true cleanup code.
      sql/ha_heap.cc:
        Changes for new handlerton returns.
      sql/ha_innodb.cc:
        Changes for handlerton code.
      sql/ha_innodb.h:
        Change in init.
      sql/ha_myisam.cc:
        Changes for additional handlerton bits.
      sql/ha_myisammrg.cc:
        Changes for  new handlerton bits.
      sql/ha_ndbcluster.cc:
        Changes for new handlerton bits.
      sql/ha_ndbcluster.h:
        Changes for handlerton bits.
      sql/handler.cc:
        Changes for ditching show_table_type_st types, and collapsing it into a handlerton array. The ha_init now just loops through all handlers to init (much cleaner...). handlertons and sys_table_types should be merged next.
      sql/handler.h:
        Additions for sys_table_types
      sql/log.cc:
        Clean up of binlog for changes in handlerton
      sql/mysql_priv.h:
        Removed unneeded define for binlog_init
      sql/sql_show.cc:
        Changes for change in handlerton to sys_table_types
      5655d31d
  18. 30 Sep, 2005 1 commit
    • unknown's avatar
      Move handler specific options into handlerton flag check · d553b667
      unknown authored
      BUG#13108
      
      
      mysql-test/r/federated.result:
        added test results for federated alter table
      mysql-test/t/federated.test:
        added test for federated alter table
      sql/examples/ha_example.cc:
        supports table re-creation
      sql/examples/ha_tina.cc:
        supports table re-creation
      sql/ha_blackhole.cc:
        supports table re-creation
      sql/ha_federated.cc:
        added flag for not supporting alter
      sql/ha_heap.cc:
        supports table recreation
      sql/ha_myisam.cc:
        supports table recreation
      sql/ha_myisammrg.cc:
        supports table re-creation
      sql/handler.cc:
        implemented flag check function
      sql/handler.h:
        added additional handlerton flags
        created a function to test flags
        replace ha_supports_generate macro with call to flag check
      sql/sql_delete.cc:
        replaced ha_supports_generate with handlerton flag check
      sql/sql_table.cc:
        added check for handlerton check for alter support
      d553b667
  19. 28 Sep, 2005 1 commit
    • unknown's avatar
      ha_tina cleanup: fixed several compiler warnings, which occured because some methods · 48f8a7da
      unknown authored
      were changed in handler, but not in ha_tina. Added some commments. Fixed the code to fit
      into my editor window :)
      
      
      sql/examples/ha_tina.cc:
        Cleanup: Fix comments and code to fit 80-char lines, remove trailing spaces,
                 add spaces after commas in the function calls.
                 Also added/clarified several comments
      sql/examples/ha_tina.h:
        fix warinings, add some comments about chain usage
      48f8a7da
  20. 22 Sep, 2005 1 commit
  21. 19 Sep, 2005 1 commit
    • unknown's avatar
      Cleanup for handlerton structure to allow for loadable engine work. This is... · fa8fcecb
      unknown authored
      Cleanup for handlerton structure to allow for loadable engine work. This is the first in a series of patches. 
      
      
      sql/examples/ha_archive.cc:
        Now declared externally.
      sql/examples/ha_example.cc:
        Now declared externally
      sql/examples/ha_tina.cc:
        Now declared externally
      sql/ha_berkeley.cc:
        Now declared externally
      sql/ha_blackhole.cc:
        Now declared externally
      sql/ha_federated.cc:
        Now declared externally.
      sql/ha_heap.cc:
        Now declared externally.
      sql/ha_innodb.cc:
        Now declared externally.
      sql/ha_myisam.cc:
        Now declared externally
      sql/ha_myisammrg.cc:
        Now declared externally.
      sql/ha_ndbcluster.cc:
        Now declared externally.
      sql/handler.cc:
        Changes for eventual loadable engines. This will allow us to gain faster access to the handlerton (eventually this will just be a handlteron array).
      sql/handler.h:
        New alias structure and change to show_table_st to place handlerton in the structure.
      fa8fcecb
  22. 07 Sep, 2005 1 commit
  23. 31 Aug, 2005 1 commit
    • unknown's avatar
      Add test for madvise() being declared in C++ code, because it is not · b34af8cd
      unknown authored
      on Solaris even though it is available, and declare it ourselves in
      that case. (Bug #7156)
      
      
      configure.in:
        Add test for madvise() being declared when C++ compiler is used.
      include/my_global.h:
        Handle madvise() being available but not declared in C++
      isam/extra.c:
        Fix typo in define test
      myisam/mi_extra.c:
        Fix typo in define test
      sql/examples/ha_tina.cc:
        Test that we have madvise() before trying to call it.
      b34af8cd
  24. 25 Aug, 2005 1 commit
  25. 24 Aug, 2005 1 commit
    • unknown's avatar
      ha_tina.cc: · 681a4a3a
      unknown authored
        Some lack madvice()
      
      
      sql/examples/ha_tina.cc:
        Some lack madvice()
      681a4a3a
  26. 20 Jul, 2005 1 commit
    • unknown's avatar
      Implement MySQL framework to support consistent read views in · ec55fec9
      unknown authored
      cursors. This should fix Bug#11813 when InnoDB part is in 
      (tested with a draft patch).
      The idea of the patch is that if a storage engine supports
      consistent read views, we open one when open a cursor,
      set is as the active view when fetch from the cursor, and close
      together with cursor close.
      
      
      sql/examples/ha_archive.cc:
        - extend handlerton with cursors methods; fix coding style
      sql/examples/ha_example.cc:
        - extend handlerton with cursors methods; fix coding style
      sql/examples/ha_tina.cc:
        - extend handlerton with cursors methods; fix coding style
      sql/ha_berkeley.cc:
        - extend handlerton with cursors methods
      sql/ha_blackhole.cc:
        - extend handlerton with cursors methods; fix coding style
      sql/ha_federated.cc:
        - extend handlerton with cursors methods; fix coding style
      sql/ha_heap.cc:
        - extend handlerton with cursors methods; fix coding style
      sql/ha_innodb.cc:
        - extend handlerton with cursors methods
      sql/ha_myisam.cc:
        - extend handlerton with cursors methods; fix coding style
      sql/ha_myisammrg.cc:
        - extend handlerton with cursors methods; fix coding style
      sql/ha_ndbcluster.cc:
        - extend handlerton with cursors methods
      sql/handler.h:
        - extend handlerton with cursors methods
      sql/sql_select.cc:
        - create a consistent read view when we open a cursor,
          set it for a fetch, and free when we closing the cursor.
      sql/sql_select.h:
        - add Cursor::ht_info to remember read views used in a cursor.
      tests/mysql_client_test.c:
        Disable an assert that will be no longer valid when consistent
        read views in InnoDB are used.
      ec55fec9
  27. 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
  28. 08 Jul, 2005 1 commit
  29. 05 Jun, 2005 1 commit
  30. 02 Jun, 2005 2 commits
    • unknown's avatar
      tztime.cc: · cee10f97
      unknown authored
        Set #pragma implementation" earlier
      Many files:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      
      
      client/sql_string.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      mysys/raid.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/field.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/ha_berkeley.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/ha_blackhole.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/ha_heap.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/ha_innodb.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/ha_isam.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/ha_isammrg.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/ha_myisam.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/ha_myisammrg.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/ha_ndbcluster.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/handler.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/hash_filo.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/item.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/item_cmpfunc.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/item_func.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/item_geofunc.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/item_strfunc.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/item_subselect.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/item_sum.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/item_timefunc.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/item_uniq.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/log_event.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/opt_range.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/procedure.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/protocol.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/protocol_cursor.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/set_var.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/sql_analyse.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/sql_class.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/sql_crypt.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/sql_list.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/sql_map.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/sql_olap.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/examples/ha_archive.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/sql_select.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/sql_string.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/sql_udf.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/examples/ha_example.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/examples/ha_tina.cc:
        Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
      sql/tztime.cc:
        Set #pragma implementation" earlier
      cee10f97
    • unknown's avatar
      Mainly cleanups for gcc 4.0. Some small pieces from looking at -Wall. Removed... · 0218ecf7
      unknown authored
      Mainly cleanups for gcc 4.0. Some small pieces from looking at -Wall. Removed a number of dumb things in ha_tina.
      
      
      client/mysqladmin.cc:
        gcc 4.0 fix
      sql/examples/ha_archive.cc:
        Bunch of little cleanups from -Wall and gcc 4.0 fixes
      sql/examples/ha_example.cc:
        Noticed that the error call was not quite right.
      sql/examples/ha_tina.cc:
        Bunch of cleanups (many of which were quite dumb of me... and I have no earthly idea how they missed everyone's notice).
      sql/ha_heap.cc:
        Removed unused variable (-Wall find)
      sql/item_subselect.cc:
        Removed unused label.
      sql/mysqld.cc:
        Cleanup of unused function and gcc 4.0 bit.
      sql/opt_range.h:
        Cleanup for gcc 4.0
      sql/repl_failsafe.cc:
        Cleanup for gcc 4.0
      sql/slave.cc:
        Cleanup for gcc 4.0
      sql/sql_acl.cc:
        Cleanup for gcc 4.0
      sql/sql_insert.cc:
        Cleanedup for gcc 4.0
      sql/sql_parse.cc:
        Cleanedup for gcc 4.0
      sql/sql_repl.cc:
        Removed unused variable
      sql/sql_select.cc:
        Cleanedup for gcc 4.0
      0218ecf7
  31. 27 Apr, 2005 1 commit
    • unknown's avatar
      BUG#9714 libsupc++ problem · 072fa90d
      unknown authored
       - Remove linking of libsupc++
       - Move all local static variables to filescope
      
      
      configure.in:
        Remove linking with libsupc++
      sql/examples/ha_archive.cc:
        Move local static variables to file scope
      sql/examples/ha_example.cc:
        Move local static variables to file scope
      sql/examples/ha_tina.cc:
        Move local static variables to file scope
      sql/ha_berkeley.cc:
        Move local static variables to file scope
      sql/ha_blackhole.cc:
        Move local static variables to file scope
      sql/ha_federated.cc:
        Move local static variables to file scope
      sql/ha_heap.cc:
        Move local static variables to file scope
      sql/ha_innodb.cc:
        Move local static variables to file scope
      sql/ha_myisam.cc:
        Move local static variables to file scope
      sql/ha_myisammrg.cc:
        Move local static variables to file scope
      sql/ha_ndbcluster.cc:
        Move local static variables to file scope
      sql/item.cc:
        Move local static instance variables to file scope
      sql/item_sum.cc:
        Move local static variables to file scope
      072fa90d
  32. 19 Feb, 2005 1 commit
    • unknown's avatar
      fix compilation errors · a98179dc
      unknown authored
      sql/examples/ha_tina.cc:
        make tina to compile (wasn't catched with -max build)
      sql/sql_yacc.yy:
        fix compilation errors --without-geometry
      a98179dc
  33. 07 Jan, 2005 1 commit
  34. 07 Dec, 2004 1 commit
  35. 18 Oct, 2004 1 commit
    • unknown's avatar
      Fix for broken --with-csv-storage-engine build. · a4d8ed87
      unknown authored
      Now we use TABLE::timestamp_field_type instead of
      TABLE::timestamp_default_now/on_update_now for determining
      if we should auto-set value of TIMESTAMP field during this operation.
      We are also use Field_timestamp::set_time() instead of
      handler::update_timestamp().
      
      
      sql/examples/ha_example.cc:
        Now we use TABLE::timestamp_field_type instead of
        TABLE::timestamp_default_now/on_update_now for determining
        if we should auto-set value of TIMESTAMP field during this operation.
        We are also use Field_timestamp::set_time() instead of
        handler::update_timestamp().
      sql/examples/ha_tina.cc:
        Now we use TABLE::timestamp_field_type instead of
        TABLE::timestamp_default_now/on_update_now for determining
        if we should auto-set value of TIMESTAMP field during this operation.
        We are also use Field_timestamp::set_time() instead of
        handler::update_timestamp().
      a4d8ed87
  36. 17 Aug, 2004 1 commit