Commit graph

65601 commits

Author SHA1 Message Date
Alexander Nozdrin
90343dd788 Auto-merge from mysql-trunk-bugfixing. 2010-06-10 18:00:32 +04:00
Alexander Nozdrin
14182ec917 Revert a patch for Bug#54334 (Double initialization of mysys mutexes).
Revision ID of the patch: marc.alff@oracle.com-20100608124148-lr1ult7lwo75niev
2010-06-10 17:44:19 +04:00
Tor Didriksen
ce5927dc89 Merge fix for Bug#53303 from 5.1-bugteam
text conflict: unittest/examples/Makefile.am
2010-06-10 13:21:35 +02:00
Tor Didriksen
a24df71e95 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)


unittest/examples/Makefile.am:
  Omit core-t, since it will always fail.
unittest/examples/no_plan-t.c:
  Comment that we recommend calling plan(NO_PLAN)
unittest/mytap/tap.c:
  Use the named constant NO_PLAN
  Flush all output.
unittest/mytap/tap.h:
  Change documentation for the plan() function.
2010-06-10 13:15:35 +02:00
Alexander Nozdrin
3b3de28816 Auto-merge from mysql-trunk-bugfixing. 2010-06-10 14:38:32 +04:00
Davi Arnaut
517bee4d28 Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-06-09 21:41:40 -03:00
Davi Arnaut
34ceaa6a3d Merge of mysql-5.0-bugteam into mysql-5.1-bugteam. 2010-06-09 21:36:20 -03:00
Davi Arnaut
41297909ad 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.

extra/yassl/include/lock.hpp:
  Move windows.h inclusion into the global namespace.
2010-06-09 21:30:41 -03:00
Georgi Kodinov
344127f371 merge 2010-06-09 11:41:24 +03:00
Georgi Kodinov
04f4786c08 Merge 2010-06-09 11:29:27 +03:00
Davi Arnaut
60153dd36e Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-06-08 20:44:25 -03:00
Davi Arnaut
75a18e24fa Merge of mysql-5.0-bugteam into mysql-5.1-bugteam.
config/ac-macros/ssl.m4:
  Enable yaSSL thread safety if linking with the server or a
  thread safe client library. Avoids building a thread safe
  yaSSL when only building a non-thread safe client library.
2010-06-08 18:14:18 -03:00
Davi Arnaut
51e90dc79e Bug#53906: Stray semicolon in my_sys.h corrupts macro function definition of MY_INIT
include/my_sys.h:
  Remove stray semicolon.
2010-06-08 16:20:54 -03:00
Davi Arnaut
e3d9ac5262 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.

config/ac-macros/yassl.m4:
  Enable yaSSL thread safety if linking with the server or a
  thread safe client library. Avoids building a thread safe
  yaSSL when only building a non-thread safe client library.
extra/yassl/CMakeLists.txt:
  Always enable for Windows builds.
extra/yassl/certs/ca-cert.pem:
  New certificate, previous one expired.
extra/yassl/certs/client-cert.der:
  New certificate, previous one expired.
extra/yassl/certs/client-cert.pem:
  New certificate, previous one expired.
extra/yassl/certs/dsa-cert.pem:
  New certificate, previous one expired.
extra/yassl/certs/server-cert.pem:
  New certificate, previous one expired.
extra/yassl/include/lock.hpp:
  Rename MULTI_THREAD to YASSL_THREAD_SAFE.
extra/yassl/src/Makefile.am:
  Use CXXFLAGS to set thread related definitions as the lock header
  (lock.hpp) has no local dependencies.
extra/yassl/src/lock.cpp:
  Rename MULTI_THREAD to YASSL_THREAD_SAFE.
extra/yassl/taocrypt/CMakeLists.txt:
  Always enable for Windows builds.
extra/yassl/taocrypt/benchmark/Makefile.am:
  Pass thread related CXXFLAGS.
extra/yassl/taocrypt/src/Makefile.am:
  Pass thread related CXXFLAGS.
extra/yassl/taocrypt/test/Makefile.am:
  Pass thread related CXXFLAGS.
extra/yassl/taocrypt/test/memory.cpp:
  Rename MULTI_THREAD to YASSL_THREAD_SAFE.
extra/yassl/testsuite/Makefile.am:
  Pass thread related CXXFLAGS.
2010-06-08 10:36:47 -03:00
Marc Alff
be9c400638 Bug#54334 Double initialization of mysys mutexes
Prior to this fix, mysys mutexes such as THR_LOCK_lock could be initialized
twice by a call to my_init().
The root cause was out of place initialization in my_basic_init(),
calling my_thread_global_init().

