Commit graph

11 commits

Author SHA1 Message Date
Jimmy Yang
177d8b0c12 Fix bug #11830883, SUPPORT "CORRUPTED" BIT FOR INNODB TABLES AND INDEXES.
Also addressed issues in bug #11745133, where we could mark a table
corrupted instead of crashing the server when found a corrupted buffer/page
if the table created with innodb_file_per_table on.
2011-08-16 18:07:59 -07:00
Marko Mäkelä
d26a9ed0d3 Bug#54728: Replace the dulint struct with a 64-bit integer. 2010-06-23 14:06:59 +03:00
Marko Mäkelä
42eff81005 Merge a change from mysql-5.1-innodb:
------------------------------------------------------------
revno: 3479
revision-id: marko.makela@oracle.com-20100524110439-fazi70rlmt07tzd9
parent: vasil.dimov@oracle.com-20100520133157-42uk5q3pp0vsinac
committer: Marko Mäkelä <marko.makela@oracle.com>
branch nick: 5.1-innodb
timestamp: Mon 2010-05-24 14:04:39 +0300
message:
  Bug#53578: assert on invalid page access, in fil_io()

  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.
2010-05-24 14:45:24 +03:00
Vasil Dimov
0ecec12df3 Merge r3403..3414 from mysql-5.1-innodb:
------------------------------------------------------------
  revno: 3414
  revision-id: marko.makela@oracle.com-20100422093342-jf9ojlzdqsdebohn
  parent: marko.makela@oracle.com-20100421185359-8qaxoa2yyrpzwdd7
  committer: Marko M?kel? <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Thu 2010-04-22 12:33:42 +0300
  message:
    Correct the definition of DICT_SYS_INDEXES_NAME_FIELD.
    When row_merge_drop_temp_indexes() was reworked to drop the indexes
    via the data dictionary cache, the code was broken because it would
    read the index name from the wrong field.
  modified:
    storage/innodb_plugin/ChangeLog 2425@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2FChangeLog
    storage/innodb_plugin/dict/dict0boot.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fdict%2Fdict0boot.c
    storage/innodb_plugin/include/dict0boot.h 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fdict0boot.h
  ------------------------------------------------------------
  revno: 3413
  revision-id: marko.makela@oracle.com-20100421185359-8qaxoa2yyrpzwdd7
  parent: marko.makela@oracle.com-20100421102723-0i80uezbyu0ekj5d
  committer: Marko M?kel? <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Wed 2010-04-21 21:53:59 +0300
  message:
    btr_page_split_and_insert(): Avoid an infinite loop. (Bug #52964)
    
    btr_page_tuple_smaller(): New function, refactored from
    btr_page_split_and_insert().
    
    btr_page_get_split_rec(): Renamed from btr_page_get_sure_split_rec().
    Note that a NULL return may mean that the tuple is to be inserted into
    either the lower or upper page, to be determined by btr_page_tuple_smaller().
    
    btr_page_split_and_insert(): When btr_page_get_split_rec() returns NULL,
    invoke btr_page_tuple_smaller() to determine which half-page the tuple
    belongs to.
    
    Reviewed by Sunny Bains
  modified:
    storage/innodb_plugin/ChangeLog 2425@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2FChangeLog
    storage/innodb_plugin/btr/btr0btr.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fbtr%2Fbtr0btr.c
  ------------------------------------------------------------
  revno: 3412
  revision-id: marko.makela@oracle.com-20100421102723-0i80uezbyu0ekj5d
  parent: marko.makela@oracle.com-20100421100029-mji6lmdgvuqh96qq
  committer: Marko M?kel? <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Wed 2010-04-21 13:27:23 +0300
  message:
    dict_create_index_step(): Be strict about DYNAMIC and COMPRESSED tables.
    Bug #50495 is about REDUNDANT and COMPACT tables, after all.
  modified:
    mysql-test/suite/innodb_plugin/r/innodb-zip.result 2252@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Fmysql-test%2Finnodb-zip.result
    mysql-test/suite/innodb_plugin/t/innodb-zip.test 2252@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Fmysql-test%2Finnodb-zip.test
    storage/innodb_plugin/ChangeLog 2425@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2FChangeLog
    storage/innodb_plugin/dict/dict0crea.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fdict%2Fdict0crea.c
  ------------------------------------------------------------
  revno: 3411
  revision-id: marko.makela@oracle.com-20100421100029-mji6lmdgvuqh96qq
  parent: marko.makela@oracle.com-20100421095033-0acvzxb8um8cms0a
  committer: Marko M?kel? <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Wed 2010-04-21 13:00:29 +0300
  message:
    ha_innobase::add_index(): Only check for duplicate indexes
    when the data dictionary is locked.
    This fixes a UNIV_DEBUG assertion failure in innodb-index.test.
  modified:
    storage/innodb_plugin/handler/handler0alter.cc 1845@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Fhandler%2Fhandler0alter.cc
  ------------------------------------------------------------
  revno: 3410
  revision-id: marko.makela@oracle.com-20100421095033-0acvzxb8um8cms0a
  parent: marko.makela@oracle.com-20100421094032-ir4glqk46qvg2ywn
  committer: Marko M?kel? <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Wed 2010-04-21 12:50:33 +0300
  message:
    dtuple_convert_big_rec(): Store locally any fields whose maximum length
    is less than 256 bytes. (Bug #52745)
    Add related comments and debug assertions to the "offsets"
    functions in rem0rec.c.
    Approved by Sunny Bains
  modified:
    storage/innodb_plugin/ChangeLog 2425@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2FChangeLog
    storage/innodb_plugin/data/data0data.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fdata%2Fdata0data.c
    storage/innodb_plugin/rem/rem0rec.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Frem%2Frem0rec.c
  ------------------------------------------------------------
  revno: 3409
  revision-id: marko.makela@oracle.com-20100421094032-ir4glqk46qvg2ywn
  parent: marko.makela@oracle.com-20100421091611-uu46iygmv5sizjru
  committer: Marko M?kel? <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Wed 2010-04-21 12:40:32 +0300
  message:
    Adjust tests for the Bug #50495 fix.
  modified:
    mysql-test/suite/innodb_plugin/r/innodb-zip.result 2252@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Fmysql-test%2Finnodb-zip.result
    mysql-test/suite/innodb_plugin/t/innodb-zip.test 2252@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Fmysql-test%2Finnodb-zip.test
    mysql-test/suite/innodb_plugin/t/innodb_bug36169.test 2418@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Fmysql-test%2Finnodb_bug36169.test
  ------------------------------------------------------------
  revno: 3408
  revision-id: marko.makela@oracle.com-20100421091611-uu46iygmv5sizjru
  parent: marko.makela@oracle.com-20100421063916-h3gwjea7jzjilyww
  committer: Marko M?kel? <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Wed 2010-04-21 12:16:11 +0300
  message:
    rec_convert_dtuple_to_rec(): Correct the debug check.
    The "extern" accessor functions return zero or nonzero, not 0 or 1.
  modified:
    storage/innodb_plugin/rem/rem0rec.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Frem%2Frem0rec.c
  ------------------------------------------------------------
  revno: 3407
  revision-id: marko.makela@oracle.com-20100421063916-h3gwjea7jzjilyww
  parent: marko.makela@oracle.com-20100420201550-cax1xywvlcdshgfg
  committer: Marko M?kel? <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Wed 2010-04-21 09:39:16 +0300
  message:
    rec_convert_dtuple_to_rec(): Add a debug check.
  modified:
    storage/innodb_plugin/rem/rem0rec.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Frem%2Frem0rec.c
  ------------------------------------------------------------
  revno: 3406
  revision-id: marko.makela@oracle.com-20100420201550-cax1xywvlcdshgfg
  parent: marko.makela@oracle.com-20100420114222-diq7h2hiom9ww6me
  committer: Marko Makela <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Tue 2010-04-20 23:15:50 +0300
  message:
    btr_cur_optimistic_insert(): Remove unused variable "heap".
  modified:
    storage/innodb_plugin/btr/btr0cur.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fbtr%2Fbtr0cur.c
  ------------------------------------------------------------
  revno: 3405
  revision-id: marko.makela@oracle.com-20100420114222-diq7h2hiom9ww6me
  parent: marko.makela@oracle.com-20100420082908-tpako8jd4imkh1xb
  committer: Marko Makela <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Tue 2010-04-20 14:42:22 +0300
  message:
    dict_create_index_step(): Invoke dict_index_add_to_cache()
    in strict mode only if innodb_strict_mode is set. (Bug #50495)
    
    trx_is_strict(): New function, for checking innodb_strict_mode.
  modified:
    storage/innodb_plugin/ChangeLog 2425@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2FChangeLog
    storage/innodb_plugin/dict/dict0crea.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fdict%2Fdict0crea.c
    storage/innodb_plugin/handler/ha_innodb.cc 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fhandler%2Fha_innodb.cc
    storage/innodb_plugin/include/trx0trx.h 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Ftrx0trx.h
  ------------------------------------------------------------
  revno: 3404
  revision-id: marko.makela@oracle.com-20100420082908-tpako8jd4imkh1xb
  parent: marko.makela@oracle.com-20100419103603-u5pz4qc6hfhx4nua
  committer: Marko M?kel? <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Tue 2010-04-20 11:29:08 +0300
  message:
    Implement UNIV_BTR_AVOID_COPY, an optimization of page splits.
  modified:
    storage/innodb_plugin/ChangeLog 2425@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2FChangeLog
    storage/innodb_plugin/btr/btr0btr.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fbtr%2Fbtr0btr.c
    storage/innodb_plugin/include/univ.i 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Funiv.i
  ------------------------------------------------------------
  revno: 3403
  revision-id: marko.makela@oracle.com-20100419103603-u5pz4qc6hfhx4nua
  parent: marko.makela@oracle.com-20100419094405-fd3xwadullishv07
  committer: Marko =?ISO-8859-1?Q?M=E4kel=E4?= <marko.makela@oracle.com>
  branch nick: 5.1-innodb
  timestamp: Mon 2010-04-19 13:36:03 +0300
  message:
    Enable UNIV_DEBUG_VALGRIND when HAVE_purify is set.
  modified:
    storage/innobase/include/univ.i 2@cee13dc7-1704-0410-992b-c9b4543f1246:trunk%2Finclude%2Funiv.i
    storage/innodb_plugin/include/univ.i 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Funiv.i
2010-04-22 14:24:42 +03:00
Vasil Dimov
5f9ba24f91 Import branches/innodb+ from SVN on top of storage/innobase. 2010-04-12 18:20:41 +03:00
Guilhem Bichot
29a46b4cf9 Renamed storage/innodb_plugin to storage/innobase, so that 1) it's the same
layout as we always had in trees containing only the builtin
2) win\configure.js WITH_INNOBASE_STORAGE_ENGINE still works.
2009-08-07 12:16:00 +02:00
Guilhem Bichot
c5ab943afe Creation of mysql-trunk = {summit + "Innodb plugin replacing the builtin"}:
bzr branch mysql-5.1-performance-version mysql-trunk # Summit
cd mysql-trunk
bzr merge mysql-5.1-innodb_plugin # which is 5.1 + Innodb plugin 
bzr rm innobase # remove the builtin
Next step: build, test fixes.
2009-08-04 13:25:19 +02:00
tsmith/tim@siva.hindu.god
f269d9b6c3 Applied innodb-5.1 snapshots ss799 and ss854
Bugs fixed:
- Bug #20877: InnoDB data dictionary memory footprint is too big
- Bug #13544: Second delete of same row in transaction illustrates non-optimal locking
- Bug #20791: valgrind errors in InnoDB
2006-09-21 01:39:09 -06:00
tsmith@maint1.mysql.com
c488e4b928 Applied InnoDB 5.1 snapshot ss787.
Bugs fixed:
- Bug #20791    valgrind errors in InnoDB
  Remove Valgrind warning of Bug #20791 : in new database
  creation, we read the doublewrite buffer magic number from
  uninitialized memory; the code worked because it was extremely
  unlikely that the memory would contain the magic number
- Bug #21784    DROP TABLE crashes 5.1.12-pre if concurrent
  queries on the table
  remove update_thd() in ::store_lock()


Also includes numerous coding style fixes, etc.  See file-level
comments for details.
2006-09-05 03:52:15 +02:00
aivanov@mysql.com
d33b523271 Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
  #3300: "UPDATE statement with no index column in where condition locks
    all rows"
    Implement semi-consistent read to reduce lock conflicts at the cost
    of breaking serializability.
    ha_innobase::unlock_row(): reset the "did semi consistent read" flag
    ha_innobase::was_semi_consistent_read(),
    ha_innobase::try_semi_consistent_read(): new methods
    row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
    keeping track of semi-consistent reads
    row_vers_build_for_semi_consistent_read(),
    row_sel_build_committed_vers_for_mysql(): new functions
    row_search_for_mysql(): implement semi-consistent reads

  #9802: "Foreign key checks disallow alter table".
    Added test cases.

  #12456: "Cursor shows incorrect data - DML does not affect,
    probably caching"
    This patch implements a high-granularity read view to be used with
    cursors. In this high-granularity consistent read view modifications 
    done by the creating transaction after the cursor is created or 
   future transactions are not visible. But those modifications that 
   transaction did before the cursor was created are visible.

  #12701: "Support >4GB buffer pool and log files on 64-bit Windows"
    Do not call os_file_create_tmpfile() at runtime. Instead, create all
    tempfiles at startup and guard access to them with mutexes.

  #13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
    When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
    foreign key references are compatible.

  #14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
    innobase_init(): Assert that
    DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
    dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
    row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
    to change the length of a VARBINARY column that refers to or is referenced
    by a BINARY column. BINARY columns are no longer padded on comparison,
    and thus they cannot be padded on storage either.

  #14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
    Note that buf_block_t::index should be protected by btr_search_latch
    or an s-latch or x-latch on the index page.
    btr_search_drop_page_hash_index(): Read block->index while holding
    btr_search_latch and use the cached value in the loop.  Remove some
    redundant assertions.

  #15108: "mysqld crashes when innodb_log_file_size is set > 4G"

  #15308: "Problem of Order with Enum Column in Primary Key"

  #15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
    row_ins_foreign_report_add_err(): When printing the parent record,
    use the index in the parent table rather than the index in the child table.

  #15653: "Slow inserts to InnoDB if many thousands of .ibd files"
    Keep track on unflushed modifications to file spaces.  When there are tens
    of thousands of file spaces, flushing all files in fil_flush_file_spaces()
    would be very slow.
    fil_flush_file_spaces(): Only flush unflushed file spaces.
    fil_space_t, fil_system_t: Add a list of unflushed spaces.

  #15991: "innodb-file-per-table + symlink database + rename = cr"
   os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
   to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
   This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
   to a different file system.

  #16157: "InnoDB crashes when main location settings are empty"
    This patch is from Heikki.

  #16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
    with VARCHAR BINARY"
    dict_load_columns(): Set the charset-collation code
    DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
    that lack a charset-collation code, i.e., the tables were created
    with an older version of MySQL/InnoDB than 4.1.2.

  #16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
    Take a InnoDB table lock only if user has explicitly requested a table
    lock. Added some additional comments to store_lock() and external_lock().

  #16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
    Do not mistake TABLENAME_ibfk_0 for auto-generated id.
    dict_table_get_highest_foreign_id(): Ignore foreign constraint
    identifiers starting with the pattern TABLENAME_ibfk_0.

  #16582: "InnoDB: Error in an adaptive hash index pointer to page"
    Account for a race condition when dropping the adaptive hash index
    for a B-tree page.
    btr_search_drop_page_hash_index(): Retry the operation if a hash index
    with different parameters was built meanwhile.  Add diagnostics for the
    case that hash node pointers to the page remain.
    btr_search_info_update_hash(), btr_search_info_update_slow():
    Document the parameter "info" as in/out.

  #16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
    section"
    Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
    INNODB STATUS output.
    dict_foreign_error_report(): Always print a newline after invoking
    dict_print_info_on_foreign_key_in_create_format().

  #16827: "Better InnoDB error message if ibdata files omitted from my.cnf"

  #17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
    hash"
    CHECK TABLE blocking other queries, by releasing the btr_search_latch
    periodically during the adaptive hash table validation.

  #17405: "Valgrind: conditional jump or move depends on unititialised values"
    buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
    testing uninitialized variables.
2006-03-10 19:22:21 +03:00
brian@zim.(none)
2a7c71e309 Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
Renamed from innobase/include/dict0boot.h (Browse further)