Commit graph

61426 commits

Author SHA1 Message Date
Marc Alff
72ffdcb2a5 local merge 2010-03-07 10:21:59 -07:00
Marc Alff
7ece4fe472 local merge 2010-03-07 10:10:24 -07:00
Bjorn Munch
22f923f2b1 Bug #51511 MTRv1 unable to find mysqld binary in out-of-source cmake builds
Set $glob_bindir, like $bindir in v2
Removed some obsolete IM code rather than changing it
2010-03-06 20:22:04 +01:00
Alexander Nozdrin
5b778c8087 Auto-merge (empty) from mysql-trunk-bugfixing. 2010-03-06 14:05:50 +03:00
Alexander Nozdrin
1f8b769d95 Auto-merge from mysql-trunk. 2010-03-06 13:49:16 +03:00
Alexander Nozdrin
8e0ddd2df3 Auto-merge from mysql-next-mr. 2010-03-06 13:48:21 +03:00
Alexander Nozdrin
3df0cf54c4 Merge from mysql-trunk. 2010-03-06 13:39:56 +03:00
Alexander Nozdrin
9095c06355 Fix version & default.conf. 2010-03-06 13:38:49 +03:00
Alexander Nozdrin
95922b0652 Merge from mysql-trunk. 2010-03-06 13:26:38 +03:00
Alexander Nozdrin
948c100727 Fix default.conf. 2010-03-06 13:25:14 +03:00
Alexander Nozdrin
9fc9081050 Auto-merge (empty) from mysql-trunk-bugfixing. 2010-03-06 13:22:16 +03:00
Alexander Nozdrin
016f668830 Auto-merge from mysql-next-mr. 2010-03-06 13:20:51 +03:00
Alexander Nozdrin
5ab27f768b Auto-merge from mysql-trunk. 2010-03-06 13:20:40 +03:00
Marc Alff
ed3a57fea3 Bug#45194 mysql_upgrade deletes existing data in performance_schema database/schema
Before this fix, mysql_upgrade would always drop and re create
the performance_schema database.
This in theory could destroy user data created using 5.1 or older versions.

With this fix, mysql_upgrade checks the content of the
performance_schema database before droping it.
2010-03-05 08:31:01 -07:00
Guilhem Bichot
7bb4e5b459 Fix for BUG#51215 "log-error partially works with version 5.5": WL 4738 (reengineering of server variables)
had broken the 5.1 behaviour of --log-error: --log-error without argument sent to stderr instead of writing
to a file with an autogenerated name.

mysql-test/suite/sys_vars/t/log_error_func.test:
  test that error log is created and shown in SHOW VARIABLES.
  Interestingly the error log's path is apparently relative if --log-error=argument is used, but
  may be absolute or relative if --log-error(no argument) is used (because then the path is derived from
  that of pidfile_name, which can be absolute or relative, depending on if autogenerated or not).
mysql-test/suite/sys_vars/t/log_error_func2.test:
  test that error log is created and shown in SHOW VARIABLES
mysql-test/suite/sys_vars/t/log_error_func3.test:
  test that error log is empty in SHOW VARIABLES
sql/mysql_priv.h:
  id for option --log-error
sql/mysqld.cc:
  No --log-error means "write errors to stderr", whereas --log-error
  without argument means "write errors to a file". So we cannot use the default logic
  of class sys_var_charptr, which treats "option not used" the same as "option used
  without argument" and uses the same default for both. We need to catch "option used",
  in mysqld_get_one_option(), and then "without argument". Setting to "" makes sure
  that init_server_components() will create the log, with an autogenerated name.
sql/sys_vars.cc:
  need to give the option a numeric id so that we can catch it in mysqld_get_one_option()
2010-03-05 14:08:21 +01:00
Alexander Nozdrin
16dfa2b16f Make funcs_1.myisam_views experimental on Solaris due to Bug 50595. 2010-03-05 12:28:45 +03:00
Alexander Barkov
56dc1bd2e3 Fixing non-determenistic results. 2010-03-05 12:17:19 +04:00
Marc Alff
01b19dbbf4 Bug#51738 Unit test pfs_instr-t crashes
The unit test pfs_instr-t:
- generates a very long (10,000) bytes file name
- calls find_or_create_file.

This leads to a buffer overflow in mysys in my_realpath(),
because my_realpath and mysys file APIs in general do not
test for input parameters: mysys assumes every file name
is less that FN_REFLEN in length.

Calling find_or_create_file with a very long file name is likely
to happen when instrumenting third party code that does not use mysys,
so this test is legitimate.

The fix is to make find_or_create_file in the performance schema
more robust in this case.
2010-03-04 18:36:54 -07:00
Marc Alff
18884b02c0 Bug#51741 Unit test pfs-t failing in mysql-next-mr-bugfixing
The root cause of the failure is that when
Bug#51447 performance schema evil twin files
was fixed, instrumented file names got normalized.

The pfs-t unit test depends on this file normalization,
but it was not updated.

This fix aligns pfs-t.cc lookup_file_by_name()
with the logic in pfs_instr.cc find_or_create_file().
2010-03-04 18:10:27 -07:00
Alexander Nozdrin
9f17a0018f Auto-merge from mysql-next-mr-bugfixing. 2010-03-04 18:39:32 +03:00
Alexander Nozdrin
366a68bb46 Auto-merge from mysql-next-mr-bugfixing. 2010-03-04 18:34:29 +03:00
Joerg Bruehe
61f118d1fe Upmerge changes to "COPYING" (formatting, FSF addressi, still GPL v2 as of 1991)
and "README" (header part: "This is a release of MySQL ...")
from "trunk" to "next-mr".
2010-03-04 14:55:08 +01:00
Joerg Bruehe
91cfcb8a65 Update "README" (the list of contributed software and their licenses)
by adding the header part "This is MySQL ...".
2010-03-04 14:45:11 +01:00
Joerg Bruehe
a53d419677 Upmerge the new formatting of "COPYING" from 5.1 to "trunk",
the license remains to be the GPL Version 2, June 1991
2010-03-04 14:35:14 +01:00
Joerg Bruehe
145af23c04 Use a new version of "COPYING", the GPL text.
This is *no* change in contents, the differences are formatting only
and an address update of the FSF. It continues to be Version 2, June 1991.
2010-03-04 14:26:27 +01:00
Alexander Barkov
47aaf9c401 Bug#51675 Server crashes on inserting 4 byte char. after ALTER TABLE to 'utf8mb4'
Bug#51676 Server crashes on SELECT, ORDER BY on 'utf8mb4' column
An additional fix. We should use 0xFFFD as a weight for supplementary
characters, not the "weight for character U+FFFD".
2010-03-04 16:02:30 +04:00
Alexander Barkov
d6edcf75a5 Bug#51166 mysql client defaults to charset 'ascii'
Using latin1 client character set for ASCII locales:
- because ascii is not a build-in character set
- for better backward compatibility
2010-03-04 15:13:46 +04:00
Alexander Barkov
922cdddeb0 A joint patch for:
Bug#51675 Server crashes on inserting 4 byte char. after ALTER TABLE to 'utf8mb4' 
Bug#51676 Server crashes on SELECT, ORDER BY on 'utf8mb4' column


include/m_ctype.h:
  Defining MY_CS_REPLACEMENT_CHARACTER
mysql-test/r/ctype_utf8mb4.result:
  Adding tests
mysql-test/t/ctype_utf8mb4.test:
  Adding tests
strings/ctype-uca.c:
  Don't use UCA data for characters higher than 0xFFFF.
strings/ctype-ucs2.c:
  Using newly defined MY_CS_REPLACEMENT_CHARACTER
strings/ctype-utf8.c:
  Using newly defined MY_CS_REPLACEMENT_CHARACTER
  Removing unesed variable "plane".
2010-03-04 15:00:32 +04:00
Horst.Hunger
a75a9eb133 Push the test to next-mr-bar2 to let them run in pushbuild. 2010-03-04 08:34:44 +01:00
Alexander Nozdrin
0b1d317b23 A follow-up on WL#5154 and WL#5182: remove forgotten options. 2010-03-03 22:22:02 +03:00
Vladislav Vaintroub
50608a0b4b merge 2010-03-03 16:06:14 +01:00
Mattias Jonsson
689b00a4a5 Fix for debug print of null string
(fails on pb for solaris debug_max)
2010-03-03 15:58:12 +01:00
Vladislav Vaintroub
87a1ad6310 merge 2010-03-03 15:48:54 +01:00
Vladislav Vaintroub
eb10125318 Fix a problem reported by Alik:
when cmake is used for building in a symlinked directory, 
and confguration is later adjusted with "cmake-gui ." After it,
GenServerSource fails with "no rule for <filename>". The reason
for the error is that cmake-gui  resolves "." as realpath and rules
are generated accordingly, while "cmake" used symlinked path

The fix uses ${CMAKE_CURRENT_BINARY_DIR} instead of 
${CMAKE_BINARY_DIR}/sql  for generated files. 
This causes CMake to use relative file names so 
relative file names when generating make rules.
Using relative filenames avoids the problem of 
refering to the same directory using 2 different paths.

Besides, using ${CMAKE_CURRENT_BINARY_DIR} is 
a commonly used style when working with generated 
files.
2010-03-03 12:43:30 +01:00
Vladislav Vaintroub
cd03a4625f Bug #51488 :missing features and change behavior in cmake runs compared to
autotools runs
- Fix recognition of --with-debug=full in configure wrapper
- Remove CMakeCache.txt in configure wrapper, to match the original
- Fix recognition of max-no-ndb
- Fix broken dependencies of mysql_fix_privilege_table.sql from 
  mysql_system_tables.sql and mysql_system_tables_fix.sql
- Add "distclean target" that informs user about appropriate bzr command



cmake/configure.pl:
  - Recognize --with-debug=full, map to WITH_DEBUG_FULL
  - remove CMakeCache.txt, so the configuration is no more sticky
  (to match the original configure behavior)
cmake/plugin.cmake:
  - Recognize WITH_MAX_NO_NDB, this fixes missing storage engines after BUILD/*max-no-ndb scripts
mysql-test/CMakeLists.txt:
  test-force uses the same macros (MTR_FORCE) as test-bt* now
scripts/CMakeLists.txt:
  - Fix broken dependency when producing mysql_fix_privilege_tables.sql, reported by Davi.
  We now concatenate 2 scripts in custom command that
  has dependency on both scripts rather than concatenating them at cmake time.
sql/CMakeLists.txt:
  Address frequently asked question "where is distclean" by implementing distclean target 
  that does nothing except pointing to appropriate 
  bzr command.
  
  It is better not to call "bzr clean-tree" automatically, without user consent.
  It could clean new files that were meant to be added.
2010-03-03 12:29:34 +01:00
Jon Olav Hauglid
b0ab907b42 Bug #51376 Assert `! is_set()' failed in
Diagnostics_area::set_ok_status on DROP FUNCTION

This assert tests that the server is not trying to send "ok" to
the client if an error has occured during statement processing.

In this case, the assert was triggered by lock timeout errors when
accessing system tables to do an implicit REVOKE after executing
DROP FUNCTION/PROCEDURE. In practice, this was only likely to
happen with very low values for "lock_wait_timeout" (in the bug report
1 second was used). These errors were ignored and the server tried
to send "ok" to the client, triggering the assert.

The patch for Bug#45225 introduced lock timeouts for metadata locks.
This made it possible to get timeouts when accessing system tables.
Note that a followup patch for Bug#45225 pushed after this
bug was reported, changed accessing of system tables such
that the user-supplied timeout value is ignored and the maximum
timeout value is used instead. This exact bug was therefore
only noticeable in the period between the initial Bug#45225 patch
and the followup patch.

However, the same problem could occur for any errors during revoking
of privileges - not just timeouts. This patch fixes the problem by
making sure that any errors during revoking of privileges are
reported to the client. 

Test case added to sp-destruct.test. Since the original bug is not
reproducable now that system tables are accessed using a a long
timeout value, this test instead calls DROP FUNCTION with a grant
system table missing.
2010-03-03 10:24:53 +01:00
Alexander Nozdrin
aca943f0b1 Auto-merge (empty) from mysql-trunk-bugfixing. 2010-03-02 17:37:50 +03:00
Alexander Nozdrin
d3755291ca Manual merge from mysql-next-mr.
Conflicts:
  - sql/sql_base.cc
2010-03-02 17:34:50 +03:00
Alexander Nozdrin
455d3dc459 Auto-merge from mysql-trunk. 2010-03-02 17:32:48 +03:00
Dmitry Lenev
c843f58f04 Merged recent changed from mysql-next-mr-bugfixing
into mysql-next-4284 tree.
2010-03-02 11:17:08 +03:00
Alexander Nozdrin
64b91b2698 Auto-merge from mysql-trunk-merge. 2010-03-02 10:24:32 +03:00
Alexander Nozdrin
61bd9ef648 Remove test from experimental because Bug 45578 and 46010 are fixed. 2010-03-02 10:22:33 +03:00
Vladislav Vaintroub
0139908c7e merge 2010-03-02 06:13:06 +01:00
Vladislav Vaintroub
40e12231fe Fix WITH_DEBUG problems in CMake build, so people who use configure wrappers do not
suffer. The problem was that when custom C flags were defined with in environment 
variable CFLAGS, WITH_DEBUG did not have any effect. Also, switch from 
WITH_DEBUG=ON to WITH_DEBUG=OFF   was not handled correctly .Expected is switch 
to with RelwithDebInfo or when custom compiler flags  are defined, to None.
2010-03-02 01:53:15 +01:00
Marc Alff
77385a9136 Bug#51612 Un initialized locker_lost variable in pfs_instr.cc
Fixed the missing initialization of locker_lost.

This fix is not strictly necessary, but is desirable to re-align the code
from 5.5 and 6.0, and reduce the spurious code differences.

This will facilitate maintenance and help to apply patches cleanly, for merges.
2010-03-01 17:10:01 -07:00
Mattias Jonsson
11dab05ecd merge 2010-03-02 00:52:33 +01:00
Mattias Jonsson
4bce198ce9 manual merge fix of bug#42438 in mysql-next-mr-merge 2010-03-02 00:05:30 +01:00
Mats Kindahl
5c8d6c7473 Bug #49022: Plugins included into bin release cannot be
installed on debug version of server

When starting a server using mysqld_safe with the option
--mysqld-version=debug, the debug version of the server
is started. When attempting to load a plugin that is not
debug-built, the load will fail because a non-debug built
plugin use, e.g., fastmutex while the debug-built server
uses safemutex.

To solve this problem, mysqld_safe will set the plugin-dir
to use a directory where debug-built plugins are placed.

This patch sets the plugin dir to <plugin-dir>/whatever,
when mysqld-version=whatever, and just <plugin-dir> otherwise.
2010-03-01 23:40:24 +01:00
Roy Lyseng
74310b21f1 WL#5252: deprecate --optimizer_search_depth=63
Followup: Changes in sys_vars test suite

  mysql-test/suite/sys_vars/r/optimizer_search_depth_basic.result
    Added warnings.
2010-03-01 21:19:47 +01:00
Alexander Nozdrin
771f215235 Auto-merge from mysql-trunk-merge. 2010-03-01 21:56:54 +03:00