Commit graph

20 commits

Author SHA1 Message Date
vasil
2140d5956a 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
a5f81a6054 branches/zip:
Move common SQL commands to an .inc file.
2007-11-21 10:47:08 +00:00
vasil
f5ff7acb2e branches/zip:
Synchronize the utf8 and ucs2 tests.
2007-11-21 10:18:22 +00:00
marko
81761f5f7c 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
a8a47268a4 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
bb97dfee59 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
499bbb4b17 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
770dde6947 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
685f665b06 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
8763d94169 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
6b4c37d6e8 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
489d829617 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
2d74f90890 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
bbe0043055 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
1bbbcbfef4 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
56c41b1386 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
fd91f7bb76 branches/zip: Reimplement merge sort in fast index creation.
The creation of the primary key does not work.  We will have to flag
externally stored columns and copy the externally stored part from
the old table.

row_build_index_for_mysql(): Rename to row_merge_build_indexes().
Move from row0mysql.c to row0merge.c.

Remove private declarations from row0merge.h.  Make many functions static
in row0merge.c.

cmp_rec_rec_simple(): A new comparison function.

dict_index_get_min_size(): New function.

OS_FILE_FROM_FD(fd): A macro for converting from int to os_file_t.

rec_convert_dtuple_to_rec_comp(): Make the interface lower-level.

rec_get_converted_size_comp(): Return also extra_size.

UT_SORT_FUNCTION_BODY(): Remove reference to an obsolete test program.

row_rec_to_index_entry_low(): New function.

row0merge.c: Implement merge sort based on file streams instead of
fixed-size blocks.  Sort the small blocks as arrays of dfield_t*,
because it is faster than invoking rec_get_offsets() for every
comparison.
2007-06-08 07:37:07 +00:00
marko
d1bdef34ac branches/zip: innodb-index.test: Check the length of the long columns. 2007-06-07 19:57:34 +00:00
marko
f0c4bdbcea branches/zip: Minor cleanup.
innobase_create_index_def(): Add parameter new_primary.

innobase_copy_index_def(): Simplify the documented algorithm,
and try to implement it properly.

innodb-index.test: Replace CHECKSUM TABLE with something more stable and
useful.  The test passes on an older BitKeeper snapshot:

ChangeSet@1.2475.18.9, 2007-05-08 11:16:41+02:00, jbruehe@mysql.com +1 -0
  Raise version number after cloning 5.1.18-beta

But it fails on a newer one where the statement
	alter table t1 add primary key (a), add key (b(20));
results in fast index creation:

ChangeSet@1.2500.1.40, 2007-06-01 20:06:13+04:00, kostja@bodhi.(none) +2 -0
  Merge bodhi.(none):/opt/local/work/mysql-5.0-runtime
  into  bodhi.(none):/opt/local/work/mysql-5.1-runtime
  MERGE: 1.1810.2984.14
2007-06-07 12:23:26 +00:00
marko
a47b9e64e6 branches/zip: Merge branches/fast-index-creation -r1413.
Fix some bugs.  The tests innodb and innodb-index fail, but that might
be due to an old MySQL source tree being used.
2007-04-04 11:05:33 +00:00