Commit graph

661 commits

Author SHA1 Message Date
vasil
f452afcaab Improve the comment for trx_struct::undo_no.
Suggested by:	Heikki
2007-05-08 13:34:35 +00:00
marko
e5dc455bc5 Minor cleanup.
row_ins_check_foreign_constraint(), row_ins_scan_sec_index_for_duplicate():
Make use of the predicates page_rec_is_infimum() and page_rec_is_supremum().
2007-05-08 10:51:03 +00:00
vasil
bcb68dadb2 Fix Bug#25078 by always letting the replication thread on the slave
server to enter InnoDB. This can be made further customizable by the
user if we introduce a new config parameter. This will wait until
config parameters can be easily added.

Approved by:	Marko
2007-05-08 07:20:02 +00:00
vasil
a9581aee01 Fix typo in comment: the exact prototype is in
include/data0type.ic, not in data/data0type.ic
2007-05-03 12:27:08 +00:00
vasil
5ddc1f7ff5 Fix typo in comment. 2007-04-27 09:09:23 +00:00
vasil
8f7fe46eea Fix typo in the comment. 2007-04-25 04:47:10 +00:00
sunny
1b9d63c3f8 Fix Bug#22819, remove assertion. (http://bugs.mysql.com/bug.php?id=22819) 2007-04-23 02:00:46 +00:00
vasil
a676ff46a5 Reindent with tabs instead of spaces.
Spotted by:	Marko
2007-04-20 22:51:55 +00:00
vasil
c8824046f1 Bugfix: only call innobase_release_temporary_latches() in case of current_thd
is not NULL, otherwise we get NULL pointer dereferencing.

Approved by:	Heikki
2007-04-20 17:51:54 +00:00
vasil
9023842b88 Fix phantom reads (http://bugs.mysql.com/27197) following Heikki's
patch in the bug followup.

Approved by:	Heikki
2007-04-20 14:41:06 +00:00
marko
b04830936f ha_innodb.cc: Remove ../storage/innobase/include/ prefix from #include
directives.  This could and should have been done when sql/ha_innodb.cc
was renamed to storage/innobase/handler/ha_innodb.cc.
2007-04-19 13:02:21 +00:00
marko
a8db2854f8 Merge a change from MySQL AB:
ChangeSet@2007-04-03 16:13:27+05:00, gluh@mysql.com
  Bug#21432 Database/Table name limited to 64 bytes, not chars,
  problems with multi-byte

==== storage/innobase/handler/ha_innodb.cc ====
2007-04-03 16:13:25+05:00, gluh@mysql.com +2 -2
  removed unnecessary multiplication
2007-04-19 11:44:07 +00:00
marko
7ad2c906e3 Merge a change from MySQL AB, to fix a mistake made
in Makefile.am in r1353 by marko (shame on him):

ChangeSet@2007-03-30 06:57:58+02:00, msvensson@pilot.blaudden 
  Add missing \ causing CMakelists.txt etc not to be included in dist
2007-04-19 11:29:38 +00:00
vasil
9cd6534deb Fix typo which was causing bogus symbolic link *.opt to be created and
make install (in mysql dir) to fail.
2007-04-18 11:35:51 +00:00
vasil
0bc5ed331e Potential fix for Bug#25645:
"Move innobase_release_stat_resources(trx) outside the 'if' in
ha_innobase::external_lock(). That would add more safety that whatever
MySQL does at a query end, there would be no risk of a hang on the btr
search latch."

Also call innobase_release_temporary_latches() in the beginning of
ha_innobase::close().

Approved by:	Heikki
2007-04-16 16:27:41 +00:00
vasil
4cfe26325c Fix typo. 2007-04-12 11:19:36 +00:00
vasil
2439cf690e Fix Bug#9709 by retrying (forever) if ERROR_SHARING_VIOLATION or
ERROR_LOCK_VIOLATION is encountered during file operation.
This is caused by backup software, so InnoDB should retry while the backup
software is done with the file.

Approved by:	Heikki
2007-04-11 17:59:31 +00:00
sunny
d8533985c0 Fix code indentation from r1424. 2007-04-11 06:04:11 +00:00
sunny
d6de3007b2 Fixed a missing function decoration that slipped into r1422. 2007-04-11 05:35:12 +00:00
sunny
24d73c56eb Bug# 20352. Added variable srv_insert_buffer_batch_size. We want to make
this variable settable. Since the pluggable engine interface currently
doesn't provide a usable mechanism, we will add the latter functionality
once it's available.
2007-04-11 04:12:40 +00:00
sunny
42d12ae25c Fix for Bug # 18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out
of UNDO slots in the rollback segment. This is a partial fix since the
MySQL error code requested to properly report the error condition back
to the client has not yet materialized. Currently we have #ifdef'd the
error code translation in ha_innodb.cc. This will have to be changed
as and when MySQl add the new requested code or an equivalent code
that we can then use.

Given the above, currently we will get the old behaviour, not the "fixed"
and intended behaviour.
2007-04-11 02:43:56 +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
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