Commit graph

76 commits

Author SHA1 Message Date
marko
70f1128619 branches/innodb+: Merge revisions 2835:2862 from branches/zip:
------------------------------------------------------------------------
  r2838 | vasil | 2008-10-21 12:49:27 +0300 (Tue, 21 Oct 2008) | 61 lines

  branches/zip:

  Merge 2744:2837 from branches/5.1 (skipping r2782 and r2826):

    ------------------------------------------------------------------------
    r2832 | vasil | 2008-10-21 10:08:30 +0300 (Tue, 21 Oct 2008) | 10 lines
    Changed paths:
       M /branches/5.1/handler/ha_innodb.cc

    branches/5.1:

    In ha_innobase::info():

    Replace sql_print_warning() which prints to mysqld error log with
    push_warning_printf() which sends the error message to the client.

    Suggested by: Marko, Sunny, Michael
    Objected by:  Inaam

    ------------------------------------------------------------------------
    r2837 | vasil | 2008-10-21 12:07:44 +0300 (Tue, 21 Oct 2008) | 32 lines
    Changed paths:
       M /branches/5.1/mysql-test/innodb-semi-consistent.result
       M /branches/5.1/mysql-test/innodb-semi-consistent.test
       M /branches/5.1/mysql-test/innodb.result
       M /branches/5.1/mysql-test/innodb.test

    branches/5.1:

    Merge a change from MySQL (this fixes the failing innodb and
    innodb-semi-consistent tests):

      revno: 2757
      committer: Georgi Kodinov <kgeorge@mysql.com>
      branch nick: B39812-5.1-5.1.29-rc
      timestamp: Fri 2008-10-03 15:24:19 +0300
      message:
        Bug #39812: Make statement replication default for 5.1 (to match 5.0)

        Make STMT replication default for 5.1.
        Add a default of MIXED into the config files
        Fix the tests that needed MIXED replication mode.
      modified:
        mysql-test/include/mix1.inc
        mysql-test/r/innodb-semi-consistent.result
        mysql-test/r/innodb.result
        mysql-test/r/innodb_mysql.result
        mysql-test/r/tx_isolation_func.result
        mysql-test/t/innodb-semi-consistent.test
        mysql-test/t/innodb.test
        mysql-test/t/tx_isolation_func.test
        sql/mysqld.cc
        support-files/my-huge.cnf.sh
        support-files/my-innodb-heavy-4G.cnf.sh
        support-files/my-large.cnf.sh
        support-files/my-medium.cnf.sh
        support-files/my-small.cnf.sh


    ------------------------------------------------------------------------

  ------------------------------------------------------------------------
  r2847 | marko | 2008-10-22 10:07:37 +0300 (Wed, 22 Oct 2008) | 6 lines

  branches/zip: page_zip_rec_needs_ext(): Fix a bug that was introduced
  in the fix of Mantis issue #73.  With key_block_size=16, we will also
  have to check the available space on the uncompressed page.
  Otherwise, the clustered index record can be almost 16 kilobytes in
  size, and the undo log record will not fit.
  ------------------------------------------------------------------------
  r2850 | marko | 2008-10-22 13:52:12 +0300 (Wed, 22 Oct 2008) | 2 lines

  branches/zip: ibuf_insert_to_index_page(): Discard the local variable block.
  page_cur is always positioned on block, the function parameter.
  ------------------------------------------------------------------------
  r2853 | sunny | 2008-10-23 01:52:09 +0300 (Thu, 23 Oct 2008) | 2 lines
  branches/zip: Add missing UNIV_INTERN.
  ------------------------------------------------------------------------
  r2855 | sunny | 2008-10-23 09:29:46 +0300 (Thu, 23 Oct 2008) | 36 lines

  branches/zip:

  Merge revisions 2837:2852 from branches/5.1:

    ------------------------------------------------------------------------
    r2849 | sunny | 2008-10-22 12:01:18 +0300 (Wed, 22 Oct 2008) | 8 lines
    Changed paths:
       M /branches/5.1/handler/ha_innodb.cc
       M /branches/5.1/include/row0mysql.h
       M /branches/5.1/row/row0mysql.c

    branches/5.1: Return the actual error code encountered when allocating
    a new autoinc value. The change in behavior (bug) was introduced in 5.1.22
    when we introduced the new AUTOINC locking model.

    rb://31

    Bug#40224 New AUTOINC changes mask reporting of deadlock/timeout errors

    ------------------------------------------------------------------------
    r2852 | sunny | 2008-10-23 01:42:24 +0300 (Thu, 23 Oct 2008) | 9 lines
    Changed paths:
       M /branches/5.1/handler/ha_innodb.cc
       M /branches/5.1/handler/ha_innodb.h

    branches/5.1: Backport r2724 from branches/zip

    Check column value against the col max value before updating the table's
    global autoinc counter value. This is part of simplifying the AUTOINC
    sub-system. We extract the type info from MySQL data structures at runtime.

    This fixes Bug#37788 InnoDB Plugin: AUTO_INCREMENT wrong for compressed tables

    ------------------------------------------------------------------------

  ------------------------------------------------------------------------
  r2856 | sunny | 2008-10-23 10:07:05 +0300 (Thu, 23 Oct 2008) | 1 line

  Reverting test file changes from r2855
  ------------------------------------------------------------------------
  r2857 | sunny | 2008-10-23 10:24:33 +0300 (Thu, 23 Oct 2008) | 30 lines

  branches/zip:

  Merge revisions 2852:2854 from branches/5.1:

    ------------------------------------------------------------------------
    r2854 | sunny | 2008-10-23 08:30:32 +0300 (Thu, 23 Oct 2008) | 13 lines
    Changed paths:
       M /branches/5.1/dict/dict0dict.c
       M /branches/5.1/dict/dict0mem.c
       M /branches/5.1/handler/ha_innodb.cc
       M /branches/5.1/handler/ha_innodb.h
       M /branches/5.1/include/dict0dict.h
       M /branches/5.1/include/dict0mem.h
       M /branches/5.1/row/row0mysql.c

    branches/5.1: Backport changes from branches/zip r2725

    Simplify the autoinc initialization code. This removes the
    non-determinism related to reading the table's autoinc value for the first
    time. This change has also reduced the sizeof dict_table_t by sizeof(ibool)
    bytes because we don't need the dict_table_t::autoinc_inited field anymore.

    Bug#39830 Table autoinc value not updated on first insert.
    Bug#35498 Cannot get table test/table1 auto-inccounter value in ::info
    Bug#36411 Failed to read auto-increment value from storage engine" in 5.1.24 auto-inc
    rb://16


    ------------------------------------------------------------------------

  ------------------------------------------------------------------------
  r2858 | vasil | 2008-10-23 11:33:43 +0300 (Thu, 23 Oct 2008) | 4 lines

  branches/zip:

  Update the ChangeLog
  ------------------------------------------------------------------------
  r2861 | marko | 2008-10-23 12:27:15 +0300 (Thu, 23 Oct 2008) | 24 lines

  branches/zip: Clean up the file format stamping.

  trx_sys_file_format_max_upgrade(): Rename from
  trx_sys_file_format_max_update().  Improve the documentation.  Add a
  const qualifier to the parameter "name".  Replace the parameter
  "flags" with "format_id", because this function should deal with file
  format identifiers, not with table flags.

  trx_sys_file_format_max_write(), trx_sys_file_format_max_set(): Add a
  const qualifier to the parameter "name".

  ha_innodb.cc: Correct the spelling in some comments: "side effect".
  Remove redundant prototypes for some static callback functions.

  innodb_file_format_name_update(), innodb_file_format_check_update():
  Correct the function signature.  Use appropriate pointer type conversions.

  MYSQL_SYSVAR_STR(file_format), MYSQL_SYSVAR_STR(file_format_check):
  Remove the type conversions from the callback function pointers.  When
  the function signatures match, no type conversion is needed.  The type
  conversions would only prevent compilation warnings for any mismatch.

  Approved by Sunny in rb://25.
  ------------------------------------------------------------------------
  r2862 | marko | 2008-10-23 12:37:42 +0300 (Thu, 23 Oct 2008) | 8 lines

  branches/zip: Non-functional changes:

  ibuf_get_volume_buffered(): Declare with static linkage.
  This function is private to ibuf0ibuf.c.

  btr_cur_pessimistic_delete(): Use the cached result of
  btr_cur_get_index(cursor).
  ------------------------------------------------------------------------
2008-10-23 10:03:20 +00:00
marko
467b0a8db0 branches/innodb+: Merge revisions 2799:2835 from branches/zip:
------------------------------------------------------------------------
  r2809 | marko | 2008-10-16 09:41:13 +0300 (Thu, 16 Oct 2008) | 18 lines

  branches/zip: Skip the undo log size check on REDUNDANT and COMPACT tables.

  In ROW_FORMAT=DYNAMIC and ROW_FORMAT=COMPRESSED, column prefix indexes
  require that prefixes of externally stored columns be written to the
  undo log. This may make the undo log record bigger than the record on
  the B-tree page.  The maximum size of an undo log record is the page
  size.  That must be checked for, in dict_index_add_to_cache().

  dict_index_add_to_cache(): Skip the undo log size check for REDUNDANT
  and COMPACT tables. These tables store prefixes of externally stored
  columns locally within the clustered index record.  There are no special
  considerations for the undo log record size.

  innodb-index.test: Ensure that the check exists for ROW_FORMAT=DYNAMIC,
  but not for ROW_FORMAT=COMPACT.

  This fixes issue #99.  rb://28 approved by Sunny.
  ------------------------------------------------------------------------
  r2810 | vasil | 2008-10-16 19:57:58 +0300 (Thu, 16 Oct 2008) | 12 lines

  branches/zip:

  Fix Mantis issue#61:

  In row_undo_ins_parse_undo_rec(): if we find that a table has no indexes
  (dict_table_get_first_index() returns NULL) do not try to call
  trx_undo_rec_get_row_ref() with a NULL pointer because that would lead to
  a crash. Instead, print a warning and set node->table to NULL just like
  it is done if the .ibd file is missing.

  Approved by:    Heikki (via IM)
  ------------------------------------------------------------------------
  r2824 | marko | 2008-10-20 09:58:01 +0300 (Mon, 20 Oct 2008) | 2 lines

  branches/zip: rec_convert_dtuple_to_rec_comp(): Relax a too tight assertion.
  Spotted by Sunny.
  ------------------------------------------------------------------------
  r2825 | vasil | 2008-10-20 13:41:04 +0300 (Mon, 20 Oct 2008) | 6 lines

  branches/zip:

  Print the table name via ut_print_name() and add two spaces before InnoDB.

  Suggested by:   Marko
  ------------------------------------------------------------------------
  r2833 | marko | 2008-10-21 10:16:45 +0300 (Tue, 21 Oct 2008) | 2 lines

  branches/zip: ibuf_insert_low(): Avoid unnecessarily
  acquiring and releasing ibuf_mutex.
  ------------------------------------------------------------------------
  r2834 | marko | 2008-10-21 10:18:57 +0300 (Tue, 21 Oct 2008) | 1 line

  branches/zip: ibuf_delete_rec(): Add debug assertions suggested by Heikki.
  ------------------------------------------------------------------------
  r2835 | marko | 2008-10-21 11:04:06 +0300 (Tue, 21 Oct 2008) | 1 line

  branches/zip: ibuf_insert_low(): Simplify a comparison.
  ------------------------------------------------------------------------
