Commit graph

68280 commits

Author SHA1 Message Date
Jimmy Yang
b448b5d510 Fix Bug #59390 row_merge_build_indexes() fails to register tmpfd for PFS
rb://582 approved by Marko
2011-01-28 01:38:21 -08:00
Jimmy Yang
df13ee2eb6 Merge from mysql-5.1-innodb to mysql-5.5-innodb 2011-01-28 01:10:40 -08:00
Jimmy Yang
71e8043bae Fix Bug #59465 btr_estimate_number_of_different_key_vals use incorrect offset
for external_size
      
rb://581 approved by Marko
2011-01-28 00:50:10 -08:00
Marko Mäkelä
438888dfeb Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-27 13:30:59 +02:00
Marko Mäkelä
786ac62c82 Bug#59440 Race condition in XA ROLLBACK and XA COMMIT after server restart
trx_get_trx_by_xid(): Invalidate trx->xid after a successful lookup,
so that subsequent callers will not find the same transaction.

The only callers of trx_get_trx_by_xid() will be invoking
innobase_commit_low() or innobase_rollback_trx(), and those code paths
should not depend on trx->xid.

rb://584 approved by Jimmy Yang
2011-01-27 13:27:29 +02:00
Marko Mäkelä
35aba604a0 ibuf_contract_ext(): Remove an #if 0 section of code
that refers to trx_sys_set_ibuf_format().
Change buffer format tagging was never implemented.
2011-01-27 10:12:00 +02:00
Marko Mäkelä
118f6a6327 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-26 10:02:52 +02:00
Sunny Bains
31790d7f6a In sync_close() fix a bug introduced by the fix for Bug #59683 where we iterate
over the mutex list and free each mutex. When UNIV_MEM_DEBUG is defined, we
need skip the hash mutex.

It is a minor bug affecting only UNIV_SYNC_DEBUG builds, found by Michael.
2011-01-26 09:33:59 +11:00
Marko Mäkelä
e44703db76 Bug#59585 Fix 58912 introduces compiler warning
due to potentially uninitialized variable

row_upd_changes_ord_field_binary(): Initialize dfield_len to suppress the
warning. The compiler cannot know that row_ext_lookup() does initialize
dfield_len for us, as it is defined in a different module.
2011-01-25 15:43:08 +02:00
Marko Mäkelä
12a54ac5d7 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-25 12:35:35 +02:00
Marko Mäkelä
896e0ba4e0 Bug#59486 Incorrect usage of UNIV_UNLIKELY() in mlog_parse_string()
mlog_parse_string(): Enclose the comparison in UNIV_UNLIKELY,
not the comparand.
2011-01-25 12:17:28 +02:00
Marko Mäkelä
46b7ef6991 Bug#59464 Race condition in row_vers_build_for_semi_consistent_read
row_vers_build_for_semi_consistent_read(): Dereference version_trx before
releasing kernel_mutex, but not thereafter.
2011-01-25 11:54:50 +02:00
Marko Mäkelä
41375b0fa4 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-25 10:51:13 +02:00
Marko Mäkelä
60a622d1c1 Bug#59707 Unused compression-related parameters in buffer pool functions
buf_block_alloc(): ulint zip_size is always 0.
buf_LRU_get_free_block(): ulint zip_size is always 0.
buf_LRU_free_block(): ibool* buf_pool_mutex_released is always NULL.

Remove these parameters.

buf_LRU_get_free_block(): Simplify the initialization of block->page.zip
and release buf_pool_mutex() earlier.
2011-01-25 09:56:18 +02:00
Sunny Bains
7f7e934f23 Fix Bug #59683 :InnoDB latch deadlock detector/violation debug code is very slow
There are two main pain points, one is lookup by thread id for sync_thread_t
and the other is to do a lookup  by latch or level in sync_thread_t::levels.
Changed the sync_thread_t::levels lookup and reserve operation from O(N)
to O(1).

Pure lookups are still O(N), the main change for pure lookup is that we no
longer need to search up to SYNC_THREAD_N_LEVELS but only up to the number
of slots actually ever used ie. it is possible some were used in the past
but are now on the free list. If the in_use count drops to 0 we reset the
free list too.

Overload the sync_level_t::level field to track the free list. If
sync_thread_t::latch == NULL then sync_thread_t::level contains the ordinal
value of the previous free entry.

rb://580 Approved by Jimmy Yang.
2011-01-25 18:25:36 +11:00
Vasil Dimov
e8bc965a38 Merge mysql-5.1-innodb -> mysql-5.5-innodb 2011-01-24 09:43:50 +02:00
Vasil Dimov
214ade1149 Merge mysql-5.5 -> mysql-5.5-innodb 2011-01-24 09:42:07 +02:00
Vasil Dimov
cad4ba1955 Merge mysql-5.1 -> mysql-5.1-innodb 2011-01-24 09:40:37 +02:00
unknown
494e67d3c5 Manual Merge. 2011-01-24 11:52:29 +08:00
unknown
49b7a1f48d Postfix BUG#58546
Updated Copyright.
2011-01-24 11:48:54 +08:00
Martin Hansson
42afa4c934 Merge. 2011-01-20 13:28:11 +01:00
Martin Hansson
b6b22911c4 Merge. 2011-01-20 09:25:17 +01:00
Martin Hansson
cc7b6f1645 Merge. 2011-01-20 09:19:45 +01:00
Martin Hansson
4073411145 Merge of fix for Bug#59173. 2011-01-19 15:12:43 +01:00
Martin Hansson
03db0de64f Bug#59173: Failure to handle DATE(TIME) values where Year, Month or Day is
ZERO
      
When dates are represented internally as strings, i.e. when a string constant
is compared to a date value, both values are converted to long integers,
ostensibly for fast comparisons. DATE typed integer values are converted to
DATETIME by multiplying by 1,000,000 (each digit pair representing hour,
minute and second, respectively). But the mechanism did not distuinguish
cached INTEGER values, already in correct format, from newly converted
strings.

Fixed by marking the INTEGER cache as being of DATETIME format.
2011-01-19 15:09:32 +01:00
Alexander Barkov
dfb7930b33 Merging Copyright update from 5.1 2011-01-19 16:31:17 +03:00
Alexander Barkov
435289acd4 Updating Copyright information 2011-01-19 16:17:52 +03:00
Bjorn Munch
359fe5ec6c null upmerge 2011-01-19 13:16:45 +01:00
Bjorn Munch
7a2050c505 merge from 5.5-mtr 2011-01-19 12:56:17 +01:00
Bjorn Munch
1614c92709 merge from 5.1-mtr 2011-01-19 12:55:37 +01:00
Bjorn Munch
ebb96d947a null upmerge 2011-01-19 12:02:30 +01:00
Bjorn Munch
489bbe30c6 merge from 5.5 main 2011-01-19 11:21:20 +01:00
Bjorn Munch
65d6cf7946 merge from 5.1 main 2011-01-19 11:19:54 +01:00
Libing Song
76d2e22209 Automerge 2011-01-19 01:57:58 +08:00
Anitha Gopi
fb7a2a0075 automerge 2011-01-18 23:33:02 +05:30
Anitha Gopi
a481d70a6e Bug#47449: This problem not seen in PB2. Remove from experimental group 2011-01-18 23:21:39 +05:30
Libing Song
16c0933916 Manual merge 2011-01-19 01:38:10 +08:00
Libing Song
77bc81b89c Bug#58546 test rpl_packet timeout failure sporadically on PB
rpl_packet got a timeout failure sporadically on PB when stopping
slave. The real reason of this bug is that STOP SLAVE stopped
IO thread first and then stopped SQL thread. It was
possible that IO thread stopped after replicating part of a
transaction which SQL thread was executing. SQL thread would
be hung if the transaction could not be rolled back safely.
            
After this patch, STOP SLAVE will stop SQL thread first and then stop IO
thread, which guarantees that IO thread will fetch the reset of the
events of the transaction that SQL thread is executing, so that SQL
thread can finish the transaction if it cannot be rolled back safely.
            
Added below auxiliary files to make the test code neater.
restart_slave_sql.inc
rpl_connection_master.inc
rpl_connection_slave.inc
rpl_connection_slave1.inc
2011-01-19 01:23:49 +08:00
John H. Embretsen
4bdfcf59f2 Post push test fix for show_check.test.
Fix for bug#45740 introduced test case using SHOW TABLE STATUS against a Memory table using latin1 character in table name.
The test failed on Windows and FreeBSD due to a difference in the value for Avg_row_length.
The average row length normally depends on the values for data length and row count. According to the 5.5 manual data length is approximate with Memory tables.
With MyISAM and InnoDB the Avg_row_length is the same on Windows and Solaris.
The solution implemented by this patch is to mask out the value for Avg_row_length, as it may vary when using Memory tables.
2011-01-18 13:04:17 +01:00
Bjorn Munch
95a8cc0204 upmerge undo of 59063 2011-01-18 12:39:23 +01:00
Bjorn Munch
00a6d119ea Bug #59063 rpl_migration_crash_safe fails on Windows
Undoing the patch, it complicates the code but is not the solution

I do not beleive newline mismatch could be the cause of this failure
First, I cannot see how this could be a problem, mtr ignores the newline
  when reading the expect file, and the file is written and read on Windows.
Second, if this really was the problem it should have been deterministic:
  either the newline is correctly interepreted or it is not.
2011-01-18 12:25:07 +01:00
Bjorn Munch
96adf25850 oops forgot one file in last commit 2011-01-18 12:11:52 +01:00
Bjorn Munch
b470674070 Some more copyright fixes in mtr 2011-01-18 12:06:25 +01:00
Bjorn Munch
6579abf3bb Some more copyright fixes in mtr 2011-01-18 12:01:40 +01:00
Marko Mäkelä
ba5bc8a1ca Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-18 12:30:33 +02:00
Marko Mäkelä
359bddbee1 Bug#59579 rw_lock_debug_print outputs to stderr
rw_lock_debug_print(): Add parameter FILE* for specifying the output stream.
rw_lock_list_print_info(): Invoke rw_lock_debug_print() on file, not stderr.
2011-01-18 12:25:13 +02:00
Bjorn Munch
d651529112 Fixed copyright headers in mtr src files 2011-01-18 11:21:37 +01:00
Bjorn Munch
5a85609d6b Fixed copyright headers in mtr src files 2011-01-18 11:03:44 +01:00
Alexander Barkov
daf602a223 Merging from 5.1. 2011-01-18 09:50:03 +03:00
Alexander Barkov
5574a2cd91 Bug#44332 my_xml_scan reads behind the end of buffer
Problem: the scanner function tested for strings "<![CDATA[" and
"-->" without checking input string boundaries, which led to valgrind's
"Conditional jump or move depends on uninitialised value(s)" error.

Fix: Adding boundary checking.

  @ mysql-test/r/xml.result
  @ mysql-test/t/xml.test
  Adding test

  @ strings/xml.c
  Adding a helper function my_xml_parser_prefix_cmp(),
  with input string boundary check.
2011-01-18 09:38:41 +03:00