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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d866afe5
Commit
d866afe5
authored
Jan 07, 2010
by
Alfranio Correia
Browse files
Options
Browse Files
Download
Plain Diff
merge mysql-5.1-rep+2-delivery1 --> mysql-5.1-rpl-merge
parents
6f7929b1
28286c74
Changes
15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
534 additions
and
104 deletions
+534
-104
mysql-test/extra/rpl_tests/type_conversions.test
mysql-test/extra/rpl_tests/type_conversions.test
+145
-1
mysql-test/suite/binlog/r/binlog_format_switch_inside_trans.result
...t/suite/binlog/r/binlog_format_switch_inside_trans.result
+90
-0
mysql-test/suite/binlog/r/binlog_innodb.result
mysql-test/suite/binlog/r/binlog_innodb.result
+2
-2
mysql-test/suite/binlog/r/binlog_mix_innodb_stat.result
mysql-test/suite/binlog/r/binlog_mix_innodb_stat.result
+2
-2
mysql-test/suite/binlog/r/binlog_row_innodb_stat.result
mysql-test/suite/binlog/r/binlog_row_innodb_stat.result
+2
-2
mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result
mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result
+2
-2
mysql-test/suite/binlog/t/binlog_format_switch_inside_trans.test
...est/suite/binlog/t/binlog_format_switch_inside_trans.test
+98
-0
mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result
mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result
+46
-46
mysql-test/suite/rpl/r/rpl_row_mixing_engines.result
mysql-test/suite/rpl/r/rpl_row_mixing_engines.result
+46
-46
mysql-test/suite/rpl/r/rpl_typeconv.result
mysql-test/suite/rpl/r/rpl_typeconv.result
+76
-0
sql/log.cc
sql/log.cc
+2
-1
sql/rpl_utility.cc
sql/rpl_utility.cc
+10
-2
sql/set_var.cc
sql/set_var.cc
+8
-0
sql/share/errmsg-utf8.txt
sql/share/errmsg-utf8.txt
+3
-0
sql/share/errmsg.txt
sql/share/errmsg.txt
+2
-0
No files found.
mysql-test/extra/rpl_tests/type_conversions.test
View file @
d866afe5
...
...
@@ -12,6 +12,149 @@ connection slave;
let
$if_is_lossy
=
`SELECT FIND_IN_SET('ALL_LOSSY', @@SLAVE_TYPE_CONVERSIONS)`
;
let
$if_is_non_lossy
=
`SELECT FIND_IN_SET('ALL_NON_LOSSY', @@SLAVE_TYPE_CONVERSIONS)`
;
# TINYBLOB
let
$source_type
=
TINYBLOB
;
let
$target_type
=
TINYBLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
1
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
let
$source_type
=
TINYBLOB
;
let
$target_type
=
BLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
$if_is_non_lossy
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
let
$source_type
=
TINYBLOB
;
let
$target_type
=
MEDIUMBLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
$if_is_non_lossy
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
let
$source_type
=
TINYBLOB
;
let
$target_type
=
LONGBLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
$if_is_non_lossy
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
# BLOB
let
$source_type
=
BLOB
;
let
$target_type
=
TINYBLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
$if_is_lossy
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
let
$source_type
=
BLOB
;
let
$target_type
=
BLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
1
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
let
$source_type
=
BLOB
;
let
$target_type
=
MEDIUMBLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
$if_is_non_lossy
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
let
$source_type
=
BLOB
;
let
$target_type
=
LONGBLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
$if_is_non_lossy
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
# MEDIUMBLOB
let
$source_type
=
MEDIUMBLOB
;
let
$target_type
=
TINYBLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
$if_is_lossy
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
let
$source_type
=
MEDIUMBLOB
;
let
$target_type
=
BLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
$if_is_lossy
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
let
$source_type
=
MEDIUMBLOB
;
let
$target_type
=
MEDIUMBLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
1
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
let
$source_type
=
MEDIUMBLOB
;
let
$target_type
=
LONGBLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
$if_is_non_lossy
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
# LONGBLOB
let
$source_type
=
LONGBLOB
;
let
$target_type
=
TINYBLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
$if_is_lossy
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
let
$source_type
=
LONGBLOB
;
let
$target_type
=
BLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
$if_is_lossy
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
let
$source_type
=
LONGBLOB
;
let
$target_type
=
MEDIUMBLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
$if_is_lossy
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
let
$source_type
=
LONGBLOB
;
let
$target_type
=
LONGBLOB
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
1
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
# BUG#49836 (additional tests - GEOMETRY TYPE)
let
$source_type
=
GEOMETRY
;
let
$target_type
=
BLOB
;
let
$source_value
=
PointFromText
(
'POINT(10 10)'
);
let
$target_value
=
PointFromText
(
'POINT(10 10)'
);
let
$can_convert
=
0
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
let
$source_type
=
BLOB
;
let
$target_type
=
GEOMETRY
;
let
$source_value
=
'aaa'
;
let
$target_value
=
'aaa'
;
let
$can_convert
=
0
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
let
$source_type
=
GEOMETRY
;
let
$target_type
=
GEOMETRY
;
let
$source_value
=
PointFromText
(
'POINT(10 10)'
);
let
$target_value
=
PointFromText
(
'POINT(10 10)'
);
let
$can_convert
=
1
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
let
$source_type
=
BIT
(
1
);
let
$target_type
=
BIT
(
1
);
let
$source_value
=
b
'1'
;
...
...
@@ -732,6 +875,7 @@ let $target_value= b'11111';
let
$can_convert
=
$if_is_lossy
;
source
extra
/
rpl_tests
/
check_type
.
inc
;
disable_warnings
;
source
include
/
reset_master_and_slave
.
inc
;
enable_warnings
;
...
...
mysql-test/suite/binlog/r/binlog_format_switch_inside_trans.result
0 → 100644
View file @
d866afe5
set @save_binlog_format= @@global.binlog_format;
create table t1 (a int) engine= myisam;
create table t2 (a int) engine= innodb;
SELECT @@session.binlog_format;
@@session.binlog_format
ROW
SET AUTOCOMMIT=1;
# Test that the session variable 'binlog_format'
# is writable outside a transaction.
set @@session.binlog_format= statement;
SELECT @@session.binlog_format;
@@session.binlog_format
STATEMENT
begin;
# Test that the session variable 'binlog_format' is read-only
# inside a transaction with no preceding updates.
set @@session.binlog_format= mixed;
ERROR HY000: Cannot modify @@session.binlog_format inside a transaction
insert into t2 values (1);
# Test that the session variable 'binlog_format' is read-only
# inside a transaction with preceding transactional updates.
set @@session.binlog_format= row;
ERROR HY000: Cannot modify @@session.binlog_format inside a transaction
commit;
begin;
insert into t1 values (2);
# Test that the session variable 'binlog_format' is read-only
# inside a transaction with preceding non-transactional updates.
set @@session.binlog_format= statement;
ERROR HY000: Cannot modify @@session.binlog_format inside a transaction
commit;
# Test that the session variable 'binlog_format' is writable
# when AUTOCOMMIT=0, before a transaction has started.
set AUTOCOMMIT=0;
set @@session.binlog_format= row;
SELECT @@session.binlog_format;
@@session.binlog_format
ROW
insert into t1 values (4);
# Test that the session variable 'binlog_format' is read-only inside an
# AUTOCOMMIT=0 transaction with preceding non-transactional updates.
set @@session.binlog_format= statement;
ERROR HY000: Cannot modify @@session.binlog_format inside a transaction
SELECT @@session.binlog_format;
@@session.binlog_format
ROW
commit;
insert into t2 values (5);
# Test that the session variable 'binlog_format' is read-only inside an
# AUTOCOMMIT=0 transaction with preceding transactional updates.
set @@session.binlog_format= row;
ERROR HY000: Cannot modify @@session.binlog_format inside a transaction
SELECT @@session.binlog_format;
@@session.binlog_format
ROW
commit;
begin;
insert into t2 values (6);
# Test that the global variable 'binlog_format' is writable
# inside a transaction.
SELECT @@global.binlog_format;
@@global.binlog_format
ROW
set @@global.binlog_format= statement;
SELECT @@global.binlog_format;
@@global.binlog_format
STATEMENT
commit;
set @@global.binlog_format= @save_binlog_format;
create table t3(a int, b int) engine= innodb;
create table t4(a int) engine= innodb;
create table t5(a int) engine= innodb;
create trigger tr2 after insert on t3 for each row begin
insert into t4(a) values(1);
set @@session.binlog_format= statement;
insert into t4(a) values(2);
insert into t5(a) values(3);
end |
# Test that the session variable 'binlog_format' is read-only
# in sub-statements.
insert into t3(a,b) values(1,1);
ERROR HY000: Cannot change the binary logging format inside a stored function or trigger
SELECT @@session.binlog_format;
@@session.binlog_format
ROW
drop table t1;
drop table t2;
drop table t3;
drop table t4;
drop table t5;
mysql-test/suite/binlog/r/binlog_innodb.result
View file @
d866afe5
...
...
@@ -123,7 +123,7 @@ Binlog_cache_disk_use 0
create table t1 (a int) engine=innodb;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use
1
Binlog_cache_use
2
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
...
...
@@ -132,7 +132,7 @@ delete from t1;
commit;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use
2
Binlog_cache_use
4
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
...
...
mysql-test/suite/binlog/r/binlog_mix_innodb_stat.result
View file @
d866afe5
...
...
@@ -9,7 +9,7 @@ drop table if exists t1;
create table t1 (a int) engine=innodb;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use
1
Binlog_cache_use
2
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
...
...
@@ -18,7 +18,7 @@ delete from t1;
commit;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use
2
Binlog_cache_use
4
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
...
...
mysql-test/suite/binlog/r/binlog_row_innodb_stat.result
View file @
d866afe5
...
...
@@ -9,7 +9,7 @@ drop table if exists t1;
create table t1 (a int) engine=innodb;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use
1
Binlog_cache_use
2
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
...
...
@@ -18,7 +18,7 @@ delete from t1;
commit;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use
2
Binlog_cache_use
4
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
...
...
mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result
View file @
d866afe5
...
...
@@ -9,7 +9,7 @@ drop table if exists t1;
create table t1 (a int) engine=innodb;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use
1
Binlog_cache_use
2
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
...
...
@@ -18,7 +18,7 @@ delete from t1;
commit;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use
2
Binlog_cache_use
4
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
...
...
mysql-test/suite/binlog/t/binlog_format_switch_inside_trans.test
0 → 100644
View file @
d866afe5
#
# BUG#47863
# This test verifies if the session variable 'binlog_format'
# is read-only inside a transaction and in sub-statements.
#
source
include
/
have_innodb
.
inc
;
source
include
/
have_binlog_format_row
.
inc
;
set
@
save_binlog_format
=
@@
global
.
binlog_format
;
create
table
t1
(
a
int
)
engine
=
myisam
;
create
table
t2
(
a
int
)
engine
=
innodb
;
SELECT
@@
session
.
binlog_format
;
SET
AUTOCOMMIT
=
1
;
--
echo
# Test that the session variable 'binlog_format'
--
echo
# is writable outside a transaction.
set
@@
session
.
binlog_format
=
statement
;
SELECT
@@
session
.
binlog_format
;
begin
;
--
echo
# Test that the session variable 'binlog_format' is read-only
--
echo
# inside a transaction with no preceding updates.
--
error
ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT
set
@@
session
.
binlog_format
=
mixed
;
insert
into
t2
values
(
1
);
--
echo
# Test that the session variable 'binlog_format' is read-only
--
echo
# inside a transaction with preceding transactional updates.
--
error
ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT
set
@@
session
.
binlog_format
=
row
;
commit
;
begin
;
insert
into
t1
values
(
2
);
--
echo
# Test that the session variable 'binlog_format' is read-only
--
echo
# inside a transaction with preceding non-transactional updates.
--
error
ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT
set
@@
session
.
binlog_format
=
statement
;
commit
;
--
echo
# Test that the session variable 'binlog_format' is writable
--
echo
# when AUTOCOMMIT=0, before a transaction has started.
set
AUTOCOMMIT
=
0
;
set
@@
session
.
binlog_format
=
row
;
SELECT
@@
session
.
binlog_format
;
insert
into
t1
values
(
4
);
--
echo
# Test that the session variable 'binlog_format' is read-only inside an
--
echo
# AUTOCOMMIT=0 transaction with preceding non-transactional updates.
--
error
ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT
set
@@
session
.
binlog_format
=
statement
;
SELECT
@@
session
.
binlog_format
;
commit
;
insert
into
t2
values
(
5
);
--
echo
# Test that the session variable 'binlog_format' is read-only inside an
--
echo
# AUTOCOMMIT=0 transaction with preceding transactional updates.
--
error
ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT
set
@@
session
.
binlog_format
=
row
;
SELECT
@@
session
.
binlog_format
;
commit
;
begin
;
insert
into
t2
values
(
6
);
--
echo
# Test that the global variable 'binlog_format' is writable
--
echo
# inside a transaction.
SELECT
@@
global
.
binlog_format
;
set
@@
global
.
binlog_format
=
statement
;
SELECT
@@
global
.
binlog_format
;
commit
;
set
@@
global
.
binlog_format
=
@
save_binlog_format
;
create
table
t3
(
a
int
,
b
int
)
engine
=
innodb
;
create
table
t4
(
a
int
)
engine
=
innodb
;
create
table
t5
(
a
int
)
engine
=
innodb
;
delimiter
|
;
eval
create
trigger
tr2
after
insert
on
t3
for
each
row
begin
insert
into
t4
(
a
)
values
(
1
);
set
@@
session
.
binlog_format
=
statement
;
insert
into
t4
(
a
)
values
(
2
);
insert
into
t5
(
a
)
values
(
3
);
end
|
delimiter
;
|
--
echo
# Test that the session variable 'binlog_format' is read-only
--
echo
# in sub-statements.
--
error
ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT
insert
into
t3
(
a
,
b
)
values
(
1
,
1
);
SELECT
@@
session
.
binlog_format
;
drop
table
t1
;
drop
table
t2
;
drop
table
t3
;
drop
table
t4
;
drop
table
t5
;
mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result
View file @
d866afe5
This diff is collapsed.
Click to expand it.
mysql-test/suite/rpl/r/rpl_row_mixing_engines.result
View file @
d866afe5
This diff is collapsed.
Click to expand it.
mysql-test/suite/rpl/r/rpl_typeconv.result
View file @
d866afe5
...
...
@@ -69,6 +69,25 @@ RESET MASTER;
include/start_slave.inc
**** Result of conversions ****
Source_Type Target_Type All_Type_Conversion_Flags Value_On_Slave
TINYBLOB TINYBLOB <Correct value>
TINYBLOB BLOB <Correct error>
TINYBLOB MEDIUMBLOB <Correct error>
TINYBLOB LONGBLOB <Correct error>
BLOB TINYBLOB <Correct error>
BLOB BLOB <Correct value>
BLOB MEDIUMBLOB <Correct error>
BLOB LONGBLOB <Correct error>
MEDIUMBLOB TINYBLOB <Correct error>
MEDIUMBLOB BLOB <Correct error>
MEDIUMBLOB MEDIUMBLOB <Correct value>
MEDIUMBLOB LONGBLOB <Correct error>
LONGBLOB TINYBLOB <Correct error>
LONGBLOB BLOB <Correct error>
LONGBLOB MEDIUMBLOB <Correct error>
LONGBLOB LONGBLOB <Correct value>
GEOMETRY BLOB <Correct error>
BLOB GEOMETRY <Correct error>
GEOMETRY GEOMETRY <Correct value>
BIT(1) BIT(1) <Correct value>
DATE DATE <Correct value>
ENUM('master',' ENUM('master',' <Correct value>
...
...
@@ -171,6 +190,25 @@ BIT(5) BIT(6) <Correct error>
BIT(6) BIT(5) <Correct error>
BIT(5) BIT(12) <Correct error>
BIT(12) BIT(5) <Correct error>
TINYBLOB TINYBLOB ALL_NON_LOSSY <Correct value>
TINYBLOB BLOB ALL_NON_LOSSY <Correct value>
TINYBLOB MEDIUMBLOB ALL_NON_LOSSY <Correct value>
TINYBLOB LONGBLOB ALL_NON_LOSSY <Correct value>
BLOB TINYBLOB ALL_NON_LOSSY <Correct error>
BLOB BLOB ALL_NON_LOSSY <Correct value>
BLOB MEDIUMBLOB ALL_NON_LOSSY <Correct value>
BLOB LONGBLOB ALL_NON_LOSSY <Correct value>
MEDIUMBLOB TINYBLOB ALL_NON_LOSSY <Correct error>
MEDIUMBLOB BLOB ALL_NON_LOSSY <Correct error>
MEDIUMBLOB MEDIUMBLOB ALL_NON_LOSSY <Correct value>
MEDIUMBLOB LONGBLOB ALL_NON_LOSSY <Correct value>
LONGBLOB TINYBLOB ALL_NON_LOSSY <Correct error>
LONGBLOB BLOB ALL_NON_LOSSY <Correct error>
LONGBLOB MEDIUMBLOB ALL_NON_LOSSY <Correct error>
LONGBLOB LONGBLOB ALL_NON_LOSSY <Correct value>
GEOMETRY BLOB ALL_NON_LOSSY <Correct error>
BLOB GEOMETRY ALL_NON_LOSSY <Correct error>
GEOMETRY GEOMETRY ALL_NON_LOSSY <Correct value>
BIT(1) BIT(1) ALL_NON_LOSSY <Correct value>
DATE DATE ALL_NON_LOSSY <Correct value>
ENUM('master',' ENUM('master',' ALL_NON_LOSSY <Correct value>
...
...
@@ -273,6 +311,25 @@ BIT(5) BIT(6) ALL_NON_LOSSY <Correct value>
BIT(6) BIT(5) ALL_NON_LOSSY <Correct error>
BIT(5) BIT(12) ALL_NON_LOSSY <Correct value>
BIT(12) BIT(5) ALL_NON_LOSSY <Correct error>
TINYBLOB TINYBLOB ALL_LOSSY <Correct value>
TINYBLOB BLOB ALL_LOSSY <Correct error>
TINYBLOB MEDIUMBLOB ALL_LOSSY <Correct error>
TINYBLOB LONGBLOB ALL_LOSSY <Correct error>
BLOB TINYBLOB ALL_LOSSY <Correct value>
BLOB BLOB ALL_LOSSY <Correct value>
BLOB MEDIUMBLOB ALL_LOSSY <Correct error>
BLOB LONGBLOB ALL_LOSSY <Correct error>
MEDIUMBLOB TINYBLOB ALL_LOSSY <Correct value>
MEDIUMBLOB BLOB ALL_LOSSY <Correct value>
MEDIUMBLOB MEDIUMBLOB ALL_LOSSY <Correct value>
MEDIUMBLOB LONGBLOB ALL_LOSSY <Correct error>
LONGBLOB TINYBLOB ALL_LOSSY <Correct value>
LONGBLOB BLOB ALL_LOSSY <Correct value>
LONGBLOB MEDIUMBLOB ALL_LOSSY <Correct value>
LONGBLOB LONGBLOB ALL_LOSSY <Correct value>
GEOMETRY BLOB ALL_LOSSY <Correct error>
BLOB GEOMETRY ALL_LOSSY <Correct error>
GEOMETRY GEOMETRY ALL_LOSSY <Correct value>
BIT(1) BIT(1) ALL_LOSSY <Correct value>
DATE DATE ALL_LOSSY <Correct value>
ENUM('master',' ENUM('master',' ALL_LOSSY <Correct value>
...
...
@@ -375,6 +432,25 @@ BIT(5) BIT(6) ALL_LOSSY <Correct error>
BIT(6) BIT(5) ALL_LOSSY <Correct value>
BIT(5) BIT(12) ALL_LOSSY <Correct error>
BIT(12) BIT(5) ALL_LOSSY <Correct value>
TINYBLOB TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYBLOB BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYBLOB MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYBLOB LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BLOB TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BLOB BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BLOB MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BLOB LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMBLOB TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMBLOB BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMBLOB MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMBLOB LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
LONGBLOB TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
LONGBLOB BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
LONGBLOB MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
LONGBLOB LONGBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value>
GEOMETRY BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct error>
BLOB GEOMETRY ALL_LOSSY,ALL_NON_LOSSY <Correct error>
GEOMETRY GEOMETRY ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIT(1) BIT(1) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DATE DATE ALL_LOSSY,ALL_NON_LOSSY <Correct value>
ENUM('master',' ENUM('master',' ALL_LOSSY,ALL_NON_LOSSY <Correct value>
...
...
sql/log.cc
View file @
d866afe5
...
...
@@ -6191,7 +6191,8 @@ int TC_LOG_BINLOG::log_xid(THD *thd, my_xid xid)
We always commit the entire transaction when writing an XID. Also
note that the return value is inverted.
*/
DBUG_RETURN
(
!
binlog_flush_trx_cache
(
thd
,
cache_mngr
,
&
xle
));
DBUG_RETURN
(
!
binlog_flush_stmt_cache
(
thd
,
cache_mngr
)
&&
!
binlog_flush_trx_cache
(
thd
,
cache_mngr
,
&
xle
));
}
void
TC_LOG_BINLOG
::
unlog
(
ulong
cookie
,
my_xid
xid
)
...
...
sql/rpl_utility.cc
View file @
d866afe5
...
...
@@ -590,6 +590,13 @@ can_convert_field_to(Field *field,
*/
if
(
field
->
real_type
()
==
source_type
)
{
if
(
metadata
==
0
)
// Metadata can only be zero if no metadata was provided
{
DBUG_PRINT
(
"debug"
,
(
"Base types are identical, but there is no metadata"
));
*
order_var
=
0
;
DBUG_RETURN
(
true
);
}
DBUG_PRINT
(
"debug"
,
(
"Base types are identical, doing field size comparison"
));
if
(
field
->
compatible_field_size
(
metadata
,
rli
,
mflags
,
order_var
))
DBUG_RETURN
(
is_conversion_ok
(
*
order_var
,
rli
));
...
...
@@ -816,7 +823,7 @@ table_def::compatible_with(THD *thd, Relay_log_info *rli,
rli
->
report
(
ERROR_LEVEL
,
ER_SLAVE_CONVERSION_FAILED
,
ER
(
ER_SLAVE_CONVERSION_FAILED
),
col
,
db_name
,
tbl_name
,
source_type
.
c_ptr
(),
target_type
.
c_ptr
());
source_type
.
c_ptr
_safe
(),
target_type
.
c_ptr_safe
());
return
false
;
}
}
...
...
@@ -920,7 +927,7 @@ TABLE *table_def::create_conversion_table(THD *thd, Relay_log_info *rli, TABLE *
field_def
->
init_for_tmp_table
(
type
(
col
),
max_length
,
decimals
,
maybe_null
(
col
),
// maybe_null
TRUE
,
// maybe_null
FALSE
,
// unsigned_flag
pack_length
);
field_def
->
charset
=
target_table
->
field
[
col
]
->
charset
();
...
...
@@ -977,6 +984,7 @@ table_def::table_def(unsigned char *types, ulong size,
case
MYSQL_TYPE_LONG_BLOB
:
case
MYSQL_TYPE_DOUBLE
:
case
MYSQL_TYPE_FLOAT
:
case
MYSQL_TYPE_GEOMETRY
:
{
/*
These types store a single byte.
...
...
sql/set_var.cc
View file @
d866afe5
...
...
@@ -1315,6 +1315,14 @@ void fix_slave_exec_mode(enum_var_type type)
bool
sys_var_thd_binlog_format
::
check
(
THD
*
thd
,
set_var
*
var
)
{
/*
Make the session variable 'binlog_format' read-only inside a transaction.
*/
if
(
thd
->
active_transaction
()
&&
(
var
->
type
==
OPT_SESSION
))
{
my_error
(
ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT
,
MYF
(
0
));
return
1
;
}
/*
All variables that affect writing to binary log (either format or
turning logging on and off) use the same checking. We call the
...
...
sql/share/errmsg-utf8.txt
View file @
d866afe5
...
...
@@ -6299,3 +6299,6 @@ ER_SLAVE_CONVERSION_FAILED
eng "Column %d of table '%-.192s.%-.192s' cannot be converted from type '%-.32s' to type '%-.32s'"
ER_SLAVE_CANT_CREATE_CONVERSION
eng "Can't create conversion table for table '%-.192s.%-.192s'"
ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT
eng "Cannot modify @@session.binlog_format inside a transaction"
sql/share/errmsg.txt
View file @
d866afe5
...
...
@@ -6299,3 +6299,5 @@ ER_SLAVE_CONVERSION_FAILED
eng "Column %d of table '%-.192s.%-.192s' cannot be converted from type '%-.32s' to type '%-.32s'"
ER_SLAVE_CANT_CREATE_CONVERSION
eng "Can't create conversion table for table '%-.192s.%-.192s'"
ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT
eng "Cannot modify @@session.binlog_format inside a transaction"
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