1. 12 Oct, 2008 1 commit
    • Michael Widenius's avatar
      Fix for bug#39226 Maria: crash with FLUSH TABLES WITH READ LOCK after LOCK TABLES · 058916ae
      Michael Widenius authored
      - The problem was that we didn't inform the handler that we are going to close tables that are locked and may have (at least in Maria) be part of an active transaction.
      Fix for Bug#39227 Maria: crash with ALTER TABLE PARTITION
      Fix for Bug #39987 main.partition_not_windows fails under debug build
      Fixed some compiler errors & warnings found by pushbuild
      
      include/my_base.h:
        Added HA_EXTRA_PREPARE_FOR_FORCED_CLOSE for signaling the handler that the file will be forced closed
      include/my_global.h:
        Removed 'register' from 'swap_variables' as this gives a warnings when the variables are structs. Compilers should also now be smart enough to figure out this themselves
      mysql-test/r/subselect_debug.result:
        Reset value of the debug variable;  Without setting this the subselect_innodb test will fail when run after this one
      mysql-test/suite/maria/r/maria.result:
        Merged test with myisam.test
        Added tests for new fixed bugs
      mysql-test/suite/maria/t/maria.test:
        Merged test with myisam.test
        Added tests for new fixed bugs
      mysql-test/t/subselect_debug.test:
        Reset value of the debug variable;  Without setting this the subselect_innodb test will fail when run after this one
      mysys/my_uuid.c:
        Fixed compiler error on windows
      sql/ha_partition.cc:
        Added support for the new extra flag: HA_EXTRA_PREPARE_FOR_FORCED_CLOSE (Bug #39226)
        Ensure that we call extra() for HA_EXTRA_PREPARE_FOR_DROP (Bug#39227)
      sql/mysqld.cc:
        Fix for Bug #39987 main.partition_not_windows fails under debug build
        The problem was that when compiling for purify/valgrind realpath() is not used, which causes test_if_data_home_dir to fail when it shouldn't
      sql/sql_base.cc:
        Call HA_EXTRA_PREPARE_FOR_FORCED_CLOSE for tables that are locked but we are going to force close without doing a commit
      sql/sql_parse.cc:
        More DBUG_PRINT. Fixed comments
      storage/maria/ma_extra.c:
        If HA_EXTRA_PREPARE_FOR_FORCED_CLOSE is called and the table is part of a transaction, remove the table from beeing part of a transaction.
        This is safe as this is only used as part of flush tables or when the table is not part of a transaction
      storage/myisam/mi_open.c:
        Indentation fix
      unittest/mysys/waiting_threads-t.c:
        Remove not needed 'volatile' to get rid of compiler warnings on windows
      058916ae
  2. 11 Oct, 2008 2 commits
  3. 10 Oct, 2008 1 commit
  4. 09 Oct, 2008 1 commit
    • Guilhem Bichot's avatar
      Fix for BUG#39697 "Maria: hang when failing to insert due to UNIQUE (seen in pushbuild2 too)" · ade71b25
      Guilhem Bichot authored
      It was a forgotten rw_unlock(), due to the deadlock detector feature (so bug was only in 5.1-maria, not
      6.0-maria).
      
      mysql-test/suite/maria/r/maria3.result:
        result, all fine
      mysql-test/suite/maria/t/maria3.test:
        Test of BUG#39697: two scenarios (transactional tables, and non-transactional table but dynamic row format so still taking the rwlock) where the hang happened.
        t2 added by this test was masked by a temporary table created earlier in the test, which we forgot to drop.
      storage/maria/ha_maria.cc:
        use new macro
      storage/maria/ma_blockrec.c:
        use new macro
      storage/maria/ma_commit.c:
        use new macro
      storage/maria/ma_init.c:
        putting address of dummy_transaction_object in --debug trace can be useful
      storage/maria/ma_open.c:
        use new macro
      storage/maria/ma_write.c:
        if local_lock_tree is true, we have acquired keyinfo->root_lock so need to release it before "goto err".
        A pair of assertions so that our usage of TrIDs is kept sensible.
      storage/maria/maria_def.h:
        A macro so that changes of MARIA_HA::trn can be tracked with --debug. It helped to understand in what cases,
        in maria_write(), we could have !(info->dup_key_trid == info->trn->trid) && !share->now_transactional
        (answer: ALTER TABLE adding UNIQUE index on transactional table).
      ade71b25
  5. 07 Oct, 2008 2 commits
  6. 01 Oct, 2008 3 commits
    • Sergei Golubchik's avatar
      merged · cf4aa889
      Sergei Golubchik authored
      cf4aa889
    • Sergei Golubchik's avatar
      Implement conditional building correctly. · c7a304a2
      Sergei Golubchik authored
      automake *must* know all sources in advance, listing a file in EXTRA_DIST
      doesn't make it a source, which breakes dependency tracking
      (.Po files aren't included)
      c7a304a2
    • unknown's avatar
      Maria tests moved to separate suite. The suite made default for execution. · 905003c5
      unknown authored
      mysql-test/mysql-test-run.pl:
        The maria suite made default for execution.
      mysql-test/suite/maria:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-autozerofill.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-big.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-big2.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-connect.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-gis-rtree-dynamic.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-gis-rtree-trans.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-gis-rtree.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-mvcc.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-no-logging.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-page-checksum.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-preload.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-purge.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-recover.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-recovery-big.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-recovery-bitmap.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-recovery-rtree-ft.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-recovery.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria-recovery2.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria2.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria3.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/maria_notembedded.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/r/ps_maria.result:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-autozerofill.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-big.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-big2.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-connect.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-gis-rtree-dynamic.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-gis-rtree-trans.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-gis-rtree.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-mvcc.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-no-logging.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-page-checksum.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-preload.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-purge.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-recover-master.opt:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-recover.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-recovery-big-master.opt:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-recovery-big.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-recovery-bitmap-master.opt:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-recovery-bitmap.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-recovery-master.opt:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-recovery-rtree-ft-master.opt:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-recovery-rtree-ft.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-recovery.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-recovery2-master.opt:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria-recovery2.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria2.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria3.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/maria_notembedded.test:
        Maria tests moved to separate suite.
      mysql-test/suite/maria/t/ps_maria.test:
        Maria tests moved to separate suite.
      905003c5
  7. 28 Sep, 2008 1 commit
    • unknown's avatar
      Comparison of tables during altering fixed. (BUG#39399) · 51a92bbb
      unknown authored
      mysql-test/r/maria.result:
        Test suite of BUG#39399.
      mysql-test/t/maria.test:
        Test suite of BUG#39399.
      storage/maria/ha_maria.cc:
        Comparison of tables during altering fixed. (BUG#39399)
        Unused function parameter removed.
      51a92bbb
  8. 26 Sep, 2008 2 commits
    • Michael Widenius's avatar
      Fixed for Bug #39248 Maria: INSERT ON DUPLICATE KEY UPDATE gives error if using a view · 2a9d33f0
      Michael Widenius authored
      The bug was that prepared statements didn't downgrade TL_WRITE_CONCURRENT properly
      
      mysql-test/r/maria.result:
        Added test case
      mysql-test/t/maria.test:
        Added test case
      sql/mysql_priv.h:
        Make upgrade_lock_type() global
      sql/sql_base.cc:
        Fixed indentation
      sql/sql_insert.cc:
        Make upgrade_lock_type() global
      sql/sql_prepare.cc:
        Call upgrade_lock_type_for_insert() to get right lock to use
      sql/sql_view.cc:
        Indentation fix
      2a9d33f0
    • Michael Widenius's avatar
      Fix for Bug #39243 SELECT WHERE does not find row · be0b4042
      Michael Widenius authored
      Symptom was that records_in_range() found 0 matching keys which confused the optimizer to belive that there was no matching rows for the query
      
      mysql-test/r/maria.result:
        New testcase
      mysql-test/t/maria.test:
        New testcase
      storage/maria/ma_search.c:
        Fix bug in skip_key for keys that starts with a CHAR/VARCHAR NULL key.
      be0b4042
  9. 11 Sep, 2008 2 commits
  10. 10 Sep, 2008 4 commits
  11. 09 Sep, 2008 7 commits
    • Ramil Kalimullin's avatar
      Merge · 58a5d735
      Ramil Kalimullin authored
      58a5d735
    • Ramil Kalimullin's avatar
      Merge · eb2794d4
      Ramil Kalimullin authored
      eb2794d4
    • Martin Hansson's avatar
      Bug#35600: Auto merged. · cfd4c976
      Martin Hansson authored
      cfd4c976
    • Ramil Kalimullin's avatar
      Fix for bug#37526: asymertic operator <=> in trigger · 776793a9
      Ramil Kalimullin authored
      Problem: <=> operator may return wrong results 
      comparing NULL and a DATE/DATETIME/TIME value.
      
      Fix: properly check NULLs.
      
      
      mysql-test/r/type_datetime.result:
        Fix for bug#37526: asymertic operator <=> in trigger
          - test result.
      mysql-test/t/type_datetime.test:
        Fix for bug#37526: asymertic operator <=> in trigger
          - test case.
      sql/item_cmpfunc.cc:
        Fix for bug#37526: asymertic operator <=> in trigger
          - if is_nulls_eq is TRUE Arg_comparator::compare_datetime() 
        should return 1 only if both arguments are NULL.
      776793a9
    • Mats Kindahl's avatar
      Merging with 5.1-5.1.29-rc · ac1bcc20
      Mats Kindahl authored
      ac1bcc20
    • Martin Hansson's avatar
      Bug#35600: Security breach via view, I_S table and prepared · c0cfce21
      Martin Hansson authored
      statement/stored procedure
      
      View privileges are properly checked after the fix for bug no 
      36086, so the method TABLE_LIST::get_db_name() must be used 
      instead of field TABLE_LIST::db, as this only works for tables.
      Bug appears when accessing views in prepared statements.
      
      mysql-test/r/view_grant.result:
        Bug#35600: Extended existing test case.
      mysql-test/t/view_grant.test:
        Bug#35600: Extended existing test result.
      sql/sql_parse.cc:
        Bug#35600: Using method to retrieve database name instead of
        field.
      c0cfce21
    • Mats Kindahl's avatar
      Bug #39106: · 589355f0
      Mats Kindahl authored
      SUPER is not required to change binlog format for session
      
      A user without SUPER privileges can change the value of the
      session variable BINLOG_FORMAT, causing problems for a DBA.
      
      This changeset requires a user to have SUPER privileges to
      change the value of the session variable BINLOG_FORMAT, and
      not only the global variable BINLOG_FORMAT.
      
      
      mysql-test/suite/binlog/t/binlog_grant.test:
        Adding test to test grants needed for SQL_LOG_BIN and BINLOG_FORMAT.
      sql/set_var.cc:
        Adding code to check that user has SUPER permission
        needed to change the value of BINLOG_FORMAT.
      sql/set_var.h:
        Adding function sys_var_thd_binlog_format::check()
      589355f0
  12. 08 Sep, 2008 4 commits
  13. 05 Sep, 2008 10 commits
    • Michael Widenius's avatar
      Automatic merge · 7f960da4
      Michael Widenius authored
      7f960da4
    • Georgi Kodinov's avatar
      Bug #38701: Crash in String::append when inserting duplicate empty strings an uft8 · cc26bc94
      Georgi Kodinov authored
      SET col
                        
      When reporting a duplicate key error the server was making incorrect assumptions 
      on what the state of the value string to include in the error is.
      
      Fixed by accessing the data in this string in a "safe" way (without relying on it
      having a terminating 0).
            
      Detected by code analysis and fixed a similar problem in reporting the foreign key
      duplicate errors.
      
      mysql-test/r/type_set.result:
        Bug #38701: test case
      mysql-test/t/type_set.test:
        Bug #38701: test case
      sql/handler.cc:
        Bug #38701: don't rely on the presence of a terminating 0 in the string
      cc26bc94
    • Narayanan V's avatar
      updating server version number · 860f74a8
      Narayanan V authored
      configure.in:
        change server version number to 5.1.29
      860f74a8
    • Narayanan V's avatar
      WL#4380: abi_check rule (using gcc -E) for storage engine API · 16291bfd
      Narayanan V authored
      Added a rule that uses gcc to generate preprocessor
      output (gcc -E) that can be compared to an already
      generated output using the diff utility.
      
      icheck has been removed and replaced by gcc -E
      because icheck does not support C++.
      
      Makefile.am:
        Added a rule for checking that the abi/api
        has not changed.
        
        The following rules are followed in the rule in makefile.am
        
        1) Generate preprocessor output for the
           files that need to be tested for abi/ 
           api changes. use -nostdinc to prevent
           generation of preprocessor output for
           system headers. This results in
           messages in stderr saying that these
           headers were not found. Redirect the
           stderr output to /dev/null to prevent
           seeing these messages.
        2) sed the output to 
           2.1) remove blank lines and lines that
                begin with "# "
           2.2) When gcc -E is run on the Mac OS 
                and solaris sparc platforms it
                introduces a line of output that
                shows up as a difference between
                the .pp and .out files. Remove
                these OS specific preprocessor
                text inserted by the preprocessor.
        3) diff the generated file and the canons
           (.pp files already in the repository).
        4) delete the .out file that is generated.
           If the diff fails, the generated file 
           is not removed. This will be useful
           for analysis of ABI differences (e.g.
           using a visual diff tool).
        
        A ABI change that causes a build to fail will always be accompanied by new canons (.out files). The .out files that are not removed will be replaced as the new .pp files.
        
        e.g. If include/mysql/plugin.h has an ABI
             change then this rule would leave a
             <build directory>/abi_check.out file.
        
        A developer with a justified API change will then do a 
        
        mv <build directory>/abi_check.out include/mysql/plugin.pp 
        
        to replace the old canons with the new ones.
      configure.in:
        1) Removed the part of the file that was
           icheck related
        2) Added an entry for the configure
           variable DIFF
        3) Ensured that the abi_check rule is run
           only if gcc is available
      include/Makefile.am:
        1) Removed the icheck related entries
      include/mysql.h.pp:
        The pre-processor output cannon file for
        include/mysql.h
      include/mysql/plugin.h.pp:
        The pre-processor output cannon file
        for include/mysql/plugin.h
      include/mysql_h.ic:
        Removed the cannon file related to icheck.
      sql/mysql_priv.h.pp:
        The pre-processor output cannon file for
        sql/mysql_priv.h
      16291bfd
    • Michael Widenius's avatar
      Fixed bug in underflow handling of page during delete found by running sql_bench · d286751a
      Michael Widenius authored
      storage/maria/ma_delete.c:
        Remove wrong optimization (first_key is not related to keypos value at this point)
      storage/maria/maria_chk.c:
        Added printing of forgotten option
      d286751a
    • Georgi Kodinov's avatar
      merged 5.1-main -> 5.1-bugteam · ccfceec1
      Georgi Kodinov authored
      ccfceec1
    • Evgeny Potemkin's avatar
      Bug#37908: Skipped access right check caused server crash. · 1588c116
      Evgeny Potemkin authored
            
      The check_table_access function initializes per-table grant info and performs
      access rights check. It wasn't called for SHOW STATUS statement thus left
      grants info uninitialized. In some cases this led to server crash. In other
      cases it allowed a user to check for presence/absence of arbitrary values in
      any tables.
            
      Now the check_table_access function is called prior to the statement
      processing.
      
      
      mysql-test/r/status.result:
        Added a test case for the bug#37908.
      mysql-test/t/status.test:
        Added a test case for the bug#37908.
      sql/sql_parse.cc:
        Bug#37908: Skipped access right check caused server crash.
        Now the check_table_access function is called when the SHOW STATUS statement
        uses any table except information.STATUS.
      sql/sql_yacc.yy:
        Bug#37908: Skipped access right check caused server crash.
        For the SHOW PROCEDURE/FUNCTION STATUS the 'mysql.proc' table isn't added
        to the table list anymore as there is no need.
      1588c116
    • Ramil Kalimullin's avatar
      After-merge fix. · bf2f3680
      Ramil Kalimullin authored
      bf2f3680
    • Ramil Kalimullin's avatar
      Merge · bef0ee99
      Ramil Kalimullin authored
      bef0ee99
    • Ramil Kalimullin's avatar
      Fix for bug #39021: SELECT REGEXP BINARY NULL never returns · 788be2ae
      Ramil Kalimullin authored
      Problem: SELECT ... REGEXP BINARY NULL may lead to server crash/hang.
      
      Fix: properly handle NULL regular expressions.
      
      
      mysql-test/r/func_regexp.result:
        Fix for bug #39021: SELECT REGEXP BINARY NULL never returns
          - test result.
      mysql-test/t/func_regexp.test:
        Fix for bug #39021: SELECT REGEXP BINARY NULL never returns
          - test case.
      sql/item_cmpfunc.cc:
        Fix for bug #39021: SELECT REGEXP BINARY NULL never returns
          - checking regular expressions' null_value
        we tested it without a val_xxx() call before, which is wrong.
        Now Item_func_regex::regcomp() returns -1 in the case
        and allows to handle NULL expessions properly.
      sql/item_cmpfunc.h:
        Fix for bug #39021: SELECT REGEXP BINARY NULL never returns
          - checking regular expressions' null_value
        we tested it without a val_xxx() call before, which is wrong.
        Now Item_func_regex::regcomp() returns -1 in the case
        and allows to handle NULL expessions properly.
      788be2ae