Commit graph

68266 commits

Author SHA1 Message Date
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
Vinay Fisrekar
377c9661e4 Merge from mysql-5.1 for
sys_vars.innodb_max_dirty_pages_pct_func fails sporadically
2011-01-18 09:30:00 +05:30
Vinay Fisrekar
afa2ec12d0 BUG#58858 : sys_vars.innodb_max_dirty_pages_pct_func fails sporadically
Committing After latest merge.      
Modified check_pct procedure to check return value of wait condition instead 
of calling "dirty_pct".
   
Adding Review comments:
1) Added comment for success variable value
2) Procedure check_pct changed For Adding BOOLEAN input and SELECT QUERY Change
2011-01-18 09:24:52 +05:30
Luis Soares
b36350842c BUG#42879: CHANGE MASTER RELAY_LOG_FILE=path fails on windows
Re-enabling the test case on windows since BUG#12190 has fixed
the issue.
2011-01-17 18:51:01 +00:00
Magnus Blåudd
9cea818e52 mtr.pl fixes for ndb
- Support for graceful shutdown of cluster by using "ndb_mgm -e 'shutdown'"
2011-01-17 15:23:37 +01:00
Magnus Blåudd
31dce0b78d mtr.pl fixes for ndb
- Make it possible to use MTR_MAXNDB to set the upper limit of number of
  parallel ndb test to run.
 - Very useful on machines with many cores and lots of RAM
2011-01-17 15:20:49 +01:00
Magnus Blåudd
159c409ea2 mtr.pl fixes for ndb
-  Find ndbmtd and use it round robin
2011-01-17 15:18:44 +01:00
Marko Mäkelä
3d1f298657 Merge from mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-17 14:11:43 +02:00
Alexander Barkov
6665ca25af Bug#58371 Assertion failed: !s.uses_buffer_owned_by(this) with format string function
Introduced by the fix for bug#44766.

Problem: it's not correct to use args[0]->str_value as a buffer,
because args[0] may need this buffer for its own purposes.

Fix: adding a new class member tmp_value to use as return value.

  @ mysql-test/r/ctype_many.result
  @ mysql-test/t/ctype_many.test
  Adding tests

  @ sql/item_strfunc.cc
  Changing code into traditional style:
  use "str" as a buffer for the argument and tmp_value for the result value.

  @ sql/item_strfunc.h
  Adding tmp_value
2011-01-17 15:11:33 +03:00
Marko Mäkelä
1f3975b4f8 Non-functional changes.
Remove the unused data type dict_cluster_t.
Remove a bogus comment about latching order.
2011-01-17 14:06:48 +02:00
Bjorn Munch
761b170e32 null upmerge 2011-01-17 11:01:25 +01:00
Bjorn Munch
919c8126bd merge from 5.5 main 2011-01-17 10:32:16 +01:00
Alexander Barkov
a2850a2f53 Bug#59149 valgrind warnings with "like .. escape .." function
Problem: when processing a query like:
  SELECT '' LIKE '1' ESCAPE COUNT(1);
escape_item->val_str() was never executed and the "escape" class member
stayed initialized, which led to valgrind uninitialized memory error.
      
Note, a query with some tables in "FROM" clause
returns ER_WRONG_ARGUMENTS in the same situation:

   SELECT '' LIKE '1' ESCAPE COUNT(1) FROM t1;
   ERROR 1210 (HY000): Incorrect arguments to ESCAPE

Fix: disallowing using aggregate functions in ESCAPE clause,
even if there are no tables used. There is no much use of that anyway.
2011-01-17 12:30:22 +03:00
Bjorn Munch
8ed50d9972 merge from 5.1 main 2011-01-17 10:28:53 +01:00
John H. Embretsen
8e3dde5e2f Fix for Bug#45730 - Test case disabled in show_check.test due to WL#1324.
Enabled test snippet for bug 4374, tested on Mac OS X 10.6 as well as Solaris.
Moved test snippet to a different place in the file, in order to avoid having 
to save and restore "SET NAMES" setting. New surroundings expect latin1, as is 
used in the testsnippet.

An extra copy of the commented test snippet is removed, a comment is added,
SQL keywords are converted to uppercase, and engine name "heap" is updated to 
"Memory".

Also added Copyright statement and a notice about the file's encoding(s).
2011-01-17 08:12:38 +01:00