Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
b9d37b83
Commit
b9d37b83
authored
Jan 13, 2010
by
Martin Hansson
Browse files
Options
Browse Files
Download
Plain Diff
Merge of fix for Bug#48157.
parents
e57ea46d
18be529b
Changes
25
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
206 additions
and
80 deletions
+206
-80
configure.in
configure.in
+9
-6
extra/yassl/taocrypt/include/asn.hpp
extra/yassl/taocrypt/include/asn.hpp
+1
-0
extra/yassl/taocrypt/src/asn.cpp
extra/yassl/taocrypt/src/asn.cpp
+68
-55
mysql-test/collections/default.experimental
mysql-test/collections/default.experimental
+0
-1
mysql-test/extra/rpl_tests/rpl_row_func003.test
mysql-test/extra/rpl_tests/rpl_row_func003.test
+6
-0
mysql-test/r/func_concat.result
mysql-test/r/func_concat.result
+11
-0
mysql-test/r/select.result
mysql-test/r/select.result
+15
-0
mysql-test/suite/binlog/r/binlog_unsafe.result
mysql-test/suite/binlog/r/binlog_unsafe.result
+3
-0
mysql-test/suite/binlog/t/binlog_unsafe.test
mysql-test/suite/binlog/t/binlog_unsafe.test
+14
-10
mysql-test/suite/rpl/r/rpl_misc_functions.result
mysql-test/suite/rpl/r/rpl_misc_functions.result
+1
-0
mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result
mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result
+1
-0
mysql-test/suite/rpl/r/rpl_optimize.result
mysql-test/suite/rpl/r/rpl_optimize.result
+1
-0
mysql-test/suite/rpl/r/rpl_row_func003.result
mysql-test/suite/rpl/r/rpl_row_func003.result
+1
-0
mysql-test/suite/rpl/t/rpl_misc_functions.test
mysql-test/suite/rpl/t/rpl_misc_functions.test
+8
-0
mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test
mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test
+4
-0
mysql-test/suite/rpl/t/rpl_optimize.test
mysql-test/suite/rpl/t/rpl_optimize.test
+3
-1
mysql-test/suite/rpl/t/rpl_trigger.test
mysql-test/suite/rpl/t/rpl_trigger.test
+2
-0
mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result
mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result
+1
-0
mysql-test/t/func_concat.test
mysql-test/t/func_concat.test
+13
-0
mysql-test/t/select.test
mysql-test/t/select.test
+14
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+1
-1
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+2
-2
sql/item_create.cc
sql/item_create.cc
+10
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+2
-2
support-files/mysql.spec.sh
support-files/mysql.spec.sh
+15
-2
No files found.
configure.in
View file @
b9d37b83
...
...
@@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
#
# When changing major version number please also check switch statement
# in mysqlbinlog::check_master_version().
AM_INIT_AUTOMAKE
(
mysql, 5.1.4
2
)
AM_INIT_AUTOMAKE
(
mysql, 5.1.4
3
)
AM_CONFIG_HEADER
([
include/config.h:config.h.in]
)
# 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
# We take some made up examples
#
# VERSION 5.1.40sp1-alpha 5.0.34a
# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a
# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34
# MYSQL_BASE_VERSION 5.1 5.0
# MYSQL_VERSION_ID 50140 50034
# VERSION 5.1.40sp1-alpha 5.0.34a 5.5.1-m2
# MYSQL_U_SCORE_VERSION 5.1.40sp1_alpha 5.0.34a 5.5.1_m2
# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a 5.5.1
# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34 5.5.1
# 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_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|
\.
[[^.]]*
$|
|"
`
...
...
@@ -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_BASE_VERSION
)
AC_SUBST
(
MYSQL_VERSION_ID
)
...
...
extra/yassl/taocrypt/include/asn.hpp
View file @
b9d37b83
...
...
@@ -305,6 +305,7 @@ private:
bool
ValidateSignature
(
SignerList
*
);
bool
ConfirmSignature
(
Source
&
);
void
GetKey
();
char
*
AddTag
(
char
*
,
const
char
*
,
const
char
*
,
word32
,
word32
);
void
GetName
(
NameType
);
void
GetValidity
();
void
GetDate
(
DateType
);
...
...
extra/yassl/taocrypt/src/asn.cpp
View file @
b9d37b83
...
...
@@ -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
void
CertDecoder
::
GetName
(
NameType
nt
)
{
...
...
@@ -659,11 +676,21 @@ void CertDecoder::GetName(NameType nt)
SHA
sha
;
word32
length
=
GetSequence
();
// length of all distinguished names
assert
(
length
<
ASN_NAME_MAX
);
if
(
length
>=
ASN_NAME_MAX
)
goto
err
;
length
+=
source_
.
get_index
();
char
*
ptr
=
(
nt
==
ISSUER
)
?
issuer_
:
subject_
;
word32
idx
=
0
;
char
*
ptr
,
*
buf_end
;
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
)
{
GetSet
();
...
...
@@ -685,47 +712,36 @@ void CertDecoder::GetName(NameType nt)
byte
id
=
source_
.
next
();
b
=
source_
.
next
();
// strType
word32
strLen
=
GetLength
(
source_
);
bool
copy
=
false
;
if
(
id
==
COMMON_NAME
)
{
memcpy
(
&
ptr
[
idx
],
"/CN="
,
4
);
idx
+=
4
;
copy
=
true
;
}
else
if
(
id
==
SUR_NAME
)
{
memcpy
(
&
ptr
[
idx
],
"/SN="
,
4
);
idx
+=
4
;
copy
=
true
;
}
else
if
(
id
==
COUNTRY_NAME
)
{
memcpy
(
&
ptr
[
idx
],
"/C="
,
3
);
idx
+=
3
;
copy
=
true
;
}
else
if
(
id
==
LOCALITY_NAME
)
{
memcpy
(
&
ptr
[
idx
],
"/L="
,
3
);
idx
+=
3
;
copy
=
true
;
}
else
if
(
id
==
STATE_NAME
)
{
memcpy
(
&
ptr
[
idx
],
"/ST="
,
4
);
idx
+=
4
;
copy
=
true
;
}
else
if
(
id
==
ORG_NAME
)
{
memcpy
(
&
ptr
[
idx
],
"/O="
,
3
);
idx
+=
3
;
copy
=
true
;
}
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
;
switch
(
id
)
{
case
COMMON_NAME
:
if
(
!
(
ptr
=
AddTag
(
ptr
,
buf_end
,
"/CN="
,
4
,
strLen
)))
goto
err
;
break
;
case
SUR_NAME
:
if
(
!
(
ptr
=
AddTag
(
ptr
,
buf_end
,
"/SN="
,
4
,
strLen
)))
goto
err
;
break
;
case
COUNTRY_NAME
:
if
(
!
(
ptr
=
AddTag
(
ptr
,
buf_end
,
"/C="
,
3
,
strLen
)))
goto
err
;
break
;
case
LOCALITY_NAME
:
if
(
!
(
ptr
=
AddTag
(
ptr
,
buf_end
,
"/L="
,
3
,
strLen
)))
goto
err
;
break
;
case
STATE_NAME
:
if
(
!
(
ptr
=
AddTag
(
ptr
,
buf_end
,
"/ST="
,
4
,
strLen
)))
goto
err
;
break
;
case
ORG_NAME
:
if
(
!
(
ptr
=
AddTag
(
ptr
,
buf_end
,
"/O="
,
3
,
strLen
)))
goto
err
;
break
;
case
ORGUNIT_NAME
:
if
(
!
(
ptr
=
AddTag
(
ptr
,
buf_end
,
"/OU="
,
4
,
strLen
)))
goto
err
;
break
;
}
sha
.
Update
(
source_
.
get_current
(),
strLen
);
...
...
@@ -739,23 +755,20 @@ void CertDecoder::GetName(NameType nt)
source_
.
advance
(
oidSz
+
1
);
word32
length
=
GetLength
(
source_
);
if
(
email
)
{
memcpy
(
&
ptr
[
idx
],
"/emailAddress="
,
14
);
idx
+=
14
;
memcpy
(
&
ptr
[
idx
],
source_
.
get_current
(),
length
);
idx
+=
length
;
}
if
(
email
&&
!
(
ptr
=
AddTag
(
ptr
,
buf_end
,
"/emailAddress="
,
14
,
length
)))
goto
err
;
source_
.
advance
(
length
);
}
}
ptr
[
idx
++
]
=
0
;
*
ptr
=
0
;
if
(
nt
==
ISSUER
)
sha
.
Final
(
issuerHash_
);
else
sha
.
Final
(
subjectHash_
);
sha
.
Final
(
nt
==
ISSUER
?
issuerHash_
:
subjectHash_
);
return
;
err:
source_
.
SetError
(
CONTENT_E
);
}
...
...
mysql-test/collections/default.experimental
View file @
b9d37b83
...
...
@@ -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
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
ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
...
...
mysql-test/extra/rpl_tests/rpl_row_func003.test
View file @
b9d37b83
...
...
@@ -18,6 +18,8 @@
# Vs slave. #
#############################################################################
CALL
mtr
.
add_suppression
(
'Statement may not be safe to log in statement format.'
);
# Begin clean up test section
connection
master
;
--
disable_warnings
...
...
@@ -43,10 +45,12 @@ RETURN tmp;
END
|
delimiter
;
|
--
disable_warnings
INSERT
INTO
test
.
t1
VALUES
(
null
,
test
.
f1
()),(
null
,
test
.
f1
()),(
null
,
test
.
f1
());
sleep
6
;
INSERT
INTO
test
.
t1
VALUES
(
null
,
test
.
f1
()),(
null
,
test
.
f1
()),(
null
,
test
.
f1
());
sleep
6
;
--
enable_warnings
#Select in this test are used for debugging
#select * from test.t1;
...
...
@@ -56,7 +60,9 @@ sleep 6;
connection
master
;
SET
AUTOCOMMIT
=
0
;
START
TRANSACTION
;
--
disable_warnings
INSERT
INTO
test
.
t1
VALUES
(
null
,
test
.
f1
());
--
enable_warnings
ROLLBACK
;
SET
AUTOCOMMIT
=
1
;
#select * from test.t1;
...
...
mysql-test/r/func_concat.result
View file @
b9d37b83
DROP TABLE IF EXISTS t1;
DROP PROCEDURE IF EXISTS p1;
CREATE TABLE t1 ( number INT NOT NULL, alpha CHAR(6) NOT NULL );
INSERT INTO t1 VALUES (1413006,'idlfmv'),
(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 t1 eq_ref PRIMARY,a PRIMARY 318 func,const,const 1
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
mysql-test/r/select.result
View file @
b9d37b83
...
...
@@ -4704,4 +4704,19 @@ c1
9.1234
DROP TABLE t1;
# 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
mysql-test/suite/binlog/r/binlog_unsafe.result
View file @
b9d37b83
...
...
@@ -379,6 +379,9 @@ Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (VERSION());
Warnings:
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;
SET TIMESTAMP=1000000;
INSERT INTO t1 VALUES
...
...
mysql-test/suite/binlog/t/binlog_unsafe.test
View file @
b9d37b83
...
...
@@ -47,6 +47,8 @@
# 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#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 ====
#
...
...
@@ -391,6 +393,7 @@ SET @@SESSION.SQL_MODE = @save_sql_mode;
#
# BUG#47995: Mark user functions as unsafe
# BUG#49222: Mare RAND() unsafe
#
# Test that the system functions that are supposed to be marked unsafe
# 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
));
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
(
GET_LOCK
(
'tmp'
,
1
));
INSERT
INTO
t1
VALUES
(
IS_FREE_LOCK
(
'tmp'
));
INSERT
INTO
t1
VALUES
(
IS_USED_LOCK
(
'tmp'
));
INSERT
INTO
t1
VALUES
(
LOAD_FILE
(
'../../std_data/words2.dat'
));
#marked unsafe
before BUG#47995
INSERT
INTO
t1
VALUES
(
GET_LOCK
(
'tmp'
,
1
));
#marked unsafe in BUG#47995
INSERT
INTO
t1
VALUES
(
IS_FREE_LOCK
(
'tmp'
));
#marked unsafe in BUG#47995
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
in BUG#39701
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
(
SESSION_USER
());
#marked unsafe before BUG#47995
INSERT
INTO
t1
VALUES
(
SLEEP
(
1
));
INSERT
INTO
t1
VALUES
(
SYSDATE
());
INSERT
INTO
t1
VALUES
(
SLEEP
(
1
));
#marked unsafe in BUG#47995
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
(
USER
());
#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
(
VERSION
());
INSERT
INTO
t1
VALUES
(
VERSION
());
#marked unsafe in BUG#47995
INSERT
INTO
t1
VALUES
(
RAND
());
#marked unsafe in BUG#49222
DELETE
FROM
t1
;
# Since we replicate the TIMESTAMP variable, functions affected by the
# TIMESTAMP variable are safe to replicate. So we check that the
# following following functions
depend on the TIMESTAMP variable and
# don't generate a warning.
# following following functions
that depend on the TIMESTAMP variable
#
are not unsafe and
don't generate a warning.
SET
TIMESTAMP
=
1000000
;
INSERT
INTO
t1
VALUES
...
...
mysql-test/suite/rpl/r/rpl_misc_functions.result
View file @
b9d37b83
...
...
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
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));
insert into t1 values(1, connection_id(), 0, 0, "");
insert into t1 values(2, 0, rand()*1000, rand()*1000, "");
...
...
mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result
View file @
b9d37b83
...
...
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
CREATE TABLE t1 (a VARCHAR(1000));
INSERT INTO t1 VALUES (CONNECTION_ID());
INSERT INTO t1 VALUES (CONNECTION_ID());
...
...
mysql-test/suite/rpl/r/rpl_optimize.result
View file @
b9d37b83
...
...
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
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));
INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
INSERT INTO t1 (a) SELECT null FROM t1;
...
...
mysql-test/suite/rpl/r/rpl_row_func003.result
View file @
b9d37b83
...
...
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
DROP FUNCTION IF EXISTS test.f1;
DROP TABLE IF EXISTS test.t1;
CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=INNODB;
...
...
mysql-test/suite/rpl/t/rpl_misc_functions.test
View file @
b9d37b83
...
...
@@ -3,12 +3,16 @@
#
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
));
insert
into
t1
values
(
1
,
connection_id
(),
0
,
0
,
""
);
# don't put rand and password in the same query, to see if they replicate
# independently
# Pure rand test
--
disable_warnings
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()
# 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.
...
...
@@ -19,7 +23,9 @@ set sql_log_bin=1;
# Pure password test
insert
into
t1
values
(
3
,
0
,
0
,
0
,
password
(
'does_this_work?'
));
# "altogether now"
--
disable_warnings
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
;
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
sync_slave_with_master
;
...
...
@@ -73,11 +79,13 @@ DELIMITER ;|
# Exercise the functions and procedures then compare the results on
# the master to those on the slave.
--
disable_warnings
CALL
test_replication_sp1
();
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
());
--
enable_warnings
--
sync_slave_with_master
...
...
mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test
View file @
b9d37b83
...
...
@@ -17,6 +17,8 @@
--
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
));
# We replicate the connection_id in the query_log_event
...
...
@@ -41,7 +43,9 @@ INSERT INTO t1 VALUES
(
UTC_TIMESTAMP
());
# We replicate the random seed in a rand_log_event
--
disable_warnings
INSERT
INTO
t1
VALUES
(
RAND
());
--
enable_warnings
# We replicate the last_insert_id in an intvar_log_event
INSERT
INTO
t1
VALUES
(
LAST_INSERT_ID
());
...
...
mysql-test/suite/rpl/t/rpl_optimize.test
View file @
b9d37b83
...
...
@@ -13,6 +13,8 @@
--
source
include
/
not_ndb_default
.
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
));
INSERT
INTO
t1
(
a
)
VALUES
(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
),(
9
),(
10
);
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
;
save_master_pos
;
# a few updates to force OPTIMIZE to do something
update
t1
set
b
=
(
a
/
2
*
rand
());
--
disable_warnings
update
t1
set
b
=
(
a
/
2
*
rand
());
delete
from
t1
order
by
b
limit
10000
;
--
enable_warnings
...
...
mysql-test/suite/rpl/t/rpl_trigger.test
View file @
b9d37b83
...
...
@@ -40,10 +40,12 @@ insert into t3 values(100,"log",0,0,0);
SET
@@
RAND_SEED1
=
658490765
,
@@
RAND_SEED2
=
635893186
;
# 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
t2
(
b
)
values
(
last_insert_id
());
insert
into
t2
values
(
3
,
0
),(
NULL
,
0
);
insert
into
t2
values
(
NULL
,
0
),(
500
,
0
);
--
enable_warnings
select
a
,
b
,
truncate
(
rand_value
,
4
)
from
t1
;
select
*
from
t2
;
...
...
mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result
View file @
b9d37b83
...
...
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
DROP FUNCTION IF EXISTS test.f1;
DROP TABLE IF EXISTS test.t1;
CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=NDB;
...
...
mysql-test/t/func_concat.test
View file @
b9d37b83
...
...
@@ -4,6 +4,7 @@
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
DROP
PROCEDURE
IF
EXISTS
p1
;
--
enable_warnings
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
;
--
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
mysql-test/t/select.test
View file @
b9d37b83
...
...
@@ -4023,4 +4023,18 @@ SELECT * FROM t1 WHERE c1 < 9.12345;
DROP
TABLE
t1
;
--
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
sql/item_cmpfunc.cc
View file @
b9d37b83
...
...
@@ -895,9 +895,9 @@ int Arg_comparator::set_cmp_func(Item_result_field *owner_arg,
ulonglong
const_value
=
(
ulonglong
)
-
1
;
thd
=
current_thd
;
owner
=
owner_arg
;
set_null
=
set_null
&&
owner_arg
;
a
=
a1
;
b
=
a2
;
owner
=
owner_arg
;
thd
=
current_thd
;
if
((
cmp_type
=
can_compare_as_dates
(
*
a
,
*
b
,
&
const_value
)))
...
...
sql/item_cmpfunc.h
View file @
b9d37b83
...
...
@@ -54,10 +54,10 @@ public:
/* Allow owner function to use string buffers. */
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
)
{};
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
)
{};
int
set_compare_func
(
Item_result_field
*
owner
,
Item_result
type
);
...
...
sql/item_create.cc
View file @
b9d37b83
...
...
@@ -4178,6 +4178,16 @@ Create_func_rand::create_native(THD *thd, LEX_STRING name,
if
(
item_list
!=
NULL
)
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
)
{
case
0
:
{
...
...
sql/item_strfunc.cc
View file @
b9d37b83
...
...
@@ -677,8 +677,8 @@ String *Item_func_concat_ws::val_str(String *str)
res
->
length
()
+
sep_str
->
length
()
+
res2
->
length
())
{
/* We have room in str; We can't get any errors here */
if
(
str
==
res2
)
{
// This is qu
o
te uncommon!
if
(
str
->
ptr
()
==
res2
->
ptr
()
)
{
// This is qu
i
te uncommon!
str
->
replace
(
0
,
0
,
*
sep_str
);
str
->
replace
(
0
,
0
,
*
res
);
}
...
...
support-files/mysql.spec.sh
View file @
b9d37b83
# Copyright 2000-2008 MySQL AB, 2008-2010 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
# it under the terms of the GNU General Public License as published by
...
...
@@ -65,6 +65,19 @@
# See BUG#998 for details.
%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
# On SuSE 9 no separate "debuginfo" package is built. To enable basic
...
...
@@ -205,7 +218,7 @@ They should be used with caution.
%endif
%package
test
Requires: %
{
name
}
-client
perl
-DBI perl
Requires: %
{
name
}
-client
perl
Summary: MySQL - Test suite
Group: Applications/Databases
Provides: mysql-test
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment