1. 07 Oct, 2008 1 commit
    • Sergei Golubchik's avatar
      workaround for gcc 4.1.0 strict-aliasing bug · 10a2bac7
      Sergei Golubchik authored
      mysys/lf_alloc-pin.c:
        workaround for gcc 4.1.0 strict-aliasing bug.
        and yes, I mean a *bug* - as union (in alloc_free) is a
        documented way to access type-punned pointers. and it helps in
        newer gcc, but fails in 4.1.0
      10a2bac7
  2. 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
  3. 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
  4. 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
  5. 11 Sep, 2008 2 commits
  6. 05 Sep, 2008 2 commits
  7. 01 Sep, 2008 2 commits
    • Sergei Golubchik's avatar
      wt: don't support a key as a union { ulonglong, void* }. Although convenient, · 27dadbd8
      Sergei Golubchik authored
      it forces the user to bzero a key before setting it as a pointer, otherwise
      it'll have random content on architectures where
      sizeof(void*) < sizeof(ulonglong).
      
      Declaring a key as ulonglong only (not a union) makes this user mistake
      impossible.
      
      include/waiting_threads.h:
        WT_RESOURCE_ID::value is an ulonglong, not a union
      mysys/waiting_threads.c:
        WT_RESOURCE_ID::value is an ulonglong, not a union
      storage/maria/ma_write.c:
        WT_RESOURCE_ID::value is an ulonglong, not a union
      storage/maria/trnman.c:
        WT_RESOURCE_ID::value is an ulonglong, not a union
      unittest/mysys/waiting_threads-t.c:
        WT_RESOURCE_ID::value is an ulonglong, not a union
      27dadbd8
    • Sergei Golubchik's avatar
      533deb0a
  8. 31 Aug, 2008 2 commits
  9. 30 Aug, 2008 2 commits
  10. 29 Aug, 2008 3 commits
  11. 28 Aug, 2008 2 commits
    • Sergei Golubchik's avatar
      merge · 4be86917
      Sergei Golubchik authored
      4be86917
    • Sergei Golubchik's avatar
      wt: comments, OOM checks, test case for deadlock detection · 942651ea
      Sergei Golubchik authored
      include/waiting_threads.h:
        make wt_thd_dontwait private
      mysql-test/r/maria.result:
        deadlock example
      mysql-test/t/maria.test:
        deadlock example
      mysys/waiting_threads.c:
        comments, OOM checks
      sql/mysqld.cc:
        fix variables
      sql/sql_class.cc:
        move wt_lazy_init to THD constructor
      sql/sql_class.h:
        move wt_lazy_init to THD constructor
      storage/maria/ha_maria.cc:
        backport from 6.0
      storage/maria/ma_write.c:
        poset-review fixes, set thd->proc_info
      storage/maria/trnman.c:
        bugfixing
      storage/myisam/mi_check.c:
        warnings
      storage/myisam/mi_page.c:
        warnings
      storage/myisam/mi_search.c:
        warnings
      storage/myisammrg/myrg_create.c:
        warnings
      unittest/mysys/waiting_threads-t.c:
        fixes
      942651ea
  12. 27 Aug, 2008 1 commit
    • Sergei Golubchik's avatar
      proc_info_hook, mysys access to thd->proc_info · ca23272e
      Sergei Golubchik authored
      include/my_global.h:
        move __func__ definition to my_global.h
      include/my_sys.h:
        proc_info_hook
      mysys/my_static.c:
        proc_info_hook
      sql/mysqld.cc:
        proc_info_hook
      sql/sql_class.cc:
        support thd==0 in set_thd_proc_info
      sql/sql_profile.cc:
        move __func__ definition to my_global.h
      sql/sql_profile.h:
        move __func__ definition to my_global.h
      ca23272e
  13. 26 Aug, 2008 1 commit
    • Michael Widenius's avatar
      Fix for Bug#36499 Maria: potential deadlock · dd406c1e
      Michael Widenius authored
      This was done by introducing another mutex for handling the key_del link
      I also renamed all key_del variables to start with key_del prefix
      
      
      storage/maria/ma_close.c:
        Rename of key_del variables
      storage/maria/ma_key_recover.c:
        Changed key_del to be protexted by it's own mutex: key_del_lock
        Rename of key_del variables
        Removed comment for old bug
      storage/maria/ma_key_recover.h:
        Rename of key_del variables
      storage/maria/ma_open.c:
        Initialization for new key_del_lock mutex
        Renamed intern_cond to key_del_cond as it was only used for protection of key_del
      storage/maria/ma_page.c:
        Rename of key_del variables
      storage/maria/ma_write.c:
        Rename of key_del variables
      storage/maria/maria_def.h:
        Rename of key_del variables
        Added key_del_lock
      dd406c1e
  14. 25 Aug, 2008 4 commits
    • Michael Widenius's avatar
      Fixed some wrong usage of my_bool · 6629c764
      Michael Widenius authored
      Fixed compiler warning
      Ensure that pagecache returns correct error number
      
      
      storage/maria/ma_pagecache.c:
        Ensure that block->error contain error code from my_errno (not return value from pread/pwrite)
        Went through usage of my_pread/my_pwrite and ensured that result was threated correctly
        Fixed some wrong usage of my_bool
      6629c764
    • Michael Widenius's avatar
      Automatic merge · 43528b9d
      Michael Widenius authored
      43528b9d
    • Michael Widenius's avatar
      Changed all file names in maria to LEX_STRING and removed some calls to strlen() · 1a5de5bc
      Michael Widenius authored
      Ensure that pagecache gives correct error number even if error for block happend
      
      
      mysys/my_pread.c:
        Indentation fix
      storage/maria/ha_maria.cc:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_check.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_checkpoint.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_create.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_dbug.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_delete.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_info.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_keycache.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_locking.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_loghandler.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_open.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_pagecache.c:
        Store error number for last failed operation in the page block
        This should fix some asserts() when errno was not properly set after failure to read block in another thread
      storage/maria/ma_recovery.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_update.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_write.c:
        filenames changed to be of type LEX_STRING
      storage/maria/maria_def.h:
        filenames changed to be of type LEX_STRING
      storage/maria/maria_ftdump.c:
        filenames changed to be of type LEX_STRING
      storage/maria/maria_pack.c:
        filenames changed to be of type LEX_STRING
      1a5de5bc
    • Sergei Golubchik's avatar
      BUG#38606: delete in lock write concurrent · 4bdb308b
      Sergei Golubchik authored
      (sanja's patch)
      4bdb308b
  15. 24 Aug, 2008 1 commit
    • Michael Widenius's avatar
      Fix for bug#38484 DELETE causes crash or index corruption · d145362e
      Michael Widenius authored
      There is no test cases as it's not trivial to do a test case for this.
      The new code for Maria is however executed by the test case in the bug report.
      
      mysql-test/mysql-test-run.pl:
        Avoid warnings when running with --extern
      storage/maria/ha_maria.cc:
        Disable not complete assert until Sanja can push a proper fix
      storage/maria/ma_delete.c:
        Fix that pageflag for page is calculated based on original values
      storage/maria/ma_search.c:
        Ensure that prev_length structure variable is properly reset when not used
      storage/myisam/mi_search.c:
        Ensure that prev_length structure variable is properly reset when not used
      d145362e
  16. 18 Aug, 2008 2 commits
    • Michael Widenius's avatar
      Automatic merge · 57e0bdb3
      Michael Widenius authored
      57e0bdb3
    • Michael Widenius's avatar
      Fixes for Bug #38016 Maria: trying to access freed memory when committing a transaction · ea31b1e6
      Michael Widenius authored
      Don't write out states if they haven't changed
      
      sql/sql_base.cc:
        Call extra(HA_EXTRA_PREPARE_FOR_DROP) before doing a drop of a table
        More DBUG
      sql/sql_table.cc:
        Call extra(HA_EXTRA_PREPARE_FOR_RENAME) before renaming a table
      storage/maria/ha_maria.cc:
        Ensure that file->trn is set when we call extra(HA_EXTRA_PREPARE_FOR_DROP/RENAME)
      storage/maria/ma_close.c:
        When doing close, assert if we have pointers in trn->table_list that points to the MARIA_SHARE
      storage/maria/ma_extra.c:
        Reset info->state_start in case of drop/rename. This fixes the problem of accessing freed memory in repair
        Don't write state changed if they haven't changed
      storage/maria/ma_open.c:
        Reset share->changed after we have written out a state (speed optimization to not write states when they haven't changed)
      storage/maria/ma_state.c:
        Decrement share->in_trans properly in DBUG_BINARY to ensure that the DBUG_ASSERT() in maria_close() works
        More DBUG
      ea31b1e6
  17. 16 Aug, 2008 1 commit
    • Sergei Golubchik's avatar
      Bug#38466 maria: range query returns no data · edb33da7
      Sergei Golubchik authored
      storage/maria/ma_search.c:
        when we found a matching key on the node page and want to search in the left leaf
        we must use only SEARCH_FIND flag, and never SEARCH_BIGGER, SEARCH_SMALLER, or SEARCH_LAST
      edb33da7
  18. 11 Aug, 2008 1 commit
  19. 08 Aug, 2008 1 commit
    • Sergei Golubchik's avatar
      wt_thd_lazy_init(), per-thread deadlock search depths and timeouts · e2219ec9
      Sergei Golubchik authored
      mysys/array.c:
        lazy alloc in dynamic array
      sql-common/client.c:
        for dynamic array, specify init_alloc==alloc_increment explicitly
      sql/mysqld.cc:
        per-thread deadlock search depths and timeouts
      sql/set_var.cc:
        per-thread deadlock search depths and timeouts
      sql/sql_class.h:
        per-thread deadlock search depths and timeouts
      e2219ec9
  20. 07 Aug, 2008 1 commit
    • Sergei Golubchik's avatar
      move wt* maintainance from maria to the server · f8c1059c
      Sergei Golubchik authored
      include/waiting_threads.h:
        C_MODE_START/END
      mysys/waiting_threads.c:
        relax the checks - auto init thd in will_wait_for,
        allow to destroy uninited thd (=noop),
        allow a "release" an unexistent resource (=noop),
      sql/sql_class.cc:
        move wt* maintainance from maria to the server.
        do THD::cleanup after ha_close_connection() and plugin_thdvar_cleanup().
      storage/maria/unittest/trnman-t.c:
        update to new prototype
      f8c1059c
  21. 06 Aug, 2008 3 commits
    • Sergei Golubchik's avatar
      fixes for failing test suite · 5a4cdba5
      Sergei Golubchik authored
      storage/maria/ma_write.c:
        select ... group by ... - take temporary tables into account, they have TRN->pins == 0
      storage/maria/trnman.c:
        one cannot modify TRN->trid, it's a key in the trid_to_trn
        hash, if trid is modified, TRN won't be found (and deleted in
        trnman_free_trn) from the hash.
      5a4cdba5
    • Sergei Golubchik's avatar
      maria: deadlock detection when waiting on unique key (useless until we can rollback) · 3971e262
      Sergei Golubchik authored
      include/my_pthread.h:
        cleanup
      include/waiting_threads.h:
        header guard
      mysys/waiting_threads.c:
        bug - kill strategy were not applied to deadlocks of length 1.
        cast timeout to ulonglong.
      storage/maria/ma_static.c:
        declare WT_RESOURCE_TYPE ma_rc_dup_unique
      storage/maria/ma_write.c:
        deadlock detection when waiting on unique key (useless until we can rollback)
      storage/maria/maria_def.h:
        deadlock detection when waiting on unique key (useless until we can rollback)
      storage/maria/trnman.c:
        use deadlock detector.
        protect state transitions of a TRN with a mutex.
        trnman_trid_to_trn() function.
      storage/maria/trnman.h:
        trnman_trid_to_trn() function
        protect state transitions of a TRN with a mutex
        use deadlock detector.
      storage/maria/trnman_public.h:
        trnman_trid_to_trn()
      3971e262
    • Sergei Golubchik's avatar
      compiler warnings · 7ca3fc4f
      Sergei Golubchik authored
      7ca3fc4f
  22. 04 Aug, 2008 2 commits
    • Sergei Golubchik's avatar
      wt_thd_cond_timedwait() now allows the list of blockers to change after · 651f61fc
      Sergei Golubchik authored
      wt_thd_will_wait_for() was called. That is a caller doesn't need to hold a
      mutex all the time preventing blockers from releasing a resource.
      
      651f61fc
    • Sergei Golubchik's avatar
      compiler warnings · 83472904
      Sergei Golubchik authored
      trnman: remove old lockman code
      trnman: replace trid_to_committed_trn hash with trid_to_trn
      
      storage/maria/ma_blockrec.c:
        compiler warnings
      storage/maria/ma_loghandler.c:
        compiler warnings
      storage/maria/ma_write.c:
        compiler warnings
      storage/maria/trnman.c:
        remove old lockman code
        replace trid_to_committed_trn hash with trid_to_trn
      storage/maria/trnman.h:
        remove old lockman code
        replace trid_to_committed_trn hash with trid_to_trn
      storage/maria/unittest/ma_test_loghandler-t.c:
        compiler warnings
      storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
        compiler warnings
      storage/maria/unittest/ma_test_loghandler_multithread-t.c:
        compiler warnings
      83472904