mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into vajra.(none):/opt/local/work/mysql-5.0-runtime
This commit is contained in:
commit
196a8ac758
4 changed files with 161 additions and 0 deletions
35
mysql-test/r/bdb_notembedded.result
Normal file
35
mysql-test/r/bdb_notembedded.result
Normal file
|
@ -0,0 +1,35 @@
|
|||
set autocommit=1;
|
||||
reset master;
|
||||
create table bug16206 (a int);
|
||||
insert into bug16206 values(1);
|
||||
start transaction;
|
||||
insert into bug16206 values(2);
|
||||
commit;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
|
||||
f n Query 1 n use `test`; create table bug16206 (a int)
|
||||
f n Query 1 n use `test`; insert into bug16206 values(1)
|
||||
f n Query 1 n use `test`; insert into bug16206 values(2)
|
||||
drop table bug16206;
|
||||
reset master;
|
||||
create table bug16206 (a int) engine= bdb;
|
||||
insert into bug16206 values(0);
|
||||
insert into bug16206 values(1);
|
||||
start transaction;
|
||||
insert into bug16206 values(2);
|
||||
commit;
|
||||
insert into bug16206 values(3);
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
|
||||
f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb
|
||||
f n Query 1 n use `test`; insert into bug16206 values(0)
|
||||
f n Query 1 n use `test`; insert into bug16206 values(1)
|
||||
f n Query 1 n use `test`; BEGIN
|
||||
f n Query 1 n use `test`; insert into bug16206 values(2)
|
||||
f n Query 1 n use `test`; COMMIT
|
||||
f n Query 1 n use `test`; insert into bug16206 values(3)
|
||||
drop table bug16206;
|
||||
set autocommit=0;
|
||||
End of 5.0 tests
|
|
@ -6053,5 +6053,55 @@ select bug20777(18446744073709551613)+1;
|
|||
bug20777(18446744073709551613)+1
|
||||
18446744073709551614
|
||||
drop function bug20777;
|
||||
DROP FUNCTION IF EXISTS bug5274_f1|
|
||||
DROP FUNCTION IF EXISTS bug5274_f2|
|
||||
CREATE FUNCTION bug5274_f1(p1 CHAR) RETURNS CHAR
|
||||
RETURN CONCAT(p1, p1)|
|
||||
CREATE FUNCTION bug5274_f2() RETURNS CHAR
|
||||
BEGIN
|
||||
DECLARE v1 INT DEFAULT 0;
|
||||
DECLARE v2 CHAR DEFAULT 'x';
|
||||
WHILE v1 < 30 DO
|
||||
SET v1 = v1 + 1;
|
||||
SET v2 = bug5274_f1(v2);
|
||||
END WHILE;
|
||||
RETURN v2;
|
||||
END|
|
||||
SELECT bug5274_f2()|
|
||||
bug5274_f2()
|
||||
x
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
Warning 1265 Data truncated for column 'bug5274_f1' at row 1
|
||||
DROP FUNCTION bug5274_f1|
|
||||
DROP FUNCTION bug5274_f2|
|
||||
End of 5.0 tests.
|
||||
drop table t1,t2;
|
||||
|
|
38
mysql-test/t/bdb_notembedded.test
Normal file
38
mysql-test/t/bdb_notembedded.test
Normal file
|
@ -0,0 +1,38 @@
|
|||
-- source include/not_embedded.inc
|
||||
-- source include/have_bdb.inc
|
||||
|
||||
#
|
||||
# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode
|
||||
#
|
||||
set autocommit=1;
|
||||
|
||||
let $VERSION=`select version()`;
|
||||
|
||||
reset master;
|
||||
create table bug16206 (a int);
|
||||
insert into bug16206 values(1);
|
||||
start transaction;
|
||||
insert into bug16206 values(2);
|
||||
commit;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 1 f 2 n 5 n
|
||||
show binlog events;
|
||||
drop table bug16206;
|
||||
|
||||
reset master;
|
||||
create table bug16206 (a int) engine= bdb;
|
||||
insert into bug16206 values(0);
|
||||
insert into bug16206 values(1);
|
||||
start transaction;
|
||||
insert into bug16206 values(2);
|
||||
commit;
|
||||
insert into bug16206 values(3);
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 1 f 2 n 5 n
|
||||
show binlog events;
|
||||
drop table bug16206;
|
||||
|
||||
set autocommit=0;
|
||||
|
||||
|
||||
--echo End of 5.0 tests
|
|
@ -6976,6 +6976,44 @@ select bug20777(18446744073709551613)+1;
|
|||
drop function bug20777;
|
||||
delimiter |;
|
||||
|
||||
|
||||
#
|
||||
# BUG#5274: Stored procedure crash if length of CHAR variable too great.
|
||||
#
|
||||
|
||||
# Prepare.
|
||||
|
||||
--disable_warnings
|
||||
DROP FUNCTION IF EXISTS bug5274_f1|
|
||||
DROP FUNCTION IF EXISTS bug5274_f2|
|
||||
--enable_warnings
|
||||
|
||||
# Test.
|
||||
|
||||
CREATE FUNCTION bug5274_f1(p1 CHAR) RETURNS CHAR
|
||||
RETURN CONCAT(p1, p1)|
|
||||
|
||||
CREATE FUNCTION bug5274_f2() RETURNS CHAR
|
||||
BEGIN
|
||||
DECLARE v1 INT DEFAULT 0;
|
||||
DECLARE v2 CHAR DEFAULT 'x';
|
||||
|
||||
WHILE v1 < 30 DO
|
||||
SET v1 = v1 + 1;
|
||||
SET v2 = bug5274_f1(v2);
|
||||
END WHILE;
|
||||
|
||||
RETURN v2;
|
||||
END|
|
||||
|
||||
SELECT bug5274_f2()|
|
||||
|
||||
# Cleanup.
|
||||
|
||||
DROP FUNCTION bug5274_f1|
|
||||
DROP FUNCTION bug5274_f2|
|
||||
|
||||
|
||||
###
|
||||
--echo End of 5.0 tests.
|
||||
|
||||
|
|
Loading…
Reference in a new issue