2008-10-21 07:30:53 +00:00
marko
a980b544cd branches/innodb+: Merge revisions 2774:2799 from branches/zip:
------------------------------------------------------------------------
  r2781 | marko | 2008-10-13 13:40:57 +0300 (Mon, 13 Oct 2008) | 1 line

  branches/zip: page_cur_delete_rec(): Call page_zip_validate_low().
  ------------------------------------------------------------------------
  r2783 | vasil | 2008-10-13 18:34:34 +0300 (Mon, 13 Oct 2008) | 9 lines

  branches/zip:

  Remove mysql-test/patches/bug37312.diff because MySQL "fixed"
  Bug#37312 by removing the test.

  http://bugs.mysql.com/37312
  http://lists.mysql.com/commits/54462
  ------------------------------------------------------------------------
  r2784 | marko | 2008-10-13 21:35:30 +0300 (Mon, 13 Oct 2008) | 1 line

  branches/zip: Add missing NULL check to the assertion added in r2781.
  ------------------------------------------------------------------------
  r2785 | marko | 2008-10-13 22:29:12 +0300 (Mon, 13 Oct 2008) | 2 lines

  branches/zip: page_cur_delete_rec(): Remove the bogus page_zip_validate_low()
  assertion that was added in r2781 and explain why it was bogus.
  ------------------------------------------------------------------------
  r2786 | calvin | 2008-10-14 19:14:47 +0300 (Tue, 14 Oct 2008) | 7 lines

  branches/zip: fix Mantis issue #96 Problem compiling ha_innodb.cc
  on 64-bit Windows

  Change the definition of srv_replication_delay from ulint to ulong.
  ulint is 64-bit on Win64.

  Approved by:	Heikki (on IM)
  ------------------------------------------------------------------------
  r2787 | calvin | 2008-10-14 19:19:41 +0300 (Tue, 14 Oct 2008) | 7 lines

  branches/zip: fix compiler warning

  Change the definition of add_on from ulint to ullint, to eliminate
  the warning in .\btr\btr0cur.c:
  conversion from 'ullint' to 'ulint', possible loss of data

  Approved by:	Heikki (on IM)
  ------------------------------------------------------------------------
  r2793 | marko | 2008-10-15 10:00:06 +0300 (Wed, 15 Oct 2008) | 2 lines

  branches/zip: row_create_table_for_mysql(), row_create_index_for_mysql():
  Note that the dictionary object will be freed.
  ------------------------------------------------------------------------
  r2794 | marko | 2008-10-15 10:32:40 +0300 (Wed, 15 Oct 2008) | 9 lines

  branches/zip: When invoking page_zip_copy_recs(), update the lock table
  and the adaptive hash index.  This should fix Issue #95 and Issue #87.

  page_zip_copy_recs(): Copy PAGE_MAX_TRX_ID as well, to have similar behavior
  to page_copy_rec_list_start() and page_copy_rec_list_end().

  btr_root_raise_and_insert(), btr_page_split_and_insert(), btr_lift_page_up():
  Update the lock table and the adaptive hash index.
  ------------------------------------------------------------------------
  r2797 | marko | 2008-10-15 13:21:54 +0300 (Wed, 15 Oct 2008) | 3 lines

  branches/zip: Introduce UNIV_ZIP_COPY for invoking page_zip_copy_recs()
  more often in B-tree operations.
  ------------------------------------------------------------------------
  r2799 | marko | 2008-10-15 14:27:42 +0300 (Wed, 15 Oct 2008) | 25 lines

  branches/zip: When the server crashes while freeing an externally stored
  column of a compressed table, the BTR_EXTERN_LEN field in the BLOB pointer
  will be written as 0.  Tolerate this in the functions that deal with
  externally stored columns.  This fixes Issue #80 and was posted at rb://26.

  Note that the clustered index record is always deleted or purged last,
  after any secondary index records referring to it have been deleted.

  btr_free_externally_stored_field(): On an uncompressed table, zero out
  the BTR_EXTERN_LEN, so that half-deleted BLOBs can be detected after
  crash recovery.

  btr_copy_externally_stored_field_prefix(): Return 0 if the BLOB has been
  half-deleted.

  row_upd_ext_fetch(): Assert that the externally stored column exists.

  row_ext_cache_fill(): Allow btr_copy_externally_stored_field_prefix()
  to return 0.

  row_sel_sec_rec_is_for_blob(): Return FALSE if the BLOB has been half-deleted.
  This is correct, because the clustered index record would have been deleted
  or purged last, after any secondary index records referring to it had been
  deleted.
  ------------------------------------------------------------------------
