Merge
trx0trx.c:
Print more info about a trx in SHOW INNODB status; try to find the bug reported by Plaxo
buf0buf.c:
Check that page log sequence numbers are not in the future
log0recv.c, log0log.c:
Fixed a bug: if you used big BLOBs, and your log files were relatively small, InnoDB could in a big BLOB operation temporarily write over the log produced AFTER the latest checkpoint. If InnoDB would crash at that moment, then the crash recovery would fail, because InnoDB would not be able to scan the log even up to the latest checkpoint. Starting from this version, InnoDB tries to ensure the latest checkpoint is young enough. If that is not possible, InnoDB prints a warning to the .err log
Remove potential starvation of a full log buffer flush: only flush up to the lsn which was the largest at the time when we requested the full log buffer flush
os0sync.h, os0sync.c:
Fix a bug in os_event on Unix: even though we signaled the event, some threads could continue waiting if the event became nonsignaled quickly again; this made group commit less efficient than it should be
In ORDER BY MySQL seems to set the key read flag also in the case where the primary key contains only a prefix of a column - not the whole column; to prevent potential bugs retrieve the whole column if the index contains a prefix of it
Cleanup
ha_innodb.cc, data0type.h:
Make sure non-latin1 users can downgrade from 4.0.14 to an earlier version if they have not created DATA_BLOB column prefix indexes
Merge InnoDB-4.0.14: SAVEPOINT now implemented; InnoDB now accepts also column prefix keys; crashing bug in ON UPDATE CASCADE fixed; page checksum formula fixed
Release all event semaphores at shutdown also in Windows
srv0start.c, srv0srv.c:
make test sometimes failed because lock timeout thread exited without decrementing the InnoDB thread counter
Search first only 10 % of the LRU list for a replaceable block before doing an LRU flush; enable again flushing of close pages also in a flush list (checkpointing) flush
trx0trx.c:
Add forgotten return value (it was not used anywhere, fortunately)
ha_innodb.h, mysql_priv.h:
Move declaration of srv_buf_pool_max_modified_pct to ha_innodb.h and enclose it to denote it is a C variable, not C++
Clean up the working of the main thread; add a tunable parameter srv_max_buf_pool_modified_pct which can be used to make the flush phase in shutdown quicker
Remove code never actually used in IGNORE; InnoDB just rolls back the latest row insert or update on a duplicate key error and leaves it for MySQL to decide whether to ignore the error
libraries always ended up in "dir..", even though they were not supposed
to be installed anyway (they are only required at link time). Fixed it by
replacing libs_LIBRARIES with noinst_LIBRARIES for all InnoDB Makefile.am
files and by removing "libsdir = " from innobase/include/Makefile.i .
Call pthread_mutex_destroy() on not used mutex.
Changed comments in .h and .c files from // -> /* */
Added detection of mutex on which one didn't call pthread_mutex_destroy()
Fixed bug in create_tmp_field() which causes a memory overrun in queries that uses "ORDER BY constant_expression"
Added optimisation for ORDER BY NULL
Merge InnoDB-4.0.7. Support for ON UPDATE CASCADE
sql_select.cc:
Remove superfluous prints to .err log when a locking SELECT fails to a deadlock or a lock wait timeout
Fix hang introduced by selective deadlock resolution
srv0srv.c, row0mysql.c:
Fix hang introduced by selective deadlock resolution + corruption caused by lock timeout or sel deadl res in ON DELETE CASCADE
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
Do not let range estimator to return over 1 / 2 of total rows in table; use longlong in range estimation
btr0cur.h, ha_innobase.cc:
Use longlong in range estimation, in case there are > 4 billion rows
Change srv_flush_log_at_trx_commit to ulint, note that ibool is defined as ulint, so this is purely formal change
os0file.c:
Start using unbuffered i/o again in Windows because sequential read using normal i/o was 4 times slower in XP
ha_innodb.cc Remove gaps in auto-inc in multi-row inserts, more space for foreign key listings in SHOW TABLE STATUS, move resetting of active_trx to amore logical place
dict0dict.h Remove gaps from auto-inc sequence if errors in multi-row insert
dict0dict.c Remove gaps from auto-inc sequence if errors in multi-row insert
The lexer of InnoDB to 8-bit, it was 7-bit which made it crash on table names containing char codes > 127
pars0lex.l, pars0grm.y:
Add InnoDB internal SQL interpreter grammar and lexer sources