Commit graph

61626 commits

Author SHA1 Message Date
Joerg Bruehe
4b68b2d289 Merge the changes of the 5.5.3-m3 release build
back into the development branches.
2010-04-18 15:32:05 +02:00
Daniel Fischer
c62d8e5cb5 Make the libraries we produce on Windows actually usable 2010-04-16 10:27:18 +02:00
Luis Soares
091745c8a5 automerge: merged bundle from bug report into latest
mysql-trunk-bugfixing (bug 52341).
2010-04-16 00:58:05 +01:00
Luis Soares
769787ca60 Automerge: merged bug bundle from bug report into latest
mysql-trunk-bugfixing.
2010-04-16 00:56:26 +01:00
Sergey Vojtovich
6b278654a1 Merge fixes for BUG46587 and BUG47059 to trunk-bugfixing. 2010-04-15 13:36:36 +04:00
Sergey Vojtovich
535093e4db BUG#46587 - archive storage engine headers don't include
my_global.h first

We may end up with a compilation failure on certain platforms
because zlib.h is included before my_global.h.

Fixed by moving zlib.h inclusion down after my_global.h.

storage/archive/azlib.h:
  zlib.h must be included after my_global.h.
2010-04-15 13:33:33 +04:00
Sergey Vojtovich
8e7939167d BUG#47059 - In audit plugin I cannot see the event subclasses,
e.g.MYSQL_AUDIT_GENERAL_ERROR

General audit API (MYSQL_AUDIT_GENERAL_CLASS) didn't expose event
subclass to plugins.

This patch exposes event subclass to plugins via
struct mysql_event_general::event_subclass.

This change is not compatible with existing general audit plugins.
Audit interface major version has been incremented.

include/mysql/plugin_audit.h:
  Expose event subclass to audit general plugins.
plugin/audit_null/audit_null.c:
  Added distinct counters for general event sub-classes.
  
  Removed printf() from deinit(). One can easily see number of
  calls via status variables.
  
  To make code nicer, modified class mask to use macro instead
  of hardcoded number.
  
  Incremented audit plugin minor version.
sql/sql_audit.cc:
  Expose event subclass to audit general plugins.
2010-04-15 13:05:17 +04:00
Alexander Nozdrin
471d515ff4 Post-fix for Bug#52444: update test result. 2010-04-15 12:12:03 +04:00
Alexander Nozdrin
9bde9c0859 A patch for Bug#52444 (mysql_upgrade fails b/w 5.1 -> 5.5 (Celosia)).
The problem was that the code that works with stored routines was present
in mysql_system_tables.sql. This is wrong because until upgrade is finished,
stored routines may be (and were) not available.

The fix is to move that code to the end of mysql_system_tables_fix.sql.
2010-04-14 20:40:04 +04:00
Konstantin Osipov
4288e329dd A fix for Bug#11918 "SP does not accept variables in LIMIT clause"
Allow stored procedure variables in LIMIT clause.
Only allow variables of INTEGER types. 
Handle negative values by means of an implicit cast to UNSIGNED 
(similarly to prepared statement placeholders).
Add tests.
Make sure replication works by not doing NAME_CONST substitution
for variables in LIMIT clause.
Add replication tests.

