Commit graph

134 commits

Author SHA1 Message Date
Sergei Golubchik
0522307ed1 mysql-5.5 merge 2012-06-14 20:05:31 +02:00
Sergei Golubchik
431e042b5d c 2012-05-21 15:30:25 +02:00
Joerg Bruehe
5be07ceadd Merge 5.5.24 back into main 5.5.
This is a weave merge, but without any conflicts.
In 14 source files, the copyright year needed to be updated to 2012.
2012-05-07 22:20:42 +02:00
Yasufumi Kinoshita
96b62513f6 Bug#11758510 (#50723): INNODB CHECK TABLE FATAL SEMAPHORE WAIT TIMEOUT POSSIBLY TOO SHORT FOR BI
Fixed not to check timeout during the check table.
2012-04-27 19:40:12 +09:00
Yasufumi Kinoshita
08e7444e54 Bug#11758510 (#50723): INNODB CHECK TABLE FATAL SEMAPHORE WAIT TIMEOUT POSSIBLY TOO SHORT FOR BI
Fixed not to check timeout during the check table.
2012-04-27 19:38:13 +09:00
Sergei Golubchik
16c5c53fc2 mysql 5.5.23 merge 2012-04-10 08:28:13 +02:00
Georgi Kodinov
9c366f7921 merge mysql-5.5->mysql-5.5-security 2012-03-08 17:19:54 +02:00
Marko Mäkelä
8235c4e161 Merge mysql-5.1 to mysql-5.5. 2012-02-28 14:04:21 +02:00
Annamalai Gurusami
c1615df32c Bug#13635833: MULTIPLE CRASHES IN FOREIGN KEY CODE WITH CONCURRENT DDL/DML
There are two threads.  In one thread, dml operation is going on 
involving cascaded update operation.  In another thread, alter 
table add foreign key constraint is happening.  Under these 
circumstances, it is possible for the dml thread to access a 
dict_foreign_t object that has been freed by the ddl thread.  
The debug sync test case provides the sequence of operations.  
Without fix, the test case will crash the server (because of 
newly added assert).  With fix, the alter table stmt will return 
an error message.  
      
rb:947
approved by Jimmy Yang
2012-02-27 17:23:56 +05:30
Sergei Golubchik
38e3ae155d mysql-5.5 merge 2012-01-16 20:16:35 +01:00
Vasil Dimov
a4fa485f5f Partial fix for Bug#11764622 57480: MEMORY LEAK WHEN HAVING 256+ TABLES
Port vasil.dimov@oracle.com-20111205082900-lx9om1joscejr25e from mysql-trunk
2011-12-29 16:14:45 +02:00
unknown
7532976dd9 Bug #13116225 LIVE DOWNGRADE CRASHES WITH INNODB_PAGE_SIZE=4K
This bug ensures that a live downgrade from an InnoDB 5.6 with WL5756 and
a database created with innodb-page-size=8k or 4k will make a version 5.5
installation politely refuse to start. Instead of crashing or giving some
indication about a corrupted database, it will indicate the page size
difference. 

This patch takes only that part of the Wl5756 patch that is needed to
protect against opening a tablespace that is stamped with a different
page size.

It also contains the change in dict_index_find_on_id_low() just in case
a database with another page size is created by recompiling a pre-WL5756
InnoDB.
2011-12-08 13:32:19 -06:00
Jimmy Yang
8bb893f5c3 Fix Bug #13083023 - 60229: BROKEN COMPATIBILITY: ERROR WHILE CREATE TABLE
WITH FOREIGN KEY CONSTRAI

rb://844 approved by marko
2011-12-07 18:44:52 -08:00
Sergei Golubchik
0e007344ea mysql-5.5.18 merge 2011-11-03 19:17:05 +01:00
Jimmy Yang
07770e7e8e Fix Bug 12922077 - SEGV IN DICT_SET_CORRUPTED_INDEX_CACHE_ONLY(), DROP TABLE
rb://752 approved by Sunny Bains
2011-08-29 02:44:28 -07:00
Jimmy Yang
95fa7fab3b Fix bug #11830883, SUPPORT "CORRUPTED" BIT FOR INNODB TABLES AND INDEXES.
Also addressed issues in bug #11745133, where we could mark a table
corrupted instead of crashing the server when found a corrupted buffer/page
if the table created with innodb_file_per_table on.
2011-08-16 18:07:59 -07:00
Marko Mäkelä
7f03063418 Merge mysql-5.1 to mysql-5.5. Add a test case. 2011-08-15 12:18:34 +03:00
Sergei Golubchik
9809f05199 5.5-merge 2011-07-02 22:08:51 +02:00
Jimmy Yang
9e2b7fa7d5 Implement worklog #5743 InnoDB: Lift the limit of index key prefixes.
With this change, the index prefix column length lifted from 767 bytes
to 3072 bytes if "innodb_large_prefix" is set to "true".

