Commit graph

62739 commits

Author SHA1 Message Date
Jimmy Yang
c7afb80fe0 Fix Bug #54044 Create temporary tables and using innodb crashes. 2010-06-24 01:20:25 -07:00
Georgi Kodinov
99cfebfd8d merge 2010-06-21 14:49:37 +03:00
Georgi Kodinov
d149274d0f tree name change 2010-06-21 14:09:23 +03:00
Georgi Kodinov
60c828e643 Switched the mailing lists 2010-06-21 14:06:14 +03:00
Ramil Kalimullin
936a2b111a Fix for bug #54393: crash and/or valgrind errors in
mysql_client_binlog_statement

Problem: server may read from unassigned memory performing
"wrong" BINLOG queries.

Fix: never read from unassigned memory.
2010-06-18 21:32:23 +04:00
Joerg Bruehe
218a15b76a Bug#54590 "make_binary_distribution" fails because a command
line exceeds the limit

Upmerge the fix from 5.0 to 5.1
2010-06-17 19:55:21 +02:00
Joerg Bruehe
d4c4bd6e2f Bug#54590 "make_binary_distribution" fails because a command
line exceeds the limit

The number and/or names of our files for the main test suite
(contents of "mysql-test/t/") now exceeds the command line
length limit on AIX.
Solve the problem by using separate "cp" commands for the
various file name extensions.
2010-06-17 19:47:38 +02:00
Joerg Bruehe
92c57e3dc5 Automerge the fix for bug#27072 into 5.1-bugteam 2010-06-17 13:07:33 +02:00
Joerg Bruehe
f21625d77d Fix bug#27072: RPM autostarts the server
This is the fix for 5.1, where only the behaviour on upgrade is changed:
If the server was stopped when the upgrade begins, we assume the
administrator is taking manual action, so we do not start the (new)
server at the end of the upgrade.
We still install the start/stop script, so it will be started on reboot.
2010-06-15 22:27:48 +02:00
Alexey Kopytov
6497bd3784 Backport of the patch for bug52208 to 5.1 since the
root cause of 52208 resulted in another test failure
in 5.1.
2010-06-15 18:29:53 +04:00
Bjorn Munch
bc21a167f6 null upmerge 53424, irrelevant for 5.1 2010-06-15 11:03:52 +02:00
Bjorn Munch
b785819582 Bug #53424 Certain combination of flags give internal error
Reorder code breaks when finding tests skipped due to --skip-rpl etc.
Add simple test that master_opt is non-empty
2010-06-15 11:00:02 +02:00
Bjorn Munch
51a965f371 Upmerge and port 46882 2010-06-14 11:31:22 +02:00
Bjorn Munch
45c5eca0aa Bug #46882 Suite timeout doesn't kill stray processes
Kill mysqltest and call mtr_kill_leftovers() before terminating
2010-06-14 11:26:42 +02:00
Alexey Kopytov
13a43a1aac Addendum for the fix for bug #42064:
In Prepared_statement::prepare() bail out as soon as
parser_state.init() fails, trying to continue leads to crashes.
2010-06-12 09:52:31 +04:00
Alexey Kopytov
08f3b0ab92 Automerge. 2010-06-11 23:44:01 +04:00
Ramil Kalimullin
d4746b8e84 Automerge. 2010-06-11 18:43:36 +04:00
Alexey Kopytov
162e426238 Manual merge from the bugfix tree.
conflicts:
   conflict      sql/sql_parse.cc
2010-06-11 16:52:06 +04:00
Martin Hansson
5bace3f049 Bug#53859: Valgrind: opt_sum_query(TABLE_LIST*, List<Item>&,
Item*) at opt_sum.cc:305
      
Queries applying MIN/MAX functions to indexed columns are
optimized to read directly from the index if all key parts
of the index preceding the aggregated key part are bound to
constants by the WHERE clause. A prefix length is also
produced, equal to the total length of the bound key
parts. If the aggregated column itself is bound to a
constant, however, it is also included in the prefix.

Such full search keys are read as closed intervals for
reasons beyond the scope of this bug. However, the procedure
missed one case where a key part meant for use as range
endpoint was being overwritten with a NULL value destined
for equality checking. In this case the key part was
overwritten but the range flag remained, causing open
interval reading to be performed.

Bug was fixed by adding more stringent checking to the
search key building procedure (matching_cond) and never
allow overwrites of range predicates with non-range
predicates.

An assertion was added to make sure open intervals are never
used with full search keys.
2010-06-11 09:38:29 +02:00
Davi Arnaut
53b8829682 Bug#42733: Type-punning warnings when compiling MySQL --
strict aliasing violations.

One somewhat major source of strict-aliasing violations and
related warnings is the SQL_LIST structure. For example,
consider its member function `link_in_list` which takes
a pointer to pointer of type T (any type) as a pointer to
pointer to unsigned char. Dereferencing this pointer, which
is done to reset the next field, violates strict-aliasing
rules and might cause problems for surrounding code that
uses the next field of the object being added to the list.

The solution is to use templates to parametrize the SQL_LIST
structure in order to deference the pointers with compatible
types. As a side bonus, it becomes possible to remove quite
a few casts related to acessing data members of SQL_LIST.
2010-06-10 17:45:22 -03:00
Davi Arnaut
bb036c93b4 Bug#42733: Type-punning warnings when compiling MySQL --
strict aliasing violations.

Essentially, the problem is that large parts of the server were
developed in simpler times (last decades, pre C99 standard) when
strict aliasing and compilers supporting such optimizations were
rare to non-existent. Thus, when compiling the server with a modern
compiler that uses strict aliasing rules to perform optimizations,
there are several places in the code that might trigger undefined
behavior.

As evinced by some recent bugs, GCC does a somewhat good of job
misoptimizing such code, but on the other hand also gives warnings
about suspicious code. One problem is that the warnings aren't
always accurate, yet we can't afford to just shut them off as we
might miss real cases. False-positive cases are aggravated mostly
by casts that are likely to trigger undefined behavior.

The solution is to start a cleanup process focused on fixing and
reducing the amount of strict-aliasing related warnings produced
by GCC and others compilers. A good deal of noise reduction can
be achieved by just removing useless casts that are product of
historical cruft and are likely to trigger undefined behavior if
dereferenced.
2010-06-10 17:16:43 -03:00
Tor Didriksen
e3b4d33187 Backport of Bug#53303 mytap tests should always have a plan()
The bug was caused by buffered output. Flushing resolved it.
We still recommend to allways call plan().
  
Also fix some compile warnings (formal parameter different from declaration)
2010-06-10 13:15:35 +02:00
Davi Arnaut
2c8fd5fae8 Merge of mysql-5.0-bugteam into mysql-5.1-bugteam. 2010-06-09 21:36:20 -03:00
Davi Arnaut
b564aa92ab Bug#34236: Various possibly related SSL crashes
Addendum: Work around a compilation failure on Windows due to
          windows.h not being added to the global namespace.
2010-06-09 21:30:41 -03:00
Ramil Kalimullin
3058f4a136 Fix for bug #54007: assert in ha_myisam::index_next, HANDLER
Problem: the server missed the fact that one can read from 
2 indexes alternately using HANDLER interface.

Fix: check if the same (initialized) index is involved
reading next/prev values from the index.
2010-06-09 14:45:04 +04:00
Georgi Kodinov
5932330839 Merge 2010-06-09 11:29:27 +03:00
Davi Arnaut
1de997d849 Merge of mysql-5.0-bugteam into mysql-5.1-bugteam. 2010-06-08 18:14:18 -03:00
Davi Arnaut
514e407c44 Bug#53906: Stray semicolon in my_sys.h corrupts macro function definition of MY_INIT 2010-06-08 16:20:54 -03:00
Davi Arnaut
f63046319b Bug#34236: Various possibly related SSL crashes
The problem was that the bundled yaSSL library was being built
without thread safety support regardless of the thread safeness
of the compoments linked with it.

The solution is to enable yaSSL thread safety support if any
component (server or client) is to be built with thread support.

Also, generate new certificates for yaSSL's test suite.
2010-06-08 10:36:47 -03:00
Kristofer Pettersson
8f4a33732a automerge 2010-06-08 13:50:54 +02:00
Kristofer Pettersson
5a570b0f54 Bug#53191 Lock_time in slow log is negative when logging stored routines
Logging slow stored procedures caused the slow log to write 
very large lock times. The lock times was a result of a 
negative number being cast to an unsigned integer.
The reason the lock time appeard negative was because 
one of the measurements points was reset after execution
causing it to change order with the start time of the 
statement.
      
This bug is related to bug 47905 which in turn was 
introduced because of a joint fix for 12480,12481,12482 and 11587.

The fix is to only reset the start_time before any statement
execution in a SP while not resetting start_utime or
utime_after_lock which are used for measuring the 
performance of the SP. Start_time is used to set the
timestamp on the replication event which controlls how
the slave interprets time functions like NOW().
2010-06-08 10:58:19 +02:00
Sergey Glukhov
39065d5105 5.0-bugteam->5.1-bugteam merge 2010-06-08 10:28:30 +04:00
Sergey Glukhov
bc774bd332 Bug#53933 crash when using uncacheable subquery in the having clause of outer query
The problem is in the Item_func_isnull::update_used_tables() function,
bracket is at the wrong place. Because of that isnull item erroneously
is treated as const item. The fix is to set brackets in the right place.
2010-06-08 10:22:40 +04:00
Georgi Kodinov
3617e5a159 merge 2010-06-07 13:01:54 +03:00
Georgi Kodinov
80acd9573f Addendum to the fix for bug #52315: need to set a proper shutdown type
when an out-of-supported-range date is detected.
2010-06-07 12:49:52 +03:00
Ramil Kalimullin
78a9c728fe Automerge. 2010-06-04 22:01:27 +04:00
Ramil Kalimullin
752db5b2e8 Fix for bug #53912: Fails to build from source
NET::skip_big_packet isn't defined for the embedded server,
hide it in such a case.
2010-06-04 21:58:41 +04:00
Georgi Kodinov
1a101920f3 merge 2010-06-04 17:10:22 +03:00
Georgi Kodinov
5321e49da6 Bug #52315: utc_date() crashes when system time > year 2037
Some of the server implementations don't support dates later
than 2038 due to the internal time type being 32 bit.
Added checks so that the server will refuse dates that cannot
be handled by either throwing an error when setting date at 
runtime or by refusing to start or shutting down the server if 
the system date cannot be stored in my_time_t.
2010-06-04 16:21:19 +03:00
Horst.Hunger
dcd9abee2e Patch for bug#52913: Inserted check if mysqlhotcopy script is existing as requested by review. DIsabled the test until bug#54129 will befixed. 2010-06-04 10:53:18 +02:00
Luis Soares
444568e48c BUG 53893: Automerged from mysql-5.1-bugteam-gca into mysql-5.1-bugteam.
Post-push fix.
2010-06-04 00:49:09 +01:00
Luis Soares
ee0738edfe BUG#53893: RBR: nullable unique key can lead to out-of-sync slave
Post-push fix.
  
There was a valgrind issue on the loop that checks whether there
are NULL fields in the UNIQUE KEY or not. In detail, for the last 
iteration the server may read out of the key_part array boundaries,
making valgrind to output warnings.

We fix this by correcting the loop, ie, moving the part that reads
from the key_part to be inside the loop statement block. This way
the assignment is protected by the loop condition.
2010-06-04 00:45:07 +01:00
Davi Arnaut
373f2ed817 Don't enable safemalloc for valgrind builds, it's too slow. 2010-06-03 09:54:37 -03:00
Horst.Hunger
fc1928c8b4 Patch for bug#52913 including all review results and changes of date format. 2010-06-03 10:31:26 +02:00
Luis Soares
0ade82fe03 BUG 53893: automerged bug branch into mysql-5.1-bugteam latest. 2010-06-03 00:04:27 +01:00
Luis Soares
8ce9f9b317 BUG#53893: RBR: nullable unique key can lead to out-of-sync slave
When using Unique Keys with nullable parts in RBR, the slave can
choose the wrong row to update. This happens because a table with
an unique key containing nullable parts cannot strictly guarantee 
uniqueness. As stated in the manual, for all engines, a UNIQUE 
index allows multiple NULL values for columns that can contain 
NULL.

We fix this at the slave by extending the checks before assuming
that the row found through an unique index is is the correct
one. This means that when a record (R) is fetched from the storage
engine and a key that is not primary (K) is used, the server does 
the following: 

 - If K is unique and has no nullable parts, it returns R;
 - Otherwise, if any field in the before image that is part of K
   is null do an index scan;
 - If there is no NULL field in the BI part of K, then return R.

A side change: renamed the existing test case file and added a
test case covering the changes in this patch.
2010-06-02 23:26:12 +01:00
Luis Soares
21634b92e5 BUG 54161: automerged bzr bundle from bug report. 2010-06-02 13:13:30 +01:00
Luis Soares
2a8a739561 BUG#54161: MTR: disabled.def lists don't work with FQ test names
MTR will ignore fully qualified test name entries in disabled.def 
lists. Therefore, it would still run the test case, even if it is
listed.

This patch fix this by extending the check when marking the test
case as disabled to take into consideration not only the cases that
contain the simple test name but also those that contain fully 
qualified test names.
2010-06-02 12:20:43 +01:00
Alexey Kopytov
36d2769928 Automerge. 2010-06-02 13:54:40 +04:00
Georgi Kodinov
6b101d4ffc Bug#40928 : make main.func_str experimental on Solaris 2010-06-01 15:16:35 +03:00