mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Fixed failing test cases and compiler warnings found by buildbot
- Added some extra command to rpl_start_stop to ensure that the IO thread has connected to the master before we shut down the server. - if signal returns signalhandler_t, use this with the alarm code - Added missing tests to sys_vars - Fixed some possible overflow bugs in tabxml.cpp
This commit is contained in:
parent
b30a768e7b
commit
f813a00029
17 changed files with 171 additions and 15 deletions
|
@ -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__
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
23
mysql-test/suite/sys_vars/r/max_digest_length_basic.result
Normal file
23
mysql-test/suite/sys_vars/r/max_digest_length_basic.result
Normal file
|
@ -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
|
|
@ -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
|
46
mysql-test/suite/sys_vars/t/max_digest_length_basic.test
Normal file
46
mysql-test/suite/sys_vars/t/max_digest_length_basic.test
Normal file
|
@ -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;
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
--loose-enable-performance-schema
|
||||
--loose-performance-schema-max_digest_length=1024
|
47
mysql-test/suite/sys_vars/t/pfs_max_digest_length_basic.test
Normal file
47
mysql-test/suite/sys_vars/t/pfs_max_digest_length_basic.test
Normal file
|
@ -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;
|
||||
|
|
@ -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) {
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue