Commit graph

60 commits

Author SHA1 Message Date
vasil
05cd5bfab5 Fix Bug#21293: Consider transactions that had edited non-transactional
tables heavier than ones that had not. This helps killing the "right"
transaction in case of a deadlock.

Approved by:	Heikki
2007-05-15 14:53:04 +00:00
vasil
4c3e861bc5 Add a test about the behavior introduced in r1497. 2007-05-14 12:41:47 +00:00
sunny
f5efdbcf76 Fix for bug# 21101 - returns wrong error message when table column
defs exceed the max row size.

The fix returns a more appropriate error message. Add a test case to
innodb.test and expected output to innodb.result.
2007-04-11 01:34:33 +00:00
vasil
c2fcd59b81 Fix the innodb test by shifting some of the contents of the .result file.
Approved by:	Marko
2007-04-10 19:15:03 +00:00
marko
b9902f7ac5 Report the current value of the AUTO_INCREMENT counter to MySQL.
(Bug #23313, Bug #21404)

ha_innobase::update_create_info(): New function, to report
the auto_increment_value.
2007-04-02 07:20:23 +00:00
marko
0991e5bbaa Merge a change from MySQL AB:
ChangeSet
  2007/02/14 22:06:41-08:00 igor@olga.mysql.com 
  Fixed bug #25971: indexes on text columns were ignored when ref accesses
  were evaluated.
  According to the new rules for string comparison partial indexes on text
  columns can be used in the same cases when partial indexes on varchar
  columns can be used.

mysql-test/r/innodb.result
  2007/02/14 22:06:39-08:00 igor@olga.mysql.com +1 -1
  Adjusted results after the fix for bug #25971.
2007-03-27 05:49:15 +00:00
marko
79dea753bc Merge a change from MySQL AB:
ChangeSet
  2007/02/15 15:39:03+01:00 guilhem@gbichot3.local 
  Fix for BUG#25507 "multi-row insert delayed + auto increment causes
  duplicate key entries on slave" (two concurrrent connections doing
  multi-row INSERT DELAYED to insert into an auto_increment column,
  caused replication slave to stop with "duplicate key error" (and
  binlog was wrong)), and BUG#26116 "If multi-row INSERT
  DELAYED has errors, statement-based binlogging breaks" (the binlog
  was not accounting for all rows inserted, or slave could stop).
  The fix is that: if (statement-based) binlogging is on, a multi-row
  INSERT DELAYED is silently converted to a non-delayed INSERT.
  Note: it is not possible to test BUG#25507 in 5.0 (requires mysqlslap),
  so it is tested only in the changeset for 5.1. However, BUG#26116
  is tested here, and the fix for BUG#25507 is the same code change.

mysql-test/r/innodb-replace.result
  2007/02/15 15:39:01+01:00 guilhem@gbichot3.local +2 -2
  result update

mysql-test/t/innodb-replace.test
  2007/02/15 15:39:01+01:00 guilhem@gbichot3.local +2 -2
  now that multi-row delayed inserts are converted to normal inserts
  if the statement-based binlog is enabled,
  no error is issued even if this engine does not support INSERT DELAYED,
  as the insert does not go through the INSERT DELAYED code.
  To preserve the goal of this test, we change the statements to single-
  row inserts.
2007-03-27 05:45:32 +00:00
marko
4b64ce644a Port r1372 from branches/5.0: Merge a change from MySQL AB, and remove
the innodb_gis test case.

ChangeSet
  2007/02/19 13:57:06+03:00 kaa@polly.local
  Bug#18743: Several test cases fails if "classic" configuration in 5.0
  The problem happened because those tests were using "cp932" and "ucs2"
  without checking whether these character sets are available.
  This fix moves test parts to make character set specific parts be
  tested only if they are:
  - some parts were moved to "ctype_ucs.test" and "ctype_cp932.test"
  - some parts were moved to the newly added tests "innodb-ucs2.test",
  "mysqlbinglog-cp932.test" and "sp-ucs2.test"

mysql-test/t/innodb.test
  2007/02/19 13:57:02+03:00 kaa@polly.local +0 -222
  Moved ucs2-specific test cases to innodb-ucs2.test
2007-03-27 05:37:36 +00:00
marko
e03bb5986e innodb.test, innodb.result: Add test case for Bug #26835.
The bug could be reproduced as follows:

Define a table so that the first column of the clustered index is
a VARCHAR or a UTF-8 CHAR in a collation where sequences of bytes
of differing length are considered equivalent.

Insert and delete a record.  Before the delete-marked record is
purged, insert another record whose first column is of different
length but equivalent to the first record.  Under certain conditions,
the insertion can be incorrectly performed as update-in-place.

Likewise, an operation that could be done as update-in-place can
unnecessarily be performed as delete and insert, but that would not
cause corruption but merely degraded performance.
2007-03-05 15:43:58 +00:00
marko
2dddce0919 Merge changes from MySQL AB to mysql-test directives.
The results are not affected.
2007-03-02 13:23:21 +00:00
marko
145b2d305e Add a test case for r1316 (Bug #25927). 2007-03-01 09:59:37 +00:00
marko
880cc4a9ba Merge changes from MySQL AB:
ChangeSet
  2007/01/24 14:49:36+04:00 holyfoot@mysql.com 
  bug #22682 Test fails --without-geometry
  geometry dependent parts moved to proper .test files

mysql-test/r/innodb.result
  2007/01/24 14:49:34+04:00 holyfoot@mysql.com +0 -2
  result fixed

mysql-test/r/innodb_gis.result
  2007/01/24 14:49:34+04:00 holyfoot@mysql.com +2 -0
  result fixed

mysql-test/t/innodb.test
  2007/01/24 14:49:34+04:00 holyfoot@mysql.com +0 -6
  HAVE_GEOMETRY dependent part moved to innodb_gis.test

mysql-test/t/innodb_gis.test
  2007/01/24 14:49:35+04:00 holyfoot@mysql.com +6 -0
  HAVE_GEOMETRY dependent part moved here from innodb.test
2007-02-07 09:57:17 +00:00
marko
95ad47ac4e Merge changes from MySQL AB:
ChangeSet
  2007/01/22 18:42:52+02:00 monty@mysql.com 
  Give warnings for unused objects
  Changed error message to be compatible with old error file
  Added new error message for new DUP_ENTRY syntax

mysql-test/t/innodb.test
  2007/01/22 18:42:49+02:00 monty@mysql.com +14 -14
  Changed to use new error message
2007-02-07 09:48:42 +00:00
osku
19b5b950e6 Delete innodb_mysql.[test|result], as keeping them in our codebase achieves
nothing but more merge work for us.
2007-01-12 12:18:53 +00:00
marko
80d14b8ea7 dict_load_foreign(): Use a local variable instead of the 10-bit field
foreign->n_fields in order to preserve ON UPDATE CASCADE and
ON DELETE CASCADE flags.  For some reason, gcc does not warn about
shifting a 10-bit field to right by 24 bits.  (Bug #24741)

This bug was introduced while reducing the memory footprint of the
InnoDB data dictionary (Bug #20877).

innodb.test, innodb.result: Add a test case.
2007-01-09 07:40:40 +00:00
marko
6ad2ddcc69 Merge changes from MySQL AB to innodb_mysql.result. 2006-11-09 16:50:10 +00:00
marko
58fe21c8cb innodb.result, innodb_mysql.result: Merge changes from MySQL AB:
ChangeSet
  2006/10/09 19:51:41+04:00 gkodinov@macbook.local 
  Bug #22781: SQL_BIG_RESULT fails to influence sort plan
   Currently SQL_BIG_RESULT is checked only at compile time.
   However, additional optimizations may take place after
   this check that change the sort method from 'filesort'
   to sorting via index. As a result the actual plan
   executed is not the one specified by the SQL_BIG_RESULT
   hint. Similarly, there is no such test when executing
   EXPLAIN, resulting in incorrect output.
   The patch corrects the problem by testing for
   SQL_BIG_RESULT both during the explain and execution
   phases.
2006-10-26 11:37:56 +00:00
marko
bdf65e705e Merge changes from MySQL AB, and remove two compilation warnings.
ha_innodb.cc: innodb_mutex_show_status(): Add (ulong) casts to
ulonglong expressions being passed to fprintf %lu.  The warnings
were apparently introduced by MySQL AB developers.

mysql_declare_plugin(innobase): Add PLUGIN_LICENSE_GPL.

have_innodb.inc: Merge changes from MySQL AB.
2006-10-09 09:08:50 +00:00
marko
ccc8e799d1 Merge changes to mysql-test from MySQL AB.
innodb_unsafe_binlog, innodb_handler, innodb-big, innodb_cache-master,
innodb-deadlock, innodb_cache: Remove.  These have been renamed in the
MySQL tree.

innodb_mysql: Update.
2006-10-05 09:07:49 +00:00
marko
0724b4b7c6 Merge changes from MySQL AB to the innodb_mysql test. 2006-09-20 10:52:02 +00:00
marko
11a7abc0bd Merge changes to the "innodb_mysql" test from MySQL AB 2006-09-05 19:29:18 +00:00
marko
0fe7bd013e Merge changes from MySQL AB to the innodb_mysql test files. 2006-09-05 12:18:27 +00:00
marko
15330c3263 innodb.result: Adjust Innodb_rows_inserted and Innodb_rows_updated
to reflect the deleted statements in r420, which somehow reappeared
in the MySQL tree.
2006-08-14 07:52:28 +00:00
marko
8948a8b450 Merge changes to test files from MySQL AB. The suite innodb.test fails
due to this MySQL change to row0mysql.c not being merged:

http://mysql.bkbits.net:8080/mysql-5.1/diffs/storage/innobase/row/row0mysql.c@1.126.1.1
2006-08-11 09:20:10 +00:00
marko
03d5255bae Merge a change from MySQL AB:
# ChangeSet
#   2006/07/30 05:16:08+04:00 aivanov@mysql.com 
#   Make innodb_thread_concurrency 0 by default.
#    Fixing test result.
# 
# mysql-test/r/innodb.result
#   2006/07/30 05:16:05+04:00 aivanov@mysql.com +1 -1
#   Make innodb_thread_concurrency 0 by default.
#    Fixing test result.
2006-08-11 08:08:54 +00:00
marko
5ba95ed2b3 Merge a change from MySQL AB:
# ChangeSet
#   2006/07/28 21:27:01+04:00 sergefp@mysql.com 
#   BUG#14940 "MySQL choose wrong index", v.2
# mysql-test/r/innodb_gis.result
#   2006/07/28 21:26:56+04:00 sergefp@mysql.com +15 -15
#   BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
2006-08-11 08:02:26 +00:00
marko
bebced2563 innodb.result: Set the default value of innodb_thread_concurrency to 8.
This has already been changed in the MySQL source code tree.
2006-07-31 11:17:32 +00:00
marko
1ed1ede9ea Merge changes from MySQL AB:
innodb_mysql.test, innodb_mysql.result:
  Bug #16798: Uninitialized row buffer reads in ref-or-null optimizer
  Bug #12882: min/max inconsistent on empty table
  Test of behaviour with CREATE ... SELECT
 Moved from group_min_max.test:
  Bug #12672: primary key implicitly included in every innodb index
  Bug #6142: a problem with empty innodb table 
  Bug #9798: group by with rollup

ChangeSet@2006/06/01 21:47:15+03:00 bell@sanja.is.com.ua 
#   interface for transaction log management added to handlerton
#   iterators creation interface added to handlerton
ha_innodb.cc: Add get_log_status = create_iterator = NULL

ChangeSet@2006/06/04 18:52:22+03:00 monty@mysql.com 
#   This changeset is largely a handler cleanup changeset (WL#3281),
#   but includes fixes and cleanups that was found necessary while
#   testing the handler changes
# sql/ha_innodb.h
#   2006/06/04 18:52:09+03:00 monty@mysql.com +6 -13
#   Update to 'newer' table handler interface
#   - table_flags are now ulonglong
#   - Added reset() method
#   - Removed not needed ha_retrieve_all_cols() and ha_retrieve_all_pk()
#     columns.
#   - Made build_template() a class function to be able to easier access
#     class variables
# sql/ha_innodb.cc
#   2006/06/04 18:52:09+03:00 monty@mysql.com +37 -44
#   Update to 'newer' table handler interface
#   - Update innobase_create_handler() to new interface
#   - Removed HA_NOT_EXACT_COUNT (not needed)
#   - Renamed HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS
#     to HA_PRIMARY_KEY_REQUIRED_FOR_POSITION.
#   - Prefixed base status variables with 'stats'
#   - Use table column bitmaps instead of ha_get_bit_in_read_set()
#   - Added ::reset(), with code from ::extra(HA_EXTRA_RESET)
#   - Removed HA_EXTRA_RETRIVE_ALL_COLS and HA_EXTRA_RETRIEVE_PRIMARY_KEY as
#     the table->read_set and table->write_set bitmaps now are accurate

ChangeSet@2006/06/02 22:21:32+02:00 guilhem@mysql.com 
#   First push for WL#3146 "less locking in auto_increment". It is a
#   0-real-change patch.
#   New prototype for get_auto_increment() (but new arguments not yet used),
#   to be able to reserve a finite interval of auto_increment values from
#   cooperating engines.
#   A hint on how many values to reserve is found in
#   handler::estimation_rows_to_insert,
#   filled by ha_start_bulk_insert(), new wrapper around start_bulk_insert().
#   NOTE: this patch changes nothing, for all engines.
#   But it makes the API ready for those
#   engines which will want to do reservation.
#   More csets will come to complete WL#3146.
ha_innodb.h, ha_innodb.cc: update to new prototype of get_auto_increment

ChangeSet@2006/05/28 14:51:01+02:00 serg@sergbook.mysql.com 
#   handlerton cleanup:
#   duplicate fields removed, st_mysql_storage_engine added to support
#   run-time handlerton initialization (no compiler warnings), handler API
#   is now tied to MySQL version, handlerton->plugin mapping added
#   (slot-based), dummy default_hton removed, plugin-type-specific
#   initialization generalized, built-in plugins are now initialized too,
#   --default-storage-engine no longer needs a list of storage engines
#   in handle_options().
#   
# sql/ha_innodb.h
#   2006/05/28 14:50:53+02:00 serg@sergbook.mysql.com +1 -1
#   handlerton cleanup: remove duplicate fields, add st_mysql_storage_engine,
#   initialize handlerton run-time to avoid compiler warnings
# 
# sql/ha_innodb.cc
#   2006/05/28 14:50:53+02:00 serg@sergbook.mysql.com +37 -52
#   handlerton cleanup: remove duplicate fields, add st_mysql_storage_engine,
#   initialize handlerton run-time to avoid compiler warnings

ChangeSet@2006/06/01 23:59:34+02:00 serg@serg.mylan 
#   second patch for make distcheck
ha_innodb.cc: enclose in #ifdef WITH_INNOBASE_STORAGE_ENGINE / #endif
2006-06-13 12:50:11 +00:00
marko
08209c5d30 Clean up r590:
dict_scan_table_name(): Remove fallback to differently encoded name when
the table is not found.  The encoding is handled at a higher level.

innodb.result: Adjust the results for changes in the foreign key error
messages.
2006-05-26 09:14:54 +00:00
osku
a34246f01c From MySQL:
Add innodb_mysql.[test|result].
2006-04-26 07:08:21 +00:00
osku
c79a7d27c2 From MySQL:
Updates to innodb.[test|result].
2006-04-24 11:58:30 +00:00
osku
181aa37d6c Remove temporary work-arounds from innodb.result now that ALTER TABLE DROP
FOREIGN KEY works once again.
2006-04-18 06:33:03 +00:00
osku
6e6c0a4257 Fix bug #18934, "InnoDB crashes when table uses column names like
DB_ROW_ID", by refusing tables that use reserved column names.

Add dict_mem_table_free(), use it instead of duplicating the code everywhere.

Use already existing dict_mem_index_free().

Fix memory leaks in row_create_table_for_mysql() in rare corner cases.
2006-04-11 14:01:17 +00:00
jan
a98fac7a97 Make innodb_unsafe_binlog test case faster. Group all consistent read
test cases to a one test case and wait their lock timeout after all 
have been send to the server. Remove unnecessary option
--loose_innodb_lock_wait_timeout.
2006-04-05 10:11:00 +00:00
osku
e876f907bd Decrease amount of rows inserted in a certain test in innodb.test. This has
no effect on the effectiveness of the test and reduces the running time by
~10 seconds on my machine.
2006-04-05 09:47:17 +00:00
jan
71ff4bee42 Make innodb test case faster. Group all consistent read test cases to
a one test case and wait their lock timeout after all have been send
to the server.
2006-04-05 09:37:01 +00:00
jan
cf06d8d965 Setting a isolation level of the transaction to read committed
weakens the locks for this session similarly like the option
innodb_locks_unsafe_for_binlog. This patch removes almost all
gap locking (used in next-key locking) and makes MySQL to release
the row locks on the rows which does not belong to result set.
Additionally, nonlocking selects on INSERT INTO SELECT,
UPDATE ... (SELECT ...), and CREATE ... SELECT ... use a
nonlocking consistent read. If a binlog is used, then binlog
format should be set to row based binloging to make the execution
of the complex SQL statements.
2006-03-27 05:33:30 +00:00
marko
d62f8b7dc4 Merge changes from MySQL that were identified when merging r269 to MySQL. 2006-03-10 14:26:08 +00:00
jan
758331dc00 Fix for bug #12456: Cursor shows incorrect data - DML does not affect,
probably caching. Fixed test results.

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.
2006-03-01 07:47:14 +00:00
jan
af232ab7fd Merge r199 from branches/5.0:
Port a change from MySQL.

Bug#8841 - CHECKSUM TABLE is broken in MyISAM
Fixed test results.
2006-02-17 07:37:51 +00:00
jan
474b4887de Port a change from MySQL:
WL#1563 - Modify MySQL to support fast CREATE/DROP INDEX
Change "duplicate key" message to print key name
instead of key number.
2006-02-17 07:10:22 +00:00
osku
5d554cff0d Fix failing innodb.test (missing "connection default;"). 2006-02-13 09:44:33 +00:00
osku
48eb9e46a1 Apply InnoDB-specific parts of the fix for bug #9680, wrong error from
cascading update.
2006-02-10 09:16:35 +00:00
marko
50de35d083 Port r165 from branches/5.0: Port a change from MySQL:
innodb_cache.test: save and restore query_cache_size
2006-02-06 09:08:58 +00:00
marko
c97b724d7a Import those changes from mysql-5.1-new ChangeSet 1.1979 (Lars Thalmann)
that were not part of r154.  (Bug #3300)

innodb.test, innodb.result: Remove binlog related tests, because they
are not InnoDB specific; they merely require a transactional table.

ha_innobase::ha_innobase(): Add HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS
to table_flags.

ha_innobase::rnd_init(): Disable semi-consistent read for random access.
2006-01-27 09:34:55 +00:00
marko
dc8fdd92f3 Port r145 from branches/5.0:
Make innodb_thread_concurrency 0 by default, and extend the useable
range from 0 to 1000 (0 disables the thread throttling).

Remove SRV_CONCURRENCY_THRESHOLD (20).  The magic value to
disable the thread throttling is 0 from now on.
2006-01-19 13:30:20 +00:00
marko
ab3a8768b7 Port r132 from branches/5.0: Port r15 from innodb-4.1:
Do not mistake TABLENAME_ibfk_0 for auto-generated id (Bug #16387).

dict_table_get_highest_foreign_id(): Ignore foreign constraint identifiers
starting with the pattern TABLENAME_ibfk_0.

innodb.test, innodb.result: Add test case.
2006-01-12 16:48:34 +00:00
jan
7b1119ef52 Forward port r127 from branches/5.0:
Fixed a bug #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(). Added test cases for a bug. Fixed some code style errors.
2006-01-12 09:16:11 +00:00
jan
e88869eeee Forward port r108 from from branches/5.0:
Fixed bug #15308: Problem of Order with Enum Column in 
Primary Key. Added a new test case for bug #14056.
2006-01-12 08:58:56 +00:00
jan
c8b22058f7 Port r103 from braches/5.0 to trunk.
Fixed a bug on unlock_row. In a unlock_row we may unlock
only the latest lock granted to this transaction to the row.
2005-12-16 07:21:33 +00:00