rb://603 approved by Marko
2011-05-31 02:12:32 -07:00
Marko Mäkelä
33a0d8690c A non-functional change related to Bug#11830883
page_rec_write_field(): Renamed from page_rec_write_index_page_no()
and inlined.
2011-05-09 11:12:26 +03:00
Jimmy Yang
7cb397c5e0 Merge from mysql-5.1-innodb to mysql-5.5-innodb 2011-05-04 03:47:30 -07:00
Jimmy Yang
3fa4aaac71 Fix bug #11796673 address backward compatibility on index with
large prefix (>=768). Table with such large prefix index will not
be loaded into memory (for its metadata), unless innodb_force_recovery
is on.

rb://604 Approved by Marko
2011-05-04 03:06:21 -07:00
unknown
6ed10ee5dd Bug#60309 - Bug#12356829: MYSQL 5.5.9 FOR MAC OSX HAS BUG WITH FOREIGN KEY CONSTRAINTS
The innoDB global variable srv_lower_case_table_names is set to the value of lower_case_table_names declared in mysqld.h server in ha_innodb.cc.  Since this variable can change at runtime, it is reset for each handler call to ::create, ::open, ::rename_table & ::delete_table.

But it is possible for tables to be implicitly opened before an explicit handler call is made when an engine is first started or restarted.  I was able to reproduce that with the testcase in this patch on a version of InnoDB from 2 weeks ago.  It seemed like the change buffer entries for the secondary key was getting put into pages after the restart.  (But I am not sure, I did not write down the call stack while it was reproducing.)  In the current code, the implicit open, which is actually a call to dict_load_foreigns(), does not occur with this testcase.

The change is to replace srv_lower_case_table_names by an interface function in innodb.cc that retrieves the server global variable when it is needed.
2011-04-26 12:55:52 -05:00
unknown
08f128f633 Bug#60196 / Bug#11831040
Setting lowercase_table_names to 2 on Windows causing Foreign Key problems

This problem was exposed by the fix for Bug#55222.  There was a codepath in dict0load.c,
dict_load_foreigns() that made sure the table name matched case sensitive in order to
load a referenced table into the dictionary as needed.  If an engine is rebooted which
accesses a table with foreign keys, and lower_case_table_names=2, then the table with
foreign keys will get an error when it is changed (insert/updated/delete).
Once the referenced tables are loaded into the dictionary cache by a select statement
on those tables, the same change would succeed because the affected code path would
not get followed.
2011-03-07 09:42:07 -06:00
Vasil Dimov
0047afa3b2 Merge mysql-5.5-innodb -> mysql-5.5 2011-02-17 13:57:26 +02:00
Jimmy Yang
321b238874 Merge a fix for Bug #53756 ALTER TABLE ADD PRIMARY KEY affects crash recovery
This was already pushed to mysql-5.1-innodb some time ago
(revision id jimmy.yang@oracle.com-20100907054137-tpuior7hez4f5ghl)
but it was not merged to the 5.5 trees.
2011-02-10 00:58:23 -08:00
Jimmy Yang
82d8ca01c8 Fix Bug #59048 truncate table or create index could leave index->page
to be FIL_NULL

rb://545 approved by Sunny Bains
2011-02-09 01:15:06 -08:00
Marko Mäkelä
27fbb7c18c Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-02-08 13:39:24 +02:00
unknown
aff195eb5a Bug#59699 - Hidden bug would cause a crash for unknown tablespace flags.
The bug would cause a crash of InnoDB if a non-standard or unknown table
flags existed in a SYS_TABLES record. This is important because the next
file version, Cheetah, will identify itself by expanding this field.  So
unless this is fixed, an older engine that tries to open a table in a
tablespace with a newer file version will crash instead of report an error
and refuse to open the table, as it should do.

Reviewed at RB://583.    Approved by Marko.
2011-02-04 08:59:30 -06:00
Jimmy Yang
5a0138e250 Merge from mysql-5.1-innodb to mysql-5.5-innodb 2011-01-14 23:24:47 -08:00
Jimmy Yang
9cd4d49840 Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad
"rows examined" estimates". This change implements "innodb_stats_method"
with options of "nulls_equal", "nulls_unequal" and "null_ignored".
      
