Commit graph

440 commits

Author SHA1 Message Date
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
373309ab7c Output to the error log information about the limitations of
UNIV_IBUF_DEBUG.

innobase_start_or_create_for_mysql(): Note that crash recovery is broken
when UNIV_IBUF_DEBUG is defined.

ibuf_counts[]: Make this a two-dimensional array.  No need to allocate
anything from the heap.  Eliminate ibuf_counts_inited, as the array
will be zero-filled by the runtime environment.

ibuf_count_check(): New function, to print out an explanation before
assertion failure.
2007-04-10 17:58:27 +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
vasil
cf5ec402a7 * Fix Bug#26662 by not open(2)ing with O_DIRECT but rather calling fcntl(2)
to set this flag immediately after open(2)ing. This way an error caused by
O_DIRECT not being supported can easily be ignored.

* Add support for skipping the OS caching on Solaris by calling directio()
instead of fcntl().

Approved by:	Heikki
2007-03-29 19:05:09 +00:00
vasil
159d38c4e1 Merge the bodies of os_file_handle_error() and os_file_handle_error_no_exit()
into a generic function which is called from both os_file_handle_error() and
os_file_handle_error_no_exit()

Approved by:	Marko
2007-03-29 08:37:21 +00:00
marko
278c29e576 innobase_commit(): Correct the comments and formatting that were broken when
innodb_commit_concurrency was implemented.
2007-03-27 17:59:15 +00:00
marko
4f1615b745 Remove ha_innobase::last_query_id and references to thd->query_id.
MySQL calls external_lock at the beginning and end of a statement
when it is not calling start_stmt or commit or rollback.  Thus,
statement boundaries can be (and are already) detected without
monitoring thd->query_id.

The function innobase_commit() seemingly lacks the call to
innobase_release_stat_resources(), which should be called at
the end of every SQL statement.  The call was replaced by
equivalent statements by Vadim Tkachenko when he implemented
innodb_commit_concurrency in MySQL 5.0:

http://mysql.bkbits.net:8080/mysql-5.0/?PAGE=patch&REV=1.1886.70.1
2007-03-27 13:17:47 +00:00
marko
0f505f92d1 Add static qualifiers to some symbols in ha_innodb.cc that are not
referenced from other modules.
2007-03-27 08:22:27 +00:00
marko
28f6d0dea7 Merge a change from MySQL AB:
ChangeSet
  2007/03/20 10:22:15-04:00 iggy@recycle.(none) 
  Post Merge Fix.

storage/innobase/CMakeLists.txt
  2007/03/20 10:22:13-04:00 iggy@recycle.(none) +2 -2
  Post Merge Fix.
2007-03-27 06:03:03 +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
e15454c52a Merge a change from MySQL AB:
ChangeSet@1.2409.1.83  2007-03-06 10:36:15-07:00  tsmith@hindu.god
Bug #26598: Create variable to allow turning off of statistic gathering
on metadata commands

Add innodb_stats_on_metadata option, which enables gathering
index statistics when processing metadata commands such as
SHOW TABLE STATUS.  Default behavior of the server does not
change (this option is enabled by default).
2007-03-26 08:16:35 +00:00
vasil
fb71bad6d3 Fix Bug#27381 by calling os_file_handle_error_no_exit() instead of
os_file_handle_error().

Approved by:	Heikki
2007-03-25 18:32:51 +00:00
marko
b054fc69b0 Minor cleanup.
innobase_query_caching_of_table_permitted(): Make static.

ha_innobase::register_query_cache_table(): Move the function
definition from ha_innodb.h to ha_innodb.cc.  Add comments.
2007-03-21 10:02:00 +00:00
marko
8ac40ae7a7 class ha_innobase: Replace statistic_increment() with ha_statistic_increment().
ha_innobase::change_active_index(): Do not call current_thd unless
UNIV_DEBUG is defined.
2007-03-19 09:28:49 +00:00
marko
be2100c7c9 Makefile.am: EXTRA_DIST: Add the grammar source files to the
source distribution of MySQL.
2007-03-15 20:47:58 +00:00
vasil
05ff4fe2c3 Fix typo in comment in os/os0file.c
Approved by:	heikki
2007-03-15 15:00:11 +00:00
marko
98fe4ec474 Lock the data dictionary during rollback. This removes the rare
debug assertion failure ut_ad(mutex_own(&(dict_sys->mutex))) in
dict_table_get_on_id() after the rollback following crash recovery.
2007-03-14 13:45:49 +00:00
marko
2cc3d4b70b Rename the Boolean field trx->type to trx->is_purge
and remove the constants TRX_USER and TRX_PURGE.
2007-03-08 10:10:28 +00:00
marko
b35295d797 trx_sig_struct: Remove state. It is always assigned to TRX_SIG_WAITING
and never tested.
2007-03-08 10:08:35 +00:00
marko
a8b14b8eba Minor cleanup in ha_innodb.cc.
Remove the unused constants HA_INNOBASE_ROWS_IN_TABLE and
HA_INNOBASE_RANGE_COUNT.  Declare innobase_active_counter static.
2007-03-08 07:54:54 +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
32f5958e10 rec_offs_nth_size(): Treat n==0 as a special case. (Bug #26835) 2007-03-05 14:26:34 +00:00
sunny
b76aeffed9 Fix for Bug# 21409. At low transaction isolation levels we let each
consistent read set its own snapshot
2007-03-05 00:37:57 +00:00
marko
5515d272d2 lock_deadlock_recursive(): When aborting the search, display a note
regardless of start->undo_no.  Otherwise, aborted searches may show
up as genuine deadlocks.  This mistake was made in r1330.
2007-03-02 14:55:52 +00:00
marko
571aebe9ab lock_deadlock_recursive(): When the search depth or length is exceeded,
rewind lock_latest_err_file and display the two transactions at the
point of aborting the search.  (Bug #25494)
2007-03-02 14:35:55 +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
1e56010ea3 Merge a change from MySQL AB:
ChangeSet@1.2456.1.3, 2007-02-27 20:06:37+02:00, monty@mysql.com +2 -0
  Fix (last) compiler warnings

  storage/innobase/pars/lexyy.c@1.23, 2007-02-27 20:06:36+02:00, monty@mysql.com +1 -1
    Fix compiler warnings (fix is also in pars0lex.l)
2007-03-01 15:24:14 +00:00
marko
5b7f96f982 Merge changes from MySQL AB:
ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0
  Fixed compiler warnings
  ...
  Fixed compiler warnings detected on windows64
2007-03-01 15:21:12 +00:00
marko
f74103028f ha_innodb.cc: Remove the unused innobase_repl_ variables. 2007-03-01 13:28:36 +00:00
marko
145b2d305e Add a test case for r1316 (Bug #25927). 2007-03-01 09:59:37 +00:00
marko
4cc5ef0410 Prevent ALTER TABLE ... MODIFY ... NOT NULL on columns for which
there is a foreign key constraint ON ... SET NULL.  (Bug #25927)

dict_foreign_find_index(): Add paramettter check_null.

dict_foreign_add_to_cache(): Do not allow ON DELETE SET NULL
or ON UPDATE SET NULL if any of the referencing columns are declared NOT NULL.
2007-03-01 08:21:16 +00:00
marko
48d8e9819a ha_innodb.cc: Replace thd->tablespace_op with thd_tablespace_op(thd).
Plugins must treat class THD as an opaque type.
2007-02-15 14:10:41 +00:00
marko
8ea36d5647 ha_innodb.cc: Replace thd->in_lock_tables with thd_in_lock_tables(thd).
Plugins must treat class THD as an opaque type.
2007-02-15 14:09:49 +00:00
marko
6dbc015b33 ha_innodb.cc: Remove all references to thd->ha_data[hton->slot].
thd_to_trx(thd, hton): Accessor for getting the InnoDB trx object
of a MySQL thread object and an InnoDB handlerton.
2007-02-14 20:03:58 +00:00
sunny
1b591ea78d Fixed inline asm code, it didn't work with GCC > ver 3.x. 2007-02-12 23:15:38 +00:00
marko
57990bb42e Remove the declarations of some global functions in ha_innodb.h and declare
them static in ha_innodb.cc.  These functions are invoked via function
pointers in handlerton.
2007-02-12 13:08:02 +00:00
marko
704d74d5b4 Merge a change from MySQL AB:
ChangeSet
  2006/10/26 15:41:47-04:00 iggy@amd64. 
  Post Merge Cleanup

storage/innobase/include/univ.i
  2006/10/26 15:38:50-04:00 iggy@amd64. +9 -0
  Post Merge Cleanup
2007-02-07 10:10:13 +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
marko
e622cb9325 Merge changes from MySQL AB:
Rename some FIELD_TYPE_ constants to MYSQL_TYPE_.

Change the scope of a type cast of two dividends.
2007-02-02 11:14:02 +00:00
marko
cd46201941 Rename hash_create to hash0_create by a #define. This fixes a
symbol collision when building PHP with IMAP and MySQL (Bug #13859).
The bug was originally fixed by MySQL in a more obtrusive way, by
replacing all occurrences of hash_create with hash0_create.  This
change was applied to the MySQL tree as follows:

ChangeSet@1.1616.2924.6, 2007-01-11 12:31:52+01:00, kent@mysql.com +9 -0
  Many files:
    Reverted change for bug#13859, applied smaller patch from Marko
2007-02-02 10:52:40 +00:00
sunny
45ef99db9d Fix for Bug# 23666. On Windows ut_usectime returns secs
and usecs relative to the UNIX epoch (which is Jan, 1 1970).
2007-01-24 23:05:06 +00:00
osku
51c93813de Rename mutex_enter_nowait to mutex_enter_nowait_func and add macro
mutex_enter_nowait that supplies the default __FILE__ and __LINE__
arguments. Adjust callers.
2007-01-22 09:03:59 +00:00
marko
0a36f90086 Add ut_ad() debug assertions.
UT_LIST_ADD_FIRST(), UT_LIST_ADD_LAST(), UT_LIST_INSERT_AFTER():
Assert against some trivial cases of cyclic lists.

mutex_enter_func(): Assert that the current thread is not holding the mutex.
2007-01-19 12:22:24 +00:00
marko
4227e52dc1 Merge r1239 from
branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
2007-01-18 21:27:31 +00:00
marko
8ef66e659b Remove the unused function mem_strdupq(). 2007-01-18 20:33:47 +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