automerge
This commit is contained in:
commit
a0fe99a859
15
configure.in
15
configure.in
@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
|
|||||||
#
|
#
|
||||||
# When changing major version number please also check switch statement
|
# When changing major version number please also check switch statement
|
||||||
# in mysqlbinlog::check_master_version().
|
# in mysqlbinlog::check_master_version().
|
||||||
AM_INIT_AUTOMAKE(mysql, 5.1.42)
|
AM_INIT_AUTOMAKE(mysql, 5.1.43)
|
||||||
AM_CONFIG_HEADER([include/config.h:config.h.in])
|
AM_CONFIG_HEADER([include/config.h:config.h.in])
|
||||||
|
|
||||||
# Request support for automake silent-rules if available.
|
# Request support for automake silent-rules if available.
|
||||||
@ -31,12 +31,14 @@ NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0
|
|||||||
# Remember that regexps needs to quote [ and ] since this is run through m4
|
# Remember that regexps needs to quote [ and ] since this is run through m4
|
||||||
# We take some made up examples
|
# We take some made up examples
|
||||||
#
|
#
|
||||||
# VERSION 5.1.40sp1-alpha 5.0.34a
|
# VERSION 5.1.40sp1-alpha 5.0.34a 5.5.1-m2
|
||||||
# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a
|
# MYSQL_U_SCORE_VERSION 5.1.40sp1_alpha 5.0.34a 5.5.1_m2
|
||||||
# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34
|
# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a 5.5.1
|
||||||
# MYSQL_BASE_VERSION 5.1 5.0
|
# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34 5.5.1
|
||||||
# MYSQL_VERSION_ID 50140 50034
|
# MYSQL_BASE_VERSION 5.1 5.0 5.5
|
||||||
|
# MYSQL_VERSION_ID 50140 50034 50501
|
||||||
#
|
#
|
||||||
|
MYSQL_U_SCORE_VERSION=`echo $VERSION | sed -e "s|-|_|"`
|
||||||
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
|
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
|
||||||
MYSQL_NUMERIC_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
|
MYSQL_NUMERIC_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
|
||||||
MYSQL_BASE_VERSION=`echo $MYSQL_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
|
MYSQL_BASE_VERSION=`echo $MYSQL_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
|
||||||
@ -73,6 +75,7 @@ romanian russian serbian slovak spanish swedish ukrainian"
|
|||||||
#####
|
#####
|
||||||
#####
|
#####
|
||||||
|
|
||||||
|
AC_SUBST(MYSQL_U_SCORE_VERSION)
|
||||||
AC_SUBST(MYSQL_NO_DASH_VERSION)
|
AC_SUBST(MYSQL_NO_DASH_VERSION)
|
||||||
AC_SUBST(MYSQL_BASE_VERSION)
|
AC_SUBST(MYSQL_BASE_VERSION)
|
||||||
AC_SUBST(MYSQL_VERSION_ID)
|
AC_SUBST(MYSQL_VERSION_ID)
|
||||||
|
@ -305,6 +305,7 @@ private:
|
|||||||
bool ValidateSignature(SignerList*);
|
bool ValidateSignature(SignerList*);
|
||||||
bool ConfirmSignature(Source&);
|
bool ConfirmSignature(Source&);
|
||||||
void GetKey();
|
void GetKey();
|
||||||
|
char* AddTag(char*, const char*, const char*, word32, word32);
|
||||||
void GetName(NameType);
|
void GetName(NameType);
|
||||||
void GetValidity();
|
void GetValidity();
|
||||||
void GetDate(DateType);
|
void GetDate(DateType);
|
||||||
|
@ -652,6 +652,23 @@ word32 CertDecoder::GetDigest()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
char *CertDecoder::AddTag(char *ptr, const char *buf_end,
|
||||||
|
const char *tag_name, word32 tag_name_length,
|
||||||
|
word32 tag_value_length)
|
||||||
|
{
|
||||||
|
if (ptr + tag_name_length + tag_value_length > buf_end)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
memcpy(ptr, tag_name, tag_name_length);
|
||||||
|
ptr+= tag_name_length;
|
||||||
|
|
||||||
|
memcpy(ptr, source_.get_current(), tag_value_length);
|
||||||
|
ptr+= tag_value_length;
|
||||||
|
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// process NAME, either issuer or subject
|
// process NAME, either issuer or subject
|
||||||
void CertDecoder::GetName(NameType nt)
|
void CertDecoder::GetName(NameType nt)
|
||||||
{
|
{
|
||||||
@ -659,11 +676,21 @@ void CertDecoder::GetName(NameType nt)
|
|||||||
|
|
||||||
SHA sha;
|
SHA sha;
|
||||||
word32 length = GetSequence(); // length of all distinguished names
|
word32 length = GetSequence(); // length of all distinguished names
|
||||||
assert (length < ASN_NAME_MAX);
|
|
||||||
|
if (length >= ASN_NAME_MAX)
|
||||||
|
goto err;
|
||||||
length += source_.get_index();
|
length += source_.get_index();
|
||||||
|
|
||||||
char* ptr = (nt == ISSUER) ? issuer_ : subject_;
|
char *ptr, *buf_end;
|
||||||
word32 idx = 0;
|
|
||||||
|
if (nt == ISSUER) {
|
||||||
|
ptr= issuer_;
|
||||||
|
buf_end= ptr + sizeof(issuer_) - 1; // 1 byte for trailing 0
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ptr= subject_;
|
||||||
|
buf_end= ptr + sizeof(subject_) - 1; // 1 byte for trailing 0
|
||||||
|
}
|
||||||
|
|
||||||
while (source_.get_index() < length) {
|
while (source_.get_index() < length) {
|
||||||
GetSet();
|
GetSet();
|
||||||
@ -685,47 +712,36 @@ void CertDecoder::GetName(NameType nt)
|
|||||||
byte id = source_.next();
|
byte id = source_.next();
|
||||||
b = source_.next(); // strType
|
b = source_.next(); // strType
|
||||||
word32 strLen = GetLength(source_);
|
word32 strLen = GetLength(source_);
|
||||||
bool copy = false;
|
|
||||||
|
|
||||||
if (id == COMMON_NAME) {
|
switch (id) {
|
||||||
memcpy(&ptr[idx], "/CN=", 4);
|
case COMMON_NAME:
|
||||||
idx += 4;
|
if (!(ptr= AddTag(ptr, buf_end, "/CN=", 4, strLen)))
|
||||||
copy = true;
|
goto err;
|
||||||
}
|
break;
|
||||||
else if (id == SUR_NAME) {
|
case SUR_NAME:
|
||||||
memcpy(&ptr[idx], "/SN=", 4);
|
if (!(ptr= AddTag(ptr, buf_end, "/SN=", 4, strLen)))
|
||||||
idx += 4;
|
goto err;
|
||||||
copy = true;
|
break;
|
||||||
}
|
case COUNTRY_NAME:
|
||||||
else if (id == COUNTRY_NAME) {
|
if (!(ptr= AddTag(ptr, buf_end, "/C=", 3, strLen)))
|
||||||
memcpy(&ptr[idx], "/C=", 3);
|
goto err;
|
||||||
idx += 3;
|
break;
|
||||||
copy = true;
|
case LOCALITY_NAME:
|
||||||
}
|
if (!(ptr= AddTag(ptr, buf_end, "/L=", 3, strLen)))
|
||||||
else if (id == LOCALITY_NAME) {
|
goto err;
|
||||||
memcpy(&ptr[idx], "/L=", 3);
|
break;
|
||||||
idx += 3;
|
case STATE_NAME:
|
||||||
copy = true;
|
if (!(ptr= AddTag(ptr, buf_end, "/ST=", 4, strLen)))
|
||||||
}
|
goto err;
|
||||||
else if (id == STATE_NAME) {
|
break;
|
||||||
memcpy(&ptr[idx], "/ST=", 4);
|
case ORG_NAME:
|
||||||
idx += 4;
|
if (!(ptr= AddTag(ptr, buf_end, "/O=", 3, strLen)))
|
||||||
copy = true;
|
goto err;
|
||||||
}
|
break;
|
||||||
else if (id == ORG_NAME) {
|
case ORGUNIT_NAME:
|
||||||
memcpy(&ptr[idx], "/O=", 3);
|
if (!(ptr= AddTag(ptr, buf_end, "/OU=", 4, strLen)))
|
||||||
idx += 3;
|
goto err;
|
||||||
copy = true;
|
break;
|
||||||
}
|
|
||||||
else if (id == ORGUNIT_NAME) {
|
|
||||||
memcpy(&ptr[idx], "/OU=", 4);
|
|
||||||
idx += 4;
|
|
||||||
copy = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (copy) {
|
|
||||||
memcpy(&ptr[idx], source_.get_current(), strLen);
|
|
||||||
idx += strLen;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sha.Update(source_.get_current(), strLen);
|
sha.Update(source_.get_current(), strLen);
|
||||||
@ -739,23 +755,20 @@ void CertDecoder::GetName(NameType nt)
|
|||||||
source_.advance(oidSz + 1);
|
source_.advance(oidSz + 1);
|
||||||
word32 length = GetLength(source_);
|
word32 length = GetLength(source_);
|
||||||
|
|
||||||
if (email) {
|
if (email && !(ptr= AddTag(ptr, buf_end, "/emailAddress=", 14, length)))
|
||||||
memcpy(&ptr[idx], "/emailAddress=", 14);
|
goto err;
|
||||||
idx += 14;
|
|
||||||
|
|
||||||
memcpy(&ptr[idx], source_.get_current(), length);
|
|
||||||
idx += length;
|
|
||||||
}
|
|
||||||
|
|
||||||
source_.advance(length);
|
source_.advance(length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ptr[idx++] = 0;
|
*ptr= 0;
|
||||||
|
|
||||||
if (nt == ISSUER)
|
sha.Final(nt == ISSUER ? issuerHash_ : subjectHash_);
|
||||||
sha.Final(issuerHash_);
|
|
||||||
else
|
return;
|
||||||
sha.Final(subjectHash_);
|
|
||||||
|
err:
|
||||||
|
source_.SetError(CONTENT_E);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ funcs_1.ndb* # joro : NDB tests marked as experiment
|
|||||||
funcs_2.ndb_charset # joro : NDB tests marked as experimental as agreed with bochklin
|
funcs_2.ndb_charset # joro : NDB tests marked as experimental as agreed with bochklin
|
||||||
|
|
||||||
main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
|
main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
|
||||||
main.innodb-autoinc* # Bug#47809 2009-10-04 joro innodb-autoinc.test fails with valgrind errors with the innodb plugin
|
|
||||||
main.plugin_load @solaris # Bug#42144
|
main.plugin_load @solaris # Bug#42144
|
||||||
|
|
||||||
ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
|
ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
|
||||||
|
@ -237,4 +237,18 @@ source include/diff_tables.inc;
|
|||||||
|
|
||||||
-- sync_slave_with_master
|
-- sync_slave_with_master
|
||||||
|
|
||||||
|
# BUG#49479: LOAD DATA INFILE is binlogged without escaping field names
|
||||||
|
-- source include/master-slave-reset.inc
|
||||||
|
-- connection master
|
||||||
|
use test;
|
||||||
|
CREATE TABLE t1 (`key` TEXT, `text` TEXT);
|
||||||
|
|
||||||
|
LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ',';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
|
||||||
|
-- sync_slave_with_master
|
||||||
|
-- connection master
|
||||||
|
DROP TABLE t1;
|
||||||
|
-- sync_slave_with_master
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
# Vs slave. #
|
# Vs slave. #
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
|
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
|
||||||
|
|
||||||
# Begin clean up test section
|
# Begin clean up test section
|
||||||
connection master;
|
connection master;
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
@ -43,10 +45,12 @@ RETURN tmp;
|
|||||||
END|
|
END|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
|
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
|
||||||
sleep 6;
|
sleep 6;
|
||||||
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
|
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
|
||||||
sleep 6;
|
sleep 6;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
#Select in this test are used for debugging
|
#Select in this test are used for debugging
|
||||||
#select * from test.t1;
|
#select * from test.t1;
|
||||||
@ -56,7 +60,9 @@ sleep 6;
|
|||||||
connection master;
|
connection master;
|
||||||
SET AUTOCOMMIT=0;
|
SET AUTOCOMMIT=0;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
|
--disable_warnings
|
||||||
INSERT INTO test.t1 VALUES (null,test.f1());
|
INSERT INTO test.t1 VALUES (null,test.f1());
|
||||||
|
--enable_warnings
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
SET AUTOCOMMIT=1;
|
SET AUTOCOMMIT=1;
|
||||||
#select * from test.t1;
|
#select * from test.t1;
|
||||||
|
16
mysql-test/include/truncate_file.inc
Normal file
16
mysql-test/include/truncate_file.inc
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# truncate a giving file, all contents of the file are be cleared
|
||||||
|
|
||||||
|
if (`SELECT 'x$file' = 'x'`)
|
||||||
|
{
|
||||||
|
--echo Please assign a file name to $file!!
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
let TRUNCATE_FILE= $file;
|
||||||
|
|
||||||
|
perl;
|
||||||
|
use Env;
|
||||||
|
Env::import('TRUNCATE_FILE');
|
||||||
|
open FILE, '>', $TRUNCATE_FILE || die "Can not open file $file";
|
||||||
|
close FILE;
|
||||||
|
EOF
|
@ -1,4 +1,5 @@
|
|||||||
DROP TABLE IF EXISTS t1;
|
DROP TABLE IF EXISTS t1;
|
||||||
|
DROP PROCEDURE IF EXISTS p1;
|
||||||
CREATE TABLE t1 ( number INT NOT NULL, alpha CHAR(6) NOT NULL );
|
CREATE TABLE t1 ( number INT NOT NULL, alpha CHAR(6) NOT NULL );
|
||||||
INSERT INTO t1 VALUES (1413006,'idlfmv'),
|
INSERT INTO t1 VALUES (1413006,'idlfmv'),
|
||||||
(1413065,'smpsfz'),(1413127,'sljrhx'),(1413304,'qerfnd');
|
(1413065,'smpsfz'),(1413127,'sljrhx'),(1413304,'qerfnd');
|
||||||
@ -119,4 +120,14 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||||||
1 SIMPLE t2 index NULL PRIMARY 102 NULL 3 Using index
|
1 SIMPLE t2 index NULL PRIMARY 102 NULL 3 Using index
|
||||||
1 SIMPLE t1 eq_ref PRIMARY,a PRIMARY 318 func,const,const 1
|
1 SIMPLE t1 eq_ref PRIMARY,a PRIMARY 318 func,const,const 1
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
#
|
||||||
|
# Bug #50096: CONCAT_WS inside procedure returning wrong data
|
||||||
|
#
|
||||||
|
CREATE PROCEDURE p1(a varchar(255), b int, c int)
|
||||||
|
SET @query = CONCAT_WS(",", a, b, c);
|
||||||
|
CALL p1("abcde", "0", "1234");
|
||||||
|
SELECT @query;
|
||||||
|
@query
|
||||||
|
abcde,0,1234
|
||||||
|
DROP PROCEDURE p1;
|
||||||
# End of 5.1 tests
|
# End of 5.1 tests
|
||||||
|
@ -44,16 +44,16 @@ SET TIMESTAMP=1000000000/*!*/;
|
|||||||
insert into t2 values ()
|
insert into t2 values ()
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
# End of log file
|
# End of log file
|
||||||
@ -144,16 +144,16 @@ SET TIMESTAMP=1000000000/*!*/;
|
|||||||
insert into t2 values ()
|
insert into t2 values ()
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
# End of log file
|
# End of log file
|
||||||
@ -359,29 +359,29 @@ SET @@session.collation_database=DEFAULT/*!*/;
|
|||||||
create table t1 (a varchar(64) character set utf8)
|
create table t1 (a varchar(64) character set utf8)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a)
|
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
SET @@session.collation_database=7/*!*/;
|
SET @@session.collation_database=7/*!*/;
|
||||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a)
|
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
SET @@session.collation_database=DEFAULT/*!*/;
|
SET @@session.collation_database=DEFAULT/*!*/;
|
||||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a)
|
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a)
|
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
SET @@session.collation_database=7/*!*/;
|
SET @@session.collation_database=7/*!*/;
|
||||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a)
|
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
SET @@session.collation_database=DEFAULT/*!*/;
|
SET @@session.collation_database=DEFAULT/*!*/;
|
||||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a)
|
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO TABLE `t1` CHARACTER SET koi8r FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a)
|
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO TABLE `t1` CHARACTER SET koi8r FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`)
|
||||||
/*!*/;
|
/*!*/;
|
||||||
SET TIMESTAMP=1000000000/*!*/;
|
SET TIMESTAMP=1000000000/*!*/;
|
||||||
drop table t1
|
drop table t1
|
||||||
|
@ -4704,4 +4704,19 @@ c1
|
|||||||
9.1234
|
9.1234
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# End of test for bug#49489.
|
# End of test for bug#49489.
|
||||||
|
#
|
||||||
|
# Bug #49517: Inconsistent behavior while using
|
||||||
|
# NULLable BIGINT and INT columns in comparison
|
||||||
|
#
|
||||||
|
CREATE TABLE t1(a BIGINT UNSIGNED NOT NULL, b BIGINT NULL, c INT NULL);
|
||||||
|
INSERT INTO t1 VALUES(105, NULL, NULL);
|
||||||
|
SELECT * FROM t1 WHERE b < 102;
|
||||||
|
a b c
|
||||||
|
SELECT * FROM t1 WHERE c < 102;
|
||||||
|
a b c
|
||||||
|
SELECT * FROM t1 WHERE 102 < b;
|
||||||
|
a b c
|
||||||
|
SELECT * FROM t1 WHERE 102 < c;
|
||||||
|
a b c
|
||||||
|
DROP TABLE t1;
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
23
mysql-test/r/sp_sync.result
Normal file
23
mysql-test/r/sp_sync.result
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
Tests of syncronization of stored procedure execution.
|
||||||
|
#
|
||||||
|
# Bug#48157: crash in Item_field::used_tables
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 AS SELECT 1 AS a, 1 AS b;
|
||||||
|
CREATE TABLE t2 AS SELECT 1 AS a, 1 AS b;
|
||||||
|
CREATE PROCEDURE p1()
|
||||||
|
BEGIN
|
||||||
|
UPDATE t1 JOIN t2 USING( a, b ) SET t1.b = 1, t2.b = 1;
|
||||||
|
END|
|
||||||
|
LOCK TABLES t1 WRITE, t2 WRITE;
|
||||||
|
SET DEBUG_SYNC = 'multi_update_reopen_tables SIGNAL parked WAIT_FOR go';
|
||||||
|
CALL p1();
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
SET DEBUG_SYNC = 'now WAIT_FOR parked';
|
||||||
|
CREATE TABLE t1 AS SELECT 1 AS a, 1 AS b;
|
||||||
|
CREATE TABLE t2 AS SELECT 1 AS a, 1 AS b;
|
||||||
|
SET DEBUG_SYNC = 'now SIGNAL go';
|
||||||
|
# Without the DEBUG_SYNC supplied in the same patch as this test in the
|
||||||
|
# code, this test statement will hang.
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
SET DEBUG_SYNC = 'RESET';
|
@ -1640,9 +1640,6 @@ Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` union select `test`.`t1
|
|||||||
# Should not crash
|
# Should not crash
|
||||||
SELECT * FROM t1 UNION SELECT * FROM t1
|
SELECT * FROM t1 UNION SELECT * FROM t1
|
||||||
ORDER BY (SELECT a FROM t2 WHERE b = 12);
|
ORDER BY (SELECT a FROM t2 WHERE b = 12);
|
||||||
a
|
|
||||||
1
|
|
||||||
2
|
|
||||||
# Should not crash
|
# Should not crash
|
||||||
SELECT * FROM t2 UNION SELECT * FROM t2
|
SELECT * FROM t2 UNION SELECT * FROM t2
|
||||||
ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
|
ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
|
||||||
|
@ -19,7 +19,7 @@ ERROR 70100: Query execution was interrupted
|
|||||||
show binlog events from <binlog_start>;
|
show binlog events from <binlog_start>;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a, b) ;file_id=#
|
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, `b`) ;file_id=#
|
||||||
select
|
select
|
||||||
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
|
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
|
||||||
is not null;
|
is not null;
|
||||||
|
@ -929,7 +929,7 @@ master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci
|
|||||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||||
master-bin.000001 # Intvar # # INSERT_ID=10
|
master-bin.000001 # Intvar # # INSERT_ID=10
|
||||||
master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci
|
master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci
|
||||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a, @b) SET b=((@b) + `bug27417`(2)) ;file_id=#
|
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @b) SET `b`=((@b) + `bug27417`(2)) ;file_id=#
|
||||||
master-bin.000001 # Query # # ROLLBACK
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
drop trigger trg_del_t2;
|
drop trigger trg_del_t2;
|
||||||
drop table t1,t2,t3,t4,t5;
|
drop table t1,t2,t3,t4,t5;
|
||||||
|
@ -127,7 +127,7 @@ master-bin.000001 # Query # # COMMIT
|
|||||||
master-bin.000001 # Query # # use `test`; create table t2 (a varchar(200)) engine=blackhole
|
master-bin.000001 # Query # # use `test`; create table t2 (a varchar(200)) engine=blackhole
|
||||||
master-bin.000001 # Query # # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=581
|
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=581
|
||||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a) ;file_id=#
|
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) ;file_id=#
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
master-bin.000001 # Query # # use `test`; alter table t1 add b int
|
master-bin.000001 # Query # # use `test`; alter table t1 add b int
|
||||||
master-bin.000001 # Query # # use `test`; alter table t1 drop b
|
master-bin.000001 # Query # # use `test`; alter table t1 drop b
|
||||||
|
@ -628,7 +628,7 @@ master-bin.000001 # Query # # BEGIN
|
|||||||
master-bin.000001 # Intvar # # INSERT_ID=10
|
master-bin.000001 # Intvar # # INSERT_ID=10
|
||||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||||
master-bin.000001 # Intvar # # INSERT_ID=10
|
master-bin.000001 # Intvar # # INSERT_ID=10
|
||||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a, @b) SET b=((@b) + `bug27417`(2)) ;file_id=#
|
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @b) SET `b`=((@b) + `bug27417`(2)) ;file_id=#
|
||||||
master-bin.000001 # Query # # ROLLBACK
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
/* the output must denote there is the query */;
|
/* the output must denote there is the query */;
|
||||||
drop trigger trg_del_t2;
|
drop trigger trg_del_t2;
|
||||||
@ -866,7 +866,7 @@ master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci
|
|||||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||||
master-bin.000001 # Intvar # # INSERT_ID=10
|
master-bin.000001 # Intvar # # INSERT_ID=10
|
||||||
master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci
|
master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci
|
||||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a, @b) SET b=((@b) + `bug27417`(2)) ;file_id=#
|
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @b) SET `b`=((@b) + `bug27417`(2)) ;file_id=#
|
||||||
master-bin.000001 # Query # # ROLLBACK
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
drop trigger trg_del_t2;
|
drop trigger trg_del_t2;
|
||||||
drop table t1,t2,t3,t4,t5;
|
drop table t1,t2,t3,t4,t5;
|
||||||
|
@ -379,6 +379,9 @@ Note 1592 Statement may not be safe to log in statement format.
|
|||||||
INSERT INTO t1 VALUES (VERSION());
|
INSERT INTO t1 VALUES (VERSION());
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1592 Statement may not be safe to log in statement format.
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
|
INSERT INTO t1 VALUES (RAND());
|
||||||
|
Warnings:
|
||||||
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
DELETE FROM t1;
|
DELETE FROM t1;
|
||||||
SET TIMESTAMP=1000000;
|
SET TIMESTAMP=1000000;
|
||||||
INSERT INTO t1 VALUES
|
INSERT INTO t1 VALUES
|
||||||
|
@ -47,6 +47,8 @@
|
|||||||
# BUG#34768: nondeterministic INSERT using LIMIT logged in stmt mode if binlog_format=mixed
|
# BUG#34768: nondeterministic INSERT using LIMIT logged in stmt mode if binlog_format=mixed
|
||||||
# BUG#41980, SBL, INSERT .. SELECT .. LIMIT = ERROR, even when @@SQL_LOG_BIN is 0
|
# BUG#41980, SBL, INSERT .. SELECT .. LIMIT = ERROR, even when @@SQL_LOG_BIN is 0
|
||||||
# BUG#42640: mysqld crashes when unsafe statements are executed (STRICT_TRANS_TABLES mode)
|
# BUG#42640: mysqld crashes when unsafe statements are executed (STRICT_TRANS_TABLES mode)
|
||||||
|
# BUG#47995: Mark user functions as unsafe
|
||||||
|
# BUG#49222: Mare RAND() unsafe
|
||||||
#
|
#
|
||||||
# ==== Related test cases ====
|
# ==== Related test cases ====
|
||||||
#
|
#
|
||||||
@ -391,6 +393,7 @@ SET @@SESSION.SQL_MODE = @save_sql_mode;
|
|||||||
|
|
||||||
#
|
#
|
||||||
# BUG#47995: Mark user functions as unsafe
|
# BUG#47995: Mark user functions as unsafe
|
||||||
|
# BUG#49222: Mare RAND() unsafe
|
||||||
#
|
#
|
||||||
# Test that the system functions that are supposed to be marked unsafe
|
# Test that the system functions that are supposed to be marked unsafe
|
||||||
# generate a warning. Each INSERT statement below should generate a
|
# generate a warning. Each INSERT statement below should generate a
|
||||||
@ -400,27 +403,28 @@ SET @@SESSION.SQL_MODE = @save_sql_mode;
|
|||||||
CREATE TABLE t1 (a VARCHAR(1000));
|
CREATE TABLE t1 (a VARCHAR(1000));
|
||||||
INSERT INTO t1 VALUES (CURRENT_USER()); #marked unsafe before BUG#47995
|
INSERT INTO t1 VALUES (CURRENT_USER()); #marked unsafe before BUG#47995
|
||||||
INSERT INTO t1 VALUES (FOUND_ROWS()); #marked unsafe before BUG#47995
|
INSERT INTO t1 VALUES (FOUND_ROWS()); #marked unsafe before BUG#47995
|
||||||
INSERT INTO t1 VALUES (GET_LOCK('tmp', 1));
|
INSERT INTO t1 VALUES (GET_LOCK('tmp', 1)); #marked unsafe in BUG#47995
|
||||||
INSERT INTO t1 VALUES (IS_FREE_LOCK('tmp'));
|
INSERT INTO t1 VALUES (IS_FREE_LOCK('tmp')); #marked unsafe in BUG#47995
|
||||||
INSERT INTO t1 VALUES (IS_USED_LOCK('tmp'));
|
INSERT INTO t1 VALUES (IS_USED_LOCK('tmp')); #marked unsafe in BUG#47995
|
||||||
INSERT INTO t1 VALUES (LOAD_FILE('../../std_data/words2.dat')); #marked unsafe before BUG#47995
|
INSERT INTO t1 VALUES (LOAD_FILE('../../std_data/words2.dat')); #marked unsafe in BUG#39701
|
||||||
INSERT INTO t1 VALUES (MASTER_POS_WAIT('dummy arg', 4711, 1));
|
INSERT INTO t1 VALUES (MASTER_POS_WAIT('dummy arg', 4711, 1));
|
||||||
INSERT INTO t1 VALUES (RELEASE_LOCK('tmp'));
|
INSERT INTO t1 VALUES (RELEASE_LOCK('tmp')); #marked unsafe in BUG#47995
|
||||||
INSERT INTO t1 VALUES (ROW_COUNT()); #marked unsafe before BUG#47995
|
INSERT INTO t1 VALUES (ROW_COUNT()); #marked unsafe before BUG#47995
|
||||||
INSERT INTO t1 VALUES (SESSION_USER()); #marked unsafe before BUG#47995
|
INSERT INTO t1 VALUES (SESSION_USER()); #marked unsafe before BUG#47995
|
||||||
INSERT INTO t1 VALUES (SLEEP(1));
|
INSERT INTO t1 VALUES (SLEEP(1)); #marked unsafe in BUG#47995
|
||||||
INSERT INTO t1 VALUES (SYSDATE());
|
INSERT INTO t1 VALUES (SYSDATE()); #marked unsafe in BUG#47995
|
||||||
INSERT INTO t1 VALUES (SYSTEM_USER()); #marked unsafe before BUG#47995
|
INSERT INTO t1 VALUES (SYSTEM_USER()); #marked unsafe before BUG#47995
|
||||||
INSERT INTO t1 VALUES (USER()); #marked unsafe before BUG#47995
|
INSERT INTO t1 VALUES (USER()); #marked unsafe before BUG#47995
|
||||||
INSERT INTO t1 VALUES (UUID()); #marked unsafe before BUG#47995
|
INSERT INTO t1 VALUES (UUID()); #marked unsafe before BUG#47995
|
||||||
INSERT INTO t1 VALUES (UUID_SHORT()); #marked unsafe before BUG#47995
|
INSERT INTO t1 VALUES (UUID_SHORT()); #marked unsafe before BUG#47995
|
||||||
INSERT INTO t1 VALUES (VERSION());
|
INSERT INTO t1 VALUES (VERSION()); #marked unsafe in BUG#47995
|
||||||
|
INSERT INTO t1 VALUES (RAND()); #marked unsafe in BUG#49222
|
||||||
DELETE FROM t1;
|
DELETE FROM t1;
|
||||||
|
|
||||||
# Since we replicate the TIMESTAMP variable, functions affected by the
|
# Since we replicate the TIMESTAMP variable, functions affected by the
|
||||||
# TIMESTAMP variable are safe to replicate. So we check that the
|
# TIMESTAMP variable are safe to replicate. So we check that the
|
||||||
# following following functions depend on the TIMESTAMP variable and
|
# following following functions that depend on the TIMESTAMP variable
|
||||||
# don't generate a warning.
|
# are not unsafe and don't generate a warning.
|
||||||
|
|
||||||
SET TIMESTAMP=1000000;
|
SET TIMESTAMP=1000000;
|
||||||
INSERT INTO t1 VALUES
|
INSERT INTO t1 VALUES
|
||||||
|
18
mysql-test/suite/rpl/r/rpl_geometry.result
Normal file
18
mysql-test/suite/rpl/r/rpl_geometry.result
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
stop slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
reset master;
|
||||||
|
reset slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
start slave;
|
||||||
|
create table t1(a varchar(100),
|
||||||
|
b multipoint not null,
|
||||||
|
c varchar(256));
|
||||||
|
insert into t1 set
|
||||||
|
a='hello',
|
||||||
|
b=geomfromtext('multipoint(1 1)'),
|
||||||
|
c='geometry';
|
||||||
|
create table t2 (a int(11) not null auto_increment primary key,
|
||||||
|
b geometrycollection default null,
|
||||||
|
c decimal(10,0));
|
||||||
|
insert into t2(c) values (null);
|
||||||
|
drop table t1, t2;
|
@ -885,7 +885,7 @@ master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
|
|||||||
master-bin.000001 # Xid 1 # #
|
master-bin.000001 # Xid 1 # #
|
||||||
master-bin.000001 # Query 1 # BEGIN
|
master-bin.000001 # Query 1 # BEGIN
|
||||||
master-bin.000001 # Begin_load_query 1 # ;file_id=#;block_len=#
|
master-bin.000001 # Begin_load_query 1 # ;file_id=#;block_len=#
|
||||||
master-bin.000001 # Execute_load_query 1 # use `test_rpl`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE `t1` FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a, b) ;file_id=#
|
master-bin.000001 # Execute_load_query 1 # use `test_rpl`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE `t1` FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, `b`) ;file_id=#
|
||||||
master-bin.000001 # Xid 1 # #
|
master-bin.000001 # Xid 1 # #
|
||||||
master-bin.000001 # Query 1 # BEGIN
|
master-bin.000001 # Query 1 # BEGIN
|
||||||
master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
|
master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
|
||||||
|
@ -115,3 +115,20 @@ use b48297_db1;
|
|||||||
Comparing tables master:b48297_db1.t1 and slave:b48297_db1.t1
|
Comparing tables master:b48297_db1.t1 and slave:b48297_db1.t1
|
||||||
DROP DATABASE b48297_db1;
|
DROP DATABASE b48297_db1;
|
||||||
DROP DATABASE b42897_db2;
|
DROP DATABASE b42897_db2;
|
||||||
|
stop slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
reset master;
|
||||||
|
reset slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
start slave;
|
||||||
|
use test;
|
||||||
|
CREATE TABLE t1 (`key` TEXT, `text` TEXT);
|
||||||
|
LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ',';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
key text
|
||||||
|
Field A 'Field B'
|
||||||
|
Field 1 'Field 2'
|
||||||
|
Field 3 'Field 4'
|
||||||
|
'Field 5' 'Field 6'
|
||||||
|
Field 6 'Field 7'
|
||||||
|
DROP TABLE t1;
|
||||||
|
@ -5,9 +5,9 @@ show binlog events from <binlog_start>;
|
|||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (c1 char(50))
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (c1 char(50))
|
||||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (c1) ;file_id=#
|
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`c1`) ;file_id=#
|
||||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (c1) ;file_id=#
|
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`c1`) ;file_id=#
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
stop slave;
|
stop slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
@ -126,3 +126,20 @@ use b48297_db1;
|
|||||||
Comparing tables master:b48297_db1.t1 and slave:b48297_db1.t1
|
Comparing tables master:b48297_db1.t1 and slave:b48297_db1.t1
|
||||||
DROP DATABASE b48297_db1;
|
DROP DATABASE b48297_db1;
|
||||||
DROP DATABASE b42897_db2;
|
DROP DATABASE b42897_db2;
|
||||||
|
stop slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
reset master;
|
||||||
|
reset slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
start slave;
|
||||||
|
use test;
|
||||||
|
CREATE TABLE t1 (`key` TEXT, `text` TEXT);
|
||||||
|
LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ',';
|
||||||
|
SELECT * FROM t1;
|
||||||
|
key text
|
||||||
|
Field A 'Field B'
|
||||||
|
Field 1 'Field 2'
|
||||||
|
Field 3 'Field 4'
|
||||||
|
'Field 5' 'Field 6'
|
||||||
|
Field 6 'Field 7'
|
||||||
|
DROP TABLE t1;
|
||||||
|
@ -53,7 +53,7 @@ Master_User root
|
|||||||
Master_Port MASTER_PORT
|
Master_Port MASTER_PORT
|
||||||
Connect_Retry 1
|
Connect_Retry 1
|
||||||
Master_Log_File master-bin.000001
|
Master_Log_File master-bin.000001
|
||||||
Read_Master_Log_Pos 556
|
Read_Master_Log_Pos 560
|
||||||
Relay_Log_File #
|
Relay_Log_File #
|
||||||
Relay_Log_Pos #
|
Relay_Log_Pos #
|
||||||
Relay_Master_Log_File master-bin.000001
|
Relay_Master_Log_File master-bin.000001
|
||||||
|
@ -20,7 +20,7 @@ master-bin.000001 # Query # # use `test`; create table t2 (id int not null prima
|
|||||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||||
master-bin.000001 # Append_block # # ;file_id=#;block_len=#
|
master-bin.000001 # Append_block # # ;file_id=#;block_len=#
|
||||||
master-bin.000001 # Append_block # # ;file_id=#;block_len=#
|
master-bin.000001 # Append_block # # ;file_id=#;block_len=#
|
||||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (id) ;file_id=#
|
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`id`) ;file_id=#
|
||||||
==== Verify results on slave ====
|
==== Verify results on slave ====
|
||||||
[on slave]
|
[on slave]
|
||||||
select count(*) from t2 /* 5 000 */;
|
select count(*) from t2 /* 5 000 */;
|
||||||
|
25
mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
Normal file
25
mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
stop slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
reset master;
|
||||||
|
reset slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
start slave;
|
||||||
|
FLUSH LOGS;
|
||||||
|
CREATE TABLE t1(c1 INT);
|
||||||
|
FLUSH LOGS;
|
||||||
|
call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log');
|
||||||
|
Last_IO_Error
|
||||||
|
Got fatal error 1236 from master when reading data from binary log: 'could not find next log'
|
||||||
|
CREATE TABLE t2(c1 INT);
|
||||||
|
FLUSH LOGS;
|
||||||
|
CREATE TABLE t3(c1 INT);
|
||||||
|
FLUSH LOGS;
|
||||||
|
CREATE TABLE t4(c1 INT);
|
||||||
|
START SLAVE IO_THREAD;
|
||||||
|
SHOW TABLES;
|
||||||
|
Tables_in_test
|
||||||
|
t1
|
||||||
|
t2
|
||||||
|
t3
|
||||||
|
t4
|
||||||
|
DROP TABLE t1, t2, t3, t4;
|
@ -4,6 +4,7 @@ reset master;
|
|||||||
reset slave;
|
reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
|
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
|
||||||
create table t1(id int, i int, r1 int, r2 int, p varchar(100));
|
create table t1(id int, i int, r1 int, r2 int, p varchar(100));
|
||||||
insert into t1 values(1, connection_id(), 0, 0, "");
|
insert into t1 values(1, connection_id(), 0, 0, "");
|
||||||
insert into t1 values(2, 0, rand()*1000, rand()*1000, "");
|
insert into t1 values(2, 0, rand()*1000, rand()*1000, "");
|
||||||
|
@ -4,6 +4,7 @@ reset master;
|
|||||||
reset slave;
|
reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
|
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
|
||||||
CREATE TABLE t1 (a VARCHAR(1000));
|
CREATE TABLE t1 (a VARCHAR(1000));
|
||||||
INSERT INTO t1 VALUES (CONNECTION_ID());
|
INSERT INTO t1 VALUES (CONNECTION_ID());
|
||||||
INSERT INTO t1 VALUES (CONNECTION_ID());
|
INSERT INTO t1 VALUES (CONNECTION_ID());
|
||||||
|
@ -4,6 +4,7 @@ reset master;
|
|||||||
reset slave;
|
reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
|
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
|
||||||
create table t1 (a int not null auto_increment primary key, b int, key(b));
|
create table t1 (a int not null auto_increment primary key, b int, key(b));
|
||||||
INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
||||||
INSERT INTO t1 (a) SELECT null FROM t1;
|
INSERT INTO t1 (a) SELECT null FROM t1;
|
||||||
|
@ -4,6 +4,7 @@ reset master;
|
|||||||
reset slave;
|
reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
|
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
|
||||||
DROP FUNCTION IF EXISTS test.f1;
|
DROP FUNCTION IF EXISTS test.f1;
|
||||||
DROP TABLE IF EXISTS test.t1;
|
DROP TABLE IF EXISTS test.t1;
|
||||||
CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=INNODB;
|
CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=INNODB;
|
||||||
|
@ -25,7 +25,7 @@ master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL)
|
|||||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
|
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
|
||||||
master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
|
master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
|
||||||
master-bin.000001 # Execute_load_query 1 # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (word) ;file_id=1
|
master-bin.000001 # Execute_load_query 1 # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=1
|
||||||
show binlog events from 106 limit 1;
|
show binlog events from 106 limit 1;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
|
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
|
||||||
@ -193,7 +193,7 @@ master-bin.000001 # Query # # use `test`; insert into t1 values (NULL)
|
|||||||
master-bin.000001 # Query # # use `test`; drop table t1
|
master-bin.000001 # Query # # use `test`; drop table t1
|
||||||
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
|
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
|
||||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (word) ;file_id=#
|
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=#
|
||||||
master-bin.000001 # Rotate # # master-bin.000002;pos=4
|
master-bin.000001 # Rotate # # master-bin.000002;pos=4
|
||||||
show binlog events in 'master-bin.000002';
|
show binlog events in 'master-bin.000002';
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
@ -218,7 +218,7 @@ slave-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL)
|
|||||||
slave-bin.000001 # Query 1 # use `test`; drop table t1
|
slave-bin.000001 # Query 1 # use `test`; drop table t1
|
||||||
slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
|
slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
|
||||||
slave-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
|
slave-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
|
||||||
slave-bin.000001 # Execute_load_query 1 # use `test`; LOAD DATA INFILE '../../tmp/SQL_LOAD-2-1-1.data' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (word) ;file_id=1
|
slave-bin.000001 # Execute_load_query 1 # use `test`; LOAD DATA INFILE '../../tmp/SQL_LOAD-2-1-1.data' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=1
|
||||||
slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM
|
slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM
|
||||||
slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
|
slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
|
||||||
show binlog events in 'slave-bin.000002' from 4;
|
show binlog events in 'slave-bin.000002' from 4;
|
||||||
|
26
mysql-test/suite/rpl/t/rpl_geometry.test
Normal file
26
mysql-test/suite/rpl/t/rpl_geometry.test
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
source include/master-slave.inc;
|
||||||
|
source include/have_binlog_format_row.inc;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#48776, Bug#43784
|
||||||
|
#
|
||||||
|
create table t1(a varchar(100),
|
||||||
|
b multipoint not null,
|
||||||
|
c varchar(256));
|
||||||
|
|
||||||
|
insert into t1 set
|
||||||
|
a='hello',
|
||||||
|
b=geomfromtext('multipoint(1 1)'),
|
||||||
|
c='geometry';
|
||||||
|
|
||||||
|
create table t2 (a int(11) not null auto_increment primary key,
|
||||||
|
b geometrycollection default null,
|
||||||
|
c decimal(10,0));
|
||||||
|
|
||||||
|
insert into t2(c) values (null);
|
||||||
|
|
||||||
|
sync_slave_with_master;
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
drop table t1, t2;
|
||||||
|
source include/master-slave-end.inc;
|
106
mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
Normal file
106
mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
source include/master-slave.inc;
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG#28421 Infinite loop on slave relay logs
|
||||||
|
#
|
||||||
|
# That, manually deleteing one or more entries from 'master-bin.index', will
|
||||||
|
# cause master infinitely loop to send one binlog file.
|
||||||
|
#
|
||||||
|
# Manually changing index file is a illegal action, so when this happen, we
|
||||||
|
# send a fatal error to slave and close the dump session.
|
||||||
|
|
||||||
|
FLUSH LOGS;
|
||||||
|
# Now, 2 entries in index file.
|
||||||
|
# ./master-bin.000001
|
||||||
|
# ./master-bin.000002
|
||||||
|
|
||||||
|
CREATE TABLE t1(c1 INT);
|
||||||
|
# Now, the current dump file(master-bin.000002) is the second line of index
|
||||||
|
# file
|
||||||
|
sync_slave_with_master;
|
||||||
|
# Now, all events has been replicate to slave. As current dump file
|
||||||
|
# (master-bin.000002) is the last binlog file, so master is waiting for new
|
||||||
|
# events.
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
# Delete './master-bin.000001' from index file.
|
||||||
|
let $MYSQLD_DATADIR= `SELECT @@DATADIR`;
|
||||||
|
let $file= $MYSQLD_DATADIR/master-bin.index;
|
||||||
|
source include/truncate_file.inc;
|
||||||
|
|
||||||
|
if (`SELECT CONVERT(@@VERSION_COMPILE_OS USING latin1) NOT IN ('Win32', 'Win64', 'Windows')`)
|
||||||
|
{
|
||||||
|
append_file $MYSQLD_DATADIR/master-bin.index;
|
||||||
|
./master-bin.000002
|
||||||
|
EOF
|
||||||
|
sleep 0.00000001;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (`SELECT CONVERT(@@VERSION_COMPILE_OS USING latin1) IN ('Win32', 'Win64', 'Windows')`)
|
||||||
|
{
|
||||||
|
append_file $MYSQLD_DATADIR/master-bin.index;
|
||||||
|
.\master-bin.000002
|
||||||
|
EOF
|
||||||
|
sleep 0.00000001;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Now, only 1 entry in index file. ./master-bin.000002
|
||||||
|
|
||||||
|
# Generate master-bin.000003, but it is in the second line.
|
||||||
|
FLUSH LOGS;
|
||||||
|
# Now, 2 entries in index file.
|
||||||
|
# ./master-bin.000002
|
||||||
|
# ./master-bin.000003
|
||||||
|
|
||||||
|
# Now, master know that new binlog file(master-bin.000003) has been generated.
|
||||||
|
# It expects that the new binlog file is in third line of index file, but
|
||||||
|
# there is no third line in index file. It is so strange that master sends an
|
||||||
|
# error to slave.
|
||||||
|
call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log');
|
||||||
|
connection slave;
|
||||||
|
source include/wait_for_slave_io_to_stop.inc;
|
||||||
|
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1);
|
||||||
|
echo Last_IO_Error;
|
||||||
|
echo $last_error;
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
|
||||||
|
source include/truncate_file.inc;
|
||||||
|
|
||||||
|
if (`SELECT CONVERT(@@VERSION_COMPILE_OS USING latin1) NOT IN ('Win32', 'Win64', 'Windows')`)
|
||||||
|
{
|
||||||
|
append_file $MYSQLD_DATADIR/master-bin.index;
|
||||||
|
./master-bin.000001
|
||||||
|
./master-bin.000002
|
||||||
|
./master-bin.000003
|
||||||
|
EOF
|
||||||
|
sleep 0.00000001;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (`SELECT CONVERT(@@VERSION_COMPILE_OS USING latin1) IN ('Win32', 'Win64', 'Windows')`)
|
||||||
|
{
|
||||||
|
append_file $MYSQLD_DATADIR/master-bin.index;
|
||||||
|
.\master-bin.000001
|
||||||
|
.\master-bin.000002
|
||||||
|
.\master-bin.000003
|
||||||
|
EOF
|
||||||
|
sleep 0.00000001;
|
||||||
|
}
|
||||||
|
|
||||||
|
CREATE TABLE t2(c1 INT);
|
||||||
|
FLUSH LOGS;
|
||||||
|
CREATE TABLE t3(c1 INT);
|
||||||
|
FLUSH LOGS;
|
||||||
|
CREATE TABLE t4(c1 INT);
|
||||||
|
|
||||||
|
connection slave;
|
||||||
|
START SLAVE IO_THREAD;
|
||||||
|
source include/wait_for_slave_io_to_start.inc;
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
sync_slave_with_master;
|
||||||
|
SHOW TABLES;
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
DROP TABLE t1, t2, t3, t4;
|
||||||
|
source include/master-slave-end.inc;
|
@ -3,12 +3,16 @@
|
|||||||
#
|
#
|
||||||
source include/master-slave.inc;
|
source include/master-slave.inc;
|
||||||
|
|
||||||
|
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
|
||||||
|
|
||||||
create table t1(id int, i int, r1 int, r2 int, p varchar(100));
|
create table t1(id int, i int, r1 int, r2 int, p varchar(100));
|
||||||
insert into t1 values(1, connection_id(), 0, 0, "");
|
insert into t1 values(1, connection_id(), 0, 0, "");
|
||||||
# don't put rand and password in the same query, to see if they replicate
|
# don't put rand and password in the same query, to see if they replicate
|
||||||
# independently
|
# independently
|
||||||
# Pure rand test
|
# Pure rand test
|
||||||
|
--disable_warnings
|
||||||
insert into t1 values(2, 0, rand()*1000, rand()*1000, "");
|
insert into t1 values(2, 0, rand()*1000, rand()*1000, "");
|
||||||
|
--enable_warnings
|
||||||
# change the rand suite on the master (we do this because otherwise password()
|
# change the rand suite on the master (we do this because otherwise password()
|
||||||
# benefits from the fact that the above rand() is well replicated :
|
# benefits from the fact that the above rand() is well replicated :
|
||||||
# it picks the same sequence element, which hides a possible bug in password() replication.
|
# it picks the same sequence element, which hides a possible bug in password() replication.
|
||||||
@ -19,7 +23,9 @@ set sql_log_bin=1;
|
|||||||
# Pure password test
|
# Pure password test
|
||||||
insert into t1 values(3, 0, 0, 0, password('does_this_work?'));
|
insert into t1 values(3, 0, 0, 0, password('does_this_work?'));
|
||||||
# "altogether now"
|
# "altogether now"
|
||||||
|
--disable_warnings
|
||||||
insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?'));
|
insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?'));
|
||||||
|
--enable_warnings
|
||||||
select * into outfile 'rpl_misc_functions.outfile' from t1;
|
select * into outfile 'rpl_misc_functions.outfile' from t1;
|
||||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
@ -73,11 +79,13 @@ DELIMITER ;|
|
|||||||
|
|
||||||
# Exercise the functions and procedures then compare the results on
|
# Exercise the functions and procedures then compare the results on
|
||||||
# the master to those on the slave.
|
# the master to those on the slave.
|
||||||
|
--disable_warnings
|
||||||
CALL test_replication_sp1();
|
CALL test_replication_sp1();
|
||||||
CALL test_replication_sp2();
|
CALL test_replication_sp2();
|
||||||
INSERT INTO t1 (col_a) VALUES (test_replication_sf());
|
INSERT INTO t1 (col_a) VALUES (test_replication_sf());
|
||||||
INSERT INTO t1 (col_a) VALUES (test_replication_sf());
|
INSERT INTO t1 (col_a) VALUES (test_replication_sf());
|
||||||
INSERT INTO t1 (col_a) VALUES (test_replication_sf());
|
INSERT INTO t1 (col_a) VALUES (test_replication_sf());
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
--sync_slave_with_master
|
--sync_slave_with_master
|
||||||
|
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
--source include/master-slave.inc
|
--source include/master-slave.inc
|
||||||
|
|
||||||
|
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
|
||||||
|
|
||||||
CREATE TABLE t1 (a VARCHAR(1000));
|
CREATE TABLE t1 (a VARCHAR(1000));
|
||||||
|
|
||||||
# We replicate the connection_id in the query_log_event
|
# We replicate the connection_id in the query_log_event
|
||||||
@ -41,7 +43,9 @@ INSERT INTO t1 VALUES
|
|||||||
(UTC_TIMESTAMP());
|
(UTC_TIMESTAMP());
|
||||||
|
|
||||||
# We replicate the random seed in a rand_log_event
|
# We replicate the random seed in a rand_log_event
|
||||||
|
--disable_warnings
|
||||||
INSERT INTO t1 VALUES (RAND());
|
INSERT INTO t1 VALUES (RAND());
|
||||||
|
--enable_warnings
|
||||||
# We replicate the last_insert_id in an intvar_log_event
|
# We replicate the last_insert_id in an intvar_log_event
|
||||||
INSERT INTO t1 VALUES (LAST_INSERT_ID());
|
INSERT INTO t1 VALUES (LAST_INSERT_ID());
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
-- source include/not_ndb_default.inc
|
-- source include/not_ndb_default.inc
|
||||||
-- source include/master-slave.inc
|
-- source include/master-slave.inc
|
||||||
|
|
||||||
|
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
|
||||||
|
|
||||||
create table t1 (a int not null auto_increment primary key, b int, key(b));
|
create table t1 (a int not null auto_increment primary key, b int, key(b));
|
||||||
INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
||||||
INSERT INTO t1 (a) SELECT null FROM t1;
|
INSERT INTO t1 (a) SELECT null FROM t1;
|
||||||
@ -30,8 +32,8 @@ INSERT INTO t1 (a) SELECT null FROM t1;
|
|||||||
INSERT INTO t1 (a) SELECT null FROM t1;
|
INSERT INTO t1 (a) SELECT null FROM t1;
|
||||||
save_master_pos;
|
save_master_pos;
|
||||||
# a few updates to force OPTIMIZE to do something
|
# a few updates to force OPTIMIZE to do something
|
||||||
update t1 set b=(a/2*rand());
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
|
update t1 set b=(a/2*rand());
|
||||||
delete from t1 order by b limit 10000;
|
delete from t1 order by b limit 10000;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
|
||||||
|
@ -40,10 +40,12 @@ insert into t3 values(100,"log",0,0,0);
|
|||||||
SET @@RAND_SEED1=658490765, @@RAND_SEED2=635893186;
|
SET @@RAND_SEED1=658490765, @@RAND_SEED2=635893186;
|
||||||
|
|
||||||
# Emulate that we have rows 2-9 deleted on the slave
|
# Emulate that we have rows 2-9 deleted on the slave
|
||||||
|
--disable_warnings
|
||||||
insert into t1 values(1,1,rand()),(NULL,2,rand());
|
insert into t1 values(1,1,rand()),(NULL,2,rand());
|
||||||
insert into t2 (b) values(last_insert_id());
|
insert into t2 (b) values(last_insert_id());
|
||||||
insert into t2 values(3,0),(NULL,0);
|
insert into t2 values(3,0),(NULL,0);
|
||||||
insert into t2 values(NULL,0),(500,0);
|
insert into t2 values(NULL,0),(500,0);
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
select a,b, truncate(rand_value,4) from t1;
|
select a,b, truncate(rand_value,4) from t1;
|
||||||
select * from t2;
|
select * from t2;
|
||||||
|
@ -4,6 +4,7 @@ reset master;
|
|||||||
reset slave;
|
reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
|
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
|
||||||
DROP FUNCTION IF EXISTS test.f1;
|
DROP FUNCTION IF EXISTS test.f1;
|
||||||
DROP TABLE IF EXISTS test.t1;
|
DROP TABLE IF EXISTS test.t1;
|
||||||
CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=NDB;
|
CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=NDB;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS t1;
|
DROP TABLE IF EXISTS t1;
|
||||||
|
DROP PROCEDURE IF EXISTS p1;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
|
||||||
CREATE TABLE t1 ( number INT NOT NULL, alpha CHAR(6) NOT NULL );
|
CREATE TABLE t1 ( number INT NOT NULL, alpha CHAR(6) NOT NULL );
|
||||||
@ -111,4 +112,16 @@ EXPLAIN SELECT CONCAT('gui_', t2.a), t1.d FROM t2
|
|||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #50096: CONCAT_WS inside procedure returning wrong data
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE PROCEDURE p1(a varchar(255), b int, c int)
|
||||||
|
SET @query = CONCAT_WS(",", a, b, c);
|
||||||
|
|
||||||
|
CALL p1("abcde", "0", "1234");
|
||||||
|
SELECT @query;
|
||||||
|
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
|
||||||
--echo # End of 5.1 tests
|
--echo # End of 5.1 tests
|
||||||
|
@ -71,7 +71,7 @@ select "--- --position --" as "";
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/
|
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/
|
||||||
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=330 $MYSQLD_DATADIR/master-bin.000002
|
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=332 $MYSQLD_DATADIR/master-bin.000002
|
||||||
|
|
||||||
|
|
||||||
# These are tests for remote binlog.
|
# These are tests for remote binlog.
|
||||||
@ -108,7 +108,7 @@ select "--- --position --" as "";
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/
|
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/
|
||||||
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=330 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
|
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=332 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
|
||||||
|
|
||||||
# Bug#7853 mysqlbinlog does not accept input from stdin
|
# Bug#7853 mysqlbinlog does not accept input from stdin
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
|
@ -4023,4 +4023,18 @@ SELECT * FROM t1 WHERE c1 < 9.12345;
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
--echo # End of test for bug#49489.
|
--echo # End of test for bug#49489.
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #49517: Inconsistent behavior while using
|
||||||
|
--echo # NULLable BIGINT and INT columns in comparison
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1(a BIGINT UNSIGNED NOT NULL, b BIGINT NULL, c INT NULL);
|
||||||
|
INSERT INTO t1 VALUES(105, NULL, NULL);
|
||||||
|
SELECT * FROM t1 WHERE b < 102;
|
||||||
|
SELECT * FROM t1 WHERE c < 102;
|
||||||
|
SELECT * FROM t1 WHERE 102 < b;
|
||||||
|
SELECT * FROM t1 WHERE 102 < c;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
--echo End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
55
mysql-test/t/sp_sync.test
Normal file
55
mysql-test/t/sp_sync.test
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
--echo Tests of syncronization of stored procedure execution.
|
||||||
|
|
||||||
|
--source include/have_debug_sync.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#48157: crash in Item_field::used_tables
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 AS SELECT 1 AS a, 1 AS b;
|
||||||
|
CREATE TABLE t2 AS SELECT 1 AS a, 1 AS b;
|
||||||
|
|
||||||
|
DELIMITER |;
|
||||||
|
|
||||||
|
CREATE PROCEDURE p1()
|
||||||
|
BEGIN
|
||||||
|
UPDATE t1 JOIN t2 USING( a, b ) SET t1.b = 1, t2.b = 1;
|
||||||
|
END|
|
||||||
|
|
||||||
|
DELIMITER ;|
|
||||||
|
|
||||||
|
connect (con1,localhost,root,,);
|
||||||
|
connect (con2,localhost,root,,);
|
||||||
|
|
||||||
|
connection con1;
|
||||||
|
LOCK TABLES t1 WRITE, t2 WRITE;
|
||||||
|
|
||||||
|
connection con2;
|
||||||
|
LET $ID= `select connection_id()`;
|
||||||
|
SET DEBUG_SYNC = 'multi_update_reopen_tables SIGNAL parked WAIT_FOR go';
|
||||||
|
--send CALL p1()
|
||||||
|
|
||||||
|
connection con1;
|
||||||
|
let $wait_condition= SELECT 1 FROM information_schema.processlist WHERE ID = $ID AND
|
||||||
|
state = "Locked";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
SET DEBUG_SYNC = 'now WAIT_FOR parked';
|
||||||
|
CREATE TABLE t1 AS SELECT 1 AS a, 1 AS b;
|
||||||
|
CREATE TABLE t2 AS SELECT 1 AS a, 1 AS b;
|
||||||
|
SET DEBUG_SYNC = 'now SIGNAL go';
|
||||||
|
|
||||||
|
connection con2;
|
||||||
|
--reap
|
||||||
|
|
||||||
|
disconnect con1;
|
||||||
|
disconnect con2;
|
||||||
|
connection default;
|
||||||
|
|
||||||
|
--echo # Without the DEBUG_SYNC supplied in the same patch as this test in the
|
||||||
|
--echo # code, this test statement will hang.
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
|
||||||
|
SET DEBUG_SYNC = 'RESET';
|
||||||
|
|
@ -1144,8 +1144,10 @@ SELECT * FROM t1 UNION SELECT * FROM t1
|
|||||||
ORDER BY (SELECT a FROM t2 WHERE b = 12);
|
ORDER BY (SELECT a FROM t2 WHERE b = 12);
|
||||||
|
|
||||||
--echo # Should not crash
|
--echo # Should not crash
|
||||||
|
--disable_result_log
|
||||||
SELECT * FROM t1 UNION SELECT * FROM t1
|
SELECT * FROM t1 UNION SELECT * FROM t1
|
||||||
ORDER BY (SELECT a FROM t2 WHERE b = 12);
|
ORDER BY (SELECT a FROM t2 WHERE b = 12);
|
||||||
|
--enable_result_log
|
||||||
|
|
||||||
--echo # Should not crash
|
--echo # Should not crash
|
||||||
SELECT * FROM t2 UNION SELECT * FROM t2
|
SELECT * FROM t2 UNION SELECT * FROM t2
|
||||||
|
@ -506,6 +506,13 @@ public:
|
|||||||
char * name; /* Name from select */
|
char * name; /* Name from select */
|
||||||
/* Original item name (if it was renamed)*/
|
/* Original item name (if it was renamed)*/
|
||||||
char * orig_name;
|
char * orig_name;
|
||||||
|
/**
|
||||||
|
Intrusive list pointer for free list. If not null, points to the next
|
||||||
|
Item on some Query_arena's free list. For instance, stored procedures
|
||||||
|
have their own Query_arena's.
|
||||||
|
|
||||||
|
@see Query_arena::free_list
|
||||||
|
*/
|
||||||
Item *next;
|
Item *next;
|
||||||
uint32 max_length;
|
uint32 max_length;
|
||||||
uint name_length; /* Length of name */
|
uint name_length; /* Length of name */
|
||||||
|
@ -895,9 +895,9 @@ int Arg_comparator::set_cmp_func(Item_result_field *owner_arg,
|
|||||||
ulonglong const_value= (ulonglong)-1;
|
ulonglong const_value= (ulonglong)-1;
|
||||||
thd= current_thd;
|
thd= current_thd;
|
||||||
owner= owner_arg;
|
owner= owner_arg;
|
||||||
|
set_null= set_null && owner_arg;
|
||||||
a= a1;
|
a= a1;
|
||||||
b= a2;
|
b= a2;
|
||||||
owner= owner_arg;
|
|
||||||
thd= current_thd;
|
thd= current_thd;
|
||||||
|
|
||||||
if ((cmp_type= can_compare_as_dates(*a, *b, &const_value)))
|
if ((cmp_type= can_compare_as_dates(*a, *b, &const_value)))
|
||||||
|
@ -54,10 +54,10 @@ public:
|
|||||||
/* Allow owner function to use string buffers. */
|
/* Allow owner function to use string buffers. */
|
||||||
String value1, value2;
|
String value1, value2;
|
||||||
|
|
||||||
Arg_comparator(): thd(0), a_cache(0), b_cache(0), set_null(0),
|
Arg_comparator(): thd(0), a_cache(0), b_cache(0), set_null(TRUE),
|
||||||
get_value_a_func(0), get_value_b_func(0) {};
|
get_value_a_func(0), get_value_b_func(0) {};
|
||||||
Arg_comparator(Item **a1, Item **a2): a(a1), b(a2), thd(0),
|
Arg_comparator(Item **a1, Item **a2): a(a1), b(a2), thd(0),
|
||||||
a_cache(0), b_cache(0), set_null(0),
|
a_cache(0), b_cache(0), set_null(TRUE),
|
||||||
get_value_a_func(0), get_value_b_func(0) {};
|
get_value_a_func(0), get_value_b_func(0) {};
|
||||||
|
|
||||||
int set_compare_func(Item_result_field *owner, Item_result type);
|
int set_compare_func(Item_result_field *owner, Item_result type);
|
||||||
|
@ -4178,6 +4178,16 @@ Create_func_rand::create_native(THD *thd, LEX_STRING name,
|
|||||||
if (item_list != NULL)
|
if (item_list != NULL)
|
||||||
arg_count= item_list->elements;
|
arg_count= item_list->elements;
|
||||||
|
|
||||||
|
/*
|
||||||
|
When RAND() is binlogged, the seed is binlogged too. So the
|
||||||
|
sequence of random numbers is the same on a replication slave as
|
||||||
|
on the master. However, if several RAND() values are inserted
|
||||||
|
into a table, the order in which the rows are modified may differ
|
||||||
|
between master and slave, because the order is undefined. Hence,
|
||||||
|
the statement is unsafe to log in statement format.
|
||||||
|
*/
|
||||||
|
thd->lex->set_stmt_unsafe();
|
||||||
|
|
||||||
switch (arg_count) {
|
switch (arg_count) {
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
|
@ -677,8 +677,8 @@ String *Item_func_concat_ws::val_str(String *str)
|
|||||||
res->length() + sep_str->length() + res2->length())
|
res->length() + sep_str->length() + res2->length())
|
||||||
{
|
{
|
||||||
/* We have room in str; We can't get any errors here */
|
/* We have room in str; We can't get any errors here */
|
||||||
if (str == res2)
|
if (str->ptr() == res2->ptr())
|
||||||
{ // This is quote uncommon!
|
{ // This is quite uncommon!
|
||||||
str->replace(0,0,*sep_str);
|
str->replace(0,0,*sep_str);
|
||||||
str->replace(0,0,*res);
|
str->replace(0,0,*res);
|
||||||
}
|
}
|
||||||
|
@ -3178,8 +3178,9 @@ compare_errors:
|
|||||||
has already been dropped. To ignore such irrelevant "table does
|
has already been dropped. To ignore such irrelevant "table does
|
||||||
not exist errors", we silently clear the error if TEMPORARY was used.
|
not exist errors", we silently clear the error if TEMPORARY was used.
|
||||||
*/
|
*/
|
||||||
if (thd->lex->drop_temporary && thd->is_error() &&
|
if (thd->lex->sql_command == SQLCOM_DROP_TABLE && thd->lex->drop_temporary &&
|
||||||
thd->main_da.sql_errno() == ER_BAD_TABLE_ERROR && !expected_error)
|
thd->is_error() && thd->main_da.sql_errno() == ER_BAD_TABLE_ERROR &&
|
||||||
|
!expected_error)
|
||||||
thd->main_da.reset_diagnostics_area();
|
thd->main_da.reset_diagnostics_area();
|
||||||
/*
|
/*
|
||||||
If we expected a non-zero error code, and we don't get the same error
|
If we expected a non-zero error code, and we don't get the same error
|
||||||
|
@ -95,6 +95,7 @@ public:
|
|||||||
case MYSQL_TYPE_LONG_BLOB:
|
case MYSQL_TYPE_LONG_BLOB:
|
||||||
case MYSQL_TYPE_DOUBLE:
|
case MYSQL_TYPE_DOUBLE:
|
||||||
case MYSQL_TYPE_FLOAT:
|
case MYSQL_TYPE_FLOAT:
|
||||||
|
case MYSQL_TYPE_GEOMETRY:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
These types store a single byte.
|
These types store a single byte.
|
||||||
|
@ -640,7 +640,11 @@ static bool write_execute_load_query_log_event(THD *thd, sql_exchange* ex,
|
|||||||
if (n++)
|
if (n++)
|
||||||
pfields.append(", ");
|
pfields.append(", ");
|
||||||
if (item->name)
|
if (item->name)
|
||||||
|
{
|
||||||
|
pfields.append("`");
|
||||||
pfields.append(item->name);
|
pfields.append(item->name);
|
||||||
|
pfields.append("`");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
item->print(&pfields, QT_ORDINARY);
|
item->print(&pfields, QT_ORDINARY);
|
||||||
}
|
}
|
||||||
@ -660,7 +664,9 @@ static bool write_execute_load_query_log_event(THD *thd, sql_exchange* ex,
|
|||||||
val= lv++;
|
val= lv++;
|
||||||
if (n++)
|
if (n++)
|
||||||
pfields.append(", ");
|
pfields.append(", ");
|
||||||
|
pfields.append("`");
|
||||||
pfields.append(item->name);
|
pfields.append(item->name);
|
||||||
|
pfields.append("`");
|
||||||
pfields.append("=");
|
pfields.append("=");
|
||||||
val->print(&pfields, QT_ORDINARY);
|
val->print(&pfields, QT_ORDINARY);
|
||||||
}
|
}
|
||||||
|
@ -615,8 +615,10 @@ void free_items(Item *item)
|
|||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This works because items are allocated with sql_alloc() */
|
/**
|
||||||
|
This works because items are allocated with sql_alloc().
|
||||||
|
@note The function also handles null pointers (empty list).
|
||||||
|
*/
|
||||||
void cleanup_items(Item *item)
|
void cleanup_items(Item *item)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("cleanup_items");
|
DBUG_ENTER("cleanup_items");
|
||||||
|
@ -711,11 +711,14 @@ impossible position";
|
|||||||
|
|
||||||
thd_proc_info(thd, "Finished reading one binlog; switching to next binlog");
|
thd_proc_info(thd, "Finished reading one binlog; switching to next binlog");
|
||||||
switch (mysql_bin_log.find_next_log(&linfo, 1)) {
|
switch (mysql_bin_log.find_next_log(&linfo, 1)) {
|
||||||
case LOG_INFO_EOF:
|
|
||||||
loop_breaker = (flags & BINLOG_DUMP_NON_BLOCK);
|
|
||||||
break;
|
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
|
case LOG_INFO_EOF:
|
||||||
|
if (mysql_bin_log.is_active(log_file_name))
|
||||||
|
{
|
||||||
|
loop_breaker = (flags & BINLOG_DUMP_NON_BLOCK);
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
errmsg = "could not find next log";
|
errmsg = "could not find next log";
|
||||||
my_errno= ER_MASTER_FATAL_ERROR_READING_BINLOG;
|
my_errno= ER_MASTER_FATAL_ERROR_READING_BINLOG;
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "sql_select.h"
|
#include "sql_select.h"
|
||||||
#include "sp_head.h"
|
#include "sp_head.h"
|
||||||
#include "sql_trigger.h"
|
#include "sql_trigger.h"
|
||||||
|
#include "debug_sync.h"
|
||||||
|
|
||||||
/* Return 0 if row hasn't changed */
|
/* Return 0 if row hasn't changed */
|
||||||
|
|
||||||
@ -1143,8 +1144,11 @@ reopen_tables:
|
|||||||
items from 'fields' list, so the cleanup above is necessary to.
|
items from 'fields' list, so the cleanup above is necessary to.
|
||||||
*/
|
*/
|
||||||
cleanup_items(thd->free_list);
|
cleanup_items(thd->free_list);
|
||||||
|
cleanup_items(thd->stmt_arena->free_list);
|
||||||
close_tables_for_reopen(thd, &table_list);
|
close_tables_for_reopen(thd, &table_list);
|
||||||
|
|
||||||
|
DEBUG_SYNC(thd, "multi_update_reopen_tables");
|
||||||
|
|
||||||
goto reopen_tables;
|
goto reopen_tables;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,13 +21,13 @@ pkglib_LIBRARIES = libmystrings.a
|
|||||||
# Exact one of ASSEMBLER_X
|
# Exact one of ASSEMBLER_X
|
||||||
if ASSEMBLER_x86
|
if ASSEMBLER_x86
|
||||||
ASRCS = strings-x86.s longlong2str-x86.s my_strtoll10-x86.s
|
ASRCS = strings-x86.s longlong2str-x86.s my_strtoll10-x86.s
|
||||||
CSRCS = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c str_alloc.c longlong2str_asm.c my_strchr.c
|
CSRCS = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c str_alloc.c longlong2str_asm.c my_strchr.c strmov.c
|
||||||
else
|
else
|
||||||
if ASSEMBLER_sparc32
|
if ASSEMBLER_sparc32
|
||||||
# These file MUST all be on the same line!! Otherwise automake
|
# These file MUST all be on the same line!! Otherwise automake
|
||||||
# generats a very broken makefile
|
# generats a very broken makefile
|
||||||
ASRCS = bmove_upp-sparc.s strappend-sparc.s strend-sparc.s strinstr-sparc.s strmake-sparc.s strmov-sparc.s strnmov-sparc.s strstr-sparc.s
|
ASRCS = bmove_upp-sparc.s strappend-sparc.s strend-sparc.s strinstr-sparc.s strmake-sparc.s strmov-sparc.s strnmov-sparc.s strstr-sparc.s
|
||||||
CSRCS = strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c strxmov.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c my_strtoll10.c str_alloc.c my_strchr.c
|
CSRCS = strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c strtod.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c strxmov.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c my_strtoll10.c str_alloc.c my_strchr.c strmov.c
|
||||||
else
|
else
|
||||||
#no assembler
|
#no assembler
|
||||||
ASRCS =
|
ASRCS =
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (C) 2000-2001, 2003-2006 MySQL AB
|
# Copyright (C) 2000-2006 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Library General Public
|
# modify it under the terms of the GNU Library General Public
|
||||||
@ -119,6 +119,7 @@ SUFFIXES = .sh
|
|||||||
-e 's!@''SHARED_LIB_VERSION''@!@SHARED_LIB_VERSION@!' \
|
-e 's!@''SHARED_LIB_VERSION''@!@SHARED_LIB_VERSION@!' \
|
||||||
-e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \
|
-e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \
|
||||||
-e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \
|
-e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \
|
||||||
|
-e 's!@''MYSQL_U_SCORE_VERSION''@!@MYSQL_U_SCORE_VERSION@!' \
|
||||||
-e 's!@''MYSQL_COPYRIGHT_YEAR''@!@MYSQL_COPYRIGHT_YEAR@!' \
|
-e 's!@''MYSQL_COPYRIGHT_YEAR''@!@MYSQL_COPYRIGHT_YEAR@!' \
|
||||||
-e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
|
-e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
|
||||||
-e 's!@''PERL_DBI_VERSION''@!@PERL_DBI_VERSION@!' \
|
-e 's!@''PERL_DBI_VERSION''@!@PERL_DBI_VERSION@!' \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
|
# Copyright (C) 2000-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -51,9 +51,9 @@
|
|||||||
%{!?_with_cluster:%define CLUSTER_BUILD 0}
|
%{!?_with_cluster:%define CLUSTER_BUILD 0}
|
||||||
|
|
||||||
%if %{STATIC_BUILD}
|
%if %{STATIC_BUILD}
|
||||||
%define release 0
|
%define release 1
|
||||||
%else
|
%else
|
||||||
%define release 0.glibc23
|
%define release 1.glibc23
|
||||||
%endif
|
%endif
|
||||||
%define mysql_license GPL
|
%define mysql_license GPL
|
||||||
%define mysqld_user mysql
|
%define mysqld_user mysql
|
||||||
@ -65,6 +65,19 @@
|
|||||||
# See BUG#998 for details.
|
# See BUG#998 for details.
|
||||||
%define _unpackaged_files_terminate_build 0
|
%define _unpackaged_files_terminate_build 0
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# RPM build tools now automatically detects Perl module dependencies. This
|
||||||
|
# detection gives problems as it is broken in some versions, and it also
|
||||||
|
# give unwanted dependencies from mandatory scripts in our package.
|
||||||
|
# Might not be possible to disable in all RPM tool versions, but here we
|
||||||
|
# try. We keep the "AutoReqProv: no" for the "test" sub package, as disabling
|
||||||
|
# here might fail, and that package has the most problems.
|
||||||
|
# See http://fedoraproject.org/wiki/Packaging/Perl#Filtering_Requires:_and_Provides
|
||||||
|
# http://www.wideopen.com/archives/rpm-list/2002-October/msg00343.html
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
%undefine __perl_provides
|
||||||
|
%undefine __perl_requires
|
||||||
|
|
||||||
%define see_base For a description of MySQL see the base MySQL RPM or http://www.mysql.com
|
%define see_base For a description of MySQL see the base MySQL RPM or http://www.mysql.com
|
||||||
|
|
||||||
# On SuSE 9 no separate "debuginfo" package is built. To enable basic
|
# On SuSE 9 no separate "debuginfo" package is built. To enable basic
|
||||||
@ -87,7 +100,7 @@
|
|||||||
Name: MySQL
|
Name: MySQL
|
||||||
Summary: MySQL: a very fast and reliable SQL database server
|
Summary: MySQL: a very fast and reliable SQL database server
|
||||||
Group: Applications/Databases
|
Group: Applications/Databases
|
||||||
Version: @MYSQL_NO_DASH_VERSION@
|
Version: @MYSQL_U_SCORE_VERSION@
|
||||||
Release: %{release}
|
Release: %{release}
|
||||||
License: Copyright 2000-2008 MySQL AB, @MYSQL_COPYRIGHT_YEAR@ Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Under %{mysql_license} license as shown in the Description field.
|
License: Copyright 2000-2008 MySQL AB, @MYSQL_COPYRIGHT_YEAR@ Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Under %{mysql_license} license as shown in the Description field.
|
||||||
Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz
|
Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz
|
||||||
@ -205,7 +218,7 @@ They should be used with caution.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%package test
|
%package test
|
||||||
Requires: %{name}-client perl-DBI perl
|
Requires: %{name}-client perl
|
||||||
Summary: MySQL - Test suite
|
Summary: MySQL - Test suite
|
||||||
Group: Applications/Databases
|
Group: Applications/Databases
|
||||||
Provides: mysql-test
|
Provides: mysql-test
|
||||||
@ -882,6 +895,12 @@ fi
|
|||||||
# itself - note that they must be ordered by date (important when
|
# itself - note that they must be ordered by date (important when
|
||||||
# merging BK trees)
|
# merging BK trees)
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 11 2010 Joerg Bruehe <joerg.bruehe@sun.com>
|
||||||
|
|
||||||
|
- Change RPM file naming:
|
||||||
|
- Suffix like "-m2", "-rc" becomes part of version as "_m2", "_rc".
|
||||||
|
- Release counts from 1, not 0.
|
||||||
|
|
||||||
* Mon Aug 24 2009 Jonathan Perkin <jperkin@sun.com>
|
* Mon Aug 24 2009 Jonathan Perkin <jperkin@sun.com>
|
||||||
|
|
||||||
- Add conditionals for bundled zlib and innodb plugin
|
- Add conditionals for bundled zlib and innodb plugin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user