Commit graph

250 commits

Author SHA1 Message Date
Timothy Smith
c36cf42f05 Applying InnoDB snapshot innodb-5.1-ss3603
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
2009-01-12 23:31:05 +01:00
Timothy Smith
2030b8cc09 Applying InnoDB snapshot innodb-5.1-ss3603
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)
2009-01-12 23:28:56 +01:00
Timothy Smith
9b79805805 Applying InnoDB snapshot innodb-5.1-ss3603
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.
2009-01-12 23:27:11 +01:00
Timothy Smith
ab216c8721 Applying InnoDB snapshot innodb-5.1-ss3603
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)
2009-01-12 23:08:22 +01:00
Tatiana A. Nurnberg
a7d03bf4ed Bug#31177: Server variables can't be set to their current values
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.
2009-01-12 06:32:49 +01:00
Timothy Smith
03b790c2a7 Apply InnoDB snapshot innodb-5.1-ss2858, part 15. Fixes
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
2008-12-14 13:59:50 -07:00
Timothy Smith
2ae86017c5 Apply InnoDB snapshot innodb-5.1-ss2858, part 14. Fixes
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.
2008-12-14 13:57:54 -07:00
Timothy Smith
2fb7a53f4d Apply InnoDB snapshot innodb-5.1-ss2858, part 13. Fixes
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
2008-12-14 13:56:33 -07:00
Timothy Smith
3d3487658d Apply InnoDB snapshot innodb-5.1-ss2858, part 12.
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
2008-12-14 13:52:47 -07:00
Timothy Smith
0dece1b2f0 Apply InnoDB snapshot innodb-5.1-ss2858, part 11. White space changes.
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.
2008-12-14 13:52:05 -07:00
Timothy Smith
a751331793 Apply InnoDB snapshot innodb-5.1-ss2858, part 10.
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.
2008-12-14 13:50:41 -07:00
Timothy Smith
80ba0bf66f Apply InnoDB snapshot innodb-5.1-ss2858, part 9. Improve a comment.
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.
2008-12-14 13:48:44 -07:00
Timothy Smith
cc231f988c Apply InnoDB snapshot innodb-5.1-2858, part 8. Fixes
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
2008-12-14 13:47:17 -07:00
Timothy Smith
220ee82cb7 Apply InnoDB snapshot innodb-5.1-2858, part 7.
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
2008-12-14 13:42:37 -07:00
Timothy Smith
968608efb7 Apply InnoDB snapshot innodb-5.1-ss2858, part 6.
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
2008-12-14 13:38:14 -07:00
Timothy Smith
3b4e69ead5 Apply InnoDB snapshot innodb-5.1-ss2858, part 5.
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
2008-12-14 13:34:48 -07:00
Timothy Smith
b3d77069e9 Apply InnoDB snapshot innodb-5.1-ss2858, part 4. Fixes
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
2008-12-14 13:31:13 -07:00
Timothy Smith
cfd1095c79 Apply InnoDB snapshot innodb-5.1-ss2858, part 3.
branches/5.1:

Silence a compilation warning in UNIV_DEBUG.