mysql-test/r/sp.result:
  Update results (Bug#11918).
mysql-test/suite/rpl/r/rpl_sp.result:
  Update results (Bug#11918).
mysql-test/suite/rpl/t/rpl_sp.test:
  Add a test case for Bug#11918.
mysql-test/t/sp.test:
  Add a test case for Bug#11918.
sql/item.cc:
  Mark sp variables in LIMIT clause (a hack for replication).
sql/item.h:
  Mark sp variables in LIMIT clause (a hack for replication).
sql/share/errmsg-utf8.txt:
  Add a new error message (a type mismatch for LIMIT
  clause parameter).
sql/sp_head.cc:
  Binlog rewrite sp variables in LIMIT clause without NAME_CONST
  substitution.
sql/sql_string.cc:
  Implement append_ulonglong method.
sql/sql_string.h:
  Declare append_ulonglong().
sql/sql_yacc.yy:
  Support stored procedure variables in LIMIT.
2010-04-14 01:56:19 +04:00
Vladislav Vaintroub
71799f6f97 merge 2010-04-13 19:53:11 +02:00
Alexander Nozdrin
a329546022 Post-fix for Bug#13174. 2010-04-13 20:10:51 +04:00
Vladislav Vaintroub
7a3d0f0e53 merge 2010-04-13 17:12:17 +02:00
Konstantin Osipov
3227ba706f Backport of:
ChangeSet@1.2703, 2007-12-07 09:35:28-05:00, cmiller@zippy.cornsilk.net +40 -0
Bug#13174: SHA2 function
Patch contributed from Bill Karwin, paper unnumbered CLA in Seattle

Implement SHA2 functions.

Chad added code to make it work with YaSSL.  Also, he removed the 
(probable) bug of embedded server never using SSL-dependent 
functions.  (libmysqld/Makefile.am didn't read ANY autoconf defs.)

Function specification:
  SHA2( string cleartext, integer hash_length ) 
    -> string hash, or NULL
where hash_length is one of 224, 256, 384, or 512.  If either is 
NULL or a length is unsupported, then the result is NULL.  The 
resulting string is always the length of the hash_length parameter
or is NULL.

Include the canonical hash examples from the NIST in the test
results.
---
Polish and address concerns of reviewers.


.bzrignore:
  Added libmysqld/sha2.cc to the ignore list.
client/mysql.cc:
  Add condition to remove code for embedded server.
client/mysqltest.cc:
  Add condition to remove code for embedded server.
include/Makefile.am:
  New header file to header list.
include/mysql_embed.h:
  Embedded servers can use SSL-library functions too!
include/sha2.h:
  Compatibility layer to make YaSSL behave like OpenSSL.
include/sslopt-case.h:
  Remove SSL-communication parameters from command lines.
include/sslopt-longopts.h:
  Remove SSL-communication parameters from command lines.
include/sslopt-vars.h:
  Don't declare variables that are only used in SSL communication, if
  we are compiling the embedded server.
include/violite.h:
  Don't even compile the SSL-communication function if we're in the
  embedded server.
  ---
  Remove CPP condition indentation.
libmysqld/CMakeLists.txt:
  Add new file to source list.
libmysqld/Makefile.am:
  Include standard DEFS in embedded compilation.  It's an undiscovered
  but that it's not there.
  
  Add new file to source list.
libmysqld/examples/Makefile.am:
  Include autoconf DEFS.
libmysqld/lib_sql.cc:
  Initialize SSL-related variables in embedded server.
mysql-test/include/have_ssl_crypto_functs.inc:
  Distinguish between communication and crypto.
  Use the tristate value of "have_ssl" variable to know whether to
  test or not for SSL-provided crypto functions.
mysql-test/r/func_digest.result:
  
  Test against the sample test vectors in the NIST Secure
  Hash Standard (http://csrc.nist.gov/cryptval/shs.htm)
mysql-test/r/func_encrypt_nossl.result:
  Update results to the new error message text.
mysql-test/r/have_ssl_is_yes_or_disabled_only.require:
  Distinguish between communication and crypto.
  
  Use the tristate value of "have_ssl" variable to know whether to
  test or not for SSL-provided crypto functions.
mysql-test/suite/rpl/t/rpl_ssl.test:
  Distinguish between communication and crypto.
mysql-test/suite/rpl/t/rpl_ssl1.test:
  Distinguish between communication and crypto.
mysql-test/t/func_des_encrypt.test:
  Distinguish between communication and crypto.
mysql-test/t/func_digest.test:
  Test against the sample test vectors in the NIST Secure
  Hash Standard (http://csrc.nist.gov/cryptval/shs.htm)
  
  Also, test that various parameters (legal and illegal)
  do what we expect.
  ---
  Distinguish between communication and crypto.
mysql-test/t/func_encrypt.test:
  Distinguish between communication and crypto.
mysql-test/t/openssl_1.test:
  Don't test SSL communication if we're in the embedded server.
  ---
  Distinguish between communication and crypto.
mysql-test/t/ssl-big.test:
  Don't test SSL communication if we're in the embedded server.
  ---
  Distinguish between communication and crypto.
mysql-test/t/ssl.test:
  Don't test SSL communication if we're in the embedded server.
  ---
  Distinguish between communication and crypto.
mysql-test/t/ssl_8k_key.test:
  Don't test SSL communication if we're in the embedded server.
  ---
  Distinguish between communication and crypto.
mysql-test/t/ssl_compress.test:
  Don't test SSL communication if we're in the embedded server.
  ---
  Distinguish between communication and crypto.
mysql-test/t/ssl_connect.test:
  Don't test SSL communication if we're in the embedded server.
  ---
  Distinguish between communication and crypto.
sql-common/client.c:
  SSL is useful for more functionality than just connecting.  Test
  for whether we are not embedded server also.
sql/CMakeLists.txt:
  Add new source file to source list so that we have access to SHA2
  functions.
sql/Makefile.am:
  Add new source file to source list so that we have access to SHA2
  functions.
sql/item_create.cc:
  Bootstrap the SHA2 function into the server.
sql/item_strfunc.cc:
  Add new SHA2 Item class methods.
  
  Clean up two minor problems.
  ---
  Remove extraneous debugging.
  ---
  We must check nullness of a parameter only /after/ computing its
  value.
sql/item_strfunc.h:
  Declare new SHA2 Item class.
sql/mysqld.cc:
  For embedded server, don't refer to SSL-communications variables
  or values.
  ---
  Remove CPP condition indentation.
sql/sha2.cc:
  Compatibility layer to make YaSSL behave like OpenSSL.
  ---
  Add comment for generated functions.
sql/sql_acl.cc:
  For embedded server, don't refer to SSL-communications variables
  or values.
sql/sql_connect.cc:
  SSL is useful for more functionality than just connecting.  Test
  for whether we are not embedded server also.
sql/sys_vars.cc:
  For embedded server, don't refer to SSL-communications variables
  or values.
2010-04-13 19:04:45 +04:00
Vladislav Vaintroub
9615eac6c6 merge 2010-04-13 15:21:44 +02:00
Vladislav Vaintroub
cd35dd73a1 Fix perfschema unittests build on Windows
pthread_t is not defined unless my_pthread.h is included.
2010-04-13 13:48:46 +02:00
unknown
6a5b47a400 Bug#51980 mysqld service crashes with a simple COUNT(DISTINCT) query over a view
Problem: Segmentation fault in add_group_and_distinct_keys() when accessing
field of what is assumed to be an Item_field object.

Cause: In case of views, the item added to list by is_indexed_agg_distinct() 
was not of type Item_field, but Item_ref.

Resolution:  Add the real Item_field object, the one referred to by 
Item_ref object, to the list, instead.

mysql-test/r/count_distinct.result:
  Results for test case for Bug#51980.
mysql-test/t/count_distinct.test:
  Test case for Bug#51980.
  Table needs to contain at least two rows to avoid const table optimization.
sql/sql_select.cc:
  Make sure it is the actual Item_field object that is pushed to the out_args
  list of is_indexed_agg_distinct(), and not Item_ref objects.
2010-04-13 11:38:28 +02:00
Alexander Nozdrin
1b9adec789 Auto-merge from mysql-trunk. 2010-04-12 21:42:15 +04:00
Alexander Nozdrin
fe0828b3b8 Fix compile error (different storage class for mysql_temp_dir_list)
when trying to build innodb as plugin.

The reason for the error is mismatch in mysql_temp_dir_list
declaration between mysqld.h and usage in ha_innodb.cc

Add missing MYSQL_PLUGIN_IMPORT to mysql_tmpdir_list
(variables exported by the server and used by plugin need it).
2010-04-12 17:35:06 +04:00
Alexander Nozdrin
60333fbec9 A post-fix patch for WL#4877/WL#5030:
Fix tons of warnings about mismatch struct and class usage.
2010-04-12 17:17:37 +04:00
Marc Alff
bbf97ab183 Bug#52754 Build break in mysql-trunk, performance schema unit test
Tree cleaup after the last major merges in mysql-trunk:

The files sql/lex_hash.h and sql/sql_yacc.h are automatically
generated, and should not be checked in the configuration management system.
These files are now removed.
No changes are required for .bzrignore, which already listed these files
(and similar files in libmysqld/).

The file storage/perfschema/unittest/pfs_timer-t.cc did not build
after the header files refactoring affecting mysql_priv.h
The file now builds properly using sql_priv.h
2010-04-12 03:31:45 -06:00
Alexander Nozdrin
7d8368c0cd Auto-merge from mysql-trunk. 2010-04-10 12:47:19 +04:00
Alexander Nozdrin
9540aee5a6 Make main.query_cache_debug experimental on Linux due to Bug 52356. 2010-04-10 12:25:57 +04:00
Alexander Nozdrin
b596fc60e7 Update version tag to 5.5.5-m3. 2010-04-10 12:24:06 +04:00
Mats Kindahl
46bd78b9ee WL#5030: Splitting mysql_priv.h
Adding my_global.h first in all files using
NO_EMBEDDED_ACCESS_CHECKS.

Correcting a merge problem resulting from a changed definition
of check_some_access compared to the original patches.
2010-04-07 13:58:40 +02:00
Mats Kindahl
e92b3c587c WL#5030: Splitting mysql_priv.h
Adding include to build on Windows.
2010-04-06 23:00:01 +02:00
Mats Kindahl
6791cfc76a WL#5030: Splitting mysql_priv.h
Adding includes of my_global.h that seems to be necessary on Windows.
2010-04-06 16:08:51 +02:00
Mats Kindahl
87beef91ba WL#5030: Splitting mysql_priv.h
Moving an extern "C" to not cover #includes.
2010-04-06 14:11:07 +02:00
Mats Kindahl
d8e33c9c1e WL#5030: Splitting mysql_priv.h
- Adding include/mysql/innodb_priv.h which was missing before.
- Updated .bzrignore to ignore CMake generated cruft.
2010-04-06 12:55:36 +02:00
Mats Kindahl
6e63f41fdc WL#5030: Splitting mysql_priv.h
Minor fixes required because of changes since patches were developed.
2010-04-05 16:10:10 +02:00
Mats Kindahl
118ad60aa9 WL#5030: Split and remove mysql_priv.h
Fixing merge problem that causes CSV engine to misbehave.
2010-04-01 14:19:08 +02:00
Mats Kindahl
23d8586dbf WL#5030: Split and remove mysql_priv.h
This patch:

- Moves all definitions from the mysql_priv.h file into
  header files for the component where the variable is
  defined
- Creates header files if the component lacks one
- Eliminates all include directives from mysql_priv.h
- Eliminates all circular include cycles
- Rename time.cc to sql_time.cc
- Rename mysql_priv.h to sql_priv.h
2010-03-31 16:05:33 +02:00
Alexander Nozdrin
d7dd2fc92f Fix use of uninitialized variable. 2010-03-26 11:09:14 +03:00
Luis Soares
a086b2b0d3 BUG#52202: mysqlbinlog_row* fail in daily-trunk on Sol10 x86_64
debug_max

There was a buffer overrun when unpacking the date
field. Incidentaly, this seems to affect only solaris x86_64
debug builds, but others platforms may be vulnerable as well.

In particular, the buffer size used was not taking into
consideration that the '\0' character would be written into
it.

We fix this by increasing the size of the buffer used to
accommodate one extra byte (the one for the '\0').
2010-03-25 00:30:16 +00:00
Alexey Kopytov
0025c2d7e9 Fixed mysqld--help-win broken by the merge from trunk main. 2010-03-24 23:29:38 +03:00
Joerg Bruehe
8b79e6209c Add "--with-perfschema" to the configure options for RPMs. 2010-03-24 20:30:33 +01:00
Joerg Bruehe
056e670542 Fix an issue with the IBM C++ compiler
which was detected during the build of 5.5.3-m3.
This requires version 9 of IBM C++ to help.

More fixes will still be needed, it is very strict
(or rather: a bit picky?) about templates.
2010-03-24 20:15:06 +01:00
Joerg Bruehe
81cbce56bb Some fixes developed during the build of 5.5.3-m3
about handling the debug plugin files,
also "ha_example.*" are dropped.
2010-03-24 20:01:01 +01:00
Luis Soares
c9abb77c36 BUG#52341: PB2: rpl tests started taking three times more time on
linux x86_64 max 

Rpl tests were surprisingly taking too long when server was built
using cmake on linux. This was because cmake counter part of
patch for WL#4949 was not defining SIGNAL_WITH_VIO_CLOSE flag,
which had negative impact on the time needed to stop the slave IO
thread on STOP SLAVE command.

We fix this by deploy the missing SET command on configure.cmake.
2010-03-24 18:55:06 +00:00
Alexey Kopytov
d95c1e3b47 Manual merge of mysql-trunk into mysql-trunk-merge.
Conflicts:

Text conflict in client/mysqlbinlog.cc
Text conflict in mysql-test/Makefile.am
Text conflict in mysql-test/collections/default.daily
Text conflict in mysql-test/r/mysqlbinlog_row_innodb.result
Text conflict in mysql-test/suite/rpl/r/rpl_typeconv_innodb.result
Text conflict in mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
Text conflict in mysql-test/suite/rpl/t/rpl_row_create_table.test
Text conflict in mysql-test/suite/rpl/t/rpl_slave_skip.test
Text conflict in mysql-test/suite/rpl/t/rpl_typeconv_innodb.test
Text conflict in mysys/charset.c
Text conflict in sql/field.cc
Text conflict in sql/field.h
Text conflict in sql/item.h
Text conflict in sql/item_func.cc
Text conflict in sql/log.cc
Text conflict in sql/log_event.cc
Text conflict in sql/log_event_old.cc
Text conflict in sql/mysqld.cc
Text conflict in sql/rpl_utility.cc
Text conflict in sql/rpl_utility.h
Text conflict in sql/set_var.cc
Text conflict in sql/share/Makefile.am
Text conflict in sql/sql_delete.cc
Text conflict in sql/sql_plugin.cc
Text conflict in sql/sql_select.cc
Text conflict in sql/sql_table.cc
Text conflict in storage/example/ha_example.h
Text conflict in storage/federated/ha_federated.cc
Text conflict in storage/myisammrg/ha_myisammrg.cc
Text conflict in storage/myisammrg/myrg_open.c
2010-03-24 18:03:44 +03:00
Alexander Nozdrin
6da92d8f19 Auto-merge from mysql-trunk. 2010-03-24 11:14:54 +03:00
Alexander Nozdrin
ae715642f4 Auto-merge from mysql-trunk-bugfixing. 2010-03-24 11:10:56 +03:00
Alexey Kopytov
abc6846d5b Mark all main.plugin* tests as experimental on Solaris
as done in 6.0 due to bug #47146.
2010-03-23 23:34:12 +03:00
Alexey Kopytov
dea8e4c07e Fixed the incorrectly merged rpl.rpl_show_slave_running test in
mysql-trunk-merge (by copying the .result/.test files from mysql-pe).
2010-03-23 10:28:57 +03:00
Joerg Bruehe
b61fe56bd7 Fixes related to bug#46587:
archive storage engine headers don't include my_global.h first


During the build of 5.5.3-m3 on older Linux platforms
(kernels 2.4 or early 2.6),
the symptom described in the bug report occurred both
in the "archive" and in the "innobase" storage engine.

This change is the patch proposed in that bug report,
and a similar one in innobase, that latter is aligned
with Vasil Dimov of Innobase, the original author.
2010-03-22 16:19:39 +01:00
Joerg Bruehe
d883671193 Some fixes for the build on Windows
as found necessary during the release build of 5.5.3-m3.

scripts/CMakeLists.txt:
  The scripts "mysqldumpslow" and "mysqlhotcopy" need to be handled.
scripts/make_win_bin_dist:
  1) We do not create ".map" files any more.
  
  2) Typing error fixed, it isn't "$DISTDIR" but "$DESTDIR".
  
  3) Security fix:
     If the argument isn't of the form "dst=src",
     then we want the variables to be empty.
  The original code would have used an argument "foo"
  to set both "$src" and "$dst" to this string,
  which doesn't make much sense.
2010-03-22 16:02:31 +01:00
Alexey Kopytov
074583a730 Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts:

Text conflict in mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
Text conflict in sql/item_func.cc
2010-03-22 16:28:51 +03:00
Alexander Nozdrin
3695436631 Make mysqlbinlog_row, mysqlbinlog_row_innodb and mysqlbinlog_row_myisam
experimental due to Bug 52202.
2010-03-22 16:00:38 +03:00
Alexander Barkov
a35418784b Merging the latest changes 2010-03-22 16:29:53 +04:00
Alexander Barkov
84fc3da40f Bug #51976 LDML collations issue
Problem: caseup_multiply and casedn_multiply members      
were not initialized for a dynamic collation, so          
UPPER() and LOWER() functions returned empty strings.      
Fix: initializing the members properly.

Adding tests:
  mysql-test/r/ctype_ldml.result
  mysql-test/t/ctype_ldml.test

Applying the fix:
  mysys/charset.c
2010-03-22 16:27:59 +04:00