2008-10-15 12:09:17 +00:00
marko
f7e76f23c1 branches/innodb+: Merge revisions 2678:2774 from branches/zip. 2008-10-11 19:37:21 +00:00
marko
56d28f1c57 branches/innodb+: Merge 2637:2660 from branches/zip. 2008-09-22 07:57:34 +00:00
marko
8638150c6c branches/innodb+: Merge 2579:2637 from branches/zip. 2008-09-17 19:52:30 +00:00
sunny
d0e8003b2f branches/innodb+: Merge revisions 2460:2579 from branches/zip
The followin mysql-tests failed (and they are known to fail):
main.information_schema        	[ fail ]
main.innodb_file_per_table_basic[ fail ]
main.type_bit_innodb           	[ fail ]

Tested against : MYSQL_SERVER_VERSION  "5.1.28"
2008-08-09 00:15:46 +00:00
inaam
c5dacc2914 branches/innodb+: Merge revisions 2344:2454 from branches/zip 2008-05-14 15:43:19 +00:00
marko
36a5b2cd37 branches/zip: Merge 2263:2295 from branches/5.1. 2008-02-18 20:09:03 +00:00
marko
3e4b5e287b branches/zip: Merge 2236:2263 from branches/5.1. 2008-01-28 15:54:46 +00:00
marko
b52a30e09d branches/zip: When storing a longer prefix of an externally stored column
to the undo log, also store the original length of the column, so that the
changes will be correctly undone in transaction rollback or when fetching
previous versions of the row.

