Commit graph

223 commits

Author SHA1 Message Date
Marko Mäkelä
9f0c6ffa12 buf_zip_decompress(): Allow BUF_NO_CHECKSUM_MAGIC as the stamped checksum.
buf_page_get_gen(): Assert that buf_zip_decompress() succeeds.
Callers are not prepared for a NULL return value. (Bug #53248)
2010-05-03 15:28:59 +03:00
Marko Makela
068e9a1922 recv_sys_init(), recv_sys_empty_hash(): Shrink recv_sys->addr_hash.
recv_addr_t: Turn space,page_no into bitfields to save space on 64-bit.
This addresses Bug #53122 in the InnoDB Plugin.
2010-04-29 15:37:50 +02:00
Marko Makela
bd17880184 Reduce the next-key locking of READ UNCOMMITTED to match that of
READ COMMITTED in the InnoDB Plugin. (Bug #48607)
2010-04-29 15:27:43 +02:00
Vasil Dimov
792ea1f65c Bug#53046 dict_update_statistics_low can still be run concurrently
on same table

Followup to vasil.dimov@oracle.com-20100428102033-dt3caf531rs3lidr :

Add more asserions, which I forgot.
2010-04-28 13:34:52 +03:00
Vasil Dimov
7cf27d3806 Revert the fix of Bug#38996 Race condition in ANALYZE TABLE
This is branches/zip@r6032 in SVN and _is part_ of
revid:svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6113
in BZR.

This is being reverted because now the code is serialized directly on
index->stat_n_diff_key_vals[] as the fix for
Bug#53046 dict_update_statistics_low can still be run concurrently on same table
goes.
2010-04-28 13:32:00 +03:00
Vasil Dimov
1a4896325d Followup to vasil.dimov@oracle.com-20100428084627-wtrmc66wqvjsdgj7:
Address Marko's suggestions wrt the fix of
Bug#53046 dict_update_statistics_low can still be run concurrently
on same table
2010-04-28 13:20:33 +03:00
Vasil Dimov
90fa66abfd Fix Bug#53046 dict_update_statistics_low can still be run concurrently
on same table

Protect dict_index_t::stat_n_diff_key_vals[] with an array of
mutexes.

Testing: tested all code paths under UNIV_SYNC_DEBUG
for the one in dict_print() one has to enable the InnoDB table monitor:
CREATE TABLE innodb_table_monitor (a int) ENGINE=INNODB;
2010-04-28 11:46:27 +03:00
Marko Mäkelä
67b09e5d29 row_merge_drop_temp_indexes(): Remove a bogus char-to-ulint cast. 2010-04-27 16:47:38 +03:00
Marko Mäkelä
9ed0c744ae lock_rec_queue_validate(): Disable a bogus check that
a transaction that holds a lock on a clustered index record
also holds a lock on the secondary index record.
2010-04-26 16:10:29 +03:00
Marko Mäkelä
0c0a3b9a2d recv_sys_init(): Skip the red-black tree in Hot Backup. 2010-04-26 14:26:09 +03:00
Marko Mäkelä
f499c1102f Merge Vasil Dimov 2010-04-26 Bump InnoDB Plugin version number after 1.0.7 2010-04-26 13:52:15 +03:00
Marko Mäkelä
30b15fae14 row_search_for_mysql(): Never try semi-consistent read in unique searches.
They are only useful in table scans. (Bug #52663)
2010-04-26 13:27:25 +03:00
Vasil Dimov
5d345a9a9a Bump InnoDB Plugin version number after 1.0.7 has been released
in MySQL 5.1.46.
2010-04-26 11:35:57 +03:00
Marko Mäkelä
5571d4aef9 btr_page_split_and_insert(): Silence a compiler warning
about possibly uninitialized variable insert_left.
2010-04-26 10:39:49 +03:00
Marko Mäkelä
4b2b0559ee Correct the definition of DICT_SYS_INDEXES_NAME_FIELD.
When row_merge_drop_temp_indexes() was reworked to drop the indexes
via the data dictionary cache, the code was broken because it would
read the index name from the wrong field.
2010-04-22 12:33:42 +03:00
Marko Mäkelä
d9d61e929e btr_page_split_and_insert(): Avoid an infinite loop. (Bug #52964)
btr_page_tuple_smaller(): New function, refactored from
btr_page_split_and_insert().

btr_page_get_split_rec(): Renamed from btr_page_get_sure_split_rec().
Note that a NULL return may mean that the tuple is to be inserted into
either the lower or upper page, to be determined by btr_page_tuple_smaller().

btr_page_split_and_insert(): When btr_page_get_split_rec() returns NULL,
invoke btr_page_tuple_smaller() to determine which half-page the tuple
belongs to.

Reviewed by Sunny Bains
2010-04-21 21:53:59 +03:00
Marko Mäkelä
c129f738a6 dict_create_index_step(): Be strict about DYNAMIC and COMPRESSED tables.
Bug #50495 is about REDUNDANT and COMPACT tables, after all.
2010-04-21 13:27:23 +03:00
Marko Mäkelä
aa3a0fcbe9 ha_innobase::add_index(): Only check for duplicate indexes
when the data dictionary is locked.
This fixes a UNIV_DEBUG assertion failure in innodb-index.test.
2010-04-21 13:00:29 +03:00
Marko Mäkelä
6a4919d874 dtuple_convert_big_rec(): Store locally any fields whose maximum length
is less than 256 bytes. (Bug #52745)
Add related comments and debug assertions to the "offsets"
functions in rem0rec.c.
Approved by Sunny Bains
2010-04-21 12:50:33 +03:00
Marko Mäkelä
6517c87a02 rec_convert_dtuple_to_rec(): Correct the debug check.
The "extern" accessor functions return zero or nonzero, not 0 or 1.
2010-04-21 12:16:11 +03:00
Marko Mäkelä
d1923d4cb7 rec_convert_dtuple_to_rec(): Add a debug check. 2010-04-21 09:39:16 +03:00
Marko Makela
36ad5f8a4c btr_cur_optimistic_insert(): Remove unused variable "heap". 2010-04-20 23:15:50 +03:00
Marko Makela
10c53c3913 dict_create_index_step(): Invoke dict_index_add_to_cache()
in strict mode only if innodb_strict_mode is set. (Bug #50495)

trx_is_strict(): New function, for checking innodb_strict_mode.
2010-04-20 14:42:22 +03:00
Marko Mäkelä
8b2f33f873 Implement UNIV_BTR_AVOID_COPY, an optimization of page splits. 2010-04-20 11:29:08 +03:00
Marko =?ISO-8859-1?Q?M=E4kel=E4?=
e67b5257a2 Enable UNIV_DEBUG_VALGRIND when HAVE_purify is set. 2010-04-19 13:36:03 +03:00
Marko Makela
3188a795ea storage/innodb_plugin: Relax too strict assertions about prefix
indexed BLOBs for ROW_FORMAT=DYNAMIC and ROW_FORMAT_COMPRESSED tables
(Bug #52746). In these tables, the locally stored prefix of a BLOB can
be as small as 20 bytes (BTR_EXTERN_FIELD_REF_SIZE). ROW_FORMAT=REDUNDANT
and ROW_FORMAT=COMPACT store a prefix of 768 bytes (REC_MAX_INDEX_COL_LEN).

trx_undo_rec_get_col_val(): Relax the ut_ad() assertion and add a
reference to dtuple_convert_big_rec().

trx_undo_rec_get_partial_row(): Relax the ut_a() assertion that
prompted Bug #52746.
2010-04-15 09:01:22 +02:00
Vasil Dimov
164dedbad0 Move the InnoDB Plugin tests from storage/innodb_plugin/mysql-test/ where
they are ignored to a new test suite "innodb_plugin".

Remove a hack in mtr that was deployed to run the builtin InnoDB tests against
the InnoDB Plugin. Also detect if a test is an 'innodb plugin test' and if so
then transparently replace the builtin InnoDB with the InnoDB Plugin.
2010-04-09 15:56:51 +03:00
Vasil Dimov
bb4e5b5484 Merge from innodb-branches-zip 2010-04-07 22:42:25 +03:00
Vasil Dimov
e351c94ab5 Merge from innodb-branches-zip 2010-04-07 22:00:06 +03:00
Vasil Dimov
8bfeb4d181 Repply changes to storage/innodb_plugin/plug.in that were made by MySQL 2010-04-07 21:33:36 +03:00
Vasil Dimov
ebb514f809 Repply changes to storage/innodb_plugin/mysql-test/innodb_bug42101-nonzero-master.opt that were made by MySQL 2010-04-07 21:30:44 +03:00
Vasil Dimov
b844d6acaa Repply changes to storage/innodb_plugin/mysql-test/*.opt that were made by MySQL 2010-04-07 21:17:13 +03:00
Vasil Dimov
5ce66fdde6 Repply changes to storage/innodb_plugin/handler/ha_innodb.cc that were made by MySQL 2010-04-07 20:44:47 +03:00
Vasil Dimov
793a8e95cb Repply changes to storage/innodb_plugin/Makefile.am that were made by MySQL 2010-04-07 20:24:43 +03:00
Vasil Dimov
3c2335be17 Reapply changes to storage/innodb_plugin/CMakeLists.txt that were made by MySQL 2010-04-07 20:21:15 +03:00
Vasil Dimov
c834fa0260 Import branches/zip@r6960 from SVN on top of storage/innodb_plugin 2010-04-07 19:53:14 +03:00
Vasil Dimov
46e5bbaa24 Merge from mysql-5.1-innodb 2010-04-07 15:43:25 +03:00
Sergey Vojtovich
f770db5185 Applying InnoDB snapshot
Detailed revision comments:

r6900 | mmakela | 2010-03-29 13:54:57 +0300 (Mon, 29 Mar 2010) | 5 lines
branches/zip: Merge c6899 from branches/innodb+:

Add debug assertions to track down Bug #52360.
hash_table_t::magic_n: Add HASH_TABLE_MAGIC_N checks, which were fully absent.
ut_hash_ulint(): Assert table_size > 0 before division.
2010-04-01 17:02:01 +04:00
Sergey Vojtovich
7324f7628e Applying InnoDB snapshot
Detailed revision comments:

r6897 | mmakela | 2010-03-29 11:36:19 +0300 (Mon, 29 Mar 2010) | 3 lines
branches/zip: innodb_mutex_show_status(): Fix a condition
that was accidentally negated in r6781, making SHOW ENGINE INNODB MUTEX STATUS
display only locks with no OS waits.
2010-04-01 17:01:43 +04:00
Sergey Vojtovich
a47cb8f055 Applying InnoDB snapshot
Detailed revision comments:

r6891 | vdimov | 2010-03-26 16:19:01 +0200 (Fri, 26 Mar 2010) | 5 lines
Non-functional change: update copyright year to 2010 of the files
that have been modified after 2010-01-01 according to svn.

for f in $(svn log -v -r{2010-01-01}:HEAD |grep "^   M " |cut -b 16- |sort -u) ; do sed -i "" -E 's/(Copyright \(c\) [0-9]{4},) [0-9]{4}, (.*Innobase Oy.+All Rights Reserved)/\1 2010, \2/' $f ; done
2010-04-01 17:01:22 +04:00
Sergey Vojtovich
905c3d993e Applying InnoDB snapshot
Detailed revision comments:

r6875 | vdimov | 2010-03-25 18:18:15 +0200 (Thu, 25 Mar 2010) | 4 lines
branches/zip:

Wrap line at 78 column in ChangeLog.
2010-04-01 17:00:43 +04:00
Sergey Vojtovich
a244b1d34f Applying InnoDB snapshot
Detailed revision comments:

r6874 | vdimov | 2010-03-25 17:17:52 +0200 (Thu, 25 Mar 2010) | 4 lines
branches/zip:

Wrap ChangeLog at 78th column
2010-04-01 17:00:23 +04:00
Sergey Vojtovich
ca7e28039d Applying InnoDB snapshot
Detailed revision comments:

r6873 | vdimov | 2010-03-25 17:06:56 +0200 (Thu, 25 Mar 2010) | 4 lines
branches/zip:

Use Bug#N instead of Bug #N to be consistent with the rest of the fil.
2010-04-01 17:00:03 +04:00
Sergey Vojtovich
7b4858c158 Applying InnoDB snapshot
Detailed revision comments:

r6872 | vdimov | 2010-03-25 17:03:17 +0200 (Thu, 25 Mar 2010) | 4 lines
branches/zip:

Fix ChangeLog - write only the bug title in bugs.mysql.com-related entires.
2010-04-01 16:59:41 +04:00
Sergey Vojtovich
0a5b19e5af Applying InnoDB snapshot
Detailed revision comments:

r6871 | vdimov | 2010-03-25 16:39:44 +0200 (Thu, 25 Mar 2010) | 4 lines
branches/zip:

Whitespace fixup to be consistent with the rest of the file.
2010-04-01 16:58:34 +04:00
Sergey Vojtovich
f2415eb426 Applying InnoDB snapshot
Detailed revision comments:

r6868 | mmakela | 2010-03-25 13:03:08 +0200 (Thu, 25 Mar 2010) | 1 line
branches/zip: page_validate(): Check the buf[] bounds.
2010-04-01 16:58:02 +04:00
Sergey Vojtovich
538d3f2a75 Applying InnoDB snapshot
Detailed revision comments:

r6864 | mmakela | 2010-03-24 14:05:53 +0200 (Wed, 24 Mar 2010) | 1 line
branches/zip: dtype_new_store_for_order_and_null_size(): Add ut_ad() on mtype.
2010-04-01 16:57:39 +04:00
Sergey Vojtovich
64d2ade65d Applying InnoDB snapshot
Detailed revision comments:

r6861 | vdimov | 2010-03-23 19:31:02 +0200 (Tue, 23 Mar 2010) | 36 lines
branches/zip:

Merge joerg@mysql.com-20100322150231-vdq0afbqtmbs6phy from BZR,

Including univ.i before mysql/plugin.h is needed to avoid this
compiler error:

o  This is how gcc puts it:
o  > > ccache /usr/local/gcc-4.3.2/bin/gcc -static-libgcc -DHAVE_CONFIG_H -I. -I../../include -I../../include -I../../include -I../../regex -I./include -I../../sql -I. -I../../zlib    -g -O3 -march=i686   -DUNIV_LINUX -MT libinnobase_a-trx0i_s.o -MD -MP -MF .deps/libinnobase_a-trx0i_s.Tpo -c -o libinnobase_a-trx0i_s.o `test -f 'trx/trx0i_s.c' || echo './'`trx/trx0i_s.c
o  > > In file included from ./include/univ.i:114,
o  > >                  from trx/trx0i_s.c:36:
o  > > ../../include/my_pthread.h:628: error: expected ')' before '*' token
o  > > In file included from ../../include/my_pthread.h:732,
o  > >                  from ./include/univ.i:114,
o  > >                  from trx/trx0i_s.c:36:
o  > > ../../include/mysql/psi/mysql_thread.h💯 error: expected specifier-qualifier-list before 'pthread_rwlock_t'
o  > > ../../include/mysql/psi/mysql_thread.h:116: error: expected specifier-qualifier-list before 'pthread_rwlock_t'
o  > > ../../include/mysql/psi/mysql_thread.h: In function 'inline_mysql_rwlock_init':
o  > > ../../include/mysql/psi/mysql_thread.h:711: error: 'mysql_rwlock_t' has no member named 'm_psi'
o  > > ../../include/mysql/psi/mysql_thread.h:716: error: 'mysql_rwlock_t' has no member named 'm_rwlock'
o  > > .... ((continued))
o  
o  Intel's icc gives slightly clearer messages:
o  > > icc -static-intel -static-libgcc -DHAVE_CONFIG_H -I. -I../../include -I../../include -I../../include -I../../regex -I./include -I../../sql -I. -I../../zlib    -O3 -g -unroll2 -ip -mp -restrict -no-ftz -no-prefetch   -DUNIV_LINUX -MT libinnobase_a-trx0i_s.o -MD -MP -MF .deps/libinnobase_a-trx0i_s.Tpo -c -o libinnobase_a-trx0i_s.o `test -f 'trx/trx0i_s.c' || echo './'`trx/trx0i_s.c
o  > > ../../include/my_pthread.h(628): error: identifier "pthread_rwlock_t" is undefined
o  > >   extern int rw_pr_init(rw_pr_lock_t *);
o  > >                         ^
o  > > 
o  > > ../../include/mysql/psi/mysql_thread.h(100): error: identifier "pthread_rwlock_t" is undefined
o  > >     rw_lock_t m_rwlock;
o  > >     ^
o  > > 
o  > > ../../include/mysql/psi/mysql_thread.h(116): error: identifier "pthread_rwlock_t" is undefined
o  > >     rw_pr_lock_t m_prlock;
o  > >     ^
2010-04-01 16:57:08 +04:00
Sergey Vojtovich
58cb820271 Applying InnoDB snapshot
Detailed revision comments:

r6860 | jyang | 2010-03-23 18:20:36 +0200 (Tue, 23 Mar 2010) | 5 lines
branches/zip: This is patch from Inaam that uses red-black tree
to speed up insertions into the flush_list and thus the recovery
process. The patch has been tested by Nokia.
2010-04-01 16:56:22 +04:00
Sergey Vojtovich
9f0592dd38 Applying InnoDB snapshot
Detailed revision comments:

r6858 | mmakela | 2010-03-23 14:09:24 +0200 (Tue, 23 Mar 2010) | 1 line
branches/zip: innodb_read_ahead_threshold: Add missing space to help string.
2010-04-01 16:55:08 +04:00