Commit graph

63767 commits

Author SHA1 Message Date
Mattias Jonsson
4e47db3af4 merge 2011-01-26 16:50:21 +01:00
Mattias Jonsson
15f635fdf6 merge 2011-01-26 16:34:34 +01:00
Ramil Kalimullin
d95d1c96d9 Auto-merge 2011-01-26 15:55:45 +03:00
Ramil Kalimullin
6f15670a9f Null-merge from mysql-5.0 (backported fix for #47811 null-merged). 2011-01-26 15:54:18 +03:00
Ramil Kalimullin
4eb7054598 Bug #47811 : remove the non-default alignment specification.
Fix backported from to 5.0.
"Remove the alignment option, let valgrind use its default"
2011-01-26 15:49:09 +03:00
Alfranio Correia
5a19661d4f Disabled rpl_row_until and rpl_stm_until due to BUG#59543. 2011-01-26 12:37:24 +00:00
Libing Song
1912894672 Null Merge. 2011-01-26 15:32:41 +08:00
Libing Song
c895aba35c Postfix bug#49124
Updated the copyright.
2011-01-26 15:30:06 +08:00
Karen Langford
a3acdfacd1 Updating header copyright/README in source for 2011 2011-01-25 15:42:40 +01:00
Bjorn Munch
fe91320f9c merge 59063 2011-01-25 14:44:26 +01:00
Marko Mäkelä
5f20aa2b4f 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
Bjorn Munch
60faa02188 merge from 5.1 main 2011-01-25 13:07:23 +01:00
Marko Mäkelä
a1e4785a83 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ä
939088d37f 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ä
c6ee56667c 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
Sandeep Doddaballapur
ae789b6ec8 2011-01-25 12:14:28 +05:30
Mattias Jonsson
fd5782dca7 Bug#59297: Can't find record in 'tablename' on update inner join
Regression introduced in bug#52455. Problem was that the
fixed function did not set the last used partition variable, resulting
in wrong partition used when storing the position of the newly
retrieved row.

Fixed by setting the last used partition in ha_partition::index_read_idx_map.
2011-01-24 13:41:44 +01:00
Vasil Dimov
9395126ec4 Merge mysql-5.1 -> mysql-5.1-innodb 2011-01-24 09:40:37 +02:00
245c3f497a Postfix BUG#58546
Updated Copyright.
2011-01-24 11:48:54 +08:00
Bjorn Munch
0850b60759 Bug #59063 rpl_migration_crash_safe fails on Windows
Race condition may occur: mtr sees the .expect file but it's empty
Fix: wait and try again if file is empty
Addendum: try again if line isn't 'wait' or 'restart'
Also added verbose printout of extra restart options
2011-01-21 13:57:21 +01:00
Martin Hansson
9ff1ace7a6 Merge. 2011-01-20 09:25:17 +01:00
Martin Hansson
616e2227cc 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
d967925cfc Updating Copyright information 2011-01-19 16:17:52 +03:00
Bjorn Munch
ff7df1d872 merge from 5.1-mtr 2011-01-19 12:55:37 +01:00
Bjorn Munch
5a9b65cb1e merge from 5.1 main 2011-01-19 11:19:54 +01:00
Mattias Jonsson
28604b18a6 Bug#59418: parts suite have several failures with --embedded-server
The test were using external tools not available for embedded.

Fixed by rewriting the test to not rely on external tools like the mysql-client

Also fixed some non portable --exec commands and replaced #p# to #P# to pass
on windows.
2011-01-18 23:55:39 +01:00
Libing Song
5d75729c92 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
Bjorn Munch
9c7abc2549 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
813af29b73 oops forgot one file in last commit 2011-01-18 12:11:52 +01:00
Bjorn Munch
89aa03aea6 Some more copyright fixes in mtr 2011-01-18 12:01:40 +01:00
Marko Mäkelä
fe09f9e21b 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
097445ebf5 Fixed copyright headers in mtr src files 2011-01-18 11:03:44 +01:00
Alexander Barkov
cf0e22fe75 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
f25ab9fe22 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
Alexander Barkov
18e4f23a88 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ä
30fbb1515b 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
Alexander Barkov
1c9515f616 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
21a60acb77 merge from 5.1 main 2011-01-17 10:28:53 +01:00
Nirbhay Choubey
44d23cdbc0 Bug#58221 : mysqladmin --sleep=x --count=x keeps looping
When mysqldadmin is run with sleep and count options,
it goes into an infinite loop and keeps executing the
specified command.

This happened because the statement, responsible for
decrementing the count value, was missing.

Fixed by adding a statement which will decrement the
count value for each iteration.
2011-01-16 02:04:08 +05:30
3827783582 Null merge from 5.0
It is a backported patch.
2011-01-15 13:51:41 +08:00
ade1c74b3f BUG#49124 Security issue with /*!-versioned */ SQL statements on Slave
Backport to 5.0.

/*![:version:] Query Code */, where [:version:] is a sequence of 5 
digits representing the mysql server version(e.g /*!50200 ... */),
is a special comment that the query in it can be executed on those 
servers whose versions are larger than the version appearing in the 
comment. It leads to a security issue when slave's version is larger 
than master's. A malicious user can improve his privileges on slaves. 
Because slave SQL thread is running with SUPER privileges, so it can
execute queries that he/she does not have privileges on master.
      
This bug is fixed with the logic below: 
- To replace '!' with ' ' in the magic comments which are not applied on
  master. So they become common comments and will not be applied on slave.
      
- Example:
  'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /*!99999 ,(3)*/
   will be binlogged as
  'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /* 99999 ,(3)*/
2011-01-15 13:48:16 +08:00
Alexey Botchkov
0b6925002f Bug#52208 gis fails on some platforms (Solaris, HP-UX, Linux)
IA64 and some other arcitectures use different float rounding mode and
        i find no decent way to make it consistent.
        So the test changed to be insensitive to this.

per-file messages:
  mysql-test/t/gis.test
Bug#52208      gis fails on some platforms (Solaris, HP-UX, Linux)
        --replace_result added
2011-01-15 00:56:09 +04:00
Jimmy Yang
669ce69483 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
John H. Embretsen
4a62ee2c95 Bug#56895 part 2 of 2: Backport of revid holyfoot@mysql.com-20100825135522-8wrjjmvh2u2t0qo6 from mysql-5.5.
Without this patch mysqlhotcopy tests would fail due to not finding the mysqlhotcopy tool in release-like builds.
With this patch the tests would either pass, or fail due to missing Perl modules (see 56817).
Text conflict in mysql-test/mysql-test-run.pl:
 - resolved by using logic from 5.5 to find mysqlhotcopy, the intention of this backport. Changed bindir to basedir.
2011-01-14 17:01:13 +01:00
Nirbhay Choubey
95e07a6fb7 Bug#13618 : mysqldump --xml omits comment on table field
When mysqldump tries to dump information in xml format,
the result does not contain field level comments.

In order to retrieve various informations for a field/column,
mysqldump currently uses 'show fields from <tab>' statement.
The attributes returned by the statement lacks the information
regarding field comments.

Fixed by changing the query to one that probes I_S to retrieve
required field informations, including the field comment.
2011-01-14 19:50:34 +05:30
John H. Embretsen
dc7289128d Bug#56895 part 1 of 2: Backport of revid holyfoot@mysql.com-20100823084827-js10vjuil88je35r from mysql-5.5.
The purpose is to make MTR logic for mysqlhotcopy the same in 5.1 as in 5.5, making it easier to maintain and fix bugs such as 56817.
2011-01-14 14:50:39 +01:00
Sven Sandberg
d3ea6f9bb1 BUG#59063: rpl_migration_crash_safe fails on Windows
Backported the fix to 5.1.
Problem: the auxiliary test files rpl_start_server.inc and rpl_stop_server.inc
write a file that is later read by mtr. The bug was that the file was written
with platform-dependent newline terminators, i.e., \r\n on windows, whereas mtr
only understands \n.
Fix: write the file so that it uses \n on all platforms.
2011-01-14 11:33:12 +01:00
Georgi Kodinov
25071a8ce7 merge 2011-01-13 19:16:35 +02:00
Karen Langford
1e749dbb4b Raise version number after cloning 5.1.55 2011-01-13 14:58:22 +01:00
Luis Soares
e55b6e5767 Automerge from bug branch into latest mysql-5.1. 2011-01-13 11:41:00 +00:00