innodb-zip.test: New file, for tests of the compression.

upd_field_t: Add orig_len, the original length of new_val.

btr_push_update_extern_fields(): Restore the original prefix of the column.
Add the parameter heap where memory will be allocated if necessary.

trx_undo_rec_get_col_val(): Add the output parameter orig_len.

trx_undo_page_report_modify_ext(): New function: Write an externally
stored column to the undo log.  This is only called from
trx_undo_page_report_modify(), and this is the only caller of
trx_undo_page_fetch_ext().

trx_undo_update_rec_get_update(): Read the original length of the column
prefix to upd_field->orig_len.
2008-01-23 13:46:45 +00:00
marko
36cf8fa003 branches/zip: Merge 2155:2213 from branches/5.1.
(Revisions 2146:2155 were already merged.)
2008-01-07 09:15:25 +00:00
marko
30415ebd52 branches/zip: innodb-index.test: Test duplicate key failures for different
indexes.
2008-01-04 15:25:59 +00:00
marko
2505aea758 branches/zip: innodb-index.test: Drop all created tables at the end. 2008-01-04 07:57:13 +00:00
marko
4e44c7332b branches/zip: innodb-index.test: Work around MySQL bugs and bug fixes. 2008-01-03 12:45:17 +00:00
marko
adbb92becd branches/zip: Implement a limit for the size of undo log records.
innodb-index.test: Add a test with a large number of externally stored
columns.  Check that there may not be prefix indexes on too many columns.

dict_index_too_big_for_undo(): New function: Check if the undo log may
overflow.

dict_index_add_to_cache(): Return DB_SUCCESS or DB_TOO_BIG_RECORD.
Postpone the creation and linking of some data structures, so that
when dict_index_too_big_for_undo() holds, it will be easier to clean up.
Check the return status in all callers.
2007-12-19 14:03:39 +00:00
marko
71a4f691b2 branches/zip: Fast index creation: Remove the ROW_PREBUILT_OBSOLETE nonsense.
Active transactions must not switch table or index definitions on the fly,
for several reasons, including the following:

 * copied indexes do not carry any history or locking information;
   that is, rollbacks, read views, and record locking would be broken

 * huge potential for race conditions, inconsistent reads and writes,
   loss of data, and corruption

Instead of trying to track down if the table was changed during a transaction,
acquire appropriate locks that protect the creation and dropping of indexes.

innodb-index.test: Test the locking of CREATE INDEX and DROP INDEX.  Test
that consistent reads work across dropped indexes.

lock_rec_insert_check_and_lock(): Relax the lock_table_has() assertion.
When inserting a record into an index, the table must be at least IX-locked.
However, when an index is being created, an IS-lock on the table is
sufficient.

row_merge_lock_table(): Add the parameter enum lock_mode mode, which must
be LOCK_X or LOCK_S.

row_merge_drop_table(): Assert that n_mysql_handles_opened == 0.
Unconditionally drop the table.

ha_innobase::add_index(): Acquire an X or S lock on the table, as appropriate.
After acquiring an X lock, assert that n_mysql_handles_opened == 1.
Remove the comments about dropping tables in the background.

ha_innobase::final_drop_index(): Acquire an X lock on the table.

dict_table_t: Remove version_number, to_be_dropped, and prebuilts.
ins_node_t: Remove table_version_number.

enum lock_mode: Move the definition from lock0lock.h to lock0types.h.

ROW_PREBUILT_OBSOLETE, row_update_prebuilt(), row_prebuilt_table_obsolete():
Remove.

row_prebuilt_t: Remove the declaration from row0types.h.

row_drop_table_for_mysql_no_commit(): Always print a warning if a table
was added to the background drop queue.
2007-12-17 15:49:59 +00:00
marko
244c9eeda3 branches/zip: Merge r2154 from trunk:
innodb.result, innodb.test: Revert the changes in r2145.

The tests that were removed by MySQL

ChangeSet@1.2598.2.6  2007-11-06 15:42:58-07:00  tsmith@hindu.god

were moved to a new test, innodb_autoinc_lock_mode_zero, which is
kept in the MySQL BitKeeper tree.
2007-12-04 08:37:43 +00:00
marko
b385d9abd2 branches/zip: Merge 2116:2146 from trunk. 2007-11-30 12:30:21 +00:00
vasil
6edf3ef181 branches/zip:
Bugfix1: Set innodb_locks.lock_index to NOT NULL.
If a column in INFORMATION_SCHEMA table has the flag
MY_I_S_MAYBE_NULL and it is not explicitly marked as NOT NULL
with the method ::set_notnull() then it is always rendered as
NULL by MySQL.

Bugfix2: Avoid crashes if lock_index is NULL. It is NULL for table
level locks.

Pointyhat to:	Marko
2007-11-21 12:01:36 +00:00
vasil
857c6501f4 branches/zip:
Move test that depends on ucs2 to a separate file that is disabled if
ucs2 is not compiled in.
2007-11-21 11:23:05 +00:00
vasil
9d76b5263d branches/zip:
Move common SQL commands to an .inc file.
2007-11-21 10:47:08 +00:00
vasil
62a46de281 branches/zip:
Synchronize the utf8 and ucs2 tests.
2007-11-21 10:18:22 +00:00
marko
e1eb788f73 branches/zip: INFORMATION_SCHEMA.INNODB_LOCKS: Quote lock_table, lock_index.
innodb_information_schema.test. Add tests that display most columns from
INFORMATION_SCHEMA.INNODB_LOCKS.  Test that quoting of table names works
and respects SQL_MODE='ANSI_QUOTES'.

innobase_print_identifier(): Remove.

innobase_convert_identifier(): New function,
based on innobase_print_identifier().

innobase_convert_name(): New function, similar to ut_print_namel(), but
using a memory buffer.

ut_print_namel(): Use innobase_convert_name().

fill_innodb_locks_from_cache(): Convert lock_table and lock_index by
calling innobase_convert_name().
2007-11-21 08:46:11 +00:00
marko
e95893151b branches/zip: Merge 2015:2093 from trunk. 2007-11-16 13:57:27 +00:00
vasil
0028e8d1ee branches/zip:
Add innodb_locks.lock_data column and some relevant tests.
For record locks this column represents the ordering fields of the
locked row in a human readable, SQL-valid, format.

Approved by:	Marko
2007-10-29 13:03:53 +00:00
marko
0d6bfafd6c branches/zip: Merge 1937:2015 from trunk. 2007-10-24 10:59:54 +00:00
marko
3959cbd60d innodb-test: Allow Innodb_buffer_pool_pages_total to be 511 or 512.
The size of the buffer pool can be one page smaller than the requested
size when os_mem_alloc_large() returns something that is not
aligned by UNIV_PAGE_SIZE.  This test may still fail on systems with
a big os_large_page_size.
2007-10-18 06:58:39 +00:00
marko
6c9bfe7825 branches/zip: innodb-index.test: Add FORCE INDEX directives and remove
those SELECTs whose ORDER BY cannot possibly make use of an index.
2007-10-15 08:42:35 +00:00
marko
dcde0edf82 branches/zip: innodb-index.result: Adapt the results to a patch from MySQL.
Unfortunately, the patch seems to prevent MySQL from utilizing secondary
indexes in the ORDER BY clauses.  Thus, the test no longer checks if newly
created indexes are well-formed.

ChangeSet@1.2528.98.1  2007-08-02 12:45:56-07:00  igor@mysql.com

Fixed bug#28404.
This patch adds cost estimation for the queries with ORDER BY / GROUP BY
and LIMIT. 
If there was a ref/range access to the table whose rows were required
to be ordered in the result set the optimizer always employed this access
though a scan by a different index that was compatible with the required 
order could be cheaper to produce the first L rows of the result set.
Now for such queries the optimizer makes a choice between the cheapest
ref/range accesses not compatible with the given order and index scans
compatible with it.
2007-10-08 12:16:32 +00:00
marko
ac2c0d442f branches/zip: innodb.test: Fix the result, now that fast index creation
reports duplicate key values.  The reported value may depend on the
size of the main-memory merge sort buffer (row_merge_block_t).
2007-10-05 08:39:35 +00:00
marko
809270166b branches/zip: innodb-index.test: Add yet another CHECK TABLE and add the
column d to two SELECT FROM t1.
2007-09-21 10:00:00 +00:00
marko
4a1d105a31 branches/zip: Merge 1830:1862 from trunk. 2007-09-20 08:36:22 +00:00
marko
f6aec10b49 branches/zip: innodb-index.test: Add more columns and rows, to ensure
that row_merge_blocks() will have some work to do when
row_merge_block_t is shrunk to 8192 bytes.