Approved by:    Marko (via IM)
2008-12-14 13:27:13 -07:00
Timothy Smith
fe769c968e Apply InnoDB snapshot innodb-5.1-ss2858, part 2. Fixes
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)
2008-12-14 13:00:37 -07:00
Timothy Smith
e4591eb25b Apply InnoDB snapshot innodb-5.1-ss2858, part 1. Fixes
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.
2008-12-14 12:37:23 -07:00
Timothy Smith
bc896a54c8 Apply InnoDB snapshot innodb-5.1-ss2637, part 3. Fixes
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
2008-12-14 12:31:26 -07:00
Timothy Smith
fef8e27a79 Apply InnoDB snapshot innodb-5.1-ss2637, part 2. Fixes
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
2008-12-14 12:29:59 -07:00
Timothy Smith
8b0a676eb4 Apply InnoDB snapshot innodb-5.1-ss2637, part 1. Fixes
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.
2008-12-14 12:28:19 -07:00
Timothy Smith
980ec41fe7 Complete application of InnoDB snapshot innodb-5.1-ss2545.
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
2008-12-14 12:25:33 -07:00
Timothy Smith
85b06b4ea9 Complete application of InnoDB snapshot innodb-5.1-ss2485, part 2. Fixes
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)
2008-12-14 12:21:24 -07:00
Timothy Smith
8b88249b0a Complete application of InnoDB snapshot innodb-5.1-ss2485, part 1. Fixes
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.
2008-12-14 12:18:59 -07:00
Timothy Smith
63a5c5708e Complete applying InnoDB snapshot innodb-5.1-ss2479. Fixes
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
2008-12-14 12:15:12 -07:00
Timothy Smith
4e7bc33e0b Completing snapshot innodb-5.1-ss2438, part 3.
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.
2008-12-14 11:54:01 -07:00
Timothy Smith
01710fb472 Completing snapshot innodb-5.1-ss2438, part 2. Fixes
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
2008-12-14 11:26:53 -07:00
Timothy Smith
46c1980538 Completing snapshot innodb-5.1-ss2438, part 1. Fixes
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().
2008-12-14 11:24:16 -07:00
Timothy Smith
d8aa83b270 Cherry-pick some changes from innodb-5.1-ss2545 snapshot. Includes fixes for
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.
2008-08-20 16:18:33 -06:00
Timothy Smith
1999186d89 Cherry-pick one change from innodb-5.1-ss2485 snapshot. Fixes Bug#35602.
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.
2008-08-19 18:40:56 -06:00
Timothy Smith
1a01d6a93b Cherry-pick some changes from innodb-5.1-ss2479 snapshot. Includes fixes for
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.
2008-08-19 18:37:41 -06:00
Timothy Smith
0473a0d670 Cherry-pick one part of innodb-5.1-ss2438 snapshot.
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.
2008-08-19 18:29:46 -06:00
Tatiana A. Nurnberg
5d7c155c6e Bug#36434: ha_innodb.so is installed in the wrong directory
ha_innodb.so was incorrectly installed in the lib/mysql
directory rather than in lib/mysql/plugin.

Amending CS for 31736.
2008-06-19 06:44:22 +02:00
tnurnberg@noir.wlan.koehntopp.de
71fdcc349c revert the following CS on grounds of "right patch, wrong time":
"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"
2008-05-14 10:45:32 +02:00
tsmith@ramayana.hindu.god
5bdd04bffa 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 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
2008-05-10 11:55:53 -06:00
tsmith@ramayana.hindu.god
6265518976 Bug #34297: MySQL Server crashes when processing large table
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.
2008-05-09 00:38:17 -06:00
joerg@debian.(none)
e39ceb99fc Merge debian.(none):/MySQL/M51/mysql-5.1
into  debian.(none):/MySQL/M51/push-5.1
2008-03-28 17:07:56 +02:00
tnurnberg@white.intern.koehntopp.de
a3df2a4cf4 Merge mysql.com:/misc/mysql/mysql-5.1
into  mysql.com:/misc/mysql/mysql-5.1-opt
2008-03-27 23:34:12 +01:00
df@pippilotta.erinye.com
87f5261039 apply snapshot innodb-5.1-ss2387
------------------------------------------------------------------------
r2361 | sunny | 2008-03-12 09:08:09 +0200 (Wed, 12 Mar 2008) | 3 lines
Changed paths:
   M /branches/5.1/include/srv0srv.h
   M /branches/5.1/os/os0file.c
   M /branches/5.1/srv/srv0srv.c
   M /branches/5.1/srv/srv0start.c

branches/5.1: Remove the innodb_flush_method fdatasync option since it was
not being used and there was a potential it could mislead users.

------------------------------------------------------------------------
r2367 | marko | 2008-03-17 10:23:03 +0200 (Mon, 17 Mar 2008) | 5 lines
Changed paths:
   M /branches/5.1/handler/ha_innodb.cc

branches/5.1: ha_innobase::check_if_incompatible_data(): Check
HA_CREATE_USED_ROW_FORMAT before comparing row_type.  Previously,
the comparison was incorrectly guarded by the presence of an
AUTO_INCREMENT attribute.

------------------------------------------------------------------------
r2374 | vasil | 2008-03-18 09:35:30 +0200 (Tue, 18 Mar 2008) | 11 lines
Changed paths:
   M /branches/5.1/dict/dict0dict.c
   A /branches/5.1/mysql-test/innodb_bug35220.result
   A /branches/5.1/mysql-test/innodb_bug35220.test

branches/5.1:

Fix Bug#35220 ALTER TABLE too picky on reserved word "foreign".

In ALTER TABLE, change the internal parser to search for
``FOREIGN[[:space:]]'' instead of only ``FOREIGN'' when parsing
ALTER TABLE ... DROP FOREIGN KEY ...; otherwise it could be mistaken
with ALTER TABLE ... DROP foreign_col;

Approved by:    Heikki

------------------------------------------------------------------------
r2379 | vasil | 2008-03-19 18:48:00 +0200 (Wed, 19 Mar 2008) | 10 lines
Changed paths:
   M /branches/5.1/os/os0file.c

branches/5.1:

Fix Bug#34823:
fsync() occasionally returns ENOLCK and causes InnoDB to restart mysqld

Create a wrapper to fsync(2) that retries the operation if the error is
ENOLCK. Use that wrapper instead of fsync(2).

Approved by:    Heikki

------------------------------------------------------------------------
r2380 | sunny | 2008-03-21 05:03:56 +0200 (Fri, 21 Mar 2008) | 9 lines
Changed paths:
   M /branches/5.1/include/trx0undo.h
   M /branches/5.1/trx/trx0trx.c
   M /branches/5.1/trx/trx0undo.c

branches/5.1: Fix for Bug# 35352. We've added a heuristic that checks
the size of the UNDO slots cache lists (insert and upate). If either of
cached lists has more than 500 entries then we add any UNDO slots that are
freed, to the common free list instead of the cache list, this is to avoid
the case where all the free slots end up in only one of the lists on startup
after a crash.

Tested with test case for 26590 and passes all mysql-test(s).

------------------------------------------------------------------------
r2383 | vasil | 2008-03-26 09:35:22 +0200 (Wed, 26 Mar 2008) | 4 lines
Changed paths:
   M /branches/5.1/include/row0mysql.h

branches/5.1:

Fix typo in comment.

------------------------------------------------------------------------
r2384 | vasil | 2008-03-26 18:26:54 +0200 (Wed, 26 Mar 2008) | 20 lines
Changed paths:
   A /branches/5.1/mysql-test/innodb_bug34300.result
   A /branches/5.1/mysql-test/innodb_bug34300.test
   M /branches/5.1/row/row0sel.c

branches/5.1:

Fix Bug#34300 Tinyblob & tinytext fields currupted after export/import and alter in 5.1

Copy the BLOB fields, that are stored internally, to a safe place
(prebuilt->blob_heap) when converting a row from InnoDB format to
MySQL format in row_sel_store_mysql_rec().

The bug was introduced in:

 ------------------------------------------------------------------------
 r587 | osku | 2006-05-23 15:35:58 +0300 (Tue, 23 May 2006) | 3 lines

 Optimize BLOB selects by using prebuilt->blob_heap directly instead of first
 reading BLOB data to a temporary heap and then copying it to
 prebuilt->blob_heap.
 ------------------------------------------------------------------------

Approved by:    Heikki

------------------------------------------------------------------------
r2386 | vasil | 2008-03-27 07:45:02 +0200 (Thu, 27 Mar 2008) | 22 lines
Changed paths:
   M /branches/5.1/mysql-test/innodb.result

branches/5.1:

Merge change from MySQL (this fixes the failing innodb test):

ChangeSet@1.1810.3601.4, 2008-02-07 02:33:21+04:00, gshchepa@host.loc +9 -0
  Fixed bug#30059.
  Server handles truncation for assignment of too-long values
  into CHAR/VARCHAR/TEXT columns in a different ways when the
  truncated characters are spaces:
  1. CHAR(N) columns silently ignore end-space truncation;
  2. TEXT columns post a truncation warning/error in the
     non-strict/strict mode.
  3. VARCHAR columns always post a truncation note in
     any mode.

  Space truncation processing has been synchronised over
  CHAR/VARCHAR/TEXT columns: current behavior of VARCHAR
  columns has been propagated as standard.

  Binary-encoded string/BLOB columns are not affected.


------------------------------------------------------------------------
r2387 | vasil | 2008-03-27 08:49:05 +0200 (Thu, 27 Mar 2008) | 8 lines
Changed paths:
   M /branches/5.1/row/row0sel.c

branches/5.1:

Check whether *trx->mysql_query_str is != NULL in addition to
trx->mysql_query_str. This adds more safety.

This may or may not fix Bug#35226 RBR event crashes slave.