rb://553 approved by Marko
2011-01-14 09:02:28 -08:00
Vasil Dimov
be01dbf587 Merge mysql-5.5-innodb -> mysql-5.5 2011-02-08 19:28:00 +02:00
Jonathan Perkin
f13788c9fd Merge from mysql-5.5.9-release 2011-02-08 14:59:03 +01:00
Georgi Kodinov
1ecfdbf2bc merge 2011-01-10 15:09:57 +02:00
Jimmy Yang
000bdda32b merge from mysql-5.1-innodb to mysql-5.5-innodb 2011-01-05 05:47:15 -08:00
Jimmy Yang
fe8fbaaddb Fix Bug #59197 double quote in field comment prevents foreign key
constraint creation

rb://557 Approved by Sunny Bains
2011-01-04 22:44:12 -08:00
Jimmy Yang
c143ff4848 Fix Bug #59157 valgrind conditional jump warning from dict_load_foreign.
This is 5.1 built-in specific as the dict_table_t strcture is allocated
with mem_heap_zalloc since 5.1 plugin.

Approved by Sunny Bains
2011-01-04 22:31:46 -08:00
Vasil Dimov
909d7c299c PS-instrument the array of latches (rw locks) dict_table_stats_latches[].
This adds 64 new rows to performance_schema.rwlock_instances.

This patch will make perfschema.binlog_mix perfschema.binlog_row tests fail,
but they will be fixed by http://lists.mysql.com/commits/127862

Approved by:	Jimmy (rb://554)
2011-01-04 11:46:20 +02:00
unknown
5f80beebd0 55222 - Previous patch had a bug in unused code which was reactivated in
mysql-trunk-innodb in rev revno: 3367  Tue 2010-12-07 02:25:25-0800.
The crash happens only when lower_case_table_names=2, such as on MacOS,
when running the new testcase innodb-system-table-view.  Specifically,
it crashes when any query is made against the INFORMATION_SCHEMA.
INNODB_SYS_FOREIGN table.  The function dict_process_sys_foreign_rec()
is only used for displaying SYS_FOREIGN records so it does not need a
lookup version of those names to be allocated. In this patch, those new
function calls are deleted.
2010-12-09 10:42:35 -06:00
Jimmy Yang
9838f48476 Fix Bug #58643 InnoDB: too long table name
rb://531 approved by Sunny Bains
2010-12-05 18:42:23 -08:00
Marko Mäkelä
2a4aca3e68 Fix a compilation error that was introduced in the Bug #55222 fix
(bzr revision id kevin.lewis@oracle.com-20101130182552-hfydggaeeys3tjqx).
2010-12-01 10:36:54 +02:00
unknown
6d1760be87 Fix compiler warning for Bug#55222 patch. 2010-11-30 20:13:02 -06:00
unknown
2dde698e0e Bug#55222 - RB://517 - Approved by Sunny
InnoDB does not attempt to handle lower_case_table_names == 2 when looking
up foreign table names and referenced table name.  It turned that server
variable into a boolean and ignored the possibility of it being '2'.  

The setting lower_case_table_names == 2 means that it should be stored and
displayed in mixed case as given, but compared internally in lower case.
Normally the server deals with this since it stores table names.  But
InnoDB stores referential constraints for the server, so it needs to keep
track of both lower case and given names.

This solution creates two table name pointers for each foreign and referenced
table name.  One to display the name, and one to look it up.  Both pointers
point to the same allocated string unless this setting is 2.  So the overhead
added is not too much.

Two functions are created in dict0mem.c to populate the ..._lookup versions
of these pointers.  Both dict_mem_foreign_table_name_lookup_set() and
dict_mem_referenced_table_name_lookup_set() are called 5 times each.
2010-11-30 12:25:52 -06:00
Jimmy Yang
f64026427e Fix Bug #16290 Unclear error message when adding foreign key constraint
rb://502 approved by Sunny Bains
2010-11-14 23:08:04 -08:00
Vasil Dimov
631b5ef05e Merge mysql-5.1-innodb -> mysql-5.5-innodb 2010-11-11 13:25:35 +02:00
Jimmy Yang
a47989da36 Merge from mysql-5.1-innodb to mysql-5.5-innodb 2010-11-10 21:51:00 -08:00
Vasil Dimov
5bd300084b Merge mysql-5.5-innodb from bk-internal into my local repo 2010-11-10 10:52:45 +02:00
Sergei Golubchik
bc2e383e4a mysql-5.1 -> mysql-5.5 merge 2010-11-05 10:59:51 +01:00
Vasil Dimov
99cd1a616f Merge mysql-5.1-innodb -> mysql-5.5-innodb 2010-11-03 12:07:16 +02:00
Marko Mäkelä
a5352c8970 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2010-11-03 11:25:14 +02:00