Currently, this will cause a debug assertion failure, because
row_merge_cmp() is considering all columns, not just the unique ones.
2007-09-19 09:37:09 +00:00
marko
fdcf0b1fcd branches/zip: row_merge_buf_add(): Correct the processing of
column prefixes in clustered indexes.

innodb-index.test: Add test cases for creating primary keys
containing column prefixes.
2007-09-19 07:14:36 +00:00
marko
5de8acee56 branches/zip: ha_innobase::add_index(): Translate DB_TOO_BIG_RECORD
via my_error().  Add a test case to innodb-index.test.
2007-09-17 10:43:51 +00:00
marko
62ede4fcd4 branches/zip: innodb-index.test: Make the column b much longer, to hit
the 65,535-byte VARCHAR length limit of MySQL.
2007-09-17 08:42:10 +00:00
marko
b60b6d142d branches/zip: innodb-index.test: Remove a bogus comment that should have
been removed in r1808.
2007-09-12 19:13:18 +00:00
marko
57afe1d5d2 branches/zip: Merge 1809:1830 from trunk. 2007-09-10 10:09:01 +00:00
marko
45b97e559f branches/zip: Decode table names when displaying error messages in
fast index creation.

innobase_convert_tablename(): New function, to remove the filename
encoding of a database and table name.

ha_innobase::add_index(): Invoke innobase_convert_tablename() before
calling my_error().

innodb-index.result: Update the error messages.
2007-09-07 09:05:52 +00:00
marko
ffe9a4c52e branches/zip: ha_innobase:add_index(): Report HA_ERR_TABLE_EXIST when the
temporary table cannot be created or renamed.

innodb-index.test,result: Add test cases where a temporary table already
exists.
2007-09-05 11:27:41 +00:00
marko
140a706079 branches/zip: Merge 1783:1792 from trunk. 2007-09-03 08:44:39 +00:00
marko
31d63cd08f branches/zip: Merge 1664:1783 from trunk. 2007-08-30 09:21:25 +00:00
marko
71f47ed2e2 branches/zip: innodb-index.test: Add tests for creating or dropping
FOREIGN KEY constraints.  At the moment, MySQL will rebuild the entire
table and indexes when such constraints are added or removed, even though
the constraints do not affect the storage format of the data.
2007-08-21 06:40:46 +00:00
marko
885212294d branches/zip: Preserve FOREIGN KEY constraints when creating a PRIMARY KEY.
innodb-index.test: Add some test cases for FOREIGN KEY constraints.

row_merge_rename_tables(): New function,
adapted from row_rename_table_for_mysql().

ha_innobase::add_index(): Use row_merge_rename_tables().
2007-08-20 11:40:00 +00:00
marko
66f6a5acc8 branches/zip: Fix bugs in the creation or dropping of the clustered index
(PRIMARY KEY or UNIQUE INDEX on NOT NULL columns).

innodb-index.test: Remove the --replace_regex directives.  Replace correct
values to the "Duplicate entry" messages.  This will cause the test to
fail until we somehow return the duplicate key values to MySQL.
Add test cases for creating or dropping UNIQUE INDEX or PRIMARY KEY.

innobase_copy_index_def(): Allow the function to copy a clustered index
definition to a secondary one (UNIQUE INDEX).

innobase_create_key_def(): Check the NOT NULL flag from the correct
place.  Copy the clustered index if it is a UNIQUE INDEX.

ha_innobase::prepare_drop_index(): Refuse to drop the clustered index.
2007-08-16 13:13:25 +00:00
marko
4d793ff876 branches/zip: Add changes that accidentally omitted from r1698:
innodb-index.test, innodb-index.result: Add a test for creating
a PRIMARY KEY on a column that contains a NULL value.
2007-08-10 15:53:19 +00:00
marko
9ae3820ffa branches/zip: innodb-index.test: Replace numeric error codes with
symbolic ones.
2007-08-01 13:00:16 +00:00
marko
0a780db994 branches/zip: Merge 1575:1664 from trunk. 2007-08-01 11:18:43 +00:00
marko
d3255c0b3f branches/zip: innodb.test: Use ER_DROP_INDEX_FK instead of a numeric
error code.  Apparently, the numeric error codes in MySQL 5.1 are changing.
2007-08-01 11:01:27 +00:00