summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.h.cmake1
-rw-r--r--configure.cmake1
-rw-r--r--include/my_global.h4
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_start_stop_slave.result2
-rw-r--r--mysql-test/suite/rpl/t/rpl_start_stop_slave.test7
-rw-r--r--mysql-test/suite/sys_vars/r/all_vars.result2
-rw-r--r--mysql-test/suite/sys_vars/r/max_digest_length_basic.result23
-rw-r--r--mysql-test/suite/sys_vars/r/pfs_max_digest_length_basic.result23
-rw-r--r--mysql-test/suite/sys_vars/t/max_digest_length_basic.test46
-rw-r--r--mysql-test/suite/sys_vars/t/pfs_max_digest_length-master_basic.opt2
-rw-r--r--mysql-test/suite/sys_vars/t/pfs_max_digest_length_basic.test47
-rw-r--r--storage/connect/ha_connect.cc2
-rw-r--r--storage/connect/tabxml.cpp8
-rw-r--r--storage/connect/value.cpp2
-rw-r--r--storage/innobase/fsp/fsp0fsp.cc4
-rw-r--r--storage/xtradb/fsp/fsp0fsp.cc4
17 files changed, 171 insertions, 15 deletions
diff --git a/config.h.cmake b/config.h.cmake
index 33ec17e49c7..69c107ebd5b 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -406,6 +406,7 @@
#cmakedefine SIGNAL_RETURN_TYPE_IS_VOID 1
#cmakedefine RETSIGTYPE @RETSIGTYPE@
#cmakedefine VOID_SIGHANDLER 1
+#cmakedefine HAVE_SIGHANDLER_T 1
#define STRUCT_RLIMIT struct rlimit
#ifdef __APPLE__
diff --git a/configure.cmake b/configure.cmake
index f8c58dac391..d7bdd1eb668 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -547,6 +547,7 @@ MY_CHECK_TYPE_SIZE(mode_t MODE_T)
IF(NOT SIZEOF_MODE_T)
SET(mode_t int)
ENDIF()
+MY_CHECK_TYPE_SIZE(sighandler_t SIGHANDLER_T)
IF(HAVE_NETINET_IN_H)
SET(CMAKE_EXTRA_INCLUDE_FILES netinet/in.h)
diff --git a/include/my_global.h b/include/my_global.h
index 3027eed7e17..693b9c4421b 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -555,7 +555,11 @@ typedef int my_socket; /* File descriptor for sockets */
/* Type for fuctions that handles signals */
#define sig_handler RETSIGTYPE
C_MODE_START
+#ifdef HAVE_SIGHANDLER_T
+#define sig_return sighandler_t
+#else
typedef void (*sig_return)(void); /* Returns type from signal */
+#endif
C_MODE_END
#if defined(__GNUC__) && !defined(_lint)
typedef char pchar; /* Mixed prototypes can take char */
diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
index 44b3bbfef16..54f63a557e6 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
@@ -16,8 +16,8 @@ def mysql column_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8
def mysql column_stats histogram 11 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255)
def mysql column_stats hist_size 9 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned
def mysql column_stats hist_type 10 NULL YES enum 14 42 NULL NULL NULL utf8 utf8_bin enum('SINGLE_PREC_HB','DOUBLE_PREC_HB')
-def mysql column_stats max_value 5 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255)
-def mysql column_stats min_value 4 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255)
+def mysql column_stats max_value 5 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255)
+def mysql column_stats min_value 4 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255)
def mysql column_stats nulls_ratio 6 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4)
def mysql column_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI
def mysql db Alter_priv 13 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
@@ -330,8 +330,8 @@ NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp
3.0000 mysql column_stats db_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql column_stats table_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql column_stats column_name varchar 64 192 utf8 utf8_bin varchar(64)
-3.0000 mysql column_stats min_value varchar 255 765 utf8 utf8_bin varchar(255)
-3.0000 mysql column_stats max_value varchar 255 765 utf8 utf8_bin varchar(255)
+1.0000 mysql column_stats min_value varbinary 255 255 NULL NULL varbinary(255)
+1.0000 mysql column_stats max_value varbinary 255 255 NULL NULL varbinary(255)
NULL mysql column_stats nulls_ratio decimal NULL NULL NULL NULL decimal(12,4)
NULL mysql column_stats avg_length decimal NULL NULL NULL NULL decimal(12,4)
NULL mysql column_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
diff --git a/mysql-test/suite/rpl/r/rpl_start_stop_slave.result b/mysql-test/suite/rpl/r/rpl_start_stop_slave.result
index 7344acec4ec..b6cbdc9686b 100644
--- a/mysql-test/suite/rpl/r/rpl_start_stop_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_start_stop_slave.result
@@ -8,4 +8,6 @@ set @time_after_kill := (select CURRENT_TIMESTAMP);
[Time after the query]
[Killing of the slave IO thread was successful]
START SLAVE IO_THREAD;
+create table t1 (a int primary key);
+drop table t1;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_start_stop_slave.test b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test
index ab388f3eebc..a38ac8fc6a1 100644
--- a/mysql-test/suite/rpl/t/rpl_start_stop_slave.test
+++ b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test
@@ -53,5 +53,12 @@ if(`select TIMESTAMPDIFF(SECOND,@time_after_kill, @time_before_kill) > 60`)
START SLAVE IO_THREAD;
+# Ensure that the slave io thread started properly
+connection master;
+create table t1 (a int primary key);
+sync_slave_with_master;
+connection master;
+drop table t1;
+
# End of test
--source include/rpl_end.inc
diff --git a/mysql-test/suite/sys_vars/r/all_vars.result b/mysql-test/suite/sys_vars/r/all_vars.result
index 63f3ce2e439..1bd4e394f6a 100644
--- a/mysql-test/suite/sys_vars/r/all_vars.result
+++ b/mysql-test/suite/sys_vars/r/all_vars.result
@@ -10,7 +10,5 @@ there should be *no* long test name listed below:
select distinct variable_name as `there should be *no* variables listed below:` from t2
left join t1 on variable_name=test_name where test_name is null;
there should be *no* variables listed below:
-max_digest_length
-pfs_max_digest_length
drop table t1;
drop table t2;
diff --git a/mysql-test/suite/sys_vars/r/max_digest_length_basic.result b/mysql-test/suite/sys_vars/r/max_digest_length_basic.result
new file mode 100644
index 00000000000..1a733273614
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/max_digest_length_basic.result
@@ -0,0 +1,23 @@
+select @@global.max_digest_length;
+@@global.max_digest_length
+1024
+select @@session.max_digest_length;
+ERROR HY000: Variable 'max_digest_length' is a GLOBAL variable
+show global variables like 'max_digest_length';
+Variable_name Value
+max_digest_length 1024
+show session variables like 'max_digest_length';
+Variable_name Value
+max_digest_length 1024
+select * from information_schema.global_variables
+where variable_name='max_digest_length';
+VARIABLE_NAME VARIABLE_VALUE
+MAX_DIGEST_LENGTH 1024
+select * from information_schema.session_variables
+where variable_name='max_digest_length';
+VARIABLE_NAME VARIABLE_VALUE
+MAX_DIGEST_LENGTH 1024
+set global max_digest_length=1;
+ERROR HY000: Variable 'max_digest_length' is a read only variable
+set session max_digest_length=1;
+ERROR HY000: Variable 'max_digest_length' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/pfs_max_digest_length_basic.result b/mysql-test/suite/sys_vars/r/pfs_max_digest_length_basic.result
new file mode 100644
index 00000000000..12e48ee50ba
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/pfs_max_digest_length_basic.result
@@ -0,0 +1,23 @@
+select @@global.performance_schema_max_digest_length;
+@@global.performance_schema_max_digest_length
+1024
+select @@session.performance_schema_max_digest_length;
+ERROR HY000: Variable 'performance_schema_max_digest_length' is a GLOBAL variable
+show global variables like 'performance_schema_max_digest_length';
+Variable_name Value
+performance_schema_max_digest_length 1024
+show session variables like 'performance_schema_max_digest_length';
+Variable_name Value
+performance_schema_max_digest_length 1024
+select * from information_schema.global_variables
+where variable_name='performance_schema_max_digest_length';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH 1024
+select * from information_schema.session_variables
+where variable_name='performance_schema_max_digest_length';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH 1024
+set global performance_schema_max_digest_length=1;
+ERROR HY000: Variable 'performance_schema_max_digest_length' is a read only variable
+set session performance_schema_max_digest_length=1;
+ERROR HY000: Variable 'performance_schema_max_digest_length' is a read only variable
diff --git a/mysql-test/suite/sys_vars/t/max_digest_length_basic.test b/mysql-test/suite/sys_vars/t/max_digest_length_basic.test
new file mode 100644
index 00000000000..b5e1d834d7e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/max_digest_length_basic.test
@@ -0,0 +1,46 @@
+# Copyright (C) 2010 Sun Microsystems, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/not_embedded.inc
+
+#
+# Only global
+#
+
+select @@global.max_digest_length;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.max_digest_length;
+
+show global variables like 'max_digest_length';
+
+show session variables like 'max_digest_length';
+
+select * from information_schema.global_variables
+ where variable_name='max_digest_length';
+
+select * from information_schema.session_variables
+ where variable_name='max_digest_length';
+
+#
+# Read-only
+#
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global max_digest_length=1;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session max_digest_length=1;
+
diff --git a/mysql-test/suite/sys_vars/t/pfs_max_digest_length-master_basic.opt b/mysql-test/suite/sys_vars/t/pfs_max_digest_length-master_basic.opt
new file mode 100644
index 00000000000..a98eb86d2e6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/pfs_max_digest_length-master_basic.opt
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance-schema-max_digest_length=1024
diff --git a/mysql-test/suite/sys_vars/t/pfs_max_digest_length_basic.test b/mysql-test/suite/sys_vars/t/pfs_max_digest_length_basic.test
new file mode 100644
index 00000000000..5c89dbda07f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/pfs_max_digest_length_basic.test
@@ -0,0 +1,47 @@
+# Copyright (C) 2010 Sun Microsystems, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+#
+# Only global
+#
+
+select @@global.performance_schema_max_digest_length;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.performance_schema_max_digest_length;
+
+show global variables like 'performance_schema_max_digest_length';
+
+show session variables like 'performance_schema_max_digest_length';
+
+select * from information_schema.global_variables
+ where variable_name='performance_schema_max_digest_length';
+
+select * from information_schema.session_variables
+ where variable_name='performance_schema_max_digest_length';
+
+#
+# Read-only
+#
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global performance_schema_max_digest_length=1;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session performance_schema_max_digest_length=1;
+
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index 3036783e5b7..4536e65fab4 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -2483,6 +2483,8 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond)
case MYSQL_TYPE_YEAR:
case MYSQL_TYPE_NEWDATE:
return NULL;
+ default:
+ break;
} // endswitch type
if (trace) {
diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp
index 49fa9a1c554..a5ca96e40c4 100644
--- a/storage/connect/tabxml.cpp
+++ b/storage/connect/tabxml.cpp
@@ -225,7 +225,7 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
more:
if (vp->atp) {
strncpy(colname, vp->atp->GetName(g), sizeof(colname));
- strncat(xcol->Name, colname, 64);
+ strncat(xcol->Name, colname, sizeof(xcol->Name)-1);
switch (vp->atp->GetText(g, buf, sizeof(buf))) {
case RC_INFO:
@@ -238,17 +238,17 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
} // enswitch rc
if (j)
- strncat(fmt, colname, sizeof(fmt));
+ strncat(fmt, colname, sizeof(fmt)-1);
} else {
if (tdp->Usedom && node->GetType() != 1)
continue;
strncpy(colname, node->GetName(g), sizeof(colname));
- strncat(xcol->Name, colname, 64);
+ strncat(xcol->Name, colname, sizeof(xcol->Name)-1);
if (j)
- strncat(fmt, colname, sizeof(fmt));
+ strncat(fmt, colname, sizeof(fmt)-1);
if (j < lvl && ok) {
vp = lvlp[j+1];
diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp
index 884ce976a52..ed380c46043 100644
--- a/storage/connect/value.cpp
+++ b/storage/connect/value.cpp
@@ -2666,7 +2666,7 @@ bool DTVAL::SetValue_pval(PVAL valp, bool chktype)
/***********************************************************************/
bool DTVAL::SetValue_char(char *p, int n)
{
- bool rc;
+ bool rc= 0;
if (Pdtp) {
char *p2;
diff --git a/storage/innobase/fsp/fsp0fsp.cc b/storage/innobase/fsp/fsp0fsp.cc
index eae1d04af76..2bd89b5e1cd 100644
--- a/storage/innobase/fsp/fsp0fsp.cc
+++ b/storage/innobase/fsp/fsp0fsp.cc
@@ -2802,8 +2802,8 @@ try_to_extend:
if (rounds > 50) {
ib_logf(IB_LOG_LEVEL_INFO,
"Space id %lu trying to reserve %lu extents actually reserved %lu "
- " reserve %lu free %lu size %lu rounds %lu total_reserved %lu",
- space, n_ext, n_pages_added, reserve, n_free, size, rounds, total_reserved);
+ " reserve %lu free %lu size %lu rounds %lu total_reserved %llu",
+ space, n_ext, n_pages_added, reserve, n_free, size, rounds, (ullint) total_reserved);
}
goto try_again;
diff --git a/storage/xtradb/fsp/fsp0fsp.cc b/storage/xtradb/fsp/fsp0fsp.cc
index cb51366df16..ef27e688a3f 100644
--- a/storage/xtradb/fsp/fsp0fsp.cc
+++ b/storage/xtradb/fsp/fsp0fsp.cc
@@ -2810,8 +2810,8 @@ try_to_extend:
if (rounds > 50) {
ib_logf(IB_LOG_LEVEL_INFO,
"Space id %lu trying to reserve %lu extents actually reserved %lu "
- " reserve %lu free %lu size %lu rounds %lu total_reserved %lu",
- space, n_ext, n_pages_added, reserve, n_free, size, rounds, total_reserved);
+ " reserve %lu free %lu size %lu rounds %lu total_reserved %llu",
+ space, n_ext, n_pages_added, reserve, n_free, size, rounds, (ullint) total_reserved);
}
goto try_again;