Commit graph

438 commits

Author SHA1 Message Date
marko
09fbd1e0cb 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
52438c3572 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
ba4a168cd0 * 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
3a53d631f4 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
05795f53dd 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
919b6dcdc6 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
49bc0a576c 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
2870d22fc8 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
fda0510090 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
07bc65223b 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
a895ccc20a 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
86f93590f3 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
c95983b9b0 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
4af580181c 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
1135f5a4a4 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
44d9bf6727 Makefile.am: EXTRA_DIST: Add the grammar source files to the
source distribution of MySQL.
2007-03-15 20:47:58 +00:00
vasil
8a647de5a2 Fix typo in comment in os/os0file.c
Approved by:	heikki
2007-03-15 15:00:11 +00:00
marko
134b1fda32 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
7ae16135b9 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
61f029023d 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
8fadfedd7f 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
2de9fc6eac 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
e0ab42c8a7 rec_offs_nth_size(): Treat n==0 as a special case. (Bug #26835) 2007-03-05 14:26:34 +00:00
sunny
8055a7b3c2 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
ce14c9041e 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
90f86dfaa2 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
c757f2ab96 Merge changes from MySQL AB to mysql-test directives.
The results are not affected.
2007-03-02 13:23:21 +00:00
marko
ead23091ae 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
ed18169c68 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
47e17218f1 ha_innodb.cc: Remove the unused innobase_repl_ variables. 2007-03-01 13:28:36 +00:00
marko
1a72a3da1f Add a test case for r1316 (Bug #25927). 2007-03-01 09:59:37 +00:00
marko
7b2e60e13a 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
a364d4bc83 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
499f3c0db9 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
d73aa6da2c 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
466870b2b0 Fixed inline asm code, it didn't work with GCC > ver 3.x. 2007-02-12 23:15:38 +00:00
marko
4c2b680723 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
4dcbc856e0 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
213456bf8c 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
1776e2e961 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
c9459f0d6d 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
eb967c2186 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
7c5df80879 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
053fec7e22 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
1750a977ac 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
4c643e0e1a 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
a4b7a332eb Remove the unused function mem_strdupq(). 2007-01-18 20:33:47 +00:00
osku
32a562e188 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
osku
58809043f4 Change this in ha_innobase:
void*           innobase_prebuilt;

to this:

 row_prebuilt_t* prebuilt;

by introducing the typedef in ha_innodb.h, and remove all the now needless
local variables and casts in ha_innodb.cc.
2007-01-11 14:24:53 +00:00
osku
76ad45ea9b Apply patch from MySQL:
ChangeSet@1.2353, 2006-12-19 16:57:51-07:00, tsmith@siva.hindu.god +13 -0
   Added innodb_rollback_on_timeout option to restore the 4.1 
   InnoDB timeout behavior (Bug #24200)
2007-01-11 11:45:58 +00:00