An error occurred fetching the project authors.
  1. 14 Jul, 2005 1 commit
    • unknown's avatar
      Get rid of checking for ETIME return value of pthread_cond_timedwait. · e4f2bd46
      unknown authored
      ETIME was returned by cond_timedwait (sic, the pre-POSIX1001b function) on 
      Solaris 2.6 and 2.7. pthread_cond_timedwait on Solaris returns ETIMEDOUT.
      The standard requirement is that the only additional return value
      of pthred_cond_timedwait compared to pthread_cond_wait is ETIMEDOUT.
      Let us not bloat the application code with redundant checks,
      and if we're ever to work on a platform that returns a non-standard 
      value, we should write a wrapper for that platform (like we do, e.g., for
      Windows).
      
      
      mysys/my_os2cond.c:
        - fix our implementation of pthread_cond_timedwait on OS2 to return
          ETIMEDOUT instead of ETIME.
      sql/item_func.cc:
        - don't check for ETIME
      sql/slave.cc:
        - don't check for ETIME
      sql/sql_insert.cc:
        - don't check for ETIME
      e4f2bd46
  2. 11 Jul, 2005 1 commit
    • unknown's avatar
      sql_insert.cc: · 799299a5
      unknown authored
        Added cast to bool to fix windows compile problem
      
      
      sql/sql_insert.cc:
        Added cast to bool to fix windows compile problem
      799299a5
  3. 08 Jul, 2005 1 commit
    • unknown's avatar
      sql_insert.cc: · 86b51de7
      unknown authored
        Use the test() macro instead of assigning a pointer to a bool
      
      
      sql/sql_insert.cc:
        Use the test() macro instead of assigning a pointer to a bool
      86b51de7
  4. 07 Jul, 2005 1 commit
  5. 04 Jul, 2005 1 commit
    • unknown's avatar
      After merge fixes · 428830c5
      unknown authored
      Better fix for ON DUPLICATE KEY UPDATE
      
      
      mysql-test/r/group_by.result:
        After merge fixes
      mysql-test/r/select.result:
        Reorder test to match 4.1 tests (will make future merges easier)
      mysql-test/t/group_by.test:
        Added --disable_ps_protocol to avoid extra warning
      mysql-test/t/select.test:
        Reorder test to match 4.1 tests (will make future merges easier)
      sql/mysql_priv.h:
        Better fix for ON DUPLICATE KEY UPDATE
      sql/sql_base.cc:
        After merge fixes
      sql/sql_insert.cc:
        Better fix for ON DUPLICATE KEY UPDATE
        (old solution gave problem with item->cached_table)
      sql/sql_prepare.cc:
        Better fix for ON DUPLICATE KEY UPDATE
      428830c5
  6. 01 Jul, 2005 1 commit
    • unknown's avatar
      Name resolution context added (BUG#6443) · b4f595b9
      unknown authored
      include/my_bitmap.h:
        new bitmap operation
      mysql-test/r/view.result:
        added warnings
        Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
      mysql-test/t/view.test:
        Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
      mysys/my_bitmap.c:
        new bitmap operation
      sql/field.h:
        index of field in table added
      sql/item.cc:
        Name resolution context added
        table list removed from fix_fields() arguments
      sql/item.h:
        Name resolution context added
        table list removed from fix_fields() arguments
      sql/item_cmpfunc.cc:
        table list removed from fix_fields() arguments
      sql/item_cmpfunc.h:
        table list removed from fix_fields() arguments
      sql/item_func.cc:
        table list removed from fix_fields() arguments
      sql/item_func.h:
        table list removed from fix_fields() arguments
      sql/item_row.cc:
        table list removed from fix_fields() arguments
      sql/item_row.h:
        table list removed from fix_fields() arguments
      sql/item_strfunc.cc:
        fixed server crash on NULL argument
      sql/item_strfunc.h:
        table list removed from fix_fields() arguments
      sql/item_subselect.cc:
        table list removed from fix_fields() arguments
      sql/item_subselect.h:
        table list removed from fix_fields() arguments
      sql/item_sum.cc:
        table list removed from fix_fields() arguments
      sql/item_sum.h:
        table list removed from fix_fields() arguments
      sql/item_timefunc.cc:
        table list removed from fix_fields() arguments
      sql/item_timefunc.h:
        table list removed from fix_fields() arguments
      sql/item_uniq.h:
        table list removed from fix_fields() arguments
      sql/log_event.cc:
        Name resolution context added
      sql/log_event.h:
        Name resolution context added
      sql/mysql_priv.h:
        Name resolution context added
      sql/set_var.cc:
        table list removed from fix_fields() arguments
      sql/share/errmsg.txt:
        new error message
      sql/sp.cc:
        Name resolution context added
      sql/sp_head.cc:
        table list removed from fix_fields() arguments
      sql/sp_head.h:
        Name resolution context added
      sql/sql_base.cc:
        table list removed from fix_fields() arguments
        Name resolution context added
      sql/sql_class.cc:
        renamed variable
      sql/sql_delete.cc:
        Name resolution context added
      sql/sql_derived.cc:
        Name resolution context added
      sql/sql_do.cc:
        table list removed from fix_fields() arguments
      sql/sql_handler.cc:
        Name resolution context added
      sql/sql_help.cc:
        Name resolution context added
      sql/sql_insert.cc:
        Name resolution context added
        table list removed from fix_fields() arguments
      sql/sql_lex.cc:
        Name resolution context added
      sql/sql_lex.h:
        removed resolve mode (information stored into name resolution context)
      sql/sql_load.cc:
        table list removed from fix_fields() arguments
      sql/sql_olap.cc:
        Name resolution context added
      sql/sql_parse.cc:
        Name resolution context added
      sql/sql_prepare.cc:
        table list removed from fix_fields() arguments
      sql/sql_select.cc:
        table list removed from fix_fields() arguments
      sql/sql_show.cc:
        Name resolution context added
      sql/sql_trigger.cc:
        table list removed from fix_fields() arguments
      sql/sql_udf.h:
        table list removed from fix_fields() arguments
      sql/sql_union.cc:
        Name resolution context added
      sql/sql_update.cc:
        Name resolution context added
      sql/sql_view.cc:
        Name resolution context added
      sql/sql_view.h:
        table list removed from fix_fields() arguments
      sql/sql_yacc.yy:
        Name resolution context added
      sql/table.cc:
        Name resolution context added
        merged view processing moved
      sql/table.h:
        merged view processing moved
      b4f595b9
  7. 28 Jun, 2005 1 commit
  8. 27 Jun, 2005 1 commit
    • unknown's avatar
      Better bug fix for: · d10877ce
      unknown authored
      #9728  'Decreased functionality in "on duplicate key update
      #8147  'a column proclaimed ambigous in INSERT ... SELECT .. ON DUPLICATE'
      
      This ensures fields are uniquely qualified and also that one can't update other tables in the ON DUPLICATE KEY UPDATE part
      
      
      mysql-test/r/insert_select.result:
        More tests for bug #9728 and #8147
      mysql-test/r/insert_update.result:
        Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works
      mysql-test/t/insert_select.test:
        More tests for bug #9728 and #8147
      mysql-test/t/insert_update.test:
        Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works
      mysys/my_access.c:
        Cleanup (shorter loop variable names)
      sql/ha_ndbcluster.cc:
        Indentation fixes
      sql/item.cc:
        Remove item_flags
      sql/item.h:
        Remove item_flags
      sql/mysql_priv.h:
        New arguments to mysql_prepare_insert
      sql/sql_base.cc:
        Remove old fix for bug #8147
      sql/sql_insert.cc:
        Extend mysql_prepare_insert() with new field list for tables that can be used in the values port of ON DUPLICATE KEY UPDATE
      sql/sql_parse.cc:
        Revert fix for #9728
        Allow one to use other tables in ON DUPLICATE_KEY for INSERT ... SELECT if there is no GROUP BY clause
      sql/sql_prepare.cc:
        New arguments to mysql_prepare_insert
      sql/sql_yacc.yy:
        Revert bug fix for #9728
      d10877ce
  9. 22 Jun, 2005 1 commit
    • unknown's avatar
      WL#2286 - Compile MySQL w/YASSL support · 80a62132
      unknown authored
      Fix GCC 4.0 link failure.
      Better CXX_VERSION guessing.
      
      
      config/ac-macros/misc.m4:
        Better CXX_VERSION guessing.
      configure.in:
        CXX_VERSION guessing moved to misc.m4.
        HAVE_EXPLICIT_TEMPLATE_INSTANTIATION moved to config.h.
        Use compiler AR with MIPSpro and Forte instead of instantiating templates explicitly.
      extra/yassl/src/crypto_wrapper.cpp:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      extra/yassl/src/template_instnt.cpp:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      extra/yassl/src/yassl_int.cpp:
        GCC 4.0 link fix. This file needs __cxa_pure_virtual.
      extra/yassl/taocrypt/include/runtime.hpp:
        Fix GCC 4.0 link failure. Instruct compiler to always emit __cxa_pure_virtual even if
        it seems to be never used.
      extra/yassl/taocrypt/include/types.hpp:
        Include config.h.
      extra/yassl/taocrypt/src/algebra.cpp:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      extra/yassl/taocrypt/src/dh.cpp:
        GCC 4.0 link fix. This file needs __cxa_pure_virtual.
      extra/yassl/taocrypt/src/dsa.cpp:
        GCC 4.0 link fix. This file needs __cxa_pure_virtual.
      extra/yassl/taocrypt/src/integer.cpp:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      extra/yassl/taocrypt/src/rsa.cpp:
        GCC 4.0 link fix. This file needs __cxa_pure_virtual.
      extra/yassl/taocrypt/src/template_instnt.cpp:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      sql/field.cc:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      sql/item.cc:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      sql/item_buff.cc:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      sql/mysqld.cc:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      sql/opt_range.cc:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      sql/set_var.cc:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      sql/slave.cc:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      sql/sql_acl.cc:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      sql/sql_class.cc:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      sql/sql_insert.cc:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      sql/sql_map.cc:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      sql/sql_select.cc:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      sql/sql_show.cc:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      sql/table.cc:
        EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
      80a62132
  10. 21 Jun, 2005 1 commit
    • unknown's avatar
      Fix bug #10886 - INSERT ... SELECT ... ON DUPLICATE KEY UPDATE produces bad results · 8e45c057
      unknown authored
      Temporary field wasn't restored to default values after ON DUPLICATE KEY
       UPDATE event, which results in wrong data being inserted in new record.
      
      
      sql/sql_insert.cc:
        Fix bug #10886 - INSERT ... SELECT ... ON DUPLICATE KEY UPDATE produces bad results
      mysql-test/t/insert_select.test:
        Test case for bug #10886 - INSERT ... SELECT ... ON DUPLICATE KEY 
        UPDATE produces bad results
      mysql-test/r/insert_select.result:
        Test case for bug #10886 - INSERT ... SELECT ... ON DUPLICATE KEY UPDATE 
        produces bad results
      8e45c057
  11. 20 Jun, 2005 1 commit
    • unknown's avatar
      Fix for bug #11060 "Server crashes on re-execution of prepared · 78e6794b
      unknown authored
      INSERT ... SELECT with UNION" (reviewed version).
      
      Altough bug manifest itself only starting from 5.0 it is better to
      apply fix to 4.1 to keep some assumptions true and make code more
      future-proof.
      
      
      mysql-test/r/ps.result:
        Added test case for bug #11060 "Server crashes on re-execution of
        prepared INSERT ... SELECT with UNION".
      mysql-test/t/ps.test:
        Added test case for bug #11060 "Server crashes on re-execution of
        prepared INSERT ... SELECT with UNION".
      sql/sql_insert.cc:
        select_insert::prepare():
          Item::fix_fields() methods operate assuming that LEX::current_select
          points to the select to which current item belongs. Thus
          during check_insert_fields() routine execution LEX::current_select
          should point ot the first select in query since this is the
          select with which items in insert list is associated.
          But if we have INSERT SELECT UNION SELECT type of query
          LEX::current_select will point to the fake_select_lex instead
          since select_insert::prepare() is called during processing of JOIN
          which corresponds to this select_lex.
          So we have set LEX::current_select before calling check_insert_fields()
          and restore it afterwards.
      78e6794b
  12. 19 Jun, 2005 1 commit
    • unknown's avatar
      WL#2286 - Compile MySQL w/YASSL support · 2c8ee686
      unknown authored
      Fix for yaSSL link failures with Forte Developer 7, MIPSpro Compilers, Compaq C++.
      These compilers have problem with implicit template instantiation in archives
      (libyassl.a, libtaocrypt.a). Instantiate templates explicitly.
      
      Fix for yaSSL link failure on powermacg5 (gcc 3.3). When -O3 is specified gcc inlines
      __cxa_pure_virtual. This is wrong behavior, __cxa_pure_virtual must never be inlined.
      
      
      configure.in:
        Better CXX_VERSION guessing.
        EXPLICIT_TEMPLATE_INSTANTIATION macro indicates whether to instantiate templates explicitly.
        Instantiate templates explicitly on MIPSpro, Compaq, Forte.
      extra/yassl/src/crypto_wrapper.cpp:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      extra/yassl/src/template_instnt.cpp:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
        More portable templates instantiation.
      extra/yassl/src/yassl_int.cpp:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
        More portable templates instantiation.
      extra/yassl/taocrypt/include/runtime.hpp:
        Fix for link failure on powermacg5 (gcc 3.3). __cxa_pure_virtual must never be inlined.
      extra/yassl/taocrypt/src/algebra.cpp:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      extra/yassl/taocrypt/src/integer.cpp:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      extra/yassl/taocrypt/src/template_instnt.cpp:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      sql/field.cc:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      sql/item.cc:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      sql/item_buff.cc:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      sql/mysqld.cc:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      sql/opt_range.cc:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      sql/set_var.cc:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      sql/slave.cc:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      sql/sql_acl.cc:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      sql/sql_class.cc:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      sql/sql_insert.cc:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      sql/sql_map.cc:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      sql/sql_select.cc:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      sql/sql_show.cc:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      sql/table.cc:
        Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
      2c8ee686
  13. 17 Jun, 2005 1 commit
    • unknown's avatar
      Clean up warnings and build problems on Windows. (Bug #11045) · 94d1d886
      unknown authored
      VC++Files/sql/mysqld.dsp:
        Link debug server against debug yassl
      sql/examples/ha_archive.cc:
        Fix type for variables used to store number of rows
        Add cast when reading current position
      sql/examples/ha_archive.h:
        Fix variables used to store rows to ha_rows
      sql/ha_federated.cc:
        Remove unused variables, fix type of variable used to store query id
      sql/item_strfunc.cc:
        Remove unused variables
      sql/sql_acl.cc:
        Remove unused variables
      sql/sql_lex.cc:
        Add casts to fix type used for counting number of rows
      sql/sql_lex.h:
        Fix size of options to be ulong again
      sql/sql_insert.cc:
        Fix type of query id value
      sql/sql_union.cc:
        Cast value for number of rows to ha_rows
      sql/sql_yacc.yy:
        Remove unused variable
      sql/table.cc:
        Add casts for handling key_part lengths
      94d1d886
  14. 06 Jun, 2005 1 commit
    • unknown's avatar
      Ensure that we reset auto-increment cache if we have to do an UPDATE becasue of REPLACE · 9595c788
      unknown authored
      This fixes bug #11080: Multi-row REPLACE fails on a duplicate key error
      
      
      mysql-test/r/auto_increment.result:
        New tests for auto-increment and replace
      mysql-test/r/innodb.result:
        New tests for auto-increment and replace
      mysql-test/t/auto_increment.test:
        New tests for auto-increment and replace
      mysql-test/t/innodb.test:
        New tests for auto-increment and replace
      mysys/my_alloc.c:
        More comments
      9595c788
  15. 03 Jun, 2005 1 commit
    • unknown's avatar
      Move USE_PRAGMA_IMPLEMENTATION to proper place · 72dd44b9
      unknown authored
      Ensure that 'null_value' is not accessed before val() is called in FIELD() functions
      Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys
      Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable
      
      
      mysql-test/r/func_gconcat.result:
        Move innodb specific test to innodb.test
        Changed table name r2 -> t2
        More test to see how ROLLUP was optimized
      mysql-test/r/innodb.result:
        Moved test here form func_gconcat
      mysql-test/r/olap.result:
        New test results after optimization
      mysql-test/t/func_gconcat.test:
        Move innodb specific test to innodb.test
        Changed table name r2 -> t2
        More test to see how ROLLUP was optimized
      mysql-test/t/innodb.test:
        Moved test here form func_gconcat
      sql/field.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_berkeley.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_blackhole.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_heap.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_innodb.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_isam.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_isammrg.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_myisam.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_myisammrg.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_ndbcluster.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/handler.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/hash_filo.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item_cmpfunc.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item_func.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
        Ensure that 'null_value' is not accessed before val() is called
      sql/item_geofunc.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item_strfunc.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item_subselect.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item_sum.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item_timefunc.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item_uniq.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/log_event.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/mysql_priv.h:
        Change key_map_full to not be const as we are giving it a proper value on startup
      sql/mysqld.cc:
        Move key_map variables here and initialize key_map_full properly
      sql/opt_range.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/opt_range.h:
        Fix that test_quick_select() works with any ammount of keys
      sql/procedure.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/protocol.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/protocol_cursor.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/set_var.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_analyse.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_class.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_crypt.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_insert.cc:
        Fixed that max_rows is ulong
      sql/sql_list.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_map.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_olap.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_select.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
        Fixed that ROLLUP don't have to always create a temporary table
        Added new argument to remove_const() to make above possible
        Fixed some errors that creapt up when we don't always do a temporary table for ROLLUP
      sql/sql_string.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_table.cc:
        Simple optimizations
        Fixed wrong checking of build_table_path() in undef-ed code
      sql/sql_udf.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_yacc.yy:
        removed extra {}
      72dd44b9
  16. 02 Jun, 2005 1 commit
    • 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
  17. 01 Jun, 2005 1 commit
    • unknown's avatar
      Code cleanups during code reviews · 906b210a
      unknown authored
      Ensure we get error if INSERT IGNORE ... SELECT fails
      Fixed wrong key_part->key_length usage in index_merge
      
      
      client/mysql.cc:
        Code cleanups & simply optimizations
      mysql-test/r/information_schema.result:
        Safety
      mysql-test/t/information_schema.test:
        Safety
      sql/ha_ndbcluster.cc:
        Code cleanups
      sql/item.cc:
        Code cleanups
      sql/item_subselect.cc:
        Code cleanups
      sql/item_sum.cc:
        Code cleanups
      sql/opt_range.cc:
        Made get_index_only_read_time() static (instad of inline) to increase portability (function was not declared before use)
        Simple optimization
        Fixed wrong key_part->key_length usage in index_merge
        Removed not used variable n_used_covered
        Indentation fixes & comment cleanups
      sql/parse_file.cc:
        Code cleanups
      sql/sql_base.cc:
        Code cleanups
      sql/sql_bitmap.h:
        Added missing return
      sql/sql_insert.cc:
        Ensure we get error if INSERT IGNORE ... SELECT fails
      sql/sql_select.cc:
        Code cleanups
      sql/sql_show.cc:
        Safety fix if a LOT of errors are ignored
      sql/sql_update.cc:
        Code cleanups
      sql/table.cc:
        Code cleanups
      sql/table.h:
        Code cleanups
      sql/uniques.cc:
        Code cleanups
      strings/decimal.c:
        Simple optimization
        Code cleanups
      906b210a
  18. 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
  19. 30 May, 2005 1 commit
    • unknown's avatar
      Preparatory (and the most problematic) patch for Bug#7306 · 78422442
      unknown authored
      "the server side preparedStatement error for LIMIT placeholder",
      which moves all uses of LIMIT clause from PREPARE to OPTIMIZE
      and later steps.
      After-review fixes.
      
      
      mysql-test/r/group_min_max.result:
        Test results fixed for EXPLAINs when using GROUP_MIN_MAX access plan.
      sql/item_subselect.cc:
        Move setting of the internal LIMIT used for IN/ALL/ANY/EXISTS 
        subqueries to one place: Item_exists_subselect::fix_length_and_dec().
        This implies that unit->select_limit_cnt is not set until the item is 
        fixed. This is OK, as now LIMIT values are not used until JOIN::optimize.
      sql/mysql_priv.h:
        setup_tables no longer needs a special flag for the case when
        it's called from JOIN::reinit() (we don't need to call setup_tables
        between two executions of a correlated subquery).
      sql/opt_range.cc:
        Fix a glitch in GROUP_MIN_MAX access plan: we should use table metadata,
        not field data, to evaluate max_used_key_length, which is then
        used for explain.
      sql/sp.cc:
        - setup_tables signature changed.
      sql/sql_base.cc:
        - setup_tables no longer needs a special mode for subqueries.
          Unused checks were removed.
      sql/sql_delete.cc:
        - setup_tables signature changed
      sql/sql_help.cc:
        - setup_tables signature changed
      sql/sql_insert.cc:
        - setup_tables signature changed
      sql/sql_lex.cc:
        Consolidate setting of internal LIMIT for IN/ALL/ANY/EXISTS subqeries
        in one place, and hence remove it from st_select_lex::test_limit().
      sql/sql_lex.h:
        Cleanup signature of st_select_lex_unit::init_prepare_fake_select_lex().
      sql/sql_load.cc:
        - setup_tables signature changed
      sql/sql_olap.cc:
        - setup_tables signature changed
      sql/sql_parse.cc:
        - st_select_lex_unit::set_limit() signature changed
      sql/sql_select.cc:
        Move setting of JOIN::select_limit from JOIN::prepare
        to JOIN::optimize. At prepare, limit is unknown yet.
        Remove excessive cleanups from JOIN::reinit which were overwriting
        join->join_tab[i]->table->used_keys. This fixes the bug which was triggered
        by the change in item_subselect.cc.
      sql/sql_union.cc:
        Class st_select_lex_unit was changed to avoid calls to 
         st_select_lex_unit::set_limit from places where it may be unknown.
        Now unit->select_limit_cnt is set at ::exec(). 
        st_select_lex_unit::init_prepare_fake_select_lex(): 
         - move out set_limit functionality
         - remove a few lines of dead code.
        st_select_lex_unit::prepare():
          - now we don't call set_limit at the time of prepare, so the value  
            of unit->select_limit_cnt may be unknown here. Use sl->select_limit
            instead.
        st_select_lex_unit::exec():
          - cleanup
          - call set_limit explicitly as it has been moved out of 
           init_prepare_fake_select_lex.
      sql/sql_update.cc:
        - setup_tables signature changed
      78422442
  20. 25 May, 2005 1 commit
    • unknown's avatar
      Cleanup's during review · c6283dbb
      unknown authored
      Added ASSERT() to detect wrongly packed fields
      
      
      sql/field.h:
        Fixed comments to right format
      sql/opt_range.cc:
        Merged code
      sql/sql_base.cc:
        Fixed indentation
      sql/sql_insert.cc:
        Fixed comments to right format
      sql/sql_select.cc:
        Simplify code
      sql/unireg.cc:
        Simply code for calculating key_buff_length
        Added ASSERT() to detect wrongly packed fields
      c6283dbb
  21. 24 May, 2005 1 commit
    • unknown's avatar
      Fix for bugs: · 1fa7c69d
      unknown authored
       #5860 "Multi-table UPDATE does not activate update triggers"
       #6812 "Triggers are not activated for INSERT ... SELECT"
       #8755 "Trigger is not activated by LOAD DATA".
      This patch also implements proper handling of triggers for special forms
      of insert like REPLACE or INSERT ... ON DUPLICATE KEY UPDATE. 
      Also now we don't call after trigger in case when we have failed to
      inserted/update or delete row. Trigger failure should stop statement
      execution.
      
      I have not properly tested handling of errors which happen inside of
      triggers in this patch, since it is simplier to do this once we will be
      able to access tables from triggers.
      
      
      mysql-test/r/trigger.result:
        Added tests for triggers behavior for various non-standard forms of
        INSERT such as REPLACE and INSERT ... ON DUPLICATE KEY UPDATE.
        Also added tests for bugs #5860 "Multi-table UPDATE does not activate
        update triggers", #6812 "Triggers are not activated for INSERT ... SELECT"
        and #8755 "Trigger is not activated by LOAD DATA".
      mysql-test/t/trigger.test:
        Added tests for triggers behavior for various non-standard forms of
        INSERT such as REPLACE and INSERT ... ON DUPLICATE KEY UPDATE.
        Also added tests for bugs #5860 "Multi-table UPDATE does not activate
        update triggers", #6812 "Triggers are not activated for INSERT ... SELECT"
        and #8755 "Trigger is not activated by LOAD DATA".
      sql/item.cc:
        Since it turned out that at trigger loading time we can't say in which
        buffer TABLE::record[0] or record[1] old version of row will be stored
        we have to change our approach to binding of Item_trigger_field to
        Field instances.
        Now after trigger parsing (in Item_trigger_field::setup_table()) we only
        find index of proper Field in the TABLE::field array. Then before trigger
        is invoked we set Table_triggers_list::old_field/new_field so they point
        to arrays holding Field instances bound to buffers with proper row
        versions. And as last step in Item_trigger_field::fix_fields() we get
        pointer to Field from those arrays using saved field index.
        
        Item_trigger_field::setup_field()/fix_fields() were changed to implement
        this approach.
      sql/item.h:
        Since it turned out that at trigger loading time we can't say in which
        buffer TABLE::record[0] or record[1] old version of row will be stored
        we have to change our approach to binding of Item_trigger_field to
        Field instances.
        Now after trigger parsing (in Item_trigger_field::setup_table()) we only
        find index of proper Field in the TABLE::field array. Then before trigger
        is invoked we set Table_triggers_list::old_field/new_field so they point
        to arrays holding Field instances bound to buffers with proper row
        versions. And as last step in Item_trigger_field::fix_fields() we get
        pointer to Field from those arrays using saved field index.
        
        Item_trigger_field:
        - Added field_idx member to store index of Field object corresponding to
          this Item in TABLE::field array.
        - Added triggers member to be able to access to parent Table_trigger_list
          object from fix_fields() method.
        - setup_field() no longer needs to know for which type of event this
          trigger is, since it does not make decision Field for which buffer
          (record[0] or record[1] is appropriate for this Item_trigger_field)
      sql/mysql_priv.h:
        Added fill_record_n_invoke_before_triggers() methods. They are simple
        wrappers around fill_record() which invoke proper before trigger right
        after filling record with values.
      sql/sql_base.cc:
        Added fill_record_n_invoke_before_triggers() methods. They are simple
        wrappers around fill_record() which invoke proper before trigger right
        after filling record with values.
      sql/sql_delete.cc:
        mysql_delete():
          Now we stop statement execution if one of triggers failed, we also
          don't execute after delete trigger if we failed to delete row from
          the table (We also pass information about which buffer contains old
          version of row to process_triggers()).
        multi_delete::send_data()/do_deletes():
          Now we also invoke triggers in case of multi-delete.
      sql/sql_insert.cc:
        mysql_insert():
          Moved invocation of before triggers to fill_record_n_invoke_before_triggers()
          method. After triggers are now executed as part of write_record().
          (as nice side effect now we also stop statement execution if one of
          triggers fail).
        write_record():
          Invoke after insert trigger after performing insert. Also invoke proper
          triggers if insert is converted to update or conflicting row is deleted.
          Cleaned up error handling a bit - no sense to report error via
          handler::print_error if it was not generated by handler method and
          was reported before.
          Also now we will execute after trigger only if we really have written
          row to the table. 
        select_insert::send_data()/store_values():
          We should also execute INSERT triggers for INSERT ... SELECT statement.
      sql/sql_load.cc:
        read_fixed_length()/read_sep_field():
          We should execute INSERT triggers when processing LOAD DATA statement.
          Small cleanup in auto-increment related code. Also moved check for
          thd->killed which is used to abort LOAD DATA in case of problems
          in 'traditional' mode to better place..
      sql/sql_trigger.cc:
        Since it turned out that at trigger loading time we can't say in which
        buffer TABLE::record[0] or record[1] old version of row will be stored
        we have to change our approach to binding of Item_trigger_field to
        Field instances.
        Now after trigger parsing (in Item_trigger_field::setup_table()) we only
        find index of proper Field in the TABLE::field array. Then before trigger
        is invoked we set Table_triggers_list::old_field/new_field so they point
        to arrays holding Field instances bound to buffers with proper row
        versions. And as last step in Item_trigger_field::fix_fields() we get
        pointer to Field from those arrays using saved field index.
        
        Table_triggers_list methods were changed to implement this approach
        (see also comments for sql_trigger.h).
      sql/sql_trigger.h:
        Since it turned out that at trigger loading time we can't say in which
        buffer TABLE::record[0] or record[1] old version of row will be stored
        we have to change our approach to binding of Item_trigger_field to
        Field instances.
        Now after trigger parsing (in Item_trigger_field::setup_table()) we only
        find index of proper Field in the TABLE::field array. Then before trigger
        is invoked we set Table_triggers_list::old_field/new_field so they point
        to arrays holding Field instances bound to buffers with proper row
        versions. And as last step in Item_trigger_field::fix_fields() we get
        pointer to Field from those arrays using saved field index.
        
        Changed Table_triggers_list to implement this new approach:
        - Added record1_field member to store array of Field objects bound
          to TABLE::record[1] buffer (instead of existing old_field member)
        - Added new_field member and changed meaning of old_field member.
          During trigger execution they should point to arrays of Field objects
          bound to buffers holding new and old versions of row respectively.
        - Added 'table' member to be able to get access to TABLE instance
          (for which this trigger list object was created) from process_triggers()
          method.
        - Now process_triggers() method sets old_field and new_field members
          properly before executing triggers body (basing on new 
          old_row_is_record1 parameter value).
        - Renamed prepare_old_row_accessors_method() to prepare_record1_accessors()
        
        Also added has_before_update_triggers() method which allows to check
        whenever any before update triggers exist for table.
      sql/sql_update.cc:
        mysql_update():
          Now we invoke before triggers in fill_record_n_invoke_before_triggers()
          method. Also now we abort statement execution when one of triggers fail.
        safe_update_on_fly():
          When we are trying to understand if we can update first table in multi
          update on the fly we should take into account that BEFORE UPDATE
          trigger can change field values.
        multi_update::send_data()/do_updates()
          We should execute proper triggers when doing multi-update
          (in both cases when we do it on the fly and using temporary tables).
      1fa7c69d
  22. 18 May, 2005 2 commits
    • unknown's avatar
      Fixes to merge from 4.1 · 3e2988d0
      unknown authored
      client/mysqldump.c:
        Temporarily disable unused (and broken) code.
      mysql-test/r/group_min_max.result:
        Update results
      mysql-test/r/mysqldump.result:
        Update results
      mysql-test/r/subselect.result:
        Update results
      mysql-test/t/group_min_max.test:
        Ignore number of rows in output of most explain results
      sql/sql_insert.cc:
        Fix reference to max_unique_length
      3e2988d0
    • unknown's avatar
      Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE · 0461b482
      unknown authored
      After review version.
      Added a condition for MERGE tables. These do not have unique
      indexes. But every key could be a unique key on the underlying
      MyISAM table. So get the maximum key length for MERGE tables
      instead of the maximum unique key length. This is used for
      buffer allocation in write_record().
      
      
      mysql-test/r/merge.result:
        Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
        The test result.
      mysql-test/t/merge.test:
        Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
        The test case does not in all cases show the problem
        without the bugfix. The improper memory allocation
        might get through undetected in many cases.
      sql/ha_myisammrg.h:
        Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
        Set a table_flag for the MERGE engine telling that any index
        might be unique without being specified as such.
      sql/handler.h:
        Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
        Added a new table_flag telling that any index
        might be unique without being specified as such.
      sql/sql_insert.cc:
        Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
        Changed the freeing of the memory to be symmetric to its
        allocation (my_safe_alloc -> my_safe_afree).
        This is not directly related to the bug.
      sql/table.cc:
        Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
        Added a condition for MERGE tables. These do not have unique
        indexes. But every key could be a unique key on the underlying
        MyISAM table. So get the maximum key length for MERGE tables
        instead of the maximum unique key length. This is used for
        buffer allocation in write_record().
      0461b482
  23. 13 May, 2005 1 commit
    • unknown's avatar
      a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types). · c07f07c3
      unknown authored
      the behavior of enum changed to be consistent.
      
      
      mysql-test/r/system_mysql_db.result:
        a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types).
      mysql-test/r/type_enum.result:
        a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types).
      mysql-test/r/type_ranges.result:
        a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types).
      sql/sql_insert.cc:
        a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types).
        Don't issue warnings for enum fields.
      sql/sql_parse.cc:
        a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types).
        set NO_DEFAULT_VALUE_FLAG flag for enum fields as well.
      c07f07c3
  24. 10 May, 2005 1 commit
    • unknown's avatar
      Many files: · e02416c5
      unknown authored
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      view.test:
        Added test case for bug #8528.
      view.result:
        Added test case for bug #8528. Fixed other test cases.
      
      
      mysql-test/r/view.result:
        Added test case for bug #8528. Fixed other test cases.
      mysql-test/t/view.test:
        Added test case for bug #8528.
      sql/sql_base.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/sql_delete.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/sql_insert.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/sql_parse.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/sql_prepare.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/sql_select.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/sql_update.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/sql_view.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/table.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/table.h:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      e02416c5
  25. 07 May, 2005 1 commit
    • unknown's avatar
      Bug#9725 - "disapearing query/hang" and "unknown error" with "on duplicate key update" · bb424944
      unknown authored
        INSERT IGNORE...UPDATE causes break in protocol or unknown error message.
        Fix so that protocol doesn't break by properly ignoring dups.
      
      
      mysql-test/r/insert_update.result:
        Test for Bug#9725
      mysql-test/t/insert_update.test:
        Test for Bug#9725
      sql/sql_insert.cc:
        Ignore the failure in update_row when IGNORE is set.
      BitKeeper/etc/logging_ok:
        Logging to logging@openlogging.org accepted
      bb424944
  26. 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 · 32386128
      unknown authored
      After merge fix.
      
      
      32386128
    • 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
  27. 26 Apr, 2005 1 commit
    • unknown's avatar
      Cleanups during review · bf17c826
      unknown authored
      mysys/default.c:
        Cleanup:
        - Just test once for recursion level
        - Don't test explicitely for \r or \n as my_isspace() already does that
      sql/sql_insert.cc:
        Fix argument
      sql/sql_select.cc:
        Fixed indentation
        added comment
      bf17c826
  28. 22 Apr, 2005 1 commit
  29. 21 Apr, 2005 3 commits
  30. 19 Apr, 2005 1 commit
    • unknown's avatar
      Bug#7806 - insert on duplicate key and auto-update of timestamp · 3be2d489
      unknown authored
      Modified the check for the timestamp field so that the flags for
      the automatic for inserts and updates are cleared independently.
      
      
      mysql-test/r/type_timestamp.result:
        Bug#7806 - insert on duplicate key and auto-update of timestamp
        The test result.
      mysql-test/t/type_timestamp.test:
        Bug#7806 - insert on duplicate key and auto-update of timestamp
        The test case.
      sql/mysql_priv.h:
        Bug#7806 - insert on duplicate key and auto-update of timestamp
        Made check_insert_fields() static. It is used only in sql_insert.cc.
      sql/sql_insert.cc:
        Bug#7806 - insert on duplicate key and auto-update of timestamp
        Modified the check of the insert fields so that an explicit
        assignment of the timestamp field does only disable the automatic
        for inserts and retains the automatic for updates.
        Added a check if the update fields contain the timestamp field.
        In this case, the automatic on update is disabled, but not the
        automatic on insert. This is called from mysql_prepare_insert().
      sql/table.h:
        Bug#7806 - insert on duplicate key and auto-update of timestamp
        Extended a comment to warn about usage of enum timestamp_auto_set_type.
      3be2d489
  31. 19 Mar, 2005 1 commit
    • unknown's avatar
      Eliminate warnings noticed by VC7. This includes fixing my_mmap() on · 892a6138
      unknown authored
      Windows to call CreateFileMapping() with correct arguments, and
      propogating the introduction of query_id_t to everywhere query ids are
      passed around. (Bug #8826)
      
      
      libmysql/libmysql.c:
        Make implicit cast explicit
      myisam/mi_open.c:
        Make cast of value to smaller data size explicit
      myisam/mi_packrec.c:
        Cast file size (my_off_t) to size_t for mmap
      mysys/my_mmap.c:
        Fix Windows version of my_mmap() to use the right parameters
        for call to CreateFileMapping()
      sql/field.cc:
        Use temporary value of correct type
      sql/field.h:
        Use query_id_t for query_id value
      sql/ha_berkeley.cc:
        Fix flag check
      sql/ha_innodb.h:
        Use query_id_t for query_id value
      sql/handler.cc:
        Explain opt_using_transactions calculation, and add cast
      sql/handler.h:
        Fix forward declaration of COND
      sql/item.cc:
        Fix val_bool() tests of val_int() to avoid implicit cast
      sql/item_cmpfunc.cc:
        Fix typo in switch label
      sql/item_func.cc:
        Make implicit cast explicit
      sql/item_strfunc.cc:
        Now that query_id is a query_id_t, need to cast it to a ulong here
      sql/item_subselect.cc:
        Fix test of value
      sql/log.cc:
        Cast my_off_t used for file size to size_t for memory allocation
        Also cast my_off_t when using it to calculate the number of pages for TC log
        Cast total_ha_2pc to uchar when saving it
      sql/mysql_priv.h:
        Move up query_id definition so it can be used more widely
      sql/opt_range.cc:
        Add unused delete operator to prevent compiler warning
      sql/set_var.cc:
        Cast value for max_user_connections
      sql/sql_cache.cc:
        Remove unused label
      sql/sql_class.h:
        Fix query id values to be of type query_id_t
      sql/sql_db.cc:
        Move variable only used inside #ifdef within the #ifdef
      sql/sql_help.cc:
        Remove unused label
      sql/sql_insert.cc:
        Use query_id_t for query id values
      sql/sql_lex.h:
        Add unused delete operator to prevent compiler warning
      sql/sql_select.cc:
        Remove unused variable
        Make cast of value explicit
      sql/sql_select.h:
        Use query_id_t for query id values
      sql/sql_table.cc:
        Make comparison to function pointer explicit
      sql/sql_update.cc:
        Use query_id_t for query id values
      sql/table.h:
        Use query_id_t for query id values
      strings/ctype-simple.c:
        Add cast of long value to (char) in expression
      strings/ctype-ucs2.c:
        Add cast of long value to (char) in expression
      strings/ctype-utf8.c:
        Make cast to smaller size explicit
      892a6138
  32. 10 Mar, 2005 1 commit
    • unknown's avatar
      Fix for sp.test failure in --ps-protocol mode (2nd attempt). · 8c6a02df
      unknown authored
      Now we should call open_and_lock_tables() even if table list is empty -
      to cache stored routines used by query and open and lock tables required
      for their execution.
      
      
      sql/sql_insert.cc:
        Now we should call open_and_lock_tables() even if table list is empty -
        to cache stored routines used by query and open and lock tables required
        for their execution.
      sql/sql_prepare.cc:
        Now we should call open_and_lock_tables() even if table list is empty -
        to cache stored routines used by query and open and lock tables required
        for their execution. Thus we have to move most of functionality from 
        select_like_statement_test() to separate function to be able to reuse it
        for multi-update processing (for which tables are open and locked in 
        mysql_multi_update_prepare() call).
      8c6a02df
  33. 28 Feb, 2005 1 commit
    • unknown's avatar
      Fixed wrong memory references found by purify · 8b8c9452
      unknown authored
      (No really critical errors found, but a few possible wrong results)
      
      
      innobase/dict/dict0dict.c:
        Replace memcmp with comparison of characters to avoid warnings from purify when 'sptr' points to a very short string
      mysql-test/r/select_found.result:
        Add missing drop table
      mysql-test/r/type_set.result:
        More tests
      mysql-test/t/select_found.test:
        Add missing drop table
      mysql-test/t/type_set.test:
        More tests
      mysys/my_init.c:
        Avoid warning from purify (purify doesn't handle getrusage() properly)
      sql/field.h:
        enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters
      sql/filesort.cc:
        enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters
      sql/item_cmpfunc.cc:
        Fixed warning from purify. (Not critical as the arguments are passed to a function but not used)
        Allocate Arg_comparator() with 'new' instead of sql_alloc() to ensure proper initialization
      sql/mysqld.cc:
        Wait for signal handler to stop when running --bootstrap
        (Fixes warning from purify)
      sql/sql_insert.cc:
        Initialize slot used by innodb.cc (not critical)
      sql/sql_lex.h:
        Better comments
      sql/sql_repl.cc:
        memcmp -> bcmp() to avoid warning from purify
      sql/sql_select.cc:
        Fix for out-of-bound memory reference when doing DISTINCT on const expressions
      strings/ctype-simple.c:
        Fixes to not access uninitialized memory
        (Not critical)
      8b8c9452
  34. 25 Feb, 2005 1 commit
    • unknown's avatar
      Remove compiler warnings and remove not used variables · 248e4494
      unknown authored
      (Found during build process)
      
      
      extra/comp_err.c:
        Remove compiler warnings
      extra/perror.c:
        Remove compiler warnings
      innobase/dict/dict0dict.c:
        Remove compiler warnings
      innobase/dict/dict0load.c:
        Remove compiler warnings
      innobase/pars/pars0sym.c:
        Remove compiler warnings
      innobase/row/row0row.c:
        Remove compiler warnings
      innobase/row/row0sel.c:
        Remove compiler warnings
      libmysqld/lib_sql.cc:
        Remove not used variables
      myisam/mi_key.c:
        Remove compiler warnings
      regex/engine.c:
        Added comment
      sql/derror.cc:
        Remove not used variables
      sql/examples/ha_archive.cc:
        Fixed bug in blob handling
        Removed not used variable
      sql/field.cc:
        Remove compiler warnings
        Remove not used variables
      sql/filesort.cc:
        Remove compiler warnings
      sql/ha_heap.cc:
        Remove not used variable
      sql/ha_innodb.cc:
        Remove not used variables
        Remove compiler warnings
      sql/handler.cc:
        Remove compiler warnings and remove not used variables
      sql/item.cc:
        Remove compiler warnings and remove not used variables
      sql/item_subselect.cc:
        Remove compiler warnings
      sql/item_sum.cc:
        Remove compiler warnings
      sql/item_sum.h:
        Remove compiler warnings and remove not used variables
      sql/log.cc:
        Remove compiler warnings and remove not used variables
      sql/log_event.cc:
        Remove compiler warnings
      sql/mysqld.cc:
        Remove compiler warnings and remove not used variables
      sql/opt_range.cc:
        Remove compiler warnings and remove not used variables
      sql/slave.cc:
        Remove compiler warnings and remove not used variables
      sql/sp_pcontext.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_acl.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_analyse.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_base.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_db.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_help.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_insert.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_load.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_parse.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_prepare.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_select.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_show.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_table.cc:
        Remove compiler warnings
      sql/sql_union.cc:
        Remove compiler warnings
      sql/sql_update.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_yacc.yy:
        Remove compiler warnings and remove not used variables
      sql/strfunc.cc:
        Remove compiler warnings and remove not used variables
      strings/ctype-ucs2.c:
        Remove compiler warnings
      tests/mysql_client_test.c:
        Remove compiler warnings and remove not used variables
      tools/mysqlmanager.c:
        Remove compiler warnings and remove not used variables
      248e4494
  35. 02 Feb, 2005 1 commit
    • unknown's avatar
      Review fixed · d5c03608
      unknown authored
      sql/ha_federated.cc:
        Fixed compiler warnings and some indentation problems (still a lot more indentation problems to fix, will come in a later patch)
      sql/mysql_priv.h:
        Remove duplicated append_escaped()
      sql/sql_analyse.cc:
        Remove duplicated append_escaped()
      sql/sql_insert.cc:
        Move extra(HA_EXTRA_IGNORE_DUP_KEY) to a more logical places
        Add missing DBUG_RETURN()
      d5c03608