With this fix,
- my_basic_init() properly initializes the mutex implementation itself,
for SAFE or FAST mutexes, and for platform dependent initializations,
before initialiazing a mutex.
- my_init() properly initializes mysys mutexes once,
when making the first call to my_thread_global_init().
2010-06-08 06:41:48 -06:00
Kristofer Pettersson
e484e89d3d automerge 2010-06-08 13:50:54 +02:00
Kristofer Pettersson
f6b5b29730 Automerge 2010-06-08 12:19:20 +02:00
Georgi Kodinov
419e3853ab Addendum to merge of Bug#52315 to mysql-trunk-merge :
Fixed the failing sys_vars.timestamp_basic.test by 
not re-calculating the value of the system variable at
check time.
2010-06-08 13:17:46 +03:00
Kristofer Pettersson
fd674a938c merge 5.1-bugteam => trunk-merge 2010-06-08 12:17:07 +02:00
Kristofer Pettersson
cf2e7c770c 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
a16f4eeea7 5.1-bugteam->trunk-merge merge 2010-06-08 10:47:23 +04:00
Sergey Glukhov
81e6a98250 5.0-bugteam->5.1-bugteam merge 2010-06-08 10:28:30 +04:00
Sergey Glukhov
66c621ba3b 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.


mysql-test/r/func_isnull.result:
  test case
mysql-test/t/func_isnull.test:
  test case
sql/item_cmpfunc.h:
  set brackets in the right place.
2010-06-08 10:22:40 +04:00
unknown
a961688d2e Postfix for bug49741 2010-06-08 10:27:34 +08:00
Georgi Kodinov
c444c4f56f merge and typo fix 2010-06-07 13:37:11 +03:00
Georgi Kodinov
e1e3293da5 merge 2010-06-07 13:01:54 +03:00
Georgi Kodinov
df088b8de2 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
Alexander Nozdrin
f29d24b0f8 Manual merge from mysql-trunk-bugfixing.
Conflicts:
  - BUILD/SETUP.sh
  - mysql-test/mysql-test-run.pl
  - mysql-test/r/partition_error.result
  - mysql-test/t/disabled.def
  - mysql-test/t/partition_error.test
  - sql/share/errmsg-utf8.txt
2010-06-07 12:47:04 +04:00
Davi Arnaut
60a9d9bbb9 Post-merge fix: header is used by the client API. Obvious in retrospect.
Also, update a few cases missed by the initial patch.

client/mysqltest.cc:
  Remove trailing comma.
include/my_alloc.h:
  Do not use wrapper.
include/mysql.h.pp:
  Update ABI file.
plugin/semisync/semisync_master.h:
  Initialize variable.
sql/debug_sync.cc:
  Use C linkage.
2010-06-05 16:39:03 -03:00
Ramil Kalimullin
9b5312db1d Automerge. 2010-06-04 22:09:10 +04:00
Ramil Kalimullin
44fc4b8b38 Automerge. 2010-06-04 22:01:27 +04:00
Ramil Kalimullin
9a38126497 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.


sql/sql_connect.cc:
  Fix for bug #53912: Fails to build from source
    - hide net.skip_big_packet for the embedded server,
  as it isn't defined there.
2010-06-04 21:58:41 +04:00
Georgi Kodinov
86dc0f5785 merge 2010-06-04 19:09:50 +03:00
Georgi Kodinov
ac738d8265 merge 2010-06-04 17:10:22 +03:00
Georgi Kodinov
121e04732e 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
517f586762 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
ef0200bd49 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
aad9408658 BUG 53893: Automerged from mysql-5.1-bugteam-gca into mysql-trunk-merge.
Post-push fix.
2010-06-04 00:47:30 +01:00
Luis Soares
1b61dcf434 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
745d2141ba Don't enable safemalloc for valgrind builds, it's too slow. 2010-06-03 09:54:37 -03:00
Horst.Hunger
5c6a9a5f6f Patch for bug#52913 including all review results and changes of date format. 2010-06-03 10:31:26 +02:00
Luis Soares
d9c910b008 BUG 53893: automerged from mysql-5.1-bugteam into mysql-trunk-merge. 2010-06-03 00:08:35 +01:00
Luis Soares
20fc48fc38 BUG 53893: automerged bug branch into mysql-5.1-bugteam latest. 2010-06-03 00:04:27 +01:00
Luis Soares
1b27674429 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
ec6285d5f7 BUG 54161: automerged mysql-5.1-bugteam into mysql-trunk-merge. 2010-06-02 13:16:47 +01:00
Luis Soares
f448197d64 BUG 54161: automerged bzr bundle from bug report. 2010-06-02 13:13:30 +01:00
Luis Soares
1d9ab18a1a 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
e90af219d2 Manual merge from mysql-5.1-bugteam to mysql-trunk-merge.
conflicts:
   conflict      configure.in
2010-06-02 14:01:26 +04:00
Alexey Kopytov
40d4c07cd0 Automerge. 2010-06-02 13:54:40 +04:00
Georgi Kodinov
fb4c786e2f merge mysql-5.1-bugteam to mysql-trunk-merge 2010-06-01 15:31:37 +03:00