------------------------------------------------------------------------
2008-03-27 15:13:10 +01:00
tsmith@rhel5-ia64-a.mysql.com
2ff69e74a4 Merge rhel5-ia64-a.mysql.com:/data0/tsmith/51
into  rhel5-ia64-a.mysql.com:/data0/tsmith/build/51
2008-03-27 08:41:25 +01:00
tsmith@rhel5-ia64-a.mysql.com
c82d7ecfee Apply innodb-5.1-ss2360 snapshot
Fixes:
- Bug #34920: auto_increment resets to 1 on foreign key creation
  We need to use/inherit the passed in autoinc counter for ALTER TABLE
  statements too.
2008-03-27 02:40:45 +01:00
gluh@mysql.com/mgluh.(none)
106cd87059 Bug#35406 5.1-opt crashes on select from I_S.REFERENTIAL_CONSTRAINTS
added intialization of f_key_info.referenced_key_name for the case when
referenced table is dropped
2008-03-18 19:42:04 +04:00
jperkin/jonathan@chorlton.adsl.perkin.org.uk
2ebdd5ea2f Merge bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  chorlton.adsl.perkin.org.uk:/Users/jonathan/mysql/bk/build/5.1
2008-03-06 15:13:14 +00:00
iggy@alf.(none)
a54f3995ec Merge bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  alf.(none):/src/mysql-5.1-build_31929
2008-02-21 19:53:37 -05:00
tsmith@ramayana.hindu.god
b8b6c7fcf7 Applied InnoDB snapshot innodb-5.1-ss2298
Fixes the following bugs:

- Bug #33349: possible race condition revolving around data dictionary and repartitioning
  Introduce retry/sleep logic as a workaround for a transient bug
  where ::open fails for partitioned tables randomly if we are using
  one file per table.

- Bug #34053: normal users can enable innodb_monitor logging
  In CREATE TABLE and DROP TABLE check whether the table in question is one
  of the magic innodb_monitor tables and whether the user has enough rights
  to mess with it before doing anything else.

- Bug #22868: 'Thread thrashing' with > 50 concurrent conns under an upd-intensive workloadw
- Bug #29560: InnoDB >= 5.0.30 hangs on adaptive hash rw-lock 'waiting for an X-lock'
  This is a combination of changes that forward port the scalability fix applied to 5.0
  through r1001.
  It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
  scalability fix of 5.0)
  Then it applies r1001 to 5.0 which is the original scalability fix.
  Finally it applies r2082 which fixes an issue with the original fix.

- Bug #30930: Add auxiliary function to retrieve THD::thread_id
  Add thd_get_thread_id() function.  Also make check_global_access() function
  visible to InnoDB under INNODB_COMPATIBILITY_HOOKS #define.
2008-02-19 09:44:09 -07:00
iggy@alf.(none)
18aba8a82c Bug#31929 Windows build fails with >=4 Parallel build threads.
- Add GenError Dependency to storage engines that include 
mysqld_error.h
2008-01-29 21:58:57 -05:00
tsmith@ramayana.hindu.god
54a492ecac Apply innodb-5.1-ss2146 and innodb-5.1-ss2178 snapshots.
Fixes:

Bug #18942: DROP DATABASE does not drop an orphan FOREIGN KEY constraint
  Fix Bug#18942 by dropping all foreign key constraints at the end of
  DROP DATABASE. Usually, by then, there are no foreign constraints
  left because all of them are dropped when the relevant tables are
  dropped. This code is to ensure that any orphaned FKs are wiped too.

Bug #29157: UPDATE, changed rows incorrect
  Return HA_ERR_RECORD_IS_THE_SAME from ha_innobase::update_row() if no
  columns were updated.

Bug #32440: InnoDB free space info does not appear in SHOW TABLE STATUS or I_S
  Put information about the free space in a tablespace in
  INFORMATION_SCHEMA.TABLES.DATA_FREE. This information was previously
  available in INFORMATION_SCHEMA.TABLES.TABLE_COMMENT, but MySQL has
  removed it from there recently.
  The stored value is in kilobytes.
  This can be considered as a permanent workaround to
  http://bugs.mysql.com/32440. "Workaround" becasue that bug is about the
  data missing from TABLE_COMMENT and this is actually not solved.
2008-01-14 22:55:50 -07:00
jperkin/jonathan@chorlton.adsl.perkin.org.uk
e286ac998c Use pkglibdir to simplify pkgplugindir, and fix the path in a
couple of Makefiles.  Continuation of the fix for bug#31736.
2008-01-02 13:00:46 +00:00