From 21197c70b8e0f7ef1b7b2d74f693cfd366a05bfd Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 28 Sep 2010 11:16:30 +0200 Subject: [PATCH 1/3] Set version number for mysql-5.1.49sp1 release --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 74e575fad8c..84767b01264 100644 --- a/configure.in +++ b/configure.in @@ -12,7 +12,7 @@ dnl dnl When changing the major version number please also check the switch dnl statement in mysqlbinlog::check_master_version(). You may also need dnl to update version.c in ndb. -AC_INIT([MySQL Server], [5.1.49], [], [mysql]) +AC_INIT([MySQL Server], [5.1.49sp1], [], [mysql]) AC_CONFIG_SRCDIR([sql/mysqld.cc]) AC_CANONICAL_SYSTEM From 2331ea8edbf2dcc9bb7166b19fb038dd37da85ad Mon Sep 17 00:00:00 2001 From: smenon Date: Tue, 28 Sep 2010 12:36:08 +0200 Subject: [PATCH 2/3] Backport into mysql-5.1.49sp1-release > ------------------------------------------------------------ > revno: 3452.1.12 > revision-id: davi.arnaut@oracle.com-20100730121710-sc068t4d2f1c2gi9 > parent: dao-gang.qu@sun.com-20100730035934-8in8err1b1rqu72y > committer: Davi Arnaut > branch nick: mysql-5.1-bugteam > timestamp: Fri 2010-07-30 09:17:10 -0300 > message: > Bug#54041: MySQL 5.0.92 fails when tests from Connector/C suite run > > Fix a regression (due to a typo) which caused spurious incorrect > argument errors for long data stream parameters if all forms of > logging were disabled (binary, general and slow logs). --- mysql-test/r/mysql_client_test.result | 2 ++ mysql-test/t/mysql_client_test.test | 2 ++ sql/sql_prepare.cc | 4 +-- tests/mysql_client_test.c | 49 +++++++++++++++++++++------ 4 files changed, 45 insertions(+), 12 deletions(-) diff --git a/mysql-test/r/mysql_client_test.result b/mysql-test/r/mysql_client_test.result index 08d982c85e3..edda7980e97 100644 --- a/mysql-test/r/mysql_client_test.result +++ b/mysql-test/r/mysql_client_test.result @@ -1,3 +1,5 @@ SET @old_general_log= @@global.general_log; +SET @old_slow_query_log= @@global.slow_query_log; ok SET @@global.general_log= @old_general_log; +SET @@global.slow_query_log= @old_slow_query_log; diff --git a/mysql-test/t/mysql_client_test.test b/mysql-test/t/mysql_client_test.test index 15c0cd4ac84..41670117c7c 100644 --- a/mysql-test/t/mysql_client_test.test +++ b/mysql-test/t/mysql_client_test.test @@ -2,6 +2,7 @@ -- source include/not_embedded.inc SET @old_general_log= @@global.general_log; +SET @old_slow_query_log= @@global.slow_query_log; # We run with different binaries for normal and --embedded-server # @@ -17,3 +18,4 @@ SET @old_general_log= @@global.general_log; echo ok; SET @@global.general_log= @old_general_log; +SET @@global.slow_query_log= @old_slow_query_log; diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 041d9f7c30b..e80517d4bc4 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -790,7 +790,7 @@ static bool insert_params_with_log(Prepared_statement *stmt, uchar *null_array, type (the types are supplied at execute). Check that the supplied type of placeholder can accept a data stream. */ - else if (!is_param_long_data_type(param)) + else if (! is_param_long_data_type(param)) DBUG_RETURN(1); res= param->query_val_str(&str); if (param->convert_str_value(thd)) @@ -836,7 +836,7 @@ static bool insert_params(Prepared_statement *stmt, uchar *null_array, type (the types are supplied at execute). Check that the supplied type of placeholder can accept a data stream. */ - else if (is_param_long_data_type(param)) + else if (! is_param_long_data_type(param)) DBUG_RETURN(1); if (param->convert_str_value(stmt->thd)) DBUG_RETURN(1); /* out of memory */ diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 97d146ff9ef..a5f5812c2f0 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -13246,37 +13246,52 @@ static void test_bug15518() } -static void disable_general_log() +static void disable_query_logs() { int rc; rc= mysql_query(mysql, "set @@global.general_log=off"); myquery(rc); + rc= mysql_query(mysql, "set @@global.slow_query_log=off"); + myquery(rc); } -static void enable_general_log(int truncate) +static void enable_query_logs(int truncate) { int rc; rc= mysql_query(mysql, "set @save_global_general_log=@@global.general_log"); myquery(rc); + rc= mysql_query(mysql, "set @save_global_slow_query_log=@@global.slow_query_log"); + myquery(rc); + rc= mysql_query(mysql, "set @@global.general_log=on"); myquery(rc); + rc= mysql_query(mysql, "set @@global.slow_query_log=on"); + myquery(rc); + + if (truncate) { rc= mysql_query(mysql, "truncate mysql.general_log"); myquery(rc); + + rc= mysql_query(mysql, "truncate mysql.slow_log"); + myquery(rc); } } -static void restore_general_log() +static void restore_query_logs() { int rc; rc= mysql_query(mysql, "set @@global.general_log=@save_global_general_log"); myquery(rc); + + rc= mysql_query(mysql, "set @@global.slow_query_log=@save_global_slow_query_log"); + myquery(rc); } @@ -15447,7 +15462,7 @@ static void test_bug17667() return; } - enable_general_log(1); + enable_query_logs(1); for (statement_cursor= statements; statement_cursor->buffer != NULL; statement_cursor++) @@ -15527,7 +15542,7 @@ static void test_bug17667() statement_cursor->buffer); } - restore_general_log(); + restore_query_logs(); if (!opt_silent) printf("success. All queries found intact in the log.\n"); @@ -17390,7 +17405,7 @@ static void test_bug28386() } mysql_free_result(result); - enable_general_log(1); + enable_query_logs(1); stmt= mysql_simple_prepare(mysql, "SELECT ?"); check_stmt(stmt); @@ -17429,7 +17444,7 @@ static void test_bug28386() mysql_free_result(result); - restore_general_log(); + restore_query_logs(); DBUG_VOID_RETURN; } @@ -18215,7 +18230,7 @@ static void test_bug42373() Bug#54041: MySQL 5.0.92 fails when tests from Connector/C suite run */ -static void test_bug54041() +static void test_bug54041_impl() { int rc; MYSQL_STMT *stmt; @@ -18230,7 +18245,7 @@ static void test_bug54041() rc= mysql_query(mysql, "CREATE TABLE t1 (a INT)"); myquery(rc); - stmt= mysql_simple_prepare(mysql, "INSERT INTO t1 (a) VALUES (?)"); + stmt= mysql_simple_prepare(mysql, "SELECT a FROM t1 WHERE a > ?"); check_stmt(stmt); verify_param_count(stmt, 1); @@ -18268,6 +18283,20 @@ static void test_bug54041() } +/** + Bug#54041: MySQL 5.0.92 fails when tests from Connector/C suite run +*/ + +static void test_bug54041() +{ + enable_query_logs(0); + test_bug54041_impl(); + disable_query_logs(); + test_bug54041_impl(); + restore_query_logs(); +} + + /* Read and parse arguments and MySQL options from my.cnf */ @@ -18348,7 +18377,7 @@ and you are welcome to modify and redistribute it under the GPL license\n"); static struct my_tests_st my_tests[]= { - { "disable_general_log", disable_general_log }, + { "disable_query_logs", disable_query_logs }, { "test_view_sp_list_fields", test_view_sp_list_fields }, { "client_query", client_query }, { "test_prepare_insert_update", test_prepare_insert_update}, From e73738f13f037fcc78ae4480007104bfdfc8778c Mon Sep 17 00:00:00 2001 From: smenon Date: Tue, 28 Sep 2010 12:39:22 +0200 Subject: [PATCH 3/3] Backport into mysql-5.1.49sp1-release > ------------------------------------------------------------ > revno: 3457.3.1 > revision-id: alexey.kopytov@sun.com-20100712145855-niybvwsthe480r69 > parent: mattias.jonsson@oracle.com-20100709130033-fgr7hggrrebf6qkc > committer: Alexey Kopytov > branch nick: 55061-5.1-bugteam > timestamp: Mon 2010-07-12 18:58:55 +0400 > message: > Bug#55061: Build failing on sol 8 x86 - assembler code vs > compiler problem > > GCC-style inline assembly is not supported by the Sun Studio > compilers prior to version 12. > > Added a check for the Sun Studio version to avoid using > _FPU_GETCW() / _FPU_SETCW() when inline assembly is > unsupported. This can lead to some differences in floating > point calculations on Solaris 8/x86 which, however, is not worth > bothering with Sun-style assembly .il templates. --- sql/mysqld.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 5514c356bd1..f9012b750f4 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -190,7 +190,7 @@ typedef fp_except fp_except_t; # define fpu_control_t unsigned int # define _FPU_EXTENDED 0x300 # define _FPU_DOUBLE 0x200 -# if defined(__GNUC__) || defined(__SUNPRO_CC) +# if defined(__GNUC__) || (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x590) # define _FPU_GETCW(cw) asm volatile ("fnstcw %0" : "=m" (*&cw)) # define _FPU_SETCW(cw) asm volatile ("fldcw %0" : : "m" (*&cw)) # else