Commit graph

58544 commits

Author SHA1 Message Date
Alexander Nozdrin
dcf935a198 Update version. 2009-09-22 18:21:44 +04:00
Bjorn Munch
8ff5366c06 merge from trunk (with trunk-mtr) 2009-09-22 14:39:18 +02:00
Bjorn Munch
3df9e7358e merge from trunk-mtr 2009-09-22 12:52:31 +02:00
unknown
f280974393 Merge from mysql-5.0.86-release 2009-09-21 22:54:39 +02:00
Jonathan Perkin
e465d11383 Merge from mysql-5.1.39-release 2009-09-21 12:10:32 +02:00
Bjorn Munch
bb181d25cb new merge from trunk 2009-09-21 11:43:01 +02:00
Bjorn Munch
4a75d269ce tiny suppression fix: avoid / 2009-09-21 11:28:49 +02:00
Marc Alff
4fa77f94b6 Merge mysql-next-mr (revno 2880) --> mysql-trunk-signal 2009-09-20 22:50:05 -06:00
Alexander Nozdrin
18f7dd0fad Update default.experimental. 2009-09-20 01:09:02 +04:00
Alexander Nozdrin
4d3c995e8b Merge from mysql-trunk. 2009-09-19 13:38:17 +04:00
Alexander Nozdrin
9d8c023859 Mark some tests experimental. 2009-09-19 13:37:22 +04:00
Alexander Nozdrin
ede2edd19b Merge from mysql-5.1. 2009-09-19 13:07:51 +04:00
Alexander Nozdrin
159e42fc08 Merge next-mr -> next-mr-bugfixing. 2009-09-18 19:24:18 +04:00
Alexander Nozdrin
23364d6920 Merge trunk -> trunk-bugfixing. 2009-09-18 19:23:44 +04:00
Alexander Nozdrin
387952e072 Merge trunk -> next-mr. 2009-09-18 19:13:29 +04:00
Bjorn Munch
f89b36fcbf new merge from trunk 2009-09-18 16:44:11 +02:00
Alexander Nozdrin
e60ff2b6a3 Revert InnoDB default values as of the InnoDB plugin 1.0.4. 2009-09-18 17:24:49 +04:00
Alexander Nozdrin
adb4d9c4a6 Merge 5.1-bugteam -> trunk-alik (up to revno:3111). 2009-09-18 10:55:20 +04:00
Alexander Nozdrin
d3502127f3 Null-merge 5.1-bugteam revno:3110 (fix for Bug#44030).
After discussion with Satya this bug does not exist
in trunk.
2009-09-18 10:52:18 +04:00
Marc Alff
9cc6497dae Merge mysql-trunk-mr (revno 2879) --> mysql-trunk-signal 2009-09-18 00:48:01 -06:00
Joerg Bruehe
c78915b218 Fix bug#47137
Solaris binary packages should be compiled with '-g0', not '-g'

The main fix for this is done in the build tools,
but in the sources it affects "configure.in"
which sets "DEBUG_CXXFLAGS" to be used in all debug builds.
2009-09-17 21:50:54 +02:00
Alexander Nozdrin
d35001e742 Merge 5.1-bugteam -> trunk-alik. 2009-09-17 22:00:49 +04:00
Joerg Bruehe
db89051656 Fix bug#46980
Option "--without-server" still not working in 5.1

The general approach is to make sure that source files
which require thread support are only compiled if the build
really needs thread support,
which means when the server is built or a thread-safe client
library.

This required several changes:
- Make sure the subdirectories "storage/" and "plugin/" are
  only processed if the server is built, not ifclient-only.
- Make the compilation of some modules which inherently
  require threading depend on thread supportin the build.
- Separate the handling of threading in "configure.in" from
  that of server issues, threading is also needed in a
  non-server build of a thread-safe client library.

Also, "libdbug" must get built even in a client-only build,
so "dbug/" must be in the list of client directories.

In addition, calls to thread functions in source files which
can be built without thread support must use the wrapper
functions which handle the non-threaded build.
So the modules "client/mysqlimport.c" and "client/mysqlslap.c"
must call "my_thread_end()" only via "mysql_thread_end()".


Makefile.am:
  The directories "storage/" and "plugin/" contain files
  which are needed for the server only, so their contents
  is to be built only if a server is built.
  
  They must not be named unconditionally, because building
  their contents will fail unless threads are enabled.
  
  These directories are now listed in the "configure"
  variable "sql_server_dirs" which becomes part of
  "sql_union_dirs" if the server is to be built.
client/mysqlimport.c:
  Use the wrapper function "mysql_thread_end()" which
  correctly handles the case of a non-threaded build.
client/mysqlslap.c:
  Use the wrapper function "mysql_thread_end()" which
  correctly handles the case of a non-threaded build.
configure.in:
  Various changes to support builds "--without-server":
  
  1) For the unit tests, we need "libdbug".
  
  2) Separate the treatment of the server from that of the
     thread-safe client library.
  
  3) Introduce an "automake conditional" "NEED_THREAD"
     which can be checked in some "Makefile.am".
  
  4) Include "storage/" and "plugin/" in the list of
     "sql_server_dirs" so that they are handled in the
     top "Makefile.am" only if the server is to be built
     (see the change in that file).
mysys/Makefile.am:
  The code of "mf_keycache.c" in 5.1 is no longer safe
  to be built without thread support.
  (In 5.0, this was possible.)
  
  Rather than fix these issues, which is tedious and risky,
  avoid the need to ever build it without thread support:
  It is needed in the server only, which needs thread support.
  
  The only case where we build a "libmysys" without thread
  support is for a non-threaded client, where "mf_keycache"
  is not neded.
  So its inclusion in the list of source files can depend
  on the new conditional "NEED_THREAD".
unittest/mysys/Makefile.am:
  Test program "my_atomic-t" is to verify the correct handling
  of threads only, it cannot be built without thread support
  and is not needed in such cases either.
  
  Let its build depend on the new conditional "NEED_THREAD".
2009-09-17 18:34:24 +02:00
Alexander Nozdrin
1ab3890883 Merge mysql-trunk-build -> mysql-next-mr-alik. 2009-09-17 18:25:44 +04:00
Joerg Bruehe
d040849266 Merge "trunk-build" (including 5.4.2-beta) and "trunk". 2009-09-17 15:29:31 +02:00
Sergey Glukhov
2535ede713 Bug#42364 SHOW ERRORS returns empty resultset after dropping non existent table
additional backport of of bug43138 fix


mysql-test/t/myisam-system.test:
  additional backport of of bug43138 fix
sql/sql_db.cc:
  additional backport of of bug43138 fix
2009-09-17 16:33:23 +05:00
Marc Alff
4336ca4072 fixed tree name 2009-09-17 03:23:05 -06:00
Marc Alff
071634bb35 Merge mysql-next-mr --> mysql-trunk-signal 2009-09-17 03:20:11 -06:00
Satya B
7cf8f7a4bb Applying InnoDB snapshot 5.1-ss5282, Fixes BUG#44030
1. Fixes BUG#44030 - Error: (1500) Couldn't read the MAX(ID) autoinc value 
                     from the index (PRIMARY)

2. Disables the innodb-autoinc test for innodb plugin temporarily.
   The testcase for this bug has different result file for InnoDB plugin.
   Should add the testcase to Innodb suite with a different result file.

Detailed revision comments:

r5243 | sunny | 2009-06-04 03:17:14 +0300 (Thu, 04 Jun 2009) | 14 lines
branches/5.1: When the InnoDB and MySQL data dictionaries go out of sync, before
the bug fix we would assert on missing autoinc columns. With this fix we allow
MySQL to open the table but set the next autoinc value for the column to the
MAX value. This effectively disables the next value generation. INSERTs will
fail with a generic AUTOINC failure. However, the user should be able to
read/dump the table, set the column values explicitly, use ALTER TABLE to
set the next autoinc value and/or sync the two data dictionaries to resume
normal operations.

Fix Bug#44030 Error: (1500) Couldn't read the MAX(ID) autoinc value from the
index (PRIMARY)

rb://118

r5252 | sunny | 2009-06-04 10:16:24 +0300 (Thu, 04 Jun 2009) | 2 lines
branches/5.1: The version of the result file checked in was broken in r5243.

r5259 | vasil | 2009-06-05 10:29:16 +0300 (Fri, 05 Jun 2009) | 7 lines
branches/5.1:

Remove the word "Error" from the printout because the mysqltest suite
interprets it as an error and thus the innodb-autoinc test fails.

Approved by:	Sunny (via IM)
r5466 | vasil | 2009-07-02 10:46:45 +0300 (Thu, 02 Jul 2009) | 6 lines
branches/5.1:

Adjust the failing innodb-autoinc test to conform to the latest behavior
of the MySQL code. The idea and the comment in innodb-autoinc.test come
from Sunny.
2009-09-17 11:59:43 +05:30
Alexander Nozdrin
36499d2101 Merge mysql-trunk-bugfixing -> mysql-next-mr-bugfixing. 2009-09-16 14:11:26 +04:00
Alexander Nozdrin
b93add2065 Fix default.conf 2009-09-16 14:08:43 +04:00
Alexander Nozdrin
c65bfe4564 Merge mysql-trunk -> mysql-next-mr. 2009-09-16 14:04:10 +04:00
Alexander Nozdrin
68fd9874b3 Fix default.conf 2009-09-16 14:02:07 +04:00
Alexander Nozdrin
28eb79ed37 Merge mysql-trunk-bugfixing -> mysql-next-mr-bugfixing. 2009-09-16 11:03:35 +04:00
Ingo Struewing
3449f393e0 auto-merge 2009-09-16 09:01:28 +02:00
Alexander Nozdrin
75bdd4074c Merge mysql-trunk -> mysql-trunk-bugfixing. 2009-09-16 10:55:17 +04:00
Alexander Nozdrin
80c91e4298 Merge from mysql-5.1-bugteam. 2009-09-16 10:52:43 +04:00
Joerg Bruehe
d42364c630 Null-merge a version number change from 5.0 to 5.1 2009-09-15 10:07:57 +02:00
Kristofer Pettersson
7ee331ab5d autocommit 2009-09-15 09:34:30 +02:00
Kristofer Pettersson
d98625d5ca autocommit 2009-09-15 09:33:25 +02:00
Luis Soares
63a81c0994 BUG#47016: rpl_do_grant fails on PB-2 with a failing connect
The test case rpl_do_grant fails sporadically on PB2 with "Access
denied for user 'create_rout_db'@'localhost' ...". Inspecting the
test case, one may find that if issues a GRANT on the master
connection and immediately after it creates two new connections
(one to the master and one to the slave) using the credentials
set with the GRANT.
      
Unfortunately, there is no synchronization between master and
slave after the grant and before the connections are
established. This can result in slave not having executed the
GRANT by the time the connection is attempted.
      
This patch fixes this by deploying a sync_slave_with_master
between the grant and the connections attempt.
2009-09-13 22:43:47 +01:00
Luis Soares
3c916057ad BUG#47014: rpl_drop_temp fails on PB-2 with results mismatch
The test case creates two temporary tables, then closes the
connection, waits for it to disconnect, then syncs the slave with
the master, checks for remaining opened temporary tables on
slave (which should be 0) and finally drops the used
database (mysqltest).
      
Unfortunately, sometimes, the test fails with one open table on
the slave. This seems to be caused by the fact that waiting for
the connection to be closed is not sufficient. The test needs to
wait for the DROP event to be logged and only then synchronize
the slave with the master and proceed with the check. This is
caused by the asynchronous nature of the disconnect wrt
binlogging of the DROP temporary table statement.
      
We fix this by deploying a call to wait_for_binlog_event.inc
on the test case, which makes execution to wait for the DROP
temp tables event before synchronizing master and slave.
2009-09-13 21:52:14 +01:00
Vladislav Vaintroub
12cea944fc fix compile error. definition of VOID in trunk still conflicts with windows headers. that was fixed in 6.0 2009-09-13 19:38:06 +02:00
Mattias Jonsson
23dc8abe2b merge 2009-09-12 00:40:23 +02:00
Vladislav Vaintroub
fc8db5e9ea Downport
WL#1624 -determine MAC addresses on Windows.
Contribution  by Chris Runyan
2009-09-11 22:42:39 +02:00
Vladislav Vaintroub
716099e07c This is the downport of
Bug#24509 - 2048 file descriptor limit on windows needs increasing, also 
WL#3049 - improved Windows I/O
                        
The patch replaces the use of the POSIX I/O interfaces in mysys on Windows with 
the Win32 API calls (CreateFile, WriteFile, etc). The Windows HANDLE for the open 
file is stored in the my_file_info struct, along with a flag for append mode 
because the Windows API does not support opening files in append mode in all cases)
The default max open files has been increased to 16384 and can be increased further
by setting --max-open-files=<value> during the server start.
                              
Another major change in this patch that almost all Windows specific file IO code
has been moved to a new file my_winfile.c, greatly reducing the amount of code 
in #ifdef blocks within mysys, thus improving readability.
                               
                                    
Minor enhancements:
- my_(f)stat() is changed to use __stati64 structure with  64 file size
and timestamps. It will return correct file size now (C runtime implementation
used to report outdated information)
- my_lock on Windows is prepared to handle additional timeout parameter
- after review : changed __WIN__ to _WIN32 in the new and changed code.

client/mysqlbinlog.cc:
  fileno -> my_fileno
client/readline.cc:
  fileno -> my_fileno
include/config-win.h:
  Increase OS_FILE_LIMIT for Windows.
  Remove O_SHARE - Windows does not support it. Its definition conflicts with
  O_SHORT_LIVED, that has different semantics.
include/my_dir.h:
  Use stat64 for stat() family of functions on Windows, because of 64 bit file size.
include/my_global.h:
  Increased default value for open file limit to 16K
include/my_sys.h:
  - my_file_info got new structure members - file handle and open flags
  - 2 new Windows-only mysys functions : my_get_osfhandle and my_osmaperr,
    modelled after Windows C runtime functions _get_osfhandle and _dosmaperr
libmysql/CMakeLists.txt:
  new files my_winfile.c and my_winerr.c
mysql-test/suite/large_tests/r/lock_tables_big.result:
  test for more then 2048 open file descriptors on Windows
mysql-test/suite/large_tests/t/lock_tables_big.test:
  test for more then 2048 open file descriptors on Windows
mysys/CMakeLists.txt:
  new files my_winfile.c and my_winerr.c
mysys/Makefile.am:
  new files my_winfile.c and my_winerr.c
mysys/default_modify.c:
  fileno -> my_fileno
mysys/my_chsize.c:
  implementation of chsize on Windows now moved to my_winfile.c
mysys/my_create.c:
  - my_sopen->my_win_open
  - close open file before removing (won't generally work on Windows otherwise)
mysys/my_file.c:
  On Windows, files returned by my_open will not start with 0, but 2048 
  (making it simple to detect incompatible mix of CRT and mysys  io functions)
mysys/my_fopen.c:
  fileno->my_win_fileno , fclose->my_win_fclose, fdopen->my_win_fdopen
  Check for legal filename is done by my_win_[f]open functions
mysys/my_fstream.c:
  fileno->my_fileno
mysys/my_lib.c:
  Windows stat() functions are moved to my_winfile.c
mysys/my_lock.c:
  Move Windows code under #ifdef to a separate function win_lock().
  Add a parameter for lock wait timeout
mysys/my_mmap.c:
   _get_osfhandle->my_get_osfhandle
mysys/my_open.c:
  my_sopen->my_win_open (simpler interface)
mysys/my_pread.c:
  moved most windows specific code to my_win_file.c
  Use my_win_pread
mysys/my_quick.c:
  Use my_win_read/my_win_write
mysys/my_read.c:
  Moved most of windows specific code to my_win_file.c
  Use my_win_read()
mysys/my_seek.c:
  On Windows, use my_win_lseek() in my_seek()/my_tell()
  Removed dead code (synchronization of lseeks)
  Improved DBUG tracing (file position is ulonglong, not ulong)
mysys/my_static.c:
  Removed array initialization. my_file_info_default is global variable
  thus it is initialized with all zeros anyway
mysys/my_sync.c:
  _commit->my_win_fsync
mysys/my_winerr.c:
  New file my_winerr.c
  Exports my_osmaperr modelled after undocumented C runtime
  function _dosmaperr(). The problem with _dosmaperr() used previously is that 
  1) it is nowhere documented and thus code relying on it is not guaranteed to work
     in subsequent releases on the C runtime
  2) it is present only in static C runtime (mysqld does not link if compiled with
    /MD)
mysys/my_winfile.c:
  New file my_winfile.c
  Implements ANSI/Posix file IO routines, when possible using native Windows IO, without
  C runtime (C runtime dropped because of the 2048 file descriptor limit).
mysys/my_write.c:
  write->my_win_write
mysys/mysys_priv.h:
  Declaration of Windows Posix functions (private to mysys, shall not be visible
  outside)
storage/innobase/handler/ha_innodb.cc:
  mysys native Windows IO : correct innodb tmp file handling
  mysql_tmpfile does not return valid CRT file descriptor, thus
  it is not possible to dup() it. Instead, the native file handle has 
  to be duplicated and then converted to CRT descriptor.
storage/myisam/mi_locking.c:
  _commit->my_sync
2009-09-11 22:26:35 +02:00
Ramil Kalimullin
b6c16b329a Fix for bug#47130: misplaced or redundant check for null pointer?
Problem: LOGGER::general_log_write() relied on valid "thd" parameter passed
but had inconsistent "if (thd)" check.

Fix: as we always pass a valid "thd" parameter to the method, 
redundant check removed.


sql/log.cc:
  Fix for bug#47130: misplaced or redundant check for null pointer?
    - code clean-up, as we rely on the "thd" parameter in the
  LOGGER::general_log_write(), redundant "if (thd)" check removed, 
  added assert(thd) instead.
2009-09-11 22:06:27 +05:00
Marc Alff
ea0d4516ed Post merge fixes 2009-09-11 01:15:41 -06:00
Alexander Nozdrin
057192abbd Add DBUG_VIOLATION_HELPER_LEAVE definition to non-debug build. 2009-09-10 16:18:54 +04:00
Sergey Glukhov
0412a7c753 5.0-bugteam->5.1-bugteam merge 2009-09-10 15:30:03 +05:00