Commit graph

61398 commits

Author SHA1 Message Date
Alexander Nozdrin
929293b9be Auto-merge from mysql-next-mr-bugfixing. 2010-03-10 17:58:35 +03:00
Konstantin Osipov
7fe455a6bc A fix and a test case for Bug#51710 FLUSH TABLES <view> WITH READ
LOCK kills the server.

Prohibit FLUSH TABLES WITH READ LOCK application to views or
temporary tables.
Fix a subtle bug in the implementation when we actually
did not remove table share objects from the table cache after 
acquiring exclusive locks.

mysql-test/r/flush.result:
  Update results (Bug#51710)
mysql-test/t/flush.test:
  Add a test case for Bug#51710.
sql/sql_parse.cc:
  Fix Bug#51710 "FLUSH TABLES <view> WITH READ LOCK
  killes the server.
  Ensure we don't open views and temporary tables.
  Fix a yet another bug in the implementation which 
  did not actually remove the tables from cache after acquiring
  exclusive locks.
2010-03-10 17:35:25 +03:00
Alexander Nozdrin
8f79df0435 Auto-merge (empty) from mysql-trunk-bugfixing. 2010-03-10 16:35:38 +03:00
Alexander Nozdrin
d4e0cff35b Auto-merge (empty) from mysql-next-mr. 2010-03-10 16:34:45 +03:00
Alexander Nozdrin
e58f200a3d Auto-merge from mysql-trunk. 2010-03-10 16:34:12 +03:00
Alexander Nozdrin
494781fa8d Auto-merge (empty) from mysql-trunk. 2010-03-10 16:27:18 +03:00
Alexander Nozdrin
cfeee8580d Auto-merge from mysql-next-mr. 2010-03-10 16:26:34 +03:00
Alexander Nozdrin
c9db455c87 Auto-merge from mysql-next-mr-bugfixing. 2010-03-10 16:22:52 +03:00
Joerg Bruehe
1b0d2eefb7 Automerge part of the fixes for bug#49022 into "next-mr-bugfixing". 2010-03-10 12:10:21 +01:00
Joerg Bruehe
fcd119066c Part of the fixes for bug#49022
Plugins included into bin release cannot be
    installed on debug version of server

IF    the build process was split into separate "debug" and
      "optimized" builds
   AND
      the plugin files of the debug build got copied into
      "plugin/debug/"
(both is done for MySQL release builds starting from 5.5.3),
THEN these debug plugin files are to be included in the
     final binary package.

This change deals with the inclusion only,
the other parts are done in different changesets.


plugin/Makefile.am:
  The "install" rule must not assume that "debug" files are
  present, this depends on the preceding steps in the build.
  
  If they are present, we cannot copy them by simply using
  "libtool install" (as we could do during an ordinary build)
  because they are already kept in "plugin/debug/".
  
  When doing the copy to the destination hierarchy, we must
  ensure that symlinks are not expanded but rather copied
  as symlinks.
  "cp -d" is specific to GNU, the portable way would use
  "cp -P", but that is not fully specified with recursion.
  So we fall back on "tar c | tar x", which is known to
  keep symlinks unchanged (and un-expanded).
  
  Using "$(TAR)" is just a precaution in case of weird path
  settings or other portability issues.
2010-03-10 10:48:43 +01:00
Mats Kindahl
ec82cbb293 Merging with mysql-next-mr-bugfixing 2010-03-10 10:41:19 +01:00
Marc Alff
f6660539c2 Bug#51878 Build break in HPUX involving mysql_prlock on a client
This is a fix specific for HPUX,
for which the compiler does not resolve properly dependencies
involving unused inline functions.
(See existing comments in mysql_thread.h)

In include/mysql/psi/mysql_thread.h,
the instrumentation helpers for mysql_prlock_*
uses the pr lock apis.

These apis are implemented in mysys/thr_rwlock.c,
which is not linked to client code.

As a result, the code does not link in libmysql_r, on HPUX.

The fix is to cut dependencies explicitely,
by introducing -DDISABLE_MYSQL_RWLOCK_H,
when building client code.
2010-03-09 11:03:02 -07:00
Tor Didriksen
58559ac827 Bug#50888 valgrind warnings in Field_timestamp::val_str
Ensure that we store the correct cached_field_type whenever we cache Field items
(in this case it allows us to compare dates as dates, rather than strings)


mysql-test/r/type_timestamp.result:
  Add test case.
mysql-test/t/type_timestamp.test:
  Add test case.
sql/item.h:
  Initialize cached_field_type from the Field item.
2010-03-09 15:54:12 +01:00
Alexander Nozdrin
4315b101f5 pfs_upgrade.test is a case-sensitive test. 2010-03-09 18:05:19 +03:00
Alexander Nozdrin
85f04306f9 Auto-merge from mysql-next-mr-bugfixing. 2010-03-09 13:00:28 +03:00
Alexander Nozdrin
786a83e2d4 Auto-merge from mysql-trunk-bugfixing. 2010-03-09 12:57:58 +03:00
Alexander Nozdrin
9670dba990 Auto-merge from mysql-next-mr. 2010-03-09 12:57:11 +03:00
Alexander Nozdrin
e5ec83bd34 Auto-merge from mysql-trunk. 2010-03-09 12:57:04 +03:00
Alexander Nozdrin
1cdc0b3a4c Auto-merge from mysql-trunk. 2010-03-09 12:53:13 +03:00
Alexander Nozdrin
28ca3bfdca Bug#51832 mysql_upgrade failing on performance_schema tables in mysql-trunk
Before this fix, client tools (mysql_upgrade, mysqlcheck, mysqldump)
would try to process performance schema tables, leading to failures.

The fix is to align FIRST_PERFORMANCE_SCHEMA_VERSION to 5.5.3,
which is the version number of mysql-trunk where the
performance schema is first available.
2010-03-09 12:52:11 +03:00
Vladislav Vaintroub
057c2b35c3 merge 2010-03-08 00:33:07 +01:00
Vladislav Vaintroub
402cab754a Fix typo (CMAKE_SIZEOF_VOIDP=>CMAKE_SIZEOF_VOID_P) 2010-03-08 00:31:06 +01:00
Marc Alff
a7c9bf2ccf Bug#51295 Build warnings in mdl.cc
Before this fix, the performance schema instrumentation
in mdl.h / mdl.cc was incomplete, causing:
- build warnings,
- no data collection for the performance schema

This fix:
- added instrumentation helpers for the new preferred
  reader read write lock, mysql_prlock_*
- implemented completely the performance schema
  instrumentation of mdl.h / mdl.cc
2010-03-07 10:50:47 -07:00
Marc Alff
8c28d0d1cf local merge 2010-03-07 10:41:51 -07:00
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