include/Makefile.am: use @PERL@ to call scripts/dheadgen.pl - don't rely on #! /usr/bin/perl
scripts/dheadgen.pl: use 2-arg open() for compatibility with older Perl versions
storage/innobase/srv/srv0srv.c: Don't use C++-style comments in C code
Running a SELECT query over an IBMDB2I table with a cp1250 character set
was producing an error 2027 (ibmdb2i error 2027: Error converting single-byte
sort sequence to UCS-2).
The QMY_DESCRIBE_RANGE API was returning error 2027 to the storage engine
because the CCSID used for a cp1250 column (870) does not match the CCSID
used by the DB2 sort sequences associated with cp1250_* collations (1153).
This was because the storage engine relies on a set of system APIs to
determine which CCSID value most closely matches a particular MySQL
character set. However, in the case of cp1250, the system is returning
CCSID 870, which does not have a codepoint for the euro symbol, making it
an incorrect match.
This patch overrides the selection of a compatible CCSID to always return
1153 for cp1250.
The Innodb plugin 1.0.4 can be installed dynamically using the 'INSTALL PLUGIN' syntax
If mysqld is already statically linked with the inbuilt innodb, it is not possible to
install the innodb plugin 1.0.4 dynamically. Doing so would throw this error - Function
'innodb' already exists.
wmemset was being used to fill the row buffers.
wmemset was intended to fill the buffer with
16-bit UCS2 pad values. However, the 64-bit
version of wmemset uses 32-bit wide characters
and thus filled the buffer incorrectly. In some
cases, the null byte map would be overwritten,
causing ctype_utf8.test and ibmdb2i_rir.test to
fail, giving the error message CPF5035.
This patch eliminates the use of wmemset to fill
the row buffer. wmemset has been replaced with
memset16, which always fills memory with 16-bit
values.
BUG#42101 - Race condition in innodb_commit_concurrency
Detailed revision comments:
r4994 | marko | 2009-05-14 15:04:55 +0300 (Thu, 14 May 2009) | 18 lines
branches/5.1: Prevent a race condition in innobase_commit() by ensuring
that innodb_commit_concurrency>0 remains constant at run time. (Bug #42101)
srv_commit_concurrency: Make this a static variable in ha_innodb.cc.
innobase_commit_concurrency_validate(): Check that innodb_commit_concurrency
is not changed from or to 0 at run time. This is needed, because
innobase_commit() assumes that innodb_commit_concurrency>0 remains constant.
Without this limitation, the checks for innodb_commit_concurrency>0
in innobase_commit() should be removed and that function would have to
acquire and release commit_cond_m at least twice per invocation.
Normally, innodb_commit_concurrency=0, and introducing the mutex operations
would mean significant overhead.
innodb_bug42101.test, innodb_bug42101-nonzero.test: Test cases.
rb://123 approved by Heikki Tuuri
BUG#44320 - InnoDB: missing DB_ROLL_PTR in Table Monitor COLUMNS output
Detailed revision comments:
r4976 | marko | 2009-05-13 15:44:54 +0300 (Wed, 13 May 2009) | 6 lines
branches/5.1: Display DB_ROLL_PTR in the COLUMNS section of the
innodb_table_monitor output. It was accidentally omitted due to an
off-by-one loop condition. (Bug #44320)
rb://116 approved by Heikki Tuuri
Detailed revision comments:
r4705 | vasil | 2009-04-14 14:30:13 +0300 (Tue, 14 Apr 2009) | 7 lines
branches/5.1:
When using the random function, first take the modulus by the number of pages
and then typecast to ulint.
This is a followup to r4699 - the fix of Bug#43660.
Occasionally, if both the partition_pruning
and partition_range tests are run sequentially
against the IBMDB2I engine, the partition_range
test will fail.
Compiler padding on a 64-bit build allowed
garbage data in the hash key used for
caching open iconv descriptors. As a
result, cached descriptors were not found,
and multiple duplicate iconv descriptors
were opened for a single character set.
Eventually, the maximum number of open
iconv descriptors was reached, and further
iconv_open() calls would fail, leading the
storage engine to report incorrectly that
the character set was not supported.
This patch widens the 16-bit members of the
hash key to 32 bits to eliminate compiler
padding. The entire length of the hash key
is now initialized correctly on both 32-bit
and 64-bit builds.
In order to better support the usage of
IBMDB2I tables from within RPG programs,
the storage engine should ensure that the
RCDFMT name is consistent and predictable
for DB2 tables.
This patch appends a "RCDFMT <name>"
clause to the CREATE TABLE statement
that is passed to DB2. <name> is
generated from the original name of
the table itself. This ensures a
consistent and deterministic mapping
from the original table.
For the sake of simplicity only
the alpha-numeric characters are
preserved when generating the new
name, and these are upper-cased;
other characters are replaced with
an underscore (_). Following DB2
system identifier rules, the name
always begins with an alpha-character
and has a maximum of ten characters.
If no usable characters are found in
the table name, the name X is used.
This patch fixes compilation warning, "conversion from 'time_t' to 'ulong',
possible loss of data".
The fix is to typecast time_t to ulong before assigning it to ulong.
Backported this from 6.0-bugteam tree.
When a user selected an unsupported character set for an
IBMDB2I table, error 2501 or 2511 may have been returned,
giving the appearance of an internal programming error.
This patch consolidates these errors into a single descriptive
error message for the common case of an unsupported character
set.
The new error number is 2504 and indicates a user error.
The errors 2501 and 2511 remain to indicate cases of internal
programming errors.
This patch adds corrections to the original patch
submitted 2009-04-08 (http://lists.mysql.com/commits/71607):
- fixed that the original patch didn't work because of an
incorrect condition;
- added a test case.
Killing the insert-select statement corrupts the MyISAM table only
when the destination table is empty and when it has indexes. When
we bulk insert huge data and if the destination table is empty we
disable the indexes for fast inserts, data is then inserted and
indexes are re-enabled after bulk_insert operation
Killing the query, aborts the repair table operation during enable
indexes phase leading to table corruption.
We now truncate the table when we detect that enable indexes is
killed for bulk insert query.As we have an empty table before the
operation, we can fix by truncating the table.
A bug in the initialization of key segment information made it point
to the wrong bit, since a bit index was used when its int value
was needed. This lead to misinterpretation of bit columns
read from MyISAM record format when a NULL bit pushed them over
a byte boundary.
Fixed by using the int value of the bit instead.
The storage engine was not correctly handling the case in
which rnd_pos is executed for a handler without a preceding
rnd_next or index read operation. As a result, an unitialized
file handle was sometimes being passed to the QMY_READ API.
The fix clears the rrnAssocHandle at the beginning of each
read operation and then checks to see whether it has been
set to a valid handle value before attempting to use it
in rnd_pos. If rrnAssocHandle has not been set by a previous
read operation, rnd_pos instead falls back to the use of the
currently active handle.
single quote fails in 5.1.x
Performing fulltext prefix search (a word with truncation
operator) may cause a dead-loop.
The problem was in smarter index merge algorithm - it was writing
record reference to an incorrect memory area.
1) BUG#27276 - InnoDB Error: ibuf cursor restoration fails
2) Follow up fix for BUG#27276 which fixes the bug introduced in
the previous revision r2924
Detailed revision comments:
r2924 | marko | 2008-10-29 10:07:48 +0200 (Wed, 29 Oct 2008) | 7 lines
branches/5.1: Merge revision 2866 from branches/zip:
ibuf_delete_rec(): When the cursor to the insert buffer record cannot be
restored, do not complain if the tablespace does not exist. (Bug #27276)
Approved by Sunny Bains (rb://34)
r3598 | marko | 2008-12-22 15:28:03 +0200 (Mon, 22 Dec 2008) | 6 lines
branches/5.1: ibuf_delete_rec(): When the record cannot be found and
the tablespace has been dropped, commit the mini-transaction, so that
InnoDB will not hold the insert buffer tree latch in exclusive mode,
causing a potential deadlock. This bug was introduced in the fix of
Bug #27276 in r2924.
Killing insert-select statement on MyISAM corrupts the table.
Killing the insert-select statement corrupts the MyISAM table only
when the destination table is empty and when it has indexes. When
we bulk insert huge data and if the destination table is empty we
disable the indexes for fast inserts, data is then inserted and
indexes are re-enabled after bulk_insert operation
Killing the query, aborts the repair table operation during enable
indexes phase leading to table corruption.
We now truncate the table when we detect that enable indexes is
killed for bulk insert query.As we have an empty table before the
operation, we can fix by truncating the table.
1) BUG#43660 - SHOW INDEXES/ANALYZE does NOT update cardinality
for indexes of InnoDB table
Detailed revision comments:
r4699 | vasil | 2009-04-09 14:01:52 +0300 (Thu, 09 Apr 2009) | 15 lines
branches/5.1:
Fix Bug#43660 SHOW INDEXES/ANALYZE does NOT update cardinality for indexes
of InnoDB table
by replacing the PRNG that is used to pick random pages with a better
one.
This is based on r4670 but also adds a new configuration option and
enables the fix only if this option is changed. Please skip the present
revision when merging.
Approved by: Heikki (via email)
problems
1) BUG#39320 - innodb crash in file btr/btr0pcur.c line 217 with
innodb_locks_unsafe_for_binlog
2) Fixes bug in multi-table semi consistent reads.
3) Fixes email address from dev@innodb.com to innodb_dev_ww@oracle.com
4) Fixes warning message generated by main.innodb test
Detailed revision comments:
r4399 | marko | 2009-03-12 09:38:05 +0200 (Thu, 12 Mar 2009) | 5 lines
branches/5.1: row_sel_get_clust_rec_for_mysql(): Store the cursor position
also for unlock_row(). (Bug #39320)
rb://96 approved by Heikki Tuuri.
r4400 | marko | 2009-03-12 10:06:44 +0200 (Thu, 12 Mar 2009) | 8 lines
branches/5.1: Fix a bug in multi-table semi-consistent reads.
Remember the acquired record locks per table handle (row_prebuilt_t)
rather than per transaction (trx_t), so that unlock_row should successfully
unlock all non-matching rows in multi-table operations.
This deficiency was found while investigating Bug #39320.
rb://94 approved by Heikki Tuuri.
r4481 | marko | 2009-03-19 15:01:48 +0200 (Thu, 19 Mar 2009) | 6 lines
branches/5.1: row_unlock_for_mysql(): Do not unlock records that were
modified by the current transaction. This bug was introduced or unmasked
in r4400.
rb://97 approved by Heikki Tuuri
r4573 | vasil | 2009-03-30 14:17:13 +0300 (Mon, 30 Mar 2009) | 4 lines
branches/5.1:
Fix email address from dev@innodb.com to innodb_dev_ww@oracle.com
r4574 | vasil | 2009-03-30 14:27:08 +0300 (Mon, 30 Mar 2009) | 38 lines
branches/5.1:
Restore the state of INNODB_THREAD_CONCURRENCY to silence this warning:
TEST RESULT TIME (ms)
------------------------------------------------------------
worker[1] Using MTR_BUILD_THREAD 250, with reserved ports 12500..12509
main.innodb [ pass ] 8803
MTR's internal check of the test case 'main.innodb' failed.
This means that the test case does not preserve the state that existed
before the test case was executed. Most likely the test case did not
do a proper clean-up.
This is the diff of the states of the servers before and after the
test case was executed:
mysqltest: Logging to '/tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.log'.
mysqltest: Results saved in '/tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.result'.
mysqltest: Connecting to server localhost:12500 (socket /tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/mysqld.1.sock) as 'root', connection 'default', attempt 0 ...
mysqltest: ... Connected.
mysqltest: Start processing test commands from './include/check-testcase.test' ...
mysqltest: ... Done processing test commands.
--- /tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.result 2009-03-30 14:12:31.000000000 +0300
+++ /tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.reject 2009-03-30 14:12:41.000000000 +0300
@@ -99,7 +99,7 @@
INNODB_SUPPORT_XA ON
INNODB_SYNC_SPIN_LOOPS 20
INNODB_TABLE_LOCKS ON
-INNODB_THREAD_CONCURRENCY 8
+INNODB_THREAD_CONCURRENCY 16
INNODB_THREAD_SLEEP_DELAY 10000
INSERT_ID 0
INTERACTIVE_TIMEOUT 28800
mysqltest: Result content mismatch
not ok
r4576 | vasil | 2009-03-30 16:25:10 +0300 (Mon, 30 Mar 2009) | 4 lines
branches/5.1:
Revert a change to Makefile.am that I committed accidentally in c4574.
On IBM i 5.4, schemas with names that are longer
than 8 characters and contain digits or an underscore
cannot contain IBMDB2I tables, even though this should
theoritically be possible if all alpha characters
are uppercase.
THe current patch fixes the IBMDB2I engine to
allow digits and the underscore(_) to be used in
schema names longer than 8 characters on IBM i 5.4.
In some circumstances, when a table is created with
the IBMDB2I engine, the CREATE TABLE statement will
return successfully but the table will not exist.
The current patch addresses the above issue and causes
CREATE to fail and report and error to the user.
The utf8_swedish_ci and ucs2_swedish_ci
collations do not work with indexes on
IBMDB2I tables.
The current patch adds the mapping for
ucs2_swedish collation and removes the
ucs2_spanish2 mapping which is not
supported by any version of the operating
system.
Currently the memory map is being created
with a size that is greater than the size
of the underlying datafile. This can cause
varying behaviour,
e.g.
In windows the size of the datafile
is increased, while on linux it remains
the same.
This fix removes the increment margin to
the size that is used while creating the
memory map.
The conformance checker was not taking into
account, and, making concessions for acceptable
incompatibilites in tables created by
versions earlier than 4.1.
The current patch relaxes the conformance
checker to ignore differences in key_alg
and language for tables created by versions
earlier than 4.1.
Probe definition file is now a separate file that is copied during
build to the correct location, this enforces dependency requirements
correctly and allows builds to work when using the current or separate
build directories
Any statement reading corrupt archive data file
(CHECK/REPAIR/SELECT/UPDATE/DELETE) may cause assertion
failure in debug builds. This assertion has been removed
and an error is returned instead.
Also fixed that CHECK/REPAIR returns vague error message
when it mets corruption in archive data file. This is
fixed by returning proper error code.
Bug #43203 Overflow from auto incrementing causes server segv
Detailed revision comments:
r4325 | sunny | 2009-03-02 02:28:52 +0200 (Mon, 02 Mar 2009) | 10 lines
branches/5.1: Bug#43203: Overflow from auto incrementing causes server segv
It was not a SIGSEGV but an assertion failure. The assertion was checking
the invariant that *first_value passed in by MySQL doesn't contain a value
that is greater than the max value for that type. The assertion has been
changed to a check and if the value is greater than the max we report a
generic AUTOINC failure.
rb://93
Approved by Heikki
Bug #42714 AUTO_INCREMENT errors in 5.1.31
Detailed revision comments:
r4287 | sunny | 2009-02-25 05:32:01 +0200 (Wed, 25 Feb 2009) | 10 lines
branches/5.1: Fix Bug#42714 AUTO_INCREMENT errors in 5.1.31. There are two
changes to the autoinc handling.
1. To fix the immediate problem from the bug report, we must ensure that the
value written to the table is always less than the max value stored in
dict_table_t.
2. The second related change is that according to MySQL documentation when
the offset is greater than the increment, we should ignore the offset.
Bug #42400 InnoDB autoinc code can't handle floating-point columns
Detailed revision comments:
r4065 | sunny | 2009-01-29 16:01:36 +0200 (Thu, 29 Jan 2009) | 8 lines
branches/5.1: In the last round of AUTOINC cleanup we assumed that AUTOINC
is only defined for integer columns. This caused an assertion failure when
we checked for the maximum value of a column type. We now calculate the
max value for floating-point autoinc columns too.
Fix Bug#42400 - InnoDB autoinc code can't handle floating-point columns
rb://84 and Mantis issue://162
r4111 | sunny | 2009-02-03 22:06:52 +0200 (Tue, 03 Feb 2009) | 2 lines
branches/5.1: Add the ULL suffix otherwise there is an overflow.
Bug #42279 Race condition in btr_search_drop_page_hash_when_freed()
Detailed revision comments:
r4032 | marko | 2009-01-23 15:43:51 +0200 (Fri, 23 Jan 2009) | 10 lines
branches/5.1: Merge r4031 from branches/5.0:
btr_search_drop_page_hash_when_freed(): Check if buf_page_get_gen()
returns NULL. The page may have been evicted from the buffer pool
between buf_page_peek_if_search_hashed() and buf_page_get_gen(),
because the buffer pool mutex will be released between these two calls.
(Bug #42279)
rb://82 approved by Heikki Tuuri
This problem comes while inserting a duplicate row in merge table
without key but the child table has a primary key.
While forming the error message handler tries to locate the key field
which is creating this problem but as there is no key on the merge
table there is a segmentation fault.
Bug #42152: Race condition in lock_is_table_exclusive()
Detailed revision comments:
r4005 | marko | 2009-01-20 16:22:36 +0200 (Tue, 20 Jan 2009) | 8 lines
branches/5.1: lock_is_table_exclusive(): Acquire kernel_mutex before
accessing table->locks and release kernel_mutex before returning from
the function. This fixes a portential race condition in the
"commit every 10,000 rows" in ALTER TABLE, CREATE INDEX, DROP INDEX,
and OPTIMIZE TABLE. (Bug #42152)
rb://80 approved by Heikki Tuuri
Bug #41571: MySQL segfaults after innodb recovery
Detailed revision comments:
r4004 | marko | 2009-01-20 16:19:00 +0200 (Tue, 20 Jan 2009) | 12 lines
branches/5.1: Merge r4003 from branches/5.0:
rec_set_nth_field(): When the field already is SQL null,
do nothing when it is being changed to SQL null. (Bug #41571)
Normally, MySQL does not pass "do-nothing" updates to the storage engine.
When it does and a column of an InnoDB table that is in ROW_FORMAT=COMPACT
is being updated from NULL to NULL, the InnoDB buffer pool will be corrupted
without this fix.
rb://81 approved by Heikki Tuuri
Bug #42075: dict_load_indexes failure in dict_load_table will corrupt the dictionary cache
Detailed revision comments:
r3930 | marko | 2009-01-14 15:51:30 +0200 (Wed, 14 Jan 2009) | 4 lines
branches/5.1: dict_load_table(): If dict_load_indexes() fails,
invoke dict_table_remove_from_cache() instead of dict_mem_table_free(),
so that the data dictionary will not point to freed data.
(Bug #42075, Issue #153, rb://76 approved by Heikki Tuuri)
Bug #38187: Error 153 when creating savepoints
Detailed revision comments:
r3911 | sunny | 2009-01-13 14:15:24 +0200 (Tue, 13 Jan 2009) | 13 lines
branches/5.1: Fix Bug#38187 Error 153 when creating savepoints
InnoDB previously treated savepoints as a stack e.g.,
SAVEPOINT a;
SAVEPOINT b;
SAVEPOINT c;
SAVEPOINT b; <- This would delete b and c.
This fix changes the behavior to:
SAVEPOINT a;
SAVEPOINT b;
SAVEPOINT c;
SAVEPOINT b; <- Does not delete savepoint c
Improved data typing of server variables in InnoDB to avoid bugs on
Windows.
Workaround for bug in gcc assembler on 32-bit Mac OS X as well as
on Solaris.
The problem is that select queries executed concurrently with
a concurrent insert on a MyISAM table could be cached if the
select started after the query cache invalidation but before
the unlock of tables performed by the concurrent insert. This
race could happen because the concurrent insert was failing
to prevent cache of select queries happening at the same time.
The solution is to add a 'uncacheable' status flag to signal
that a concurrent insert is being performed on the table and
that queries executing at the same time shouldn't cache the
results.
Modify plugins.m4 configuration framework so that plugins which are
not built still get added to the source distribution during make dist.
This came up now because we can only build ibmdb2i on i5/OS, and we
can't bootstrap our source dist on that platform. The solution is to
specify DIST_SUBDIRS containing all plugins, separate from SUBDIRS
which contains the plugins which are actually built.
This ibmdb2i code is from the ibmdb2i-ga3-src.zip file, with a patch
to plug.in to disable the plugin if the PASE environment isn't available.
- Remove bothersome warning messages. This change focuses on the warnings
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
MyISAM did copy of key statistics incorrectly, which may cause
server crash or incorrect cardinality values. This may happen only on
platforms where size of long differs from size of pointer.
To determine number of bytes to be copied from array of ulong,
MyISAM mistakenly used sizoef(pointer) instead of sizeof(ulong).
A Query in the MyISAM merge table was crashing
if the index merge algorithm was being used
Index Merge optimization requires the reading of
multiple indexes at the same time. Reading multiple
indexes at once with current SE API means that we
need to have handler instance for each to-be-read
index. This is done by creating clones of the handlers
instances. The clone internally does a open of the handler.
The open for a MERGE engine is handled in the following
phases
1) open parent table
2) generate list of underlying
table
3) attach underlying tables
But the current implementation does only the first
phase (i.e.) open parent table.
The current patch fixes this at the MERGE engine level,
by handling the clone operation within the MERGE engine
rather than in the storage engine API. It opens and
attaches the MyISAM tables on the MyISAM storage engine
interface directly within the MERGE engine. The new MyISAM
table instances, as well as the MERGE clone itself, are not
visible in the table cache. This is not a problem because
all locking is handled by the original MERGE table from which
this is cloned of.
1) Buffer Pool size now defaults to 1GB and a minimum of 64MB
2) Log files are 3 by default and each 128MB in size
3) Removed innodb-file-io-threads config variable since no longer used
4) Set read io and write io threads to 8 by default for better default performance
5) Set log buffer size to 16 MB by default and minimum to 2MB
6) Set additional memory buffer pool to 8 MB and minimum to 2MB
7) Set max dirty percent to 75% and decreased to 99% to never allow a completely dirty buffer pool
8) Increased io capacity to 200 for a good default
Every subsequent query to a merge table with indexes was lowering
down cardinality.
The problem was that key statistics was not cleared when merge
children were detached. Causing next attach children perform
incremental key statistics calculation.
Fixed by clearing key statistics when attaching first child.
code backported from 6.0
per-file messages:
include/my_global.h
Remove SC_MAXWIDTH. This is unused and irrelevant nowadays.
include/my_sys.h
Remove errbuf declaration and unused definitions.
mysys/my_error.c
Remove errbuf definition and move and adjust ERRMSGSIZE.
mysys/my_init.c
Declare buffer on the stack and use my_snprintf.
mysys/safemalloc.c
Use size explicitly. It's more than enough for the message at hand.
sql/sql_error.cc
Use size explicitly. It's more than enough for the message at hand.
sql/sql_parse.cc
Declare buffer on the stack. Use my_snprintf as it will result in
less stack space being used than by a system provided sprintf --
this allows us to put the buffer on the stack without causing much
trouble. Also, the use of errbuff here was not thread-safe as the
function can be entered concurrently from multiple threads.
sql/sql_table.cc
Use MYSQL_ERRMSG_SIZE. Extra space is not needed as my_snprintf will
nul terminate strings.
storage/myisam/ha_myisam.cc
Use MYSQL_ERRMSG_SIZE.
sql/share/errmsg.txt
Error message truncation in test "innodb" in embedded mode
filename in the error message can safely take up to 210 symbols.
Replaced abs_top_srcdir with top_srcdir, not sure it's an
improvement but at least it's known that abs_top_srcdir
in cases have a problem and this is a more common variable
to use for the same purpose.
There was a type casting problem in the storage/innobase/handler/ha_innodb.cc,
(int ha_innobase::write_row(...)). Innobase uses has an internal error variable
of type 'ulint' while mysql uses an 'int'.
To fix the problem the function manipulates an error variable of
type 'ulint' and only casts it into 'int' when needs to return the value.
myisam_repair_threads > 1 causes crash
Problem: parallel repair (myisam_repair_threads > 1) of a myisam
table with two or more fulltext keys that use the same parser may
lead to a server crash. ALTER TABLE ENABLE KEYS is affected as well.
Fix: properly initialize fulltext structures for parallel repair.
Note: 1. there's no deterministic test case.
2. now we call parser->init() for each fulltext key
(not for each fulltext parser used).
conflicts:
Text conflict in client/mysqltest.cc
Text conflict in mysql-test/include/wait_until_connected_again.inc
Text conflict in mysql-test/lib/mtr_report.pm
Text conflict in mysql-test/mysql-test-run.pl
Text conflict in mysql-test/r/events_bugs.result
Text conflict in mysql-test/r/log_state.result
Text conflict in mysql-test/r/myisam_data_pointer_size_func.result
Text conflict in mysql-test/r/mysqlcheck.result
Text conflict in mysql-test/r/query_cache.result
Text conflict in mysql-test/r/status.result
Text conflict in mysql-test/suite/binlog/r/binlog_index.result
Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result
Text conflict in mysql-test/suite/rpl/r/rpl_packet.result
Text conflict in mysql-test/suite/rpl/t/rpl_packet.test
Text conflict in mysql-test/t/disabled.def
Text conflict in mysql-test/t/events_bugs.test
Text conflict in mysql-test/t/log_state.test
Text conflict in mysql-test/t/myisam_data_pointer_size_func.test
Text conflict in mysql-test/t/mysqlcheck.test
Text conflict in mysql-test/t/query_cache.test
Text conflict in mysql-test/t/rpl_init_slave_func.test
Text conflict in mysql-test/t/status.test
Detailed description of changes:
r3601 | marko | 2008-12-22 16:05:19 +0200 (Mon, 22 Dec 2008) | 9 lines
branches/5.1: Make
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED
a true replacement of SET GLOBAL INNODB_LOCKS_UNSAFE_FOR_BINLOG=1.
This fixes an error that was introduced in r370, causing
semi-consistent read not to not unlock rows in READ UNCOMMITTED mode.
(Bug #41671, Issue #146)
rb://67 approved by Heikki Tuuri
Detailed description of changes:
r3590 | marko | 2008-12-18 15:33:36 +0200 (Thu, 18 Dec 2008) | 11 lines
branches/5.1: When converting a record to MySQL format, copy the default
column values for columns that are SQL NULL. This addresses failures in
row-based replication (Bug #39648).
row_prebuilt_t: Add default_rec, for the default values of the columns in
MySQL format.
row_sel_store_mysql_rec(): Use prebuilt->default_rec instead of
padding columns.
rb://64 approved by Heikki Tuuri
Detailed description of changes:
r3588 | inaam | 2008-12-18 14:26:54 +0200 (Thu, 18 Dec 2008) | 8 lines
branches/5.1
It is a bug in unused code. If we don't calculate the hash value when
calculating the mutex number then two pages which map to same hash
value can get two different mutex numbers.
Approved by: Marko
Detailed description of changes:
r3412 | vasil | 2008-12-05 10:46:18 +0200 (Fri, 05 Dec 2008) | 7 lines
branches/5.1:
Add the traditional 2 spaces after the timestamp so the message does
not look like:
070223 13:26:01InnoDB: Warning: canno....
Detailed description of changes:
r3257 | inaam | 2008-11-24 22:06:50 +0200 (Mon, 24 Nov 2008) | 13 lines
branches/5.1 bug#40760
The config param innodb_thread_concurrency is dynamically set and is
read when a thread enters/exits innodb. If the value is changed between
the enter and exit time the behaviour becomes erratic.
The fix is not to use srv_thread_concurrency when exiting, instead use
the flag trx->declared_to_be_inside_innodb.
rb://57
Approved by: Marko
Detailed description of changes:
r2981 | marko | 2008-11-07 14:54:10 +0200 (Fri, 07 Nov 2008) | 6 lines
branches/5.1: row_mysql_store_col_in_innobase_format(): Correct a misleading
comment. In the UTF-8 encoding, ASCII takes 1 byte per character, while
the "latin1" character set (normally ISO-8859-1, but in MySQL it actually
refers to the Windows Code Page 1252 a.k.a. CP1252, WinLatin1)
takes 1 to 3 bytes (1 to 2 bytes for the ISO-8859-1 subset).
r3114 | calvin | 2008-11-14 20:31:48 +0200 (Fri, 14 Nov 2008) | 8 lines
branches/5.1: fix bug#40386: Not flushing query cache after truncate
ha_statistics.records can not be 0 unless the table is empty, set to
1 instead. The original problem of bug 29507 is fixed in the server.
Additional test was done with the fix of bug 29507 in the server.
Approved by: Heikki (on IM)
Detailed description of changes:
r2929 | marko | 2008-10-29 21:26:14 +0200 (Wed, 29 Oct 2008) | 13 lines
branches/5.1: dtype_get_sql_null_size(): return the correct storage
size of a SQL NULL column. (Bug #40369)
When MySQL Bug #20877 was fixed in r834, this function was
accidentally modified to return 0 or 1. Apparently, the only impact of
this bug is that fixed-length columns cannot be updated in-place from
or to SQL NULL, even in ROW_FORMAT=REDUNDANT. After this fix,
fixed-length columns in ROW_FORMAT=REDUNDANT will have a constant
storage size as they should, no matter if NULL or non-NULL. The bug
caused fixed-length NULL columns to occupy 1 byte.
rb://37 approved by Heikki over IM.
Detailed description of changes:
r2902 | vasil | 2008-10-28 12:10:25 +0200 (Tue, 28 Oct 2008) | 10 lines
branches/5.1:
Fix Bug#38189 innodb_stats_on_metadata missing
Make the variable innodb_stats_on_metadata visible to the users and
also settable at runtime. Previously it was only "visible" as a command
line startup option to mysqld.
Approved by: Marko (https://svn.innodb.com/rb/r/36)
Bounds-checks and blocksize corrections were applied to user-input,
but constants in the server were trusted implicitly. If these values
did not actually meet the requirements, the user could not set change
a variable, then set it back to the (wonky) factory default or maximum
by explicitly specifying it (SET <var>=<value> vs SET <var>=DEFAULT).
Now checks also apply to the server's presets. Wonky values and maxima
get corrected at startup. Consequently all non-offsetted values the user
sees are valid, and users can set the variable to that exact value if
they so desire.
The problem: data file can not be deleted on win because
there is another opened instance of this file.
Data file might be opened twice, on table opening stage and
during write_row execution. We need to close both instances
to satisfy Win.
Bug #39830: Table autoinc value not updated on first insert.
Bug #35498: Cannot get table test/table1 auto-inccounter value in ::info
Bug #36411: Failed to read auto-increment value from storage engine" in 5.1.24 auto-inc
Detailed revision comments:
r2854 | sunny | 2008-10-23 08:30:32 +0300 (Thu, 23 Oct 2008) | 13 lines
branches/5.1: Backport changes from branches/zip r2725
Simplify the autoinc initialization code. This removes the
non-determinism related to reading the table's autoinc value for the first
time. This change has also reduced the sizeof dict_table_t by sizeof(ibool)
bytes because we don't need the dict_table_t::autoinc_inited field anymore.
rb://16
Bug #37788: InnoDB Plugin: AUTO_INCREMENT wrong for compressed tables
(Note, this bug is not only in the plugin, the overflow checks are relevant
for MySQL's InnoDB as well.)
Detailed revision comments:
r2852 | sunny | 2008-10-23 01:42:24 +0300 (Thu, 23 Oct 2008) | 9 lines
branches/5.1: Backport r2724 from branches/zip
Check column value against the col max value before updating the table's
global autoinc counter value. This is part of simplifying the AUTOINC
sub-system. We extract the type info from MySQL data structures at runtime.
Bug #40224: New AUTOINC changes mask reporting of deadlock/timeout errors
Detailed revision comments:
r2849 | sunny | 2008-10-22 12:01:18 +0300 (Wed, 22 Oct 2008) | 8 lines
branches/5.1: Return the actual error code encountered when allocating
a new autoinc value. The change in behavior (bug) was introduced in 5.1.22
when we introduced the new AUTOINC locking model.
rb://31
A follow-up to fix for bug #39438. This moves some errro messages from the
server error log to the client, to make it easier for users (especially in
shared hosting environment) to get info about why their statement is failing.
Detailed revision comments:
r2832 | vasil | 2008-10-21 10:08:30 +0300 (Tue, 21 Oct 2008) | 10 lines
branches/5.1:
In ha_innobase::info():
Replace sql_print_warning() which prints to mysqld error log with
push_warning_printf() which sends the error message to the client.
Suggested by: Marko, Sunny, Michael
Objected by: Inaam
Detailed revision comments:
r2826 | vasil | 2008-10-20 14:09:01 +0300 (Mon, 20 Oct 2008) | 5 lines
branches/5.1:
Non-functional change: use a single tab instead of 12 spaces between
variable type and variable name.
Fix memory handling to avoid possible crash during error printout. (Code
review, no associated bug.)
Detailed revision comments:
r2782 | marko | 2008-10-13 14:21:02 +0300 (Mon, 13 Oct 2008) | 5 lines
branches/5.1: Backport a fix from branches/zip r2763:
row_drop_database_for_mysql(): Postpone mem_free(table_name), so that
an error printout will not dereference freed memory.
Detailed revision comments:
r2744 | marko | 2008-10-09 10:53:09 +0300 (Thu, 09 Oct 2008) | 5 lines
branches/5.1: ha_innobase::delete_all_rows(): In response to a user asking
<http://forums.innodb.com/read.php?4,215,215> why DELETE FROM t is not
mapped to TRUNCATE TABLE t as it is in MyISAM, note in a comment that
DELETE is transactional while TRUNCATE is not.
Bug #39939: DROP TABLE/DISCARD TABLESPACE takes long time in buf_LRU_invalidate_tablespace()
Detailed revision comments:
r2742 | inaam | 2008-10-08 22:02:15 +0300 (Wed, 08 Oct 2008) | 11 lines
branches/5.1:
Improve implementation of buf_LRU_invalidate_tablespace by attempting
hash index drop in batches instead of doing it one by one.
Reviewed by: Heikki, Sunny, Marko
Approved by: Heikki
A follow-up fix for Bug 38839, which exposed a pre-existing bug in the
autoinc handling.
Detailed revision comments:
r2722 | sunny | 2008-10-04 02:48:04 +0300 (Sat, 04 Oct 2008) | 18 lines
branches/5.1: This bug has always existed but was masked by other errors. The
fix for bug# 38839 triggered this bug. When the offset and increment are > 1
we need to calculate the next value taking into consideration the two
variables. Previously we simply assumed they were 1 particularly offset was
never used. MySQL does its own calculation and that's probably why it seemed
to work in the past. We would return what we thought was the correct next
value and then MySQL would recalculate the actual value from that and return
it to the caller (e.g., handler::write_row()). Several new tests have been
added that try and catch some edge cases. The tests exposed a wrap around
error in MySQL next value calculation which was filed as bug 39828. The tests
will need to be updated once MySQL fix that bug.
One good side effect of this fix is that dict_table_t size has been
reduced by 8 bytes because we have moved the autoinc_increment field to
the row_prebuilt_t structure. See review-board for a detailed discussion.
rb://3
Send error message to the client when a rollback occurs when trying to get an
autoincrement value. This is related to the fixes for Bug#36411 and
Bug#35498.
Detailed revision comments:
r2721 | sunny | 2008-10-04 02:08:23 +0300 (Sat, 04 Oct 2008) | 6 lines
branches/5.1: We need to send the messages to the client because
handler::get_auto_increment() doesn't allow a way to return the
specific error for why it failed.
rb://18
A follow-up to the previous patch, fix for Bug #39438.
r2720 | vasil | 2008-10-03 19:52:39 +0300 (Fri, 03 Oct 2008) | 8 lines
branches/5.1:
Print a warning if an attempt is made to get the free space for a table
whose .ibd file is missing or the tablespace has been discarded. This is a
followup to r2719.
Suggested by: Inaam
Bug #39438: Testcase for Bug#39436 crashes on 5.1 in fil_space_get_latch
Detailed revision comments:
r2719 | vasil | 2008-10-03 18:17:28 +0300 (Fri, 03 Oct 2008) | 49 lines
branches/5.1:
Fix Bug#39438 Testcase for Bug#39436 crashes on 5.1 in fil_space_get_latch
In ha_innobase::info() - do not try to get the free space for a tablespace
which has been discarded with ALTER TABLE ... DISCARD TABLESPACE or if the
.ibd file is missing for some other reason.
ibd_file_missing and tablespace_discarded are manipulated only in
row_discard_tablespace_for_mysql() and in row_import_tablespace_for_mysql()
and the manipulation is protected/surrounded by
row_mysql_lock_data_dictionary()/row_mysql_unlock_data_dictionary() thus we
do the same in ha_innobase::info() when checking the values of those members
to avoid race conditions. I have tested the code-path with UNIV_DEBUG and
UNIV_SYNC_DEBUG.
rb://20
Reviewed by: Inaam, Calvin
Approved by: Heikki
Bug#38231: Innodb crash in lock_reset_all_on_table() on TRUNCATE + LOCK / UNLOCK
branches/5.1:
Fix Bug#38231 Innodb crash in lock_reset_all_on_table() on TRUNCATE + LOCK / UNLOCK
In TRUNCATE TABLE and discard tablespace: do not remove table-level S
and X locks and do not assert on such locks not being wait locks.
Leave such locks alone.
Approved by: Heikki (rb://14)
Bug #35498: Cannot get table test/table1 auto-inccounter value in ::info
Detailed revison comments:
r2702 | sunny | 2008-09-30 11:41:56 +0300 (Tue, 30 Sep 2008) | 13 lines
branches/5.1: Since handler::get_auto_increment() doesn't allow us
to return the cause of failure we have to inform MySQL using the
sql_print_warning() function to return the cause for autoinc failure.
Previously we simply printed the error code, this patch prints the
text string representing the following two error codes:
DB_LOCK_WAIT_TIMEOUT
DB_DEADLOCK.
Bug#35498 Cannot get table test/table1 auto-inccounter value in ::info
Approved by Marko.
Bug #39483: InnoDB hang on adaptive hash because of out of order ::open() call by MySQL
Detailed revision comments:
r2630 | inaam | 2008-09-16 19:11:26 +0300 (Tue, 16 Sep 2008) | 11 lines
branches/5.1 bug#39483 InnoDB hang on adaptive hash because of out
of order ::open() call by MySQL
Forward port of r2629
Under some conditions MySQL calls ::open with search_latch leading
to a deadlock as we try to acquire dict_sys->mutex inside ::open
breaking the latching order. The fix is to release search_latch.
Reviewed by: Heikki
Bug #38839: auto increment does not work properly with InnoDB after update
Detailed revision comments:
r2609 | sunny | 2008-08-24 01:19:05 +0300 (Sun, 24 Aug 2008) | 12 lines
branches/5.1: Fix for MySQL Bug#38839. Reset the statement level last
value field in prebuilt. This field tracks the last value in an autoincrement
interval. We use this value to check whether we need to update a table's
AUTOINC counter, if the value written to a table is less than this value
then we avoid updating the table's AUTOINC value in order to reduce
mutex contention. If it's not reset (e.g., after a DELETE statement) then
there is the possibility of missing updates to the table's AUTOINC counter
resulting in a subsequent duplicate row error message under certain
conditions (see the test case for details).
Bug #38839 - auto increment does not work properly with InnoDB after update
Bug #37885: row_search_for_mysql may gap lock unnecessarily with SQL comments in query
Detailed revision comments:
r2603 | marko | 2008-08-21 16:25:05 +0300 (Thu, 21 Aug 2008) | 10 lines
branches/5.1: Identify SELECT statements by thd_sql_command() == SQLCOM_SELECT
instead of parsing the query string. This fixes MySQL Bug #37885 without
us having to implement lexical analysis of SQL comments in yet another place.
thd_is_select(): A new predicate.
row_search_for_mysql(): Use thd_is_select().
Approved by Heikki.
Fix race condition which could result in freeing a struct that is
still in use by another thread.
Detailed revision comments:
r2537 | inaam | 2008-07-15 20:46:03 +0300 (Tue, 15 Jul 2008) | 12 lines
branches/5.1 issue# 4
Fixed a timing hole where a thread dropping an index can free the
in-memory index struct while another thread is still using
that structure to remove entries from adaptive hash index belonging
to one of the pages that belongs to the index being dropped.
The fix is to have a reference counter in the index struct and to
wait for this counter to drop to zero beforing freeing the struct.
Reviewed by: Heikki
r2543 | inaam | 2008-07-22 18:57:43 +0300 (Tue, 22 Jul 2008) | 7 lines
branches/5.1:
Removed UNIV_INLINE qualifier from btr_search_info_get_ref_count().
Otherwise compilation failed on non-debug builds.
Pointed by: Vasil
Bug #36149: Read buffer overflow in srv0start.c found during "make test"
Detailed revision comments:
r2485 | vasil | 2008-05-28 16:01:14 +0300 (Wed, 28 May 2008) | 9 lines
branches/5.1:
Fix Bug#36149 Read buffer overflow in srv0start.c found during "make test"
Use strncmp(3) instead of memcmp(3) to avoid reading past end of the string
if it is empty (*str == '\0'). This bug is _not_ a buffer overflow.
Discussed with: Sunny (via IM)
Bug #36819: ut_usectime does not handle errors from gettimeofday
Detailed revision comments:
r2480 | vasil | 2008-05-27 11:40:07 +0300 (Tue, 27 May 2008) | 11 lines
branches/5.1:
Fix Bug#36819 ut_usectime does not handle errors from gettimeofday
by retrying gettimeofday() several times if it fails in ut_usectime().
If it fails on all calls then return error to the caller to be handled
at higher level.
Update the variable innodb_row_lock_time_max in SHOW STATUS output only
if ut_usectime() was successful.
Bug #11894: innodb_file_per_table crashes w/ Windows .sym symbolic link hack
Detailed revision comments:
r2466 | calvin | 2008-05-20 01:37:14 +0300 (Tue, 20 May 2008) | 12 lines
branches/5.1:
Fix Bug#11894 innodb_file_per_table crashes w/ Windows .sym symbolic
link hack
The crash was due to un-handled error 3 (path not found). In the case
of file per table, change the call to os_file_handle_error_no_exit()
from os_file_handle_error(). Also, checks for full path pattern during
table create (Windows only), which is used in symbolic link and temp
table creation.
Approved by: Heikki
Changes to plug.in structure, some INNODB_CFLAGS improvements for better
maintenance, and some comments and whitespace changes.
Detailed revision comments:
r2433 | vasil | 2008-04-30 12:02:35 +0300 (Wed, 30 Apr 2008) | 5 lines
branches/5.1:
Add vim modeline to hint it that plug.in is a config file
so it can be colorized.
r2429 | vasil | 2008-04-30 11:19:06 +0300 (Wed, 30 Apr 2008) | 10 lines
branches/5.1:
* Use INNODB_CFLAGS insead of cluttering CFLAGS with InnoDB specific
flags. CFLAGS are used to compile every file in the MySQL source tree.
* Add INNODB_DYNAMIC_CFLAGS to the flags of the dynamic plugin and use
-prefer-non-pic to make the dynamic plugin faster on i386.
Approved by: Sunny
r2430 | vasil | 2008-04-30 11:48:35 +0300 (Wed, 30 Apr 2008) | 8 lines
branches/5.1:
Use CFLAGS instead of INNODB_CFLAGS to avoid having incompatible flags
inserted in CFLAGS and INNODB_CFLAGS and to avoid compiling mysql and
innodb with different flags.
Discussed with: Sunny
r2431 | vasil | 2008-04-30 11:54:49 +0300 (Wed, 30 Apr 2008) | 4 lines
branches/5.1:
Fix r2430, it should be CFLAGS="$CFLAGS ..." not CFLAGS="..."
r2432 | vasil | 2008-04-30 11:58:38 +0300 (Wed, 30 Apr 2008) | 4 lines
branches/5.1:
Non-functional change: use tabs for indentation in plug.in.
r2436 | vasil | 2008-04-30 19:15:46 +0300 (Wed, 30 Apr 2008) | 7 lines
branches/5.1:
Non-functional white space change in Makefile.am:
Use tabs for indentation and be consistent about spaces around the
equal sign.
Bug #36169: create innodb compressed table with too large row size crashed
Revision comments:
r2422 | vasil | 2008-04-24 16:00:30 +0300 (Thu, 24 Apr 2008) | 11 lines
branches/5.1:
Fix Bug#36169 create innodb compressed table with too large row size crashed
Sometimes it is possible that
row_drop_table_for_mysql(index->table_name, trx, FALSE); is invoked in
row_create_index_for_mysql() when the index object is freed so copy the
table name to a safe place beforehand and use the copy.
Approved by: Sunny
Bug #35537: Innodb doesn't increment handler_update and handler_delete
Detailed revision comments:
r2388 | vasil | 2008-03-27 14:02:34 +0200 (Thu, 27 Mar 2008) | 7 lines
branches/5.1:
Swap the order in which mysql_thd, mysql_query_str and *mysql_query_str
are checked for non-NULL.
Suggested by: Marko
r2421 | calvin | 2008-04-24 15:32:30 +0300 (Thu, 24 Apr 2008) | 6 lines
branches/5.1: Fix bug#35537 - Innodb doesn't increment handler_update
and handler_delete
Add the calls to ha_statistic_increment() in ha_innobase::delete_row()
and ha_innobase::update_row().
parameter innodb_thread_concurrency_timer_based is used to
get this new feature (it is set by default). The new feature
is only available on platforms where atomic instructions are
available.
mysql-test/t/partition.test
sql/ha_partition.cc
Bug#40954: Crash in MyISAM index code with concurrency test using partitioned tables
Problem was usage of read_range_first with an empty key.
Solution was to not to give a key if it was empty. (real author Mattias Jonsson)
storage/archive/archive_reader.c
client/mysqlslap.c
Aligned the copyright texts output from "--version" of tools, to
let internal tools be able to change them if needed.
storage/ndb/test/tools/connect.cpp
storage/ndb/test/run-test/atrt.hpp
Corrected a few GPL headers not restricted to GPL version 2
Makefile.am
Added missing --report-features to the 'test-bt-fast' target
support-files/mysql.spec.sh
Reversed the removal of the "%define license GPL" in as internal
tools depended on it
mmap is slower that caching indeed.
Here the problem is that mmap is used even if --myisam-use-mmap=OFF
solved by checking the flag in ha_myisam::extra() as it is called in
init_read_record()
per-file comments:
storage/myisam/ha_myisam.cc
Bug#40634 table scan temporary table is 4x slower due to mmap instead instead of caching
do nothing for HA_EXTRA_MMAP if no opt_myisam_use_mmap
case and then select
Problem was that the archive share was using a case insensitive
charset when comparing table names
Solution was to use a case sensitive char set when the table
names are case sensitive
The Blackhole engine did not support row-based replication
since the delete_row(), update_row(), and the index and range
searching functions were not implemented.
This patch adds row-based replication support for the
Blackhole engine by implementing the two functions mentioned
above, and making the engine pretend that it has found the
correct row to delete or update when executed from the slave
SQL thread by implementing index and range searching functions.
It is necessary to only pretend this for the SQL thread, since
a SELECT executed on the Blackhole engine will otherwise never
return EOF, causing a livelock.
Bug#37531, Bug#36941, Bug#36941, Bug#36942, Bug#38185.
Also include test case from Bug 34300 which was left out from earlier snapshot
(5.1-ss2387).
Also include fix for Bug #29507, "TRUNCATE shows to many rows effected", since
the fix for Bug 37531 depends on it.
Bug #35602 "Failed to read auto-increment value from storage engine" with
Innodb
The test for REPLACE was an error of ommission since it's classified as
a simple INSERT. For REPLACE statements we don't acquire the special
AUTOINC lock for AUTOINC_NEW_STYLE_LOCKING with this fix.
Bug#36600 and Bug#36793:
Bug #36600 SHOW STATUS takes a lot of CPU in buf_get_latched_pages_number
Fix by removing the Innodb_buffer_pool_pages_latched variable from SHOW
STATUS output in non-UNIV_DEBUG compilation.
Bug #36793 rpl_innodb_bug28430 fails on Solaris
This is a back port from branches/zip. This code has been tested on a
big-endian machine too.
Bug #36278 Data_free in SHOW TABLE STATUS for InnoDB is in kilobytes
Change the fix for Bug 32440 to show bytes instead of kilobytes in
INFORMATION_SCHEMA.TABLES.DATA_FREE.
The problem:
CSV storage engine open function returns success even
thought it failed to open the data file
The fix:
return error
Additional fixes:
added MY_WME to my_open to avoid mysterious error message
free share struct if open the file was unsuccessful
partition is corrupt
The main problem was that ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR
PARTITION took another code path (over mysql_alter_table instead of
mysql_admin_table) which differs in two ways:
1) alter table opens the tables in a different way than admin tables do
resulting in returning with error before it tried the command
2) alter table does not start to send any diagnostic rows to the client
which the lower admin functions continue to use -> resulting in
assertion crash
The fix:
Remapped ALTER TABLE t ANALYZE/CHECK/OPTIMIZE/REPAIR PARTITION to use
the same code path as ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE t.
Adding check in mysql_admin_table to setup the partition list for
which partitions that should be used.
Partitioned tables will still not work with
REPAIR TABLE/PARTITION USE_FRM, since that requires moving partitions
to tables, REPAIR TABLE t USE_FRM, and check that the data still
fulfills the partitioning function and then move the table back to
being a partition.
NOTE: I have removed the following functions from the handler
interface:
analyze_partitions, check_partitions, optimize_partitions,
repair_partitions
Since they are not longer needed.
THIS ALTERS THE STORAGE ENGINE API
"Apply InnoDB snapshot innodb-5.1-ss2438.
Addresses the following bugs:
Change the fix for Bug#32440 to show bytes instead of kilobytes in
INFORMATION_SCHEMA.TABLES.DATA_FREE.
branches/5.1: Fix bug#29507 TRUNCATE shows to many rows effected
In InnoDB, the row count is only a rough estimate used by SQL
optimization. InnoDB is now return row count 0 for TRUNCATE operation.
branches/5.1: Fix bug#35537 - Innodb doesn't increment handler_update
and handler_delete
Add the calls to ha_statistic_increment() in ha_innobase::delete_row()
and ha_innobase::update_row().
Fix Bug#36169 create innodb compressed table with too large row size crash
Sometimes it is possible that
row_drop_table_for_mysql(index->table_name, trx, FALSE); is invoked in
row_create_index_for_mysql() when the index object is freed so copy the
table name to a safe place beforehand and use the copy.
Fix Bug#36434 ha_innodb.so is installed in the wrong directory
Change pkglib_LTLIBRARIES with pkgplugin_LTLIBRARIES which has been
forgotten in this commit: http://lists.mysql.com/commits/40206"
Addresses the following bugs:
Change the fix for Bug#32440 to show bytes instead of kilobytes in
INFORMATION_SCHEMA.TABLES.DATA_FREE.
branches/5.1: Fix bug#29507 TRUNCATE shows to many rows effected
In InnoDB, the row count is only a rough estimate used by SQL
optimization. InnoDB is now return row count 0 for TRUNCATE operation.
branches/5.1: Fix bug#35537 - Innodb doesn't increment handler_update
and handler_delete
Add the calls to ha_statistic_increment() in ha_innobase::delete_row()
and ha_innobase::update_row().
Fix Bug#36169 create innodb compressed table with too large row size crashed
Sometimes it is possible that
row_drop_table_for_mysql(index->table_name, trx, FALSE); is invoked in
row_create_index_for_mysql() when the index object is freed so copy the
table name to a safe place beforehand and use the copy.
Fix Bug#36434 ha_innodb.so is installed in the wrong directory
Change pkglib_LTLIBRARIES with pkgplugin_LTLIBRARIES which has been
forgotten in this commit: http://lists.mysql.com/commits/40206
Remove optimizations on innobase/mem/* to avoid apparent compiler bug which
causes memory overruns. See also bug 19424, and probably bug 36366.
This is done in 5.1+; 5.0 already has this workaround in place.
for ENGINE=MRG_MYISAM (should be optimized out).
Before WL#3281 MERGE engine had the HA_NOT_EXACT_COUNT flag
unset, and it worked with COUNT optimization as desired.
After the removal of the HA_NOT_EXACT_COUNT flag neither
HA_STATS_RECORDS_IS_EXACT (opposite to former HA_NOT_EXACT_COUNT
flag) nor modern HA_HAS_RECORDS flag were not added to MERGE
table flag mask.
1. The HA_HAS_RECORDS table flag has been set.
2. The ha_myisammrg::records method has been overridden to
calculate total number of records in underlying tables.
The problem was that symlink.test failed due to debug assertions or
due to errors emitted for wrong statements (in non-debug builds)
if 6.0 version of server was run with --thread-handling=pool-of-threads
option.
The above problems were caused by that on the one hand code mi_create()
which handles case when error is returned relies on my_errno being set
to appropriate non-0 value, but on the other it has not done this
in case when error was emitted due to discovery that share for table
which we are going to create is already present in the list of open
shares. Running server with pool-of-threads option just exposed this
bug since in this scheduler mode my_errno is reset to 0 when connection
(THD) is reattached to the "real" thread.
This fix ensures that code in mi_create() properly sets my_errno in
the case described above.
Since original reason that caused this bug to be exposed in 6.0 tree
might also under very special conditions lead to incorrect behavior
of earlier versions of server (i.e. to errors emitted for wrong
statements) this patch is also being pushed into 5.1 tree.
No test case is present as this code is already covered by a test
case + pushbuild options combination in 6.0.