1. 10 Jun, 2010 4 commits
  2. 09 Jun, 2010 2 commits
    • Sergey Glukhov's avatar
      Bug#38999 valgrind warnings for update statement in function compare_record() · 32b306c4
      Sergey Glukhov authored
      (InnoDB plugin branch)
      
      mysql-test/suite/innodb_plugin/r/innodb_mysql.result:
        test case
      mysql-test/suite/innodb_plugin/t/innodb_mysql.test:
        test case
      storage/innodb_plugin/row/row0sel.c:
        init null bytes with default values as they might be
        left uninitialized in some cases and these uninited bytes
        might be copied into mysql record buffer that leads to
        valgrind warnings on next use of the buffer.
      32b306c4
    • Sergey Glukhov's avatar
      Bug#38999 valgrind warnings for update statement in function compare_record() · 36f0e016
      Sergey Glukhov authored
      Valgrind warning happpens because of uninitialized null bytes.
      In row_sel_push_cache_row_for_mysql() function we fill fetch cache
      with necessary field values, row_sel_store_mysql_rec() is called
      for this and leaves null bytes untouched.
      Later row_sel_pop_cached_row_for_mysql() rewrites table record
      buffer with uninited null bytes. We can see the problem from the
      test case:
      At 'SELECT...' we call row_sel_push...->row_sel_store...->row_sel_pop_cached...
      chain which rewrites table->record[0] buffer with uninitialized null bytes.
      When we call 'UPDATE...' statement, compare_record uses this buffer and
      valgrind warning occurs.
      The fix is to init null bytes with default values.
      
      
      mysql-test/suite/innodb/r/innodb_mysql.result:
        test case
      mysql-test/suite/innodb/t/innodb_mysql.test:
        test case
      mysql-test/t/ps_3innodb.test:
        enable valgrind testing
      storage/innobase/row/row0sel.c:
        init null bytes with default values as they might be
        left uninitialized in some cases and these uninited bytes
        might be copied into mysql record buffer that leads to
        valgrind warnings on next use of the buffer.
      36f0e016
  3. 08 Jun, 2010 4 commits
  4. 03 Jun, 2010 5 commits
  5. 02 Jun, 2010 4 commits
    • Marko Mäkelä's avatar
      89de0075
    • Marko Mäkelä's avatar
      Bug#53674: InnoDB: Error: unlock row could not find a 4 mode lock on the record · 8c32f262
      Marko Mäkelä authored
      In semi-consistent read, only unlock freshly locked non-matching records.
      
      lock_rec_lock_fast(): Return LOCK_REC_SUCCESS,
      LOCK_REC_SUCCESS_CREATED, or LOCK_REC_FAIL instead of TRUE/FALSE.
      
      enum db_err: Add DB_SUCCESS_LOCKED_REC for indicating a successful
      operation where a record lock was created.
      
      lock_sec_rec_read_check_and_lock(),
      lock_clust_rec_read_check_and_lock(), lock_rec_enqueue_waiting(),
      lock_rec_lock_slow(), lock_rec_lock(), row_ins_set_shared_rec_lock(),
      row_ins_set_exclusive_rec_lock(), sel_set_rec_lock(),
      row_sel_get_clust_rec_for_mysql(): Return DB_SUCCESS_LOCKED_REC if a
      new record lock was created. Adjust callers.
      
      row_unlock_for_mysql(): Correct the function documentation.
      
      row_prebuilt_t::new_rec_locks: Correct the documentation.
      8c32f262
    • Marko Mäkelä's avatar
      Bug#53674: InnoDB: Error: unlock row could not find a 4 mode lock on the record · 47d993b2
      Marko Mäkelä authored
      In semi-consistent read, only unlock freshly locked non-matching records.
      
      Define DB_SUCCESS_LOCKED_REC for indicating a successful operation
      where a record lock was created.
      
      lock_rec_lock_fast(): Return LOCK_REC_SUCCESS,
      LOCK_REC_SUCCESS_CREATED, or LOCK_REC_FAIL instead of TRUE/FALSE.
      
      lock_sec_rec_read_check_and_lock(),
      lock_clust_rec_read_check_and_lock(), lock_rec_enqueue_waiting(),
      lock_rec_lock_slow(), lock_rec_lock(), row_ins_set_shared_rec_lock(),
      row_ins_set_exclusive_rec_lock(), sel_set_rec_lock(),
      row_sel_get_clust_rec_for_mysql(): Return DB_SUCCESS_LOCKED_REC if a
      new record lock was created. Adjust callers.
      
      row_unlock_for_mysql(): Correct the function documentation.
      
      row_prebuilt_t::new_rec_locks: Correct the documentation.
      47d993b2
    • Marko Mäkelä's avatar
  6. 01 Jun, 2010 5 commits
  7. 31 May, 2010 1 commit
    • Vasil Dimov's avatar
      Merge a change from mysql-trunk-innodb: · bc837aeb
      Vasil Dimov authored
        ------------------------------------------------------------
        revno: 3127
        revision-id: vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1
        parent: vasil.dimov@oracle.com-20100531105923-kpjwl4rbgfpfj13c
        committer: Vasil Dimov <vasil.dimov@oracle.com>
        branch nick: mysql-trunk-innodb
        timestamp: Mon 2010-05-31 18:23:41 +0300
        message:
          Fix Bug #53947 InnoDB: Assertion failure in thread 4224 in file .\sync\sync0sync.c line 324
          
          Destroy the rw-lock object before freeing the memory it is occupying.
          If we do not do this, then the mutex that is contained in the rw-lock
          object btr_search_latch_temp->mutex gets "freed" and subsequently
          mutex_free() from sync_close() hits a mutex whose memory has been
          freed and crashes.
          
          Approved by:	Heikki (via IRC)
          Discussed with:	Calvin
      bc837aeb
  8. 28 May, 2010 1 commit
  9. 27 May, 2010 1 commit
  10. 26 May, 2010 2 commits
  11. 25 May, 2010 6 commits
  12. 24 May, 2010 2 commits
    • Marko Mäkelä's avatar
      Document the Bug #53578 fix. · edf5c7f7
      Marko Mäkelä authored
      edf5c7f7
    • Marko Mäkelä's avatar
      Bug#53578: assert on invalid page access, in fil_io() · c65b1c5f
      Marko Mäkelä authored
      Store the max_space_id in the data dictionary header in order to avoid
      space_id reuse.
      
      DICT_HDR_MIX_ID: Renamed to DICT_HDR_MAX_SPACE_ID, DICT_HDR_MIX_ID_LOW.
      
      dict_hdr_get_new_id(): Return table_id, index_id, space_id or a subset of them.
      
      fil_system_t: Add ibool space_id_reuse_warned.
      
      fil_create_new_single_table_tablespace(): Get the space_id from the caller.
      
      fil_space_create(): Issue a warning if the fil_system->max_assigned_id
      is exceeded.
      
      fil_assign_new_space_id(): Return TRUE/FALSE and take a pointer to the
      space_id as a parameter. Make the function public.
      
      fil_init(): Initialize all fil_system fields by mem_zalloc(). Remove
      explicit initializations of certain fields to 0 or NULL.
      c65b1c5f
  13. 20 May, 2010 3 commits
    • Vasil Dimov's avatar
      c3a09238
    • Vasil Dimov's avatar
      Disable main.ps_3innodb for valgrind tests since it results in known · 8a187a45
      Vasil Dimov authored
      failures, that are described in
      
      Bug#38999 valgrind warnings for update statement in function compare_record()
      
      At the time I am adding this the failures are:
      
      main.ps_3innodb                          [ fail ]  Found warnings/errors in server log file!
              Test ended at 2010-05-20 01:17:34
      line
      ==31559== Thread 11:
      ==31559== Conditional jump or move depends on uninitialised value(s)
      ==31559==    at 0x75C5BD: compare_record(st_table*) (sql_update.cc:35)
      ==31559==    by 0x744732: write_record(THD*, st_table*, st_copy_info*) (sql_insert.cc:1486)
      ==31559==    by 0x74A0D7: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:835)
      ==31559==    by 0x6A79B4: mysql_execute_command(THD*) (sql_parse.cc:3198)
      ==31559==    by 0x754998: Prepared_statement::execute(String*, bool) (sql_prepare.cc:3583)
      ==31559==    by 0x754C4F: Prepared_statement::execute_loop(String*, bool, unsigned char*, unsigned char*) (sql_prepare.cc:3258)
      ==31559==    by 0x754F33: mysql_sql_stmt_execute(THD*) (sql_prepare.cc:2529)
      ==31559==    by 0x6A5028: mysql_execute_command(THD*) (sql_parse.cc:2272)
      ==31559==    by 0x6ADAE8: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5986)
      ==31559==    by 0x6AF3A4: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1233)
      ==31559==    by 0x6B0800: do_command(THD*) (sql_parse.cc:874)
      ==31559==    by 0x69CB46: handle_one_connection (sql_connect.cc:1134)
      ==31559==    by 0x33EDA062F6: start_thread (in /lib64/libpthread-2.5.so)
      ==31559==    by 0x33ECED1B6C: clone (in /lib64/libc-2.5.so)
      ==31559== Conditional jump or move depends on uninitialised value(s)
      ==31559==    at 0x75C5D0: compare_record(st_table*) (sql_update.cc:35)
      ==31559==    by 0x744732: write_record(THD*, st_table*, st_copy_info*) (sql_insert.cc:1486)
      ==31559==    by 0x74A0D7: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:835)
      ==31559==    by 0x6A79B4: mysql_execute_command(THD*) (sql_parse.cc:3198)
      ==31559==    by 0x754998: Prepared_statement::execute(String*, bool) (sql_prepare.cc:3583)
      ==31559==    by 0x754C4F: Prepared_statement::execute_loop(String*, bool, unsigned char*, unsigned char*) (sql_prepare.cc:3258)
      ==31559==    by 0x754F33: mysql_sql_stmt_execute(THD*) (sql_prepare.cc:2529)
      ==31559==    by 0x6A5028: mysql_execute_command(THD*) (sql_parse.cc:2272)
      ==31559==    by 0x6ADAE8: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5986)
      ==31559==    by 0x6AF3A4: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1233)
      ==31559==    by 0x6B0800: do_command(THD*) (sql_parse.cc:874)
      ==31559==    by 0x69CB46: handle_one_connection (sql_connect.cc:1134)
      ==31559==    by 0x33EDA062F6: start_thread (in /lib64/libpthread-2.5.so)
      ==31559==    by 0x33ECED1B6C: clone (in /lib64/libc-2.5.so)
      ^ Found warnings in /export/home4/pb2/test/sb_3-1827397-1274300957.87/mysql-5.1.48-linux-x86_64-test/mysql-test/var-n_mix/log/mysqld.1.err
      8a187a45
    • Marko Mäkelä's avatar
      114fc25b