Commit f1ce69f3 authored by Sergei Golubchik's avatar Sergei Golubchik

Merge branch '10.1' into 10.2

But without f4f48e06..f8a800be - fixes for MDEV-12672
and related issues. 10.2 specific fix follows...
parents 3fbd4aa0 f8a800be
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
# and replication is started from it. # and replication is started from it.
# #
--source include/master-slave.inc
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
--connection slave --connection slave
# Make sure the slave is stopped while we are messing with master. # Make sure the slave is stopped while we are messing with master.
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
# WL2540 replication events checksum # WL2540 replication events checksum
# Testing configuration parameters # Testing configuration parameters
--source include/master-slave.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
call mtr.add_suppression('Slave can not handle replication events with the checksum that master is configured to log'); call mtr.add_suppression('Slave can not handle replication events with the checksum that master is configured to log');
call mtr.add_suppression('Replication event checksum verification failed'); call mtr.add_suppression('Replication event checksum verification failed');
......
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
# Configuring the Environment # Configuring the Environment
###################################################################### ######################################################################
source include/have_debug.inc; source include/have_debug.inc;
source include/master-slave.inc;
source include/have_log_bin.inc; source include/have_log_bin.inc;
source include/master-slave.inc;
connection slave; connection slave;
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
# check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and # check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and
# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986) # Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986)
-- source include/master-slave.inc
source include/have_innodb.inc; source include/have_innodb.inc;
source include/master-slave.inc;
--disable_query_log --disable_query_log
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
......
...@@ -15,8 +15,9 @@ ...@@ -15,8 +15,9 @@
# BUG#55322: SHOW BINLOG EVENTS increases @@SESSION.MAX_ALLOWED_PACKET # BUG#55322: SHOW BINLOG EVENTS increases @@SESSION.MAX_ALLOWED_PACKET
# max-out size db name # max-out size db name
source include/master-slave.inc;
source include/have_binlog_format_row.inc; source include/have_binlog_format_row.inc;
source include/master-slave.inc;
call mtr.add_suppression("Slave I/O: Got a packet bigger than 'slave_max_allowed_packet' bytes, .*error.* 1153"); call mtr.add_suppression("Slave I/O: Got a packet bigger than 'slave_max_allowed_packet' bytes, .*error.* 1153");
call mtr.add_suppression("Log entry on master is longer than slave_max_allowed_packet"); call mtr.add_suppression("Log entry on master is longer than slave_max_allowed_packet");
let $db= DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; let $db= DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
# so if it is needed, it should be set explicitly before each call. # so if it is needed, it should be set explicitly before each call.
# #
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
connection slave; connection slave;
# Test that SUPER is required to change @@replicate_events_marked_for_skip. # Test that SUPER is required to change @@replicate_events_marked_for_skip.
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
# IO thread does not do it in an uncontrolled manner. # IO thread does not do it in an uncontrolled manner.
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--disable_query_log --disable_query_log
CREATE TABLE t1 (c1 TEXT) engine=InnoDB; CREATE TABLE t1 (c1 TEXT) engine=InnoDB;
......
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
# Configuring the environment # Configuring the environment
######################################################################################## ########################################################################################
--echo =====Configuring the enviroment=======; --echo =====Configuring the enviroment=======;
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_valgrind.inc --source include/not_valgrind.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/not_crashrep.inc --source include/not_crashrep.inc
--source include/master-slave.inc
call mtr.add_suppression('Attempting backtrace'); call mtr.add_suppression('Attempting backtrace');
call mtr.add_suppression("Recovery from master pos .* and file master-bin.000001"); call mtr.add_suppression("Recovery from master pos .* and file master-bin.000001");
......
...@@ -745,3 +745,9 @@ f1 f2 ...@@ -745,3 +745,9 @@ f1 f2
drop view v1; drop view v1;
drop table t1; drop table t1;
SET @@sql_mode= @save_mode; SET @@sql_mode= @save_mode;
CREATE TABLE t1 (f INT);
CREATE VIEW v1 AS SELECT * FROM t1 WHERE f <=> 'foo' WITH CHECK OPTION;
REPLACE INTO v1 SET f = NULL;
ERROR 22007: Truncated incorrect DOUBLE value: 'foo'
DROP VIEW v1;
DROP TABLE t1;
...@@ -127,3 +127,48 @@ Warning 1264 Out of range value for column 'a' at row 1 ...@@ -127,3 +127,48 @@ Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'b' at row 1 Warning 1264 Out of range value for column 'b' at row 1
DROP TABLE t1; DROP TABLE t1;
SET @@global.mysql56_temporal_format=DEFAULT; SET @@global.mysql56_temporal_format=DEFAULT;
set time_zone='Europe/Moscow';
set global mysql56_temporal_format=false;
create table t1 (a timestamp);
set timestamp=1288477526;
insert t1 values (null);
set timestamp=1288481126;
insert t1 values (null);
select a, unix_timestamp(a) from t1;
a unix_timestamp(a)
2010-10-31 02:25:26 1288477526
2010-10-31 02:25:26 1288481126
set global mysql56_temporal_format=true;
select a, unix_timestamp(a) from t1;
a unix_timestamp(a)
2010-10-31 02:25:26 1288477526
2010-10-31 02:25:26 1288481126
alter table t1 modify a timestamp;
select a, unix_timestamp(a) from t1;
a unix_timestamp(a)
2010-10-31 02:25:26 1288477526
2010-10-31 02:25:26 1288481126
drop table t1;
set global mysql56_temporal_format=false;
create table t1 (a timestamp);
set timestamp=1288477526;
insert t1 values (null);
set timestamp=1288481126;
insert t1 values (null);
select a, unix_timestamp(a) from t1;
a unix_timestamp(a)
2010-10-31 02:25:26 1288477526
2010-10-31 02:25:26 1288481126
set global mysql56_temporal_format=true;
select a, unix_timestamp(a) from t1;
a unix_timestamp(a)
2010-10-31 02:25:26 1288477526
2010-10-31 02:25:26 1288481126
create table t2 (a timestamp);
insert t2 select a from t1;
select a, unix_timestamp(a) from t2;
a unix_timestamp(a)
2010-10-31 02:25:26 1288477526
2010-10-31 02:25:26 1288481126
drop table t1, t2;
set time_zone=DEFAULT;
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
--echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog --echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog
--echo # --echo #
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_windows.inc --source include/not_windows.inc
--source include/master-slave.inc
--disable_warnings --disable_warnings
CREATE SCHEMA IF NOT EXISTS mysqlslap; CREATE SCHEMA IF NOT EXISTS mysqlslap;
......
--source include/innodb_page_size_small.inc --source include/innodb_page_size_small.inc
--source include/innodb_encrypt_log.inc --source include/innodb_encrypt_log.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc --source include/have_debug_sync.inc
let $innodb_metrics_select= let $innodb_metrics_select=
......
--source include/have_partition.inc --source include/have_partition.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--source include/big_test.inc --source include/big_test.inc
--source include/master-slave.inc
--vertical_results --vertical_results
......
--source include/master-slave.inc
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
--enable_connect_log --enable_connect_log
......
include/master-slave.inc
[connection master]
connection slave;
set global time_zone='Europe/Moscow';
set time_zone='UTC';
stop slave;
start slave;
connection master;
set global mysql56_temporal_format=false;
set global time_zone='Europe/Moscow';
set time_zone='UTC';
create table t1 (pk int primary key, t timestamp not null);
set timestamp = 1288477526;
insert into t1 values (1,null);
set timestamp = 1288481126;
insert into t1 values (2,null);
connection slave;
select pk, t, unix_timestamp(t) from t1;
pk t unix_timestamp(t)
1 2010-10-30 22:25:26 1288477526
2 2010-10-30 23:25:26 1288481126
set time_zone=default;
select pk, t, unix_timestamp(t) from t1;
pk t unix_timestamp(t)
1 2010-10-31 02:25:26 1288477526
2 2010-10-31 02:25:26 1288481126
set global time_zone=default;
connection master;
drop table t1;
set global time_zone=default;
set global mysql56_temporal_format=default;
include/rpl_end.inc
--source include/master-slave.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
--enable_connect_log --enable_connect_log
--connection master --connection master
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
# is replication unsafe. # is replication unsafe.
# #
source include/master-slave.inc;
source include/have_binlog_format_mixed.inc; source include/have_binlog_format_mixed.inc;
source include/have_innodb.inc; source include/have_innodb.inc;
source include/master-slave.inc;
call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.'); call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.');
......
source include/master-slave.inc;
source include/have_innodb.inc; source include/have_innodb.inc;
source include/have_binlog_format_statement.inc; source include/have_binlog_format_statement.inc;
source include/master-slave.inc;
connection slave; connection slave;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
# primary key lookup), and index/key with multiple matches (forcing an # primary key lookup), and index/key with multiple matches (forcing an
# index search). # index search).
source include/master-slave.inc;
source include/have_blackhole.inc; source include/have_blackhole.inc;
source include/master-slave.inc;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
# log, the error is ignored and only the non-transactional tables are changed. # log, the error is ignored and only the non-transactional tables are changed.
############################################################################### ###############################################################################
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/master-slave.inc
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
# will be binlogged as # will be binlogged as
# 'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /* 99999 ,(3)*/'. # 'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /* 99999 ,(3)*/'.
############################################################################### ###############################################################################
source include/master-slave.inc;
source include/have_binlog_format_statement.inc; source include/have_binlog_format_statement.inc;
source include/master-slave.inc;
CREATE TABLE t1(c1 INT); CREATE TABLE t1(c1 INT);
source include/show_binlog_events.inc; source include/show_binlog_events.inc;
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
# along the way if error/no error is thrown and/or if replication starts # along the way if error/no error is thrown and/or if replication starts
# working when expected. # working when expected.
--source include/master-slave.inc
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
connection slave; connection slave;
STOP SLAVE; STOP SLAVE;
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
# Purpose: To test having extra columns on the master WL#3915 # Purpose: To test having extra columns on the master WL#3915
############################################################# #############################################################
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/master-slave.inc
let $engine_type = 'InnoDB'; let $engine_type = 'InnoDB';
--source extra/rpl_tests/rpl_extra_col_master.test --source extra/rpl_tests/rpl_extra_col_master.test
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
# works fine. # works fine.
# #
--source include/master-slave.inc
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/master-slave.inc
connection master; connection master;
# Test 'flush error logs' statement. # Test 'flush error logs' statement.
......
source include/master-slave.inc;
source include/have_binlog_format_row.inc; source include/have_binlog_format_row.inc;
source include/master-slave.inc;
# #
# Bug#48776, Bug#43784 # Bug#48776, Bug#43784
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
# Finish the following tests by calling its common test script: # Finish the following tests by calling its common test script:
# extra/rpl_tests/rpl_get_master_version_and_clock.test. # extra/rpl_tests/rpl_get_master_version_and_clock.test.
source include/master-slave.inc;
source include/have_debug.inc; source include/have_debug.inc;
source include/have_debug_sync.inc; source include/have_debug_sync.inc;
source include/master-slave.inc;
# #
# The test is not supposed to have any binglog affairs. # The test is not supposed to have any binglog affairs.
......
# Tests of grants and users # Tests of grants and users
source include/master-slave.inc;
source include/not_embedded.inc; source include/not_embedded.inc;
source include/master-slave.inc;
connection master; connection master;
......
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/master-slave.inc
CREATE TABLE t1 (i int) ENGINE=InnoDB; CREATE TABLE t1 (i int) ENGINE=InnoDB;
......
# Testing master to slave heartbeat protocol, test cases that need debug build. # Testing master to slave heartbeat protocol, test cases that need debug build.
--source include/master-slave.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/master-slave.inc
connection slave; connection slave;
--source include/stop_slave.inc --source include/stop_slave.inc
......
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
# #
# Bug#68220: innodb_rows_updated is misleading on slave when *info_repository=TABLE # Bug#68220: innodb_rows_updated is misleading on slave when *info_repository=TABLE
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
--echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog --echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog
--echo # --echo #
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_windows.inc --source include/not_windows.inc
--source include/master-slave.inc
disable_query_log; disable_query_log;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
# Features for Replication. # Features for Replication.
######################################### #########################################
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
disable_query_log; disable_query_log;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
# if the path of the load data file is a symbolic link. # if the path of the load data file is a symbolic link.
# #
--source include/not_windows.inc --source include/not_windows.inc
--source include/master-slave.inc
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/master-slave.inc
create table t1(a int not null auto_increment, b int, primary key(a) ); create table t1(a int not null auto_increment, b int, primary key(a) );
load data infile '../../std_data/rpl_loaddata.dat' into table t1; load data infile '../../std_data/rpl_loaddata.dat' into table t1;
......
--source include/master-slave.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_debug_sync.inc --source include/have_debug_sync.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
connection master; connection master;
......
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_windows.inc --source include/not_windows.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
######################################################################################## ########################################################################################
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
......
--source include/master-slave.inc
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/master-slave.inc
--connection slave --connection slave
......
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_windows.inc --source include/not_windows.inc
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
--source extra/rpl_tests/rpl_binlog_max_cache_size.test --source extra/rpl_tests/rpl_binlog_max_cache_size.test
--source include/rpl_end.inc --source include/rpl_end.inc
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
################################################################################ ################################################################################
--source include/have_udf.inc --source include/have_udf.inc
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--let $engine=Innodb --let $engine=Innodb
set session storage_engine=innodb; set session storage_engine=innodb;
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
# tables. For further details, please, read WL#2687 and WL#5072. # tables. For further details, please, read WL#2687 and WL#5072.
################################################################################### ###################################################################################
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
let $engine_type=Innodb; let $engine_type=Innodb;
let $database_name=test; let $database_name=test;
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
# tables. For further details, please, read WL#2687 and WL#5072. # tables. For further details, please, read WL#2687 and WL#5072.
################################################################################### ###################################################################################
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--disable_query_log --disable_query_log
SET SESSION binlog_direct_non_transactional_updates = OFF; SET SESSION binlog_direct_non_transactional_updates = OFF;
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
# 3 - NULL --> NOT NULL ( sql-mode != STRICT and no failures) # 3 - NULL --> NOT NULL ( sql-mode != STRICT and no failures)
# #
################################################################################# #################################################################################
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
let $engine=Innodb; let $engine=Innodb;
--source extra/rpl_tests/rpl_not_null.test --source extra/rpl_tests/rpl_not_null.test
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
# 3 - NULL --> NOT NULL ( sql-mode != STRICT and no failures) # 3 - NULL --> NOT NULL ( sql-mode != STRICT and no failures)
# #
################################################################################# #################################################################################
--source include/master-slave.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
let $engine=MyISAM; let $engine=MyISAM;
--source extra/rpl_tests/rpl_not_null.test --source extra/rpl_tests/rpl_not_null.test
......
--source include/master-slave.inc
--source include/have_perfschema.inc --source include/have_perfschema.inc
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
UPDATE performance_schema.setup_instruments SET ENABLED="NO"; UPDATE performance_schema.setup_instruments SET ENABLED="NO";
......
# Test case for BUG #11733 # Test case for BUG #11733
-- source include/master-slave.inc
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/master-slave.inc
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
# case on doing SHOW SLAVE HOSTS on the master, we get the actual port number # case on doing SHOW SLAVE HOSTS on the master, we get the actual port number
# of the slave (ie. SLAVE_PORT). # of the slave (ie. SLAVE_PORT).
source include/master-slave.inc;
source include/have_binlog_format_mixed.inc; source include/have_binlog_format_mixed.inc;
source include/master-slave.inc;
connection master; connection master;
......
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_windows.inc --source include/not_windows.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
--source extra/rpl_tests/rpl_binlog_max_cache_size.test --source extra/rpl_tests/rpl_binlog_max_cache_size.test
--source include/rpl_end.inc --source include/rpl_end.inc
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
# having columns that are smaller (shorter) than the slave. # # having columns that are smaller (shorter) than the slave. #
################################################################## ##################################################################
-- source include/master-slave.inc
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
......
# #
--source include/master-slave.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
# BUG#11753004: 44360: REPLICATION FAILED # BUG#11753004: 44360: REPLICATION FAILED
......
# Testing table creations for row-based replication. # Testing table creations for row-based replication.
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
connection slave; connection slave;
--source include/have_innodb.inc --source include/have_innodb.inc
connection master; connection master;
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
# has been fixed. # has been fixed.
# #
-- source include/master-slave.inc
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
# #
# Case #1: master has key, but slave has not. # Case #1: master has key, but slave has not.
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
################################################################################ ################################################################################
--source include/have_udf.inc --source include/have_udf.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--let $engine=Innodb --let $engine=Innodb
set session storage_engine=innodb; set session storage_engine=innodb;
......
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
# Bug#58997: Row-based replication breaks on table with only fulltext index: # Bug#58997: Row-based replication breaks on table with only fulltext index:
connection master; connection master;
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
# deletes their contents through the merge table. Finally, the slave # deletes their contents through the merge table. Finally, the slave
# is synchronized with the master and (after the fix) it won't crash. # is synchronized with the master and (after the fix) it won't crash.
# #
--source include/master-slave.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
--connection master --connection master
CREATE TABLE t1 (a int) ENGINE=MyISAM; CREATE TABLE t1 (a int) ENGINE=MyISAM;
......
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/master-slave.inc
# #
# BUG#52868 Wrong handling of NULL value during update, replication out of sync # BUG#52868 Wrong handling of NULL value during update, replication out of sync
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
# This test issues SHOW [BINLOG|RELAYLOG] EVENTS both on master and slave after # This test issues SHOW [BINLOG|RELAYLOG] EVENTS both on master and slave after
# some statements have been issued. # some statements have been issued.
-- source include/master-slave.inc
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
-- source extra/rpl_tests/rpl_show_relaylog_events.inc -- source extra/rpl_tests/rpl_show_relaylog_events.inc
--source include/rpl_end.inc --source include/rpl_end.inc
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
# with mysqlbinlog reporting that it was unable to succeed in # with mysqlbinlog reporting that it was unable to succeed in
# reading the event. # reading the event.
-- source include/master-slave.inc
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
-- disable_warnings -- disable_warnings
DROP TABLE IF EXISTS `t1`; DROP TABLE IF EXISTS `t1`;
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
# table was binlogged in RBR. # table was binlogged in RBR.
# #
--source include/master-slave.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
#This statement is not binlogged in RBR. #This statement is not binlogged in RBR.
CREATE TEMPORARY TABLE t1(c1 INTEGER); CREATE TEMPORARY TABLE t1(c1 INTEGER);
......
-- source include/master-slave.inc
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/have_utf16.inc -- source include/have_utf16.inc
-- source include/master-slave.inc
# #
# BUG#51716: Char column with utf16 character set gives wrong padding on slave # BUG#51716: Char column with utf16 character set gives wrong padding on slave
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
# in corrupt binlog # in corrupt binlog
################################################################## ##################################################################
-- source include/master-slave.inc
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t300; DROP TABLE IF EXISTS t300;
......
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--echo # --echo #
--echo # Bug#50124 Rpl failure on DROP table with concurrent txn/non-txn --echo # Bug#50124 Rpl failure on DROP table with concurrent txn/non-txn
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
# b. nullifying the list and resuming of taking binlog from the very beginning with # b. nullifying the list and resuming of taking binlog from the very beginning with
# executing events this time # executing events this time
source include/master-slave.inc;
source include/have_binlog_format_mixed.inc; source include/have_binlog_format_mixed.inc;
source include/master-slave.inc;
connection slave; connection slave;
......
-- source include/have_binlog_format_mixed_or_row.inc -- source include/have_binlog_format_mixed_or_row.inc
-- source include/master-slave.inc
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/master-slave.inc
-- let $engine= InnoDB -- let $engine= InnoDB
-- source extra/rpl_tests/rpl_set_null.test -- source extra/rpl_tests/rpl_set_null.test
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
# bug in this test: BUG#30594: rpl.rpl_skip_error is nondeterministic: # bug in this test: BUG#30594: rpl.rpl_skip_error is nondeterministic:
# BUG#39393: slave-skip-errors does not work when using ROW based replication # BUG#39393: slave-skip-errors does not work when using ROW based replication
source include/master-slave.inc;
source include/have_innodb.inc; source include/have_innodb.inc;
source include/master-slave.inc;
--echo ==== Test Without sql_mode=strict_trans_tables ==== --echo ==== Test Without sql_mode=strict_trans_tables ====
......
--source include/master-slave.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/master-slave.inc
connection master; connection master;
SET GLOBAL BINLOG_CHECKSUM=NONE; SET GLOBAL BINLOG_CHECKSUM=NONE;
......
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_var_link.inc --source include/not_var_link.inc
--source include/master-slave.inc
########################################################################## ##########################################################################
# Loading data # Loading data
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
# test for MIXED mode. # test for MIXED mode.
source include/have_binlog_format_mixed.inc; source include/have_binlog_format_mixed.inc;
source include/master-slave.inc;
source include/have_innodb.inc; source include/have_innodb.inc;
source include/master-slave.inc;
connection slave; connection slave;
source include/have_innodb.inc; source include/have_innodb.inc;
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
# Note that due to the sleep() command the insert is written to the binary # Note that due to the sleep() command the insert is written to the binary
# log in row format. # log in row format.
source include/master-slave.inc;
source include/have_binlog_format_statement.inc; source include/have_binlog_format_statement.inc;
source include/master-slave.inc;
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
......
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_windows.inc --source include/not_windows.inc
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/master-slave.inc
--source extra/rpl_tests/rpl_binlog_max_cache_size.test --source extra/rpl_tests/rpl_binlog_max_cache_size.test
--source include/rpl_end.inc --source include/rpl_end.inc
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
################################################################################### ###################################################################################
--source include/big_test.inc --source include/big_test.inc
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--source extra/rpl_tests/rpl_drop_create_temp_table.test --source extra/rpl_tests/rpl_drop_create_temp_table.test
--source include/rpl_end.inc --source include/rpl_end.inc
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
################################################################################ ################################################################################
--source include/have_udf.inc --source include/have_udf.inc
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--let $engine=Innodb --let $engine=Innodb
set session storage_engine=innodb; set session storage_engine=innodb;
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
########## ##########
# Includes # Includes
-- source include/master-slave.inc
-- source include/have_binlog_format_statement.inc -- source include/have_binlog_format_statement.inc
-- source include/master-slave.inc
disable_query_log; disable_query_log;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
......
################################################################################ ################################################################################
# Please, check ./extra/rpl_tests/rpl_start_stop_slave.test # Please, check ./extra/rpl_tests/rpl_start_stop_slave.test
################################################################################ ################################################################################
--source include/master-slave.inc
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
# make innodb updates run fast # make innodb updates run fast
--connection slave --connection slave
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
# BUG#49562: SBR out of sync when using numeric data types + user variable # BUG#49562: SBR out of sync when using numeric data types + user variable
# #
-- source include/master-slave.inc
-- source include/have_binlog_format_statement.inc -- source include/have_binlog_format_statement.inc
-- source include/master-slave.inc
## Setup user variables for several numeric types, so that we get ## Setup user variables for several numeric types, so that we get
## coverage on the User_var_log_event different val types ## coverage on the User_var_log_event different val types
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
# 4: sync to slave and check the number of temp tables on slave. # 4: sync to slave and check the number of temp tables on slave.
# #
source include/master-slave.inc;
source include/have_binlog_format_mixed.inc; source include/have_binlog_format_mixed.inc;
source include/have_innodb.inc; source include/have_innodb.inc;
source include/master-slave.inc;
--echo ==== Initialize ==== --echo ==== Initialize ====
......
#
# MDEV-12672 Replicated TIMESTAMP fields given wrong value near DST change
#
source include/have_binlog_format_row.inc;
source include/master-slave.inc;
connection slave;
set global time_zone='Europe/Moscow';
set time_zone='UTC';
stop slave;
start slave;
connection master;
set global mysql56_temporal_format=false;
set global time_zone='Europe/Moscow';
set time_zone='UTC';
create table t1 (pk int primary key, t timestamp not null);
set timestamp = 1288477526;
insert into t1 values (1,null);
set timestamp = 1288481126;
insert into t1 values (2,null);
sync_slave_with_master;
select pk, t, unix_timestamp(t) from t1;
set time_zone=default;
select pk, t, unix_timestamp(t) from t1;
set global time_zone=default;
connection master;
drop table t1;
set global time_zone=default;
set global mysql56_temporal_format=default;
source include/rpl_end.inc;
source include/have_binlog_format_row.inc; source include/have_binlog_format_row.inc;
source include/master-slave.inc;
source include/have_innodb.inc; source include/have_innodb.inc;
source include/master-slave.inc;
call mtr.add_suppression("Deadlock found"); call mtr.add_suppression("Deadlock found");
call mtr.add_suppression("Can't find record in 't.'"); call mtr.add_suppression("Can't find record in 't.'");
......
source include/master-slave.inc;
source include/have_binlog_format_statement.inc; source include/have_binlog_format_statement.inc;
source include/master-slave.inc;
call mtr.add_suppression("Unsafe statement written to the binary log"); call mtr.add_suppression("Unsafe statement written to the binary log");
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
# #
--source include/have_debug.inc --source include/have_debug.inc
--source include/master-slave.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
......
...@@ -602,3 +602,13 @@ remove_file $MYSQLD_DATADIR/test/t1.txt; ...@@ -602,3 +602,13 @@ remove_file $MYSQLD_DATADIR/test/t1.txt;
drop view v1; drop view v1;
drop table t1; drop table t1;
SET @@sql_mode= @save_mode; SET @@sql_mode= @save_mode;
#
# MDEV-13861 Assertion `0' failed in Protocol::end_statement
#
CREATE TABLE t1 (f INT);
CREATE VIEW v1 AS SELECT * FROM t1 WHERE f <=> 'foo' WITH CHECK OPTION;
--error ER_TRUNCATED_WRONG_VALUE
REPLACE INTO v1 SET f = NULL;
DROP VIEW v1;
DROP TABLE t1;
...@@ -83,3 +83,37 @@ SELECT TO_DAYS(a), TO_DAYS(b) FROM t1; ...@@ -83,3 +83,37 @@ SELECT TO_DAYS(a), TO_DAYS(b) FROM t1;
DROP TABLE t1; DROP TABLE t1;
SET @@global.mysql56_temporal_format=DEFAULT; SET @@global.mysql56_temporal_format=DEFAULT;
#
# MDEV-12672 Replicated TIMESTAMP fields given wrong value near DST change
#
# Copy_field
set time_zone='Europe/Moscow';
set global mysql56_temporal_format=false;
create table t1 (a timestamp);
set timestamp=1288477526;
insert t1 values (null);
set timestamp=1288481126;
insert t1 values (null);
select a, unix_timestamp(a) from t1;
set global mysql56_temporal_format=true;
select a, unix_timestamp(a) from t1;
alter table t1 modify a timestamp;
select a, unix_timestamp(a) from t1;
drop table t1;
# field_conv_incompatible()
set global mysql56_temporal_format=false;
create table t1 (a timestamp);
set timestamp=1288477526;
insert t1 values (null);
set timestamp=1288481126;
insert t1 values (null);
select a, unix_timestamp(a) from t1;
set global mysql56_temporal_format=true;
select a, unix_timestamp(a) from t1;
create table t2 (a timestamp);
insert t2 select a from t1;
select a, unix_timestamp(a) from t2;
drop table t1, t2;
set time_zone=DEFAULT;
--source include/have_stat_tables.inc --source include/have_stat_tables.inc
--source include/master-slave.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
--echo # --echo #
--echo # Bug mdev-485: unexpected failure with replication of DROP/ALTER table --echo # Bug mdev-485: unexpected failure with replication of DROP/ALTER table
......
...@@ -69,7 +69,7 @@ parse_arguments() { ...@@ -69,7 +69,7 @@ parse_arguments() {
wsrep_recover_position() { wsrep_recover_position() {
# Redirect server's error log to the log file. # Redirect server's error log to the log file.
eval /usr/sbin/mysqld $cmdline_args --user=$user --wsrep_recover \ eval /usr/sbin/mysqld $cmdline_args --user=$user --wsrep_recover \
--log-error="$log_file" --disable-log-error 2> "$log_file"
ret=$? ret=$?
if [ $ret -ne 0 ]; then if [ $ret -ne 0 ]; then
# Something went wrong, let us also print the error log so that it # Something went wrong, let us also print the error log so that it
......
...@@ -245,7 +245,7 @@ wsrep_recover_position() { ...@@ -245,7 +245,7 @@ wsrep_recover_position() {
local euid=$(id -u) local euid=$(id -u)
local ret=0 local ret=0
local wr_logfile=$(mktemp $DATADIR/wsrep_recovery.XXXXXX) local wr_logfile=$(mktemp wsrep_recovery.XXXXXX)
# safety checks # safety checks
if [ -z $wr_logfile ]; then if [ -z $wr_logfile ]; then
...@@ -263,11 +263,11 @@ wsrep_recover_position() { ...@@ -263,11 +263,11 @@ wsrep_recover_position() {
local wr_pidfile="$DATADIR/"`@HOSTNAME@`"-recover.pid" local wr_pidfile="$DATADIR/"`@HOSTNAME@`"-recover.pid"
local wr_options="--log_error='$wr_logfile' --pid-file='$wr_pidfile'" local wr_options="--disable-log-error --pid-file='$wr_pidfile'"
log_notice "WSREP: Running position recovery with $wr_options" log_notice "WSREP: Running position recovery with $wr_options"
eval_log_error "$mysqld_cmd --wsrep_recover $wr_options" eval_log_error "$mysqld_cmd --wsrep_recover $wr_options 2> $wr_logfile"
local rp="$(grep 'WSREP: Recovered position:' $wr_logfile)" local rp="$(grep 'WSREP: Recovered position:' $wr_logfile)"
if [ -z "$rp" ]; then if [ -z "$rp" ]; then
......
...@@ -1648,6 +1648,29 @@ class Dummy_error_handler : public Internal_error_handler ...@@ -1648,6 +1648,29 @@ class Dummy_error_handler : public Internal_error_handler
}; };
/**
Implements the trivial error handler which counts errors as they happen.
*/
class Counting_error_handler : public Internal_error_handler
{
public:
int errors;
bool handle_condition(THD *thd,
uint sql_errno,
const char* sqlstate,
Sql_condition::enum_warning_level *level,
const char* msg,
Sql_condition ** cond_hdl)
{
if (*level == Sql_condition::WARN_LEVEL_ERROR)
errors++;
return false;
}
Counting_error_handler() : errors(0) {}
};
/** /**
This class is an internal error handler implementation for This class is an internal error handler implementation for
DROP TABLE statements. The thing is that there may be warnings during DROP TABLE statements. The thing is that there may be warnings during
......
...@@ -5066,23 +5066,28 @@ void TABLE_LIST::cleanup_items() ...@@ -5066,23 +5066,28 @@ void TABLE_LIST::cleanup_items()
int TABLE_LIST::view_check_option(THD *thd, bool ignore_failure) int TABLE_LIST::view_check_option(THD *thd, bool ignore_failure)
{ {
/* VIEW's CHECK OPTION CLAUSE */ if (check_option)
if (check_option && check_option->val_int() == 0) {
{ /* VIEW's CHECK OPTION CLAUSE */
TABLE_LIST *main_view= top_table(); Counting_error_handler ceh;
const char *name_db= (main_view->view ? main_view->view_db.str : thd->push_internal_handler(&ceh);
main_view->db); bool res= check_option->val_int() == 0;
const char *name_table= (main_view->view ? main_view->view_name.str : thd->pop_internal_handler();
main_view->table_name); if (ceh.errors)
my_error(ER_VIEW_CHECK_FAILED, MYF(ignore_failure ? ME_JUST_WARNING : 0), return(VIEW_CHECK_ERROR);
name_db, name_table); if (res)
return ignore_failure ? VIEW_CHECK_SKIP : VIEW_CHECK_ERROR; {
} TABLE_LIST *main_view= top_table();
int result= table->verify_constraints(ignore_failure); const char *name_db= (main_view->view ? main_view->view_db.str :
/* We check thd->error() because it can be set by conversion problem. */ main_view->db);
if (thd->is_error()) const char *name_table= (main_view->view ? main_view->view_name.str :
return(VIEW_CHECK_ERROR); main_view->table_name);
return result; my_error(ER_VIEW_CHECK_FAILED, MYF(ignore_failure ? ME_JUST_WARNING : 0),
name_db, name_table);
return ignore_failure ? VIEW_CHECK_SKIP : VIEW_CHECK_ERROR;
}
}
return table->verify_constraints(ignore_failure);
} }
......
...@@ -247,7 +247,7 @@ ENDIF(CONNECT_WITH_ODBC) ...@@ -247,7 +247,7 @@ ENDIF(CONNECT_WITH_ODBC)
# #
# JDBC with MongoDB Java Driver included but disabled # JDBC with MongoDB Java Driver included but disabled
# #
OPTION(CONNECT_WITH_MONGO "Compile CONNECT storage engine with MONGO support" ON) #OPTION(CONNECT_WITH_MONGO "Compile CONNECT storage engine with MONGO support" ON)
OPTION(CONNECT_WITH_JDBC "Compile CONNECT storage engine with JDBC support" ON) OPTION(CONNECT_WITH_JDBC "Compile CONNECT storage engine with JDBC support" ON)
IF(CONNECT_WITH_JDBC) IF(CONNECT_WITH_JDBC)
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
/***********************************************************************/ /***********************************************************************/
typedef struct _datpar { typedef struct _datpar {
const char *Format; // Points to format to decode const char *Format; // Points to format to decode
char *Curp; // Points to current parsing position const char *Curp; // Points to current parsing position
char *InFmt; // Start of input format char *InFmt; // Start of input format
char *OutFmt; // Start of output format char *OutFmt; // Start of output format
int Index[8]; // Indexes of date values int Index[8]; // Indexes of date values
......
...@@ -135,7 +135,7 @@ class TDBMYSQL : public TDBEXT { ...@@ -135,7 +135,7 @@ class TDBMYSQL : public TDBEXT {
int m_Rc; // Return code from command int m_Rc; // Return code from command
//int AftRows; // The number of affected rows //int AftRows; // The number of affected rows
int N; // The current table index int N; // The current table index
int Port; // MySQL port number (0 = default) unsigned Port; // MySQL port number (0 = default)
//int Nparm; // The number of statement parameters //int Nparm; // The number of statement parameters
//int Quoted; // The identifier quoting level //int Quoted; // The identifier quoting level
}; // end of class TDBMYSQL }; // end of class TDBMYSQL
......
...@@ -120,7 +120,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, ...@@ -120,7 +120,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db,
FLD_REM, FLD_NO, FLD_CHARSET}; FLD_REM, FLD_NO, FLD_CHARSET};
unsigned int length[] = {0, 4, 16, 4, 4, 4, 4, 4, 0, 32, 32}; unsigned int length[] = {0, 4, 16, 4, 4, 4, 4, 4, 0, 32, 32};
PCSZ fmt; PCSZ fmt;
char *pn, *tn, *fld, *colname, *chset, v; char *pn, *tn, *fld, *colname, v; //, *chset;
int i, n, ncol = sizeof(buftyp) / sizeof(int); int i, n, ncol = sizeof(buftyp) / sizeof(int);
int prec, len, type, scale; int prec, len, type, scale;
int zconv = GetConvSize(); int zconv = GetConvSize();
...@@ -185,7 +185,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, ...@@ -185,7 +185,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db,
colname = (char *)fp->field_name; colname = (char *)fp->field_name;
crp->Kdata->SetValue(colname, i); crp->Kdata->SetValue(colname, i);
chset = (char *)fp->charset()->name; // chset = (char *)fp->charset()->name;
// v = (!strcmp(chset, "binary")) ? 'B' : 0; // v = (!strcmp(chset, "binary")) ? 'B' : 0;
v = 0; v = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment