Merge gleb.loc:/home/uchum/work/bk/5.1
into gleb.loc:/home/uchum/work/bk/5.1-opt mysql-test/r/innodb_mysql.result: Auto merged sql/sql_partition.cc: Auto merged mysql-test/include/mix1.inc: Merge with 5.1 (main).
This commit is contained in:
commit
5e25d08e05
@ -38,9 +38,9 @@
|
||||
*/.libs/*
|
||||
*/.pure
|
||||
*/debug/*
|
||||
*/minsizerel/*
|
||||
*/release/*
|
||||
*/relwithdebinfo/*
|
||||
*/minsizerel/*
|
||||
*~
|
||||
.*.swp
|
||||
./CMakeCache.txt
|
||||
@ -584,6 +584,7 @@ heap/hp_test2
|
||||
help
|
||||
help.c
|
||||
help.h
|
||||
include/abi_check
|
||||
include/check_abi
|
||||
include/link_sources
|
||||
include/my_config.h
|
||||
@ -1021,8 +1022,8 @@ libmysqld/.deps/unireg.Po
|
||||
libmysqld/backup_dir
|
||||
libmysqld/client.c
|
||||
libmysqld/client_settings.h
|
||||
libmysqld/convert.cc
|
||||
libmysqld/cmake_dummy.c
|
||||
libmysqld/convert.cc
|
||||
libmysqld/derror.cc
|
||||
libmysqld/discover.cc
|
||||
libmysqld/emb_qcache.cpp
|
||||
|
@ -26,8 +26,9 @@ export LDFLAGS="-fprofile-arcs -ftest-coverage"
|
||||
|
||||
# The -fprofile-arcs and -ftest-coverage options cause GCC to instrument the
|
||||
# code with profiling information used by gcov.
|
||||
# the -DDISABLE_TAO_ASM is needed to avoid build failures in Yassl.
|
||||
extra_flags="$pentium_cflags -fprofile-arcs -ftest-coverage -DDISABLE_TAO_ASM -DHAVE_MUTEX_THREAD_ONLY $debug_extra_flags $debug_cflags $max_cflags -DMYSQL_SERVER_SUFFIX=-gcov"
|
||||
# The -DDISABLE_TAO_ASM is needed to avoid build failures in Yassl.
|
||||
# The -DHAVE_gcov enables code to write out coverage info even when crashing.
|
||||
extra_flags="$pentium_cflags -fprofile-arcs -ftest-coverage -DDISABLE_TAO_ASM -DHAVE_MUTEX_THREAD_ONLY $debug_extra_flags $debug_cflags $max_cflags -DMYSQL_SERVER_SUFFIX=-gcov -DHAVE_gcov"
|
||||
extra_configs="$pentium_configs $debug_configs --disable-shared $static_link"
|
||||
extra_configs="$extra_configs $max_configs"
|
||||
c_warnings="$c_warnings $debug_extra_warnings"
|
||||
|
16
configure.in
16
configure.in
@ -71,14 +71,22 @@ AC_SUBST(AVAILABLE_LANGUAGES)
|
||||
|
||||
|
||||
# Canonicalize the configuration name.
|
||||
SYSTEM_TYPE="$host_vendor-$host_os"
|
||||
MACHINE_TYPE="$host_cpu"
|
||||
|
||||
# Check whether --with-system-type or --without-system-type was given.
|
||||
AC_ARG_WITH(system-type,
|
||||
[ --with-system-type Set the system type, like "sun-solaris10"],
|
||||
[SYSTEM_TYPE="$withval"],
|
||||
[SYSTEM_TYPE="$host_vendor-$host_os"])
|
||||
AC_ARG_WITH(machine-type,
|
||||
[ --with-machine-type Set the machine type, like "powerpc"],
|
||||
[MACHINE_TYPE="$withval"],
|
||||
[MACHINE_TYPE="$host_cpu"])
|
||||
AC_SUBST(SYSTEM_TYPE)
|
||||
AC_DEFINE_UNQUOTED([SYSTEM_TYPE], ["$SYSTEM_TYPE"],
|
||||
[Name of system, eg solaris])
|
||||
[Name of system, eg sun-solaris])
|
||||
AC_SUBST(MACHINE_TYPE)
|
||||
AC_DEFINE_UNQUOTED([MACHINE_TYPE], ["$MACHINE_TYPE"],
|
||||
[Machine type name, eg sun10])
|
||||
[Machine type name, eg sparc])
|
||||
|
||||
# Detect intel x86 like processor
|
||||
BASE_MACHINE_TYPE=$MACHINE_TYPE
|
||||
|
@ -180,7 +180,12 @@ enum ha_extra_function {
|
||||
These flags are reset by the handler::extra(HA_EXTRA_RESET) call.
|
||||
*/
|
||||
HA_EXTRA_DELETE_CANNOT_BATCH,
|
||||
HA_EXTRA_UPDATE_CANNOT_BATCH
|
||||
HA_EXTRA_UPDATE_CANNOT_BATCH,
|
||||
/*
|
||||
Inform handler that an "INSERT...ON DUPLICATE KEY UPDATE" will be
|
||||
executed. This condition is unset by HA_EXTRA_NO_IGNORE_DUP_KEY.
|
||||
*/
|
||||
HA_EXTRA_INSERT_WITH_UPDATE
|
||||
};
|
||||
|
||||
/* The following is parameter to ha_panic() */
|
||||
|
@ -103,6 +103,17 @@ extern void bitmap_lock_invert(MY_BITMAP *map);
|
||||
&= ~ (1 << ((BIT) & 7)))
|
||||
#define _bitmap_is_set(MAP, BIT) (uint) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \
|
||||
& (1 << ((BIT) & 7)))
|
||||
/*
|
||||
WARNING!
|
||||
|
||||
The below symbols are inline functions in DEBUG builds and macros in
|
||||
non-DEBUG builds. The latter evaluate their 'bit' argument twice.
|
||||
|
||||
NEVER use an increment/decrement operator with the 'bit' argument.
|
||||
It would work with DEBUG builds, but fails later in production builds!
|
||||
|
||||
FORBIDDEN: bitmap_set_bit($my_bitmap, (field++)->field_index);
|
||||
*/
|
||||
#ifndef DBUG_OFF
|
||||
static inline void
|
||||
bitmap_set_bit(MY_BITMAP *map,uint bit)
|
||||
|
@ -168,8 +168,23 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Free all memory and resources used by the client library
|
||||
|
||||
NOTES
|
||||
When calling this there should not be any other threads using
|
||||
the library.
|
||||
|
||||
To make things simpler when used with windows dll's (which calls this
|
||||
function automaticly), it's safe to call this function multiple times.
|
||||
*/
|
||||
|
||||
|
||||
void STDCALL mysql_server_end()
|
||||
{
|
||||
if (!mysql_client_init)
|
||||
return;
|
||||
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
end_embedded_server();
|
||||
#endif
|
||||
|
@ -164,8 +164,8 @@ CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||||
--error ER_DUP_ENTRY
|
||||
LOAD DATA INFILE "../std_data_ln/words.dat" INTO TABLE t1;
|
||||
|
||||
--disable warnings
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable warnings
|
||||
--enable_warnings
|
||||
|
||||
# End of 4.1 tests
|
||||
|
@ -672,6 +672,20 @@ SELECT * FROM t3 WHERE a = 'uk';
|
||||
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
||||
#
|
||||
# Test bug when trying to drop data file which no InnoDB directory entry
|
||||
#
|
||||
|
||||
create table t1 (a int) engine=innodb;
|
||||
copy_file $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t2.frm;
|
||||
--error 1146
|
||||
select * from t2;
|
||||
drop table t1;
|
||||
--error 1051
|
||||
drop table t2;
|
||||
create table t2 (a int);
|
||||
drop table t2;
|
||||
|
||||
|
||||
#
|
||||
# Bug #29154: LOCK TABLES is not atomic when >1 InnoDB tables are locked
|
||||
@ -767,7 +781,6 @@ DROP TABLE t1,t2;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
||||
#
|
||||
# Test of behaviour with CREATE ... SELECT
|
||||
#
|
||||
|
@ -360,6 +360,10 @@ sub mtr_report_stats ($) {
|
||||
/skip-name-resolve mode/ or
|
||||
/slave SQL thread aborted/ or
|
||||
/Slave: .*Duplicate entry/ or
|
||||
# Special case for Bug #26402 in show_check.test
|
||||
# Question marks are not valid file name parts
|
||||
# on Windows platforms. Ignore this error message.
|
||||
/\QCan't find file: '.\test\????????.frm'\E/ or
|
||||
# Special case, made as specific as possible, for:
|
||||
# Bug #28436: Incorrect position in SHOW BINLOG EVENTS causes
|
||||
# server coredump
|
||||
|
19
mysql-test/r/archive-big.result
Normal file
19
mysql-test/r/archive-big.result
Normal file
@ -0,0 +1,19 @@
|
||||
CREATE TABLE t1(a BLOB) ENGINE=ARCHIVE;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
@ -12675,3 +12675,10 @@ select * from t1;
|
||||
i
|
||||
1
|
||||
drop table t1;
|
||||
create table t1(a longblob) engine=archive;
|
||||
insert into t1 set a='';
|
||||
insert into t1 set a='a';
|
||||
check table t1 extended;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
|
@ -36,7 +36,7 @@ restore table t1 from '../bogus';
|
||||
Table Op Msg_type Msg_text
|
||||
t1 restore error Failed copying .frm file
|
||||
Warnings:
|
||||
Warning 1543 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
|
||||
Warning 1287 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
|
||||
Error 29 File 'MYSQLTEST_VARDIR/bogus/t1.frm' not found (Errcode: X)
|
||||
restore table t1 from '../tmp';
|
||||
Table Op Msg_type Msg_text
|
||||
|
@ -5261,3 +5261,11 @@ CREATE TABLE `bug21328` (
|
||||
insert into bug21328 values (1,NULL,NULL);
|
||||
alter table bug21328 engine=myisam;
|
||||
drop table bug21328;
|
||||
create table t1(a blob, b int) engine=csv;
|
||||
insert into t1 values('a', 1);
|
||||
flush tables;
|
||||
update t1 set b=2;
|
||||
select * from t1;
|
||||
a b
|
||||
a 2
|
||||
drop table t1;
|
||||
|
@ -31,7 +31,7 @@ create event e_55 on schedule at 10000101000000 do drop table t;
|
||||
ERROR HY000: Incorrect AT value: '10000101000000'
|
||||
create event e_55 on schedule at 20000101000000 do drop table t;
|
||||
Warnings:
|
||||
Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created
|
||||
Note 1585 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created
|
||||
show events;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
create event e_55 on schedule at 20200101000000 starts 10000101000000 do drop table t;
|
||||
@ -457,22 +457,22 @@ CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'
|
||||
DO
|
||||
SELECT 1;
|
||||
Warnings:
|
||||
Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created
|
||||
Note 1585 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created
|
||||
CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'
|
||||
ENDS '1999-01-02 00:00:00' DISABLE
|
||||
DO
|
||||
SELECT 1;
|
||||
Warnings:
|
||||
Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created
|
||||
Note 1585 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created
|
||||
CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DO
|
||||
SELECT 1;
|
||||
Warnings:
|
||||
Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created
|
||||
Note 1585 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created
|
||||
CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DISABLE
|
||||
DO
|
||||
SELECT 1;
|
||||
Warnings:
|
||||
Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created
|
||||
Note 1585 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
events_test e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
@ -482,19 +482,19 @@ The following should succeed giving a warning.
|
||||
ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'
|
||||
ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE;
|
||||
Warnings:
|
||||
Note 1533 Event execution time is in the past. Event has been disabled
|
||||
Note 1541 Event execution time is in the past. Event has been disabled
|
||||
CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'
|
||||
ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE
|
||||
DO
|
||||
SELECT 1;
|
||||
Warnings:
|
||||
Note 1533 Event execution time is in the past. Event has been disabled
|
||||
Note 1541 Event execution time is in the past. Event has been disabled
|
||||
CREATE EVENT e5 ON SCHEDULE AT '1999-01-01 00:00:00'
|
||||
ON COMPLETION PRESERVE
|
||||
DO
|
||||
SELECT 1;
|
||||
Warnings:
|
||||
Note 1533 Event execution time is in the past. Event has been disabled
|
||||
Note 1541 Event execution time is in the past. Event has been disabled
|
||||
The following should succeed without warnings.
|
||||
ALTER EVENT e2 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00';
|
||||
ALTER EVENT e3 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'
|
||||
|
@ -63,7 +63,7 @@ begin work;
|
||||
insert into t1 (a) values ("OK: create event if not exists");
|
||||
create event if not exists e1 on schedule every 2 day do select 2;
|
||||
Warnings:
|
||||
Note 1526 Event 'e1' already exists
|
||||
Note 1534 Event 'e1' already exists
|
||||
rollback work;
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -1843,6 +1843,45 @@ C3A4C3B6C3BCC39F
|
||||
D18DD184D184D0B5D0BAD182D0B8D0B2D0BDD183D18E
|
||||
drop table federated.t1;
|
||||
drop table federated.t1;
|
||||
create table federated.t1 (a int primary key, b varchar(64))
|
||||
DEFAULT CHARSET=utf8;
|
||||
create table federated.t1 (a int primary key, b varchar(64))
|
||||
ENGINE=FEDERATED
|
||||
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'
|
||||
DEFAULT CHARSET=utf8;
|
||||
insert ignore into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe");
|
||||
select * from federated.t1;
|
||||
a b
|
||||
1 Larry
|
||||
2 Curly
|
||||
truncate federated.t1;
|
||||
replace into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe");
|
||||
select * from federated.t1;
|
||||
a b
|
||||
1 Moe
|
||||
2 Curly
|
||||
update ignore federated.t1 set a=a+1;
|
||||
select * from federated.t1;
|
||||
a b
|
||||
1 Moe
|
||||
3 Curly
|
||||
drop table federated.t1;
|
||||
drop table federated.t1;
|
||||
create table federated.t1 (a int primary key, b varchar(64))
|
||||
DEFAULT CHARSET=utf8;
|
||||
create table federated.t1 (a int primary key, b varchar(64))
|
||||
ENGINE=FEDERATED
|
||||
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'
|
||||
DEFAULT CHARSET=utf8;
|
||||
insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe")
|
||||
on duplicate key update a=a+100;
|
||||
ERROR 23000: Can't write; duplicate key in table 't1'
|
||||
select * from federated.t1;
|
||||
a b
|
||||
1 Larry
|
||||
2 Curly
|
||||
drop table federated.t1;
|
||||
drop table federated.t1;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
DROP DATABASE IF EXISTS federated;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
|
34
mysql-test/r/federated_innodb.result
Normal file
34
mysql-test/r/federated_innodb.result
Normal file
@ -0,0 +1,34 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
stop slave;
|
||||
DROP DATABASE IF EXISTS federated;
|
||||
CREATE DATABASE federated;
|
||||
DROP DATABASE IF EXISTS federated;
|
||||
CREATE DATABASE federated;
|
||||
create table federated.t1 (a int primary key, b varchar(64))
|
||||
engine=myisam;
|
||||
create table federated.t1 (a int primary key, b varchar(64))
|
||||
engine=federated
|
||||
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
|
||||
insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe");
|
||||
ERROR 23000: Can't write; duplicate key in table 't1'
|
||||
select * from federated.t1;
|
||||
a b
|
||||
1 Larry
|
||||
2 Curly
|
||||
truncate federated.t1;
|
||||
alter table federated.t1 engine=innodb;
|
||||
insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe");
|
||||
ERROR 23000: Can't write; duplicate key in table 't1'
|
||||
select * from federated.t1;
|
||||
a b
|
||||
drop table federated.t1;
|
||||
drop table federated.t1;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
DROP DATABASE IF EXISTS federated;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
DROP DATABASE IF EXISTS federated;
|
13
mysql-test/r/fulltext3.result
Normal file
13
mysql-test/r/fulltext3.result
Normal file
@ -0,0 +1,13 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1(a VARCHAR(255) CHARACTER SET gbk, FULLTEXT(a));
|
||||
SET NAMES utf8;
|
||||
INSERT INTO t1 VALUES(0xF043616161),(0xBEF361616197C22061616161);
|
||||
SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST(0x97C22061616161 IN BOOLEAN MODE);
|
||||
HEX(a)
|
||||
BEF361616197C22061616161
|
||||
DELETE FROM t1 LIMIT 1;
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
SET NAMES latin1;
|
||||
DROP TABLE t1;
|
@ -665,6 +665,14 @@ UPDATE t3 SET a = 'us' WHERE a = 'uk';
|
||||
SELECT * FROM t3 WHERE a = 'uk';
|
||||
a
|
||||
DROP TABLE t1,t2,t3;
|
||||
create table t1 (a int) engine=innodb;
|
||||
select * from t2;
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
ERROR 42S02: Unknown table 't2'
|
||||
create table t2 (a int);
|
||||
drop table t2;
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
switch to connection c1
|
||||
|
@ -5,20 +5,20 @@ INITIAL_SIZE 16M
|
||||
UNDO_BUFFER_SIZE = 1M
|
||||
ENGINE=MYISAM;
|
||||
Warnings:
|
||||
Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
|
||||
Error 1475 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
|
||||
ALTER LOGFILE GROUP lg1
|
||||
ADD UNDOFILE 'undofile02.dat'
|
||||
INITIAL_SIZE = 4M
|
||||
ENGINE=XYZ;
|
||||
Warnings:
|
||||
Warning 1286 Unknown table engine 'XYZ'
|
||||
Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
|
||||
Error 1475 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
|
||||
CREATE TABLESPACE ts1
|
||||
ADD DATAFILE 'datafile.dat'
|
||||
USE LOGFILE GROUP lg1
|
||||
INITIAL_SIZE 12M;
|
||||
Warnings:
|
||||
Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
|
||||
Error 1475 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
|
||||
set storage_engine=ndb;
|
||||
CREATE LOGFILE GROUP lg1
|
||||
ADD UNDOFILE 'undofile.dat'
|
||||
|
@ -16,7 +16,7 @@ ERROR HY000: Failed to create LOGFILE GROUP
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB
|
||||
Error 1516 Failed to create LOGFILE GROUP
|
||||
Error 1525 Failed to create LOGFILE GROUP
|
||||
CREATE LOGFILE GROUP lg1
|
||||
ADD UNDOFILE 'undofile.dat'
|
||||
INITIAL_SIZE 1M
|
||||
|
@ -463,7 +463,7 @@ drop table t1;
|
||||
End of 4.1 tests
|
||||
CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY);
|
||||
Warnings:
|
||||
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
|
||||
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
|
||||
INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
|
||||
INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
|
||||
INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
|
||||
@ -1013,7 +1013,7 @@ drop table t1;
|
||||
End of 4.1 tests
|
||||
CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY);
|
||||
Warnings:
|
||||
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
|
||||
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
|
||||
INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
|
||||
INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
|
||||
INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
|
||||
|
@ -8,7 +8,7 @@ ENGINE=NDB;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 138)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Row format FIXED incompatible with variable sized attribute'
|
||||
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Row format FIXED incompatible with variable sized attribute'
|
||||
Error 1005 Can't create table 'test.t1' (errno: 138)
|
||||
CREATE TABLE t1
|
||||
( a INT KEY,
|
||||
|
@ -11,7 +11,7 @@ ERROR HY000: Failed to create LOGFILE GROUP
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
|
||||
Error 1516 Failed to create LOGFILE GROUP
|
||||
Error 1525 Failed to create LOGFILE GROUP
|
||||
create table t1 (a int key, b int unique, c int) engine ndb;
|
||||
CREATE LOGFILE GROUP lg1
|
||||
ADD UNDOFILE 'undofile.dat'
|
||||
@ -27,14 +27,14 @@ ERROR HY000: Failed to create TABLESPACE
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
|
||||
Error 1516 Failed to create TABLESPACE
|
||||
Error 1525 Failed to create TABLESPACE
|
||||
DROP LOGFILE GROUP lg1
|
||||
ENGINE =NDB;
|
||||
ERROR HY000: Failed to drop LOGFILE GROUP
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
|
||||
Error 1517 Failed to drop LOGFILE GROUP
|
||||
Error 1526 Failed to drop LOGFILE GROUP
|
||||
CREATE TABLESPACE ts1
|
||||
ADD DATAFILE 'datafile.dat'
|
||||
USE LOGFILE GROUP lg1
|
||||
@ -47,7 +47,7 @@ ERROR HY000: Failed to alter: DROP DATAFILE
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
|
||||
Error 1521 Failed to alter: DROP DATAFILE
|
||||
Error 1530 Failed to alter: DROP DATAFILE
|
||||
ALTER TABLESPACE ts1
|
||||
DROP DATAFILE 'datafile.dat'
|
||||
ENGINE NDB;
|
||||
@ -57,7 +57,7 @@ ERROR HY000: Failed to drop TABLESPACE
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
|
||||
Error 1517 Failed to drop TABLESPACE
|
||||
Error 1526 Failed to drop TABLESPACE
|
||||
DROP TABLESPACE ts1
|
||||
ENGINE NDB;
|
||||
DROP LOGFILE GROUP lg1
|
||||
|
@ -72,7 +72,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -90,7 +90,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -134,7 +134,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -152,7 +152,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -196,7 +196,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -214,7 +214,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -257,7 +257,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -275,7 +275,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
||||
*** Drop t6 ***
|
||||
@ -369,7 +369,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -387,7 +387,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -430,7 +430,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -448,7 +448,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -755,7 +755,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -773,7 +773,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
|
@ -72,7 +72,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -90,7 +90,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -134,7 +134,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -152,7 +152,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -196,7 +196,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -214,7 +214,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -257,7 +257,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -275,7 +275,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
||||
*** Drop t6 ***
|
||||
@ -369,7 +369,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -387,7 +387,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -430,7 +430,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -448,7 +448,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -755,7 +755,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -773,7 +773,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
|
@ -44,7 +44,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1586
|
||||
Last_Errno 1587
|
||||
Last_Error The incident LOST_EVENTS occured on the master. Message: <none>
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -62,7 +62,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1586
|
||||
Last_SQL_Errno 1587
|
||||
Last_SQL_Error The incident LOST_EVENTS occured on the master. Message: <none>
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
START SLAVE;
|
||||
|
@ -72,7 +72,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -90,7 +90,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -134,7 +134,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -152,7 +152,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -196,7 +196,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -214,7 +214,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -257,7 +257,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -275,7 +275,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
|
||||
*** Drop t6 ***
|
||||
@ -369,7 +369,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -387,7 +387,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -430,7 +430,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -448,7 +448,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -756,7 +756,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -774,7 +774,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
|
@ -165,7 +165,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -183,7 +183,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -208,7 +208,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -226,7 +226,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -251,7 +251,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -269,7 +269,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -294,7 +294,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -312,7 +312,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
|
@ -165,7 +165,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -183,7 +183,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -208,7 +208,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -226,7 +226,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -251,7 +251,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -269,7 +269,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -294,7 +294,7 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1523
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
@ -312,7 +312,7 @@ Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1523
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
|
@ -193,7 +193,7 @@ end|
|
||||
ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
|
||||
set global log_bin_trust_routine_creators=1;
|
||||
Warnings:
|
||||
Warning 1543 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
|
||||
Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
|
||||
set global log_bin_trust_function_creators=0;
|
||||
set global log_bin_trust_function_creators=1;
|
||||
set global log_bin_trust_function_creators=1;
|
||||
|
@ -3492,7 +3492,7 @@ SELECT 0.9888889889 * 1.011111411911;
|
||||
0.9998769417899202067879
|
||||
prepare stmt from 'select 1 as " a "';
|
||||
Warnings:
|
||||
Warning 1548 Leading spaces are removed from name ' a '
|
||||
Warning 1466 Leading spaces are removed from name ' a '
|
||||
execute stmt;
|
||||
a
|
||||
1
|
||||
|
@ -1168,7 +1168,7 @@ drop database mysqltest;
|
||||
show full plugin;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1543 The syntax 'SHOW PLUGIN' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW PLUGINS' instead
|
||||
Warning 1287 The syntax 'SHOW PLUGIN' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW PLUGINS' instead
|
||||
show plugin;
|
||||
show plugins;
|
||||
create database `mysqlttest\1`;
|
||||
|
@ -5665,7 +5665,7 @@ drop function if exists pi;
|
||||
create function pi() returns varchar(50)
|
||||
return "pie, my favorite desert.";
|
||||
Warnings:
|
||||
Note 1581 This function 'pi' has the same name as a native function
|
||||
Note 1582 This function 'pi' has the same name as a native function
|
||||
SET @save_sql_mode=@@sql_mode;
|
||||
SET SQL_MODE='IGNORE_SPACE';
|
||||
select pi(), pi ();
|
||||
@ -5714,15 +5714,15 @@ use test;
|
||||
create function `database`() returns varchar(50)
|
||||
return "Stored function database";
|
||||
Warnings:
|
||||
Note 1581 This function 'database' has the same name as a native function
|
||||
Note 1582 This function 'database' has the same name as a native function
|
||||
create function `current_user`() returns varchar(50)
|
||||
return "Stored function current_user";
|
||||
Warnings:
|
||||
Note 1581 This function 'current_user' has the same name as a native function
|
||||
Note 1582 This function 'current_user' has the same name as a native function
|
||||
create function md5(x varchar(50)) returns varchar(50)
|
||||
return "Stored function md5";
|
||||
Warnings:
|
||||
Note 1581 This function 'md5' has the same name as a native function
|
||||
Note 1582 This function 'md5' has the same name as a native function
|
||||
SET SQL_MODE='IGNORE_SPACE';
|
||||
select database(), database ();
|
||||
database() database ()
|
||||
|
@ -7,11 +7,11 @@ return 1;
|
||||
create function x() returns int
|
||||
return 2;
|
||||
Warnings:
|
||||
Note 1581 This function 'x' has the same name as a native function
|
||||
Note 1582 This function 'x' has the same name as a native function
|
||||
create function y() returns int
|
||||
return 3;
|
||||
Warnings:
|
||||
Note 1581 This function 'y' has the same name as a native function
|
||||
Note 1582 This function 'y' has the same name as a native function
|
||||
select a();
|
||||
a()
|
||||
1
|
||||
|
@ -535,7 +535,7 @@ use db_bug7787|
|
||||
CREATE PROCEDURE p1()
|
||||
SHOW INNODB STATUS; |
|
||||
Warnings:
|
||||
Warning 1543 The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW ENGINE INNODB STATUS' instead
|
||||
Warning 1287 The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW ENGINE INNODB STATUS' instead
|
||||
GRANT EXECUTE ON PROCEDURE p1 TO user_bug7787@localhost|
|
||||
DROP DATABASE db_bug7787|
|
||||
drop user user_bug7787@localhost|
|
||||
|
@ -101,13 +101,13 @@ create table t1 (t2 timestamp(2), t4 timestamp(4), t6 timestamp(6),
|
||||
t8 timestamp(8), t10 timestamp(10), t12 timestamp(12),
|
||||
t14 timestamp(14));
|
||||
Warnings:
|
||||
Warning 1543 The syntax 'TIMESTAMP(2)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
|
||||
Warning 1543 The syntax 'TIMESTAMP(4)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
|
||||
Warning 1543 The syntax 'TIMESTAMP(6)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
|
||||
Warning 1543 The syntax 'TIMESTAMP(8)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
|
||||
Warning 1543 The syntax 'TIMESTAMP(10)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
|
||||
Warning 1543 The syntax 'TIMESTAMP(12)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
|
||||
Warning 1543 The syntax 'TIMESTAMP(14)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
|
||||
Warning 1287 The syntax 'TIMESTAMP(2)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
|
||||
Warning 1287 The syntax 'TIMESTAMP(4)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
|
||||
Warning 1287 The syntax 'TIMESTAMP(6)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
|
||||
Warning 1287 The syntax 'TIMESTAMP(8)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
|
||||
Warning 1287 The syntax 'TIMESTAMP(10)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
|
||||
Warning 1287 The syntax 'TIMESTAMP(12)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
|
||||
Warning 1287 The syntax 'TIMESTAMP(14)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead
|
||||
insert t1 values (0,0,0,0,0,0,0),
|
||||
("1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59",
|
||||
"1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59",
|
||||
|
@ -168,7 +168,7 @@ max_error_count 10
|
||||
drop table t1;
|
||||
set table_type=MYISAM;
|
||||
Warnings:
|
||||
Warning 1543 The syntax 'table_type' is deprecated and will be removed in MySQL 5.2. Please use 'storage_engine' instead
|
||||
Warning 1287 The syntax 'table_type' is deprecated and will be removed in MySQL 5.2. Please use 'storage_engine' instead
|
||||
create table t1 (a int);
|
||||
insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
update t1 set a='abc';
|
||||
|
@ -647,32 +647,32 @@ select extractValue('<a>a','/a');
|
||||
extractValue('<a>a','/a')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1513 Incorrect XML value: 'parse error at line 1 pos 5: unexpected END-OF-INPUT'
|
||||
Warning 1522 Incorrect XML value: 'parse error at line 1 pos 5: unexpected END-OF-INPUT'
|
||||
select extractValue('<a>a<','/a');
|
||||
extractValue('<a>a<','/a')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1513 Incorrect XML value: 'parse error at line 1 pos 6: END-OF-INPUT unexpected (ident or '/' wanted)'
|
||||
Warning 1522 Incorrect XML value: 'parse error at line 1 pos 6: END-OF-INPUT unexpected (ident or '/' wanted)'
|
||||
select extractValue('<a>a</','/a');
|
||||
extractValue('<a>a</','/a')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1513 Incorrect XML value: 'parse error at line 1 pos 7: END-OF-INPUT unexpected (ident wanted)'
|
||||
Warning 1522 Incorrect XML value: 'parse error at line 1 pos 7: END-OF-INPUT unexpected (ident wanted)'
|
||||
select extractValue('<a>a</a','/a');
|
||||
extractValue('<a>a</a','/a')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1513 Incorrect XML value: 'parse error at line 1 pos 8: END-OF-INPUT unexpected ('>' wanted)'
|
||||
Warning 1522 Incorrect XML value: 'parse error at line 1 pos 8: END-OF-INPUT unexpected ('>' wanted)'
|
||||
select extractValue('<a>a</a></b>','/a');
|
||||
extractValue('<a>a</a></b>','/a')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1513 Incorrect XML value: 'parse error at line 1 pos 12: '</b>' unexpected (END-OF-INPUT wanted)'
|
||||
Warning 1522 Incorrect XML value: 'parse error at line 1 pos 12: '</b>' unexpected (END-OF-INPUT wanted)'
|
||||
select extractValue('<a b=>a</a>','/a');
|
||||
extractValue('<a b=>a</a>','/a')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1513 Incorrect XML value: 'parse error at line 1 pos 7: '>' unexpected (ident or string wanted)'
|
||||
Warning 1522 Incorrect XML value: 'parse error at line 1 pos 7: '>' unexpected (ident or string wanted)'
|
||||
select extractValue('<e>1</e>','position()');
|
||||
ERROR HY000: XPATH syntax error: ''
|
||||
select extractValue('<e>1</e>','last()');
|
||||
@ -723,17 +723,17 @@ select extractValue('<zot><tim0><01>10:39:15</01><02>140</02></tim0></zot>','//*
|
||||
extractValue('<zot><tim0><01>10:39:15</01><02>140</02></tim0></zot>','//*')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1513 Incorrect XML value: 'parse error at line 1 pos 13: unknown token unexpected (ident or '/' wanted)'
|
||||
Warning 1522 Incorrect XML value: 'parse error at line 1 pos 13: unknown token unexpected (ident or '/' wanted)'
|
||||
select extractValue('<.>test</.>','//*');
|
||||
extractValue('<.>test</.>','//*')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1513 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)'
|
||||
Warning 1522 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)'
|
||||
select extractValue('<->test</->','//*');
|
||||
extractValue('<->test</->','//*')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1513 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)'
|
||||
Warning 1522 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)'
|
||||
select extractValue('<:>test</:>','//*');
|
||||
extractValue('<:>test</:>','//*')
|
||||
test
|
||||
|
25
mysql-test/t/archive-big.test
Normal file
25
mysql-test/t/archive-big.test
Normal file
File diff suppressed because one or more lines are too long
@ -1550,3 +1550,12 @@ insert into t1 values (1);
|
||||
repair table t1 use_frm;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG#29207 - archive table reported as corrupt by check table
|
||||
#
|
||||
create table t1(a longblob) engine=archive;
|
||||
insert into t1 set a='';
|
||||
insert into t1 set a='a';
|
||||
check table t1 extended;
|
||||
drop table t1;
|
||||
|
@ -307,7 +307,7 @@ select -(9223372036854775808);
|
||||
select -((9223372036854775808));
|
||||
select -(-(9223372036854775808));
|
||||
--disable_metadata
|
||||
--endble_ps_protocol
|
||||
--enable_ps_protocol
|
||||
select --9223372036854775808, ---9223372036854775808, ----9223372036854775808;
|
||||
select -(-9223372036854775808), -(-(-9223372036854775808));
|
||||
|
||||
|
@ -1674,3 +1674,14 @@ CREATE TABLE `bug21328` (
|
||||
insert into bug21328 values (1,NULL,NULL);
|
||||
alter table bug21328 engine=myisam;
|
||||
drop table bug21328;
|
||||
|
||||
#
|
||||
# BUG#28971 - ALTER TABLE followed by UPDATE for a CSV table make server
|
||||
# crash
|
||||
#
|
||||
create table t1(a blob, b int) engine=csv;
|
||||
insert into t1 values('a', 1);
|
||||
flush tables;
|
||||
update t1 set b=2;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
@ -52,5 +52,5 @@ ndb_partition_error2 : HF is not sure if the test can work as internded on all
|
||||
im_options_set : Bug#20294: Instance manager tests fail randomly
|
||||
im_options_unset : Bug#20294: Instance manager tests fail randomly
|
||||
mysql_upgrade : Bug#28560 test links to /usr/local/mysql/lib libraries, causes non-determinism and failures on ABI breakage
|
||||
rpl_udf : Bug#28993 rpl_udf test causes server crash and valgrind warning in pushbuild
|
||||
ndb_dd_sql_features : Bug#29102 ndb_dd_sql_features fails in pushbuild
|
||||
federated_innodb : Bug#29522 failed assertion in binlog_close_connection()
|
||||
|
@ -1630,4 +1630,57 @@ connection slave;
|
||||
drop table federated.t1;
|
||||
|
||||
|
||||
#
|
||||
# BUG#21019 Federated Engine does not support REPLACE/INSERT IGNORE/UPDATE IGNORE
|
||||
#
|
||||
connection slave;
|
||||
create table federated.t1 (a int primary key, b varchar(64))
|
||||
DEFAULT CHARSET=utf8;
|
||||
connection master;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval create table federated.t1 (a int primary key, b varchar(64))
|
||||
ENGINE=FEDERATED
|
||||
connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'
|
||||
DEFAULT CHARSET=utf8;
|
||||
|
||||
insert ignore into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe");
|
||||
select * from federated.t1;
|
||||
|
||||
truncate federated.t1;
|
||||
replace into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe");
|
||||
select * from federated.t1;
|
||||
|
||||
update ignore federated.t1 set a=a+1;
|
||||
select * from federated.t1;
|
||||
|
||||
drop table federated.t1;
|
||||
connection slave;
|
||||
drop table federated.t1;
|
||||
|
||||
#
|
||||
# BUG#25511 Federated Insert failures.
|
||||
#
|
||||
# When the user performs a INSERT...ON DUPLICATE KEY UPDATE, we want
|
||||
# it to fail if a duplicate key exists instead of ignoring it.
|
||||
#
|
||||
connection slave;
|
||||
create table federated.t1 (a int primary key, b varchar(64))
|
||||
DEFAULT CHARSET=utf8;
|
||||
connection master;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval create table federated.t1 (a int primary key, b varchar(64))
|
||||
ENGINE=FEDERATED
|
||||
connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'
|
||||
DEFAULT CHARSET=utf8;
|
||||
|
||||
--error ER_DUP_KEY
|
||||
insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe")
|
||||
on duplicate key update a=a+100;
|
||||
select * from federated.t1;
|
||||
|
||||
drop table federated.t1;
|
||||
connection slave;
|
||||
drop table federated.t1;
|
||||
|
||||
|
||||
source include/federated_cleanup.inc;
|
||||
|
1
mysql-test/t/federated_innodb-slave.opt
Normal file
1
mysql-test/t/federated_innodb-slave.opt
Normal file
@ -0,0 +1 @@
|
||||
--innodb
|
34
mysql-test/t/federated_innodb.test
Normal file
34
mysql-test/t/federated_innodb.test
Normal file
@ -0,0 +1,34 @@
|
||||
source include/federated.inc;
|
||||
source include/have_innodb.inc;
|
||||
|
||||
#
|
||||
# Bug#25513 Federated transaction failures
|
||||
#
|
||||
connection slave;
|
||||
create table federated.t1 (a int primary key, b varchar(64))
|
||||
engine=myisam;
|
||||
connection master;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval create table federated.t1 (a int primary key, b varchar(64))
|
||||
engine=federated
|
||||
connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
|
||||
|
||||
--error ER_DUP_KEY
|
||||
insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe");
|
||||
select * from federated.t1;
|
||||
|
||||
connection slave;
|
||||
truncate federated.t1;
|
||||
alter table federated.t1 engine=innodb;
|
||||
connection master;
|
||||
|
||||
--error ER_DUP_KEY
|
||||
insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe");
|
||||
select * from federated.t1;
|
||||
|
||||
drop table federated.t1;
|
||||
connection slave;
|
||||
drop table federated.t1;
|
||||
|
||||
|
||||
source include/federated_cleanup.inc;
|
24
mysql-test/t/fulltext3.test
Normal file
24
mysql-test/t/fulltext3.test
Normal file
@ -0,0 +1,24 @@
|
||||
--source include/have_gbk.inc
|
||||
#
|
||||
# test of new fulltext search features
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
|
||||
#
|
||||
# BUG#29299 - repeatable myisam fulltext index corruption
|
||||
#
|
||||
CREATE TABLE t1(a VARCHAR(255) CHARACTER SET gbk, FULLTEXT(a));
|
||||
SET NAMES utf8;
|
||||
INSERT INTO t1 VALUES(0xF043616161),(0xBEF361616197C22061616161);
|
||||
SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST(0x97C22061616161 IN BOOLEAN MODE);
|
||||
DELETE FROM t1 LIMIT 1;
|
||||
CHECK TABLE t1;
|
||||
SET NAMES latin1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# End of 5.0 tests
|
||||
|
@ -1271,6 +1271,6 @@ grant select on test.* to юзер_юзер@localhost;
|
||||
--exec $MYSQL --default-character-set=utf8 --user=юзер_юзер -e "select user()"
|
||||
revoke all on test.* from юзер_юзер@localhost;
|
||||
drop user юзер_юзер@localhost;
|
||||
--error 1573
|
||||
--error ER_WRONG_STRING_LENGTH
|
||||
grant select on test.* to очень_длинный_юзер@localhost;
|
||||
set names default;
|
||||
|
@ -25,7 +25,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
|
||||
create table t1 (a int key, b int unique, c int) engine ndb;
|
||||
# Bug #27712 Single user mode. Creating logfile group and tablespace is allowed
|
||||
# - before bug fix these would succeed
|
||||
--error 1516
|
||||
--error ER_CREATE_FILEGROUP_FAILED
|
||||
CREATE LOGFILE GROUP lg1
|
||||
ADD UNDOFILE 'undofile.dat'
|
||||
INITIAL_SIZE 16M
|
||||
|
@ -63,13 +63,13 @@ insert into t1 values (1);
|
||||
grant alter on mysqltest_1.* to mysqltest_1@localhost;
|
||||
connect (conn4,localhost,mysqltest_1,,mysqltest_1);
|
||||
connection conn4;
|
||||
--error 1514
|
||||
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
|
||||
alter table t1 partition by list (s1) (partition p1 values in (2));
|
||||
connection default;
|
||||
grant select, alter on mysqltest_1.* to mysqltest_1@localhost;
|
||||
disconnect conn4;
|
||||
connect (conn5,localhost,mysqltest_1,,mysqltest_1);
|
||||
--error 1514
|
||||
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
|
||||
alter table t1 partition by list (s1) (partition p1 values in (2));
|
||||
disconnect conn5;
|
||||
connection default;
|
||||
|
19
mysys/hash.c
19
mysys/hash.c
@ -593,6 +593,25 @@ my_bool hash_update(HASH *hash, uchar *record, uchar *old_key,
|
||||
previous->next=pos->next; /* unlink pos */
|
||||
|
||||
/* Move data to correct position */
|
||||
if (new_index == empty)
|
||||
{
|
||||
/*
|
||||
At this point record is unlinked from the old chain, thus it holds
|
||||
random position. By the chance this position is equal to position
|
||||
for the first element in the new chain. That means updated record
|
||||
is the only record in the new chain.
|
||||
*/
|
||||
if (empty != idx)
|
||||
{
|
||||
/*
|
||||
Record was moved while unlinking it from the old chain.
|
||||
Copy data to a new position.
|
||||
*/
|
||||
data[empty]= org_link;
|
||||
}
|
||||
data[empty].next= NO_RECORD;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
pos=data+new_index;
|
||||
new_pos_index=hash_rec_mask(hash,pos,blength,records);
|
||||
if (new_index != new_pos_index)
|
||||
|
@ -6457,6 +6457,7 @@ Field *Field_string::new_field(MEM_ROOT *root, struct st_table *new_table,
|
||||
is 2.
|
||||
****************************************************************************/
|
||||
|
||||
const uint Field_varstring::MAX_SIZE= UINT_MAX16;
|
||||
|
||||
int Field_varstring::store(const char *from,uint length,CHARSET_INFO *cs)
|
||||
{
|
||||
|
@ -1183,7 +1183,7 @@ public:
|
||||
The maximum space available in a Field_varstring, in bytes. See
|
||||
length_bytes.
|
||||
*/
|
||||
static const uint MAX_SIZE= UINT_MAX16;
|
||||
static const uint MAX_SIZE;
|
||||
/* Store number of bytes used to store length (1 or 2) */
|
||||
uint32 length_bytes;
|
||||
Field_varstring(uchar *ptr_arg,
|
||||
|
@ -2961,8 +2961,34 @@ int ha_partition::rnd_init(bool scan)
|
||||
uint32 part_id;
|
||||
DBUG_ENTER("ha_partition::rnd_init");
|
||||
|
||||
include_partition_fields_in_used_fields();
|
||||
|
||||
/*
|
||||
For operations that may need to change data, we may need to extend
|
||||
read_set.
|
||||
*/
|
||||
if (m_lock_type == F_WRLCK)
|
||||
{
|
||||
/*
|
||||
If write_set contains any of the fields used in partition and
|
||||
subpartition expression, we need to set all bits in read_set because
|
||||
the row may need to be inserted in a different [sub]partition. In
|
||||
other words update_row() can be converted into write_row(), which
|
||||
requires a complete record.
|
||||
*/
|
||||
if (bitmap_is_overlapping(&m_part_info->full_part_field_set,
|
||||
table->write_set))
|
||||
bitmap_set_all(table->read_set);
|
||||
else
|
||||
{
|
||||
/*
|
||||
Some handlers only read fields as specified by the bitmap for the
|
||||
read set. For partitioned handlers we always require that the
|
||||
fields of the partition functions are read such that we can
|
||||
calculate the partition id to place updated and deleted records.
|
||||
*/
|
||||
bitmap_union(table->read_set, &m_part_info->full_part_field_set);
|
||||
}
|
||||
}
|
||||
|
||||
/* Now we see what the index of our first important partition is */
|
||||
DBUG_PRINT("info", ("m_part_info->used_partitions: 0x%lx",
|
||||
(long) m_part_info->used_partitions.bitmap));
|
||||
@ -3118,7 +3144,7 @@ int ha_partition::rnd_next(uchar *buf)
|
||||
continue; // Probably MyISAM
|
||||
|
||||
if (result != HA_ERR_END_OF_FILE)
|
||||
break; // Return error
|
||||
goto end_dont_reset_start_part; // Return error
|
||||
|
||||
/* End current partition */
|
||||
late_extra_no_cache(part_id);
|
||||
@ -3144,6 +3170,7 @@ int ha_partition::rnd_next(uchar *buf)
|
||||
|
||||
end:
|
||||
m_part_spec.start_part= NO_CURRENT_PART_ID;
|
||||
end_dont_reset_start_part:
|
||||
table->status= STATUS_NOT_FOUND;
|
||||
DBUG_RETURN(result);
|
||||
}
|
||||
@ -3275,7 +3302,15 @@ int ha_partition::index_init(uint inx, bool sorted)
|
||||
m_start_key.length= 0;
|
||||
m_ordered= sorted;
|
||||
m_curr_key_info= table->key_info+inx;
|
||||
include_partition_fields_in_used_fields();
|
||||
/*
|
||||
Some handlers only read fields as specified by the bitmap for the
|
||||
read set. For partitioned handlers we always require that the
|
||||
fields of the partition functions are read such that we can
|
||||
calculate the partition id to place updated and deleted records.
|
||||
But this is required for operations that may need to change data only.
|
||||
*/
|
||||
if (m_lock_type == F_WRLCK)
|
||||
bitmap_union(table->read_set, &m_part_info->full_part_field_set);
|
||||
file= m_file;
|
||||
do
|
||||
{
|
||||
@ -4144,35 +4179,6 @@ int ha_partition::handle_ordered_prev(uchar *buf)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Set fields in partition functions in read set for underlying handlers
|
||||
|
||||
SYNOPSIS
|
||||
include_partition_fields_in_used_fields()
|
||||
|
||||
RETURN VALUE
|
||||
NONE
|
||||
|
||||
DESCRIPTION
|
||||
Some handlers only read fields as specified by the bitmap for the
|
||||
read set. For partitioned handlers we always require that the
|
||||
fields of the partition functions are read such that we can
|
||||
calculate the partition id to place updated and deleted records.
|
||||
*/
|
||||
|
||||
void ha_partition::include_partition_fields_in_used_fields()
|
||||
{
|
||||
Field **ptr= m_part_field_array;
|
||||
DBUG_ENTER("ha_partition::include_partition_fields_in_used_fields");
|
||||
|
||||
do
|
||||
{
|
||||
bitmap_set_bit(table->read_set, (*ptr)->field_index);
|
||||
} while (*(++ptr));
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
MODULE information calls
|
||||
****************************************************************************/
|
||||
@ -4714,6 +4720,12 @@ void ha_partition::get_dynamic_partition_info(PARTITION_INFO *stat_info,
|
||||
HA_EXTRA_KEY_CACHE:
|
||||
HA_EXTRA_NO_KEY_CACHE:
|
||||
This parameters are no longer used and could be removed.
|
||||
|
||||
7) Parameters only used by federated tables for query processing
|
||||
----------------------------------------------------------------
|
||||
HA_EXTRA_INSERT_WITH_UPDATE:
|
||||
Inform handler that an "INSERT...ON DUPLICATE KEY UPDATE" will be
|
||||
executed. This condition is unset by HA_EXTRA_NO_IGNORE_DUP_KEY.
|
||||
*/
|
||||
|
||||
int ha_partition::extra(enum ha_extra_function operation)
|
||||
@ -4795,6 +4807,9 @@ int ha_partition::extra(enum ha_extra_function operation)
|
||||
*/
|
||||
break;
|
||||
}
|
||||
/* Category 7), used by federated handlers */
|
||||
case HA_EXTRA_INSERT_WITH_UPDATE:
|
||||
DBUG_RETURN(loop_extra(operation));
|
||||
default:
|
||||
{
|
||||
/* Temporary crash to discover what is wrong */
|
||||
|
@ -449,7 +449,6 @@ private:
|
||||
int handle_ordered_next(uchar * buf, bool next_same);
|
||||
int handle_ordered_prev(uchar * buf);
|
||||
void return_top_record(uchar * buf);
|
||||
void include_partition_fields_in_used_fields();
|
||||
public:
|
||||
/*
|
||||
-------------------------------------------------------------------------
|
||||
|
@ -98,7 +98,7 @@ char* query_table_status(THD *thd,const char *db,const char *table_name);
|
||||
DBUG_ASSERT(strncmp(Ver, MYSQL_SERVER_VERSION, sizeof(Ver)-1) > 0); \
|
||||
if (((uchar*)Thd) != NULL) \
|
||||
push_warning_printf(((THD *)Thd), MYSQL_ERROR::WARN_LEVEL_WARN, \
|
||||
ER_WARN_DEPRECATED_SYNTAX, ER(ER_WARN_DEPRECATED_SYNTAX), \
|
||||
ER_WARN_DEPRECATED_SYNTAX, ER(ER_WARN_DEPRECATED_SYNTAX_WITH_VER), \
|
||||
(Old), (Ver), (New)); \
|
||||
else \
|
||||
sql_print_warning("The syntax '%s' is deprecated and will be removed " \
|
||||
|
@ -81,6 +81,13 @@ public:
|
||||
*/
|
||||
Field **full_part_field_array;
|
||||
Field **full_part_charset_field_array;
|
||||
/*
|
||||
Set of all fields used in partition and subpartition expression.
|
||||
Required for testing of partition fields in write_set when
|
||||
updating. We need to set all bits in read_set because the row may
|
||||
need to be inserted in a different [sub]partition.
|
||||
*/
|
||||
MY_BITMAP full_part_field_set;
|
||||
|
||||
/*
|
||||
When we have a field that requires transformation before calling the
|
||||
|
@ -1478,6 +1478,8 @@ ER_DUP_KEYNAME 42000 S1009
|
||||
spa "Nombre de clave duplicado '%-.192s'"
|
||||
swe "Nyckelnamn '%-.192s' finns flera gånger"
|
||||
ukr "äÕÂÌÀÀÞÅ ¦Í'Ñ ËÌÀÞÁ '%-.192s'"
|
||||
# When using this error code, please use ER(ER_DUP_ENTRY_WITH_KEY_NAME)
|
||||
# for the message string. See, for example, code in handler.cc.
|
||||
ER_DUP_ENTRY 23000 S1009
|
||||
cze "Zdvojen-Bý klíè '%-.192s' (èíslo klíèe %d)"
|
||||
dan "Ens værdier '%-.192s' for indeks %d"
|
||||
@ -5022,7 +5024,9 @@ ER_UNKNOWN_STORAGE_ENGINE 42000
|
||||
ger "Unbekannte Speicher-Engine '%s'"
|
||||
por "Motor de tabela desconhecido '%s'"
|
||||
spa "Desconocido motor de tabla '%s'"
|
||||
ER_UNUSED_1
|
||||
# When using this error code, use ER(ER_WARN_DEPRECATED_SYNTAX_WITH_VER)
|
||||
# for the message string. See, for example, code in mysql_priv.h.
|
||||
ER_WARN_DEPRECATED_SYNTAX
|
||||
eng "'%s' is deprecated; use '%s' instead"
|
||||
ger "'%s' ist veraltet. Bitte benutzen Sie '%s'"
|
||||
por "'%s' é desatualizado. Use '%s' em seu lugar"
|
||||
@ -5606,8 +5610,6 @@ ER_SP_RECURSION_LIMIT
|
||||
ER_SP_PROC_TABLE_CORRUPT
|
||||
eng "Failed to load routine %-.192s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)"
|
||||
ger "Routine %-.192s konnte nicht geladen werden. Die Tabelle mysql.proc fehlt, ist beschädigt, oder enthält fehlerhaften Daten (interner Code: %d)"
|
||||
ER_FOREIGN_SERVER_EXISTS
|
||||
eng "The foreign server, %s, you are trying to create already exists."
|
||||
ER_SP_WRONG_NAME 42000
|
||||
eng "Incorrect routine name '%-.192s'"
|
||||
ger "Ungültiger Routinenname '%-.192s'"
|
||||
@ -5629,6 +5631,34 @@ ER_NON_GROUPING_FIELD_USED 42000
|
||||
ER_TABLE_CANT_HANDLE_SPKEYS
|
||||
eng "The used table type doesn't support SPATIAL indexes"
|
||||
ger "Der verwendete Tabellentyp unterstützt keine SPATIAL-Indizes"
|
||||
ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA
|
||||
eng "Triggers can not be created on system tables"
|
||||
ger "Trigger können nicht auf Systemtabellen erzeugt werden"
|
||||
ER_REMOVED_SPACES
|
||||
eng "Leading spaces are removed from name '%s'"
|
||||
ger "Führende Leerzeichen werden aus dem Namen '%s' entfernt"
|
||||
ER_AUTOINC_READ_FAILED
|
||||
eng "Failed to read auto-increment value from storage engine"
|
||||
ger "Lesen des Autoincrement-Werts von der Speicher-Engine fehlgeschlagen"
|
||||
ER_USERNAME
|
||||
eng "user name"
|
||||
ger "Benutzername"
|
||||
ER_HOSTNAME
|
||||
eng "host name"
|
||||
ger "Hostname"
|
||||
ER_WRONG_STRING_LENGTH
|
||||
eng "String '%-.70s' is too long for %s (should be no longer than %d)"
|
||||
ger "String '%-.70s' ist zu lang für %s (sollte nicht länger sein als %d)"
|
||||
ER_NON_INSERTABLE_TABLE
|
||||
eng "The target table %-.100s of the %s is not insertable-into"
|
||||
ger "Die Zieltabelle %-.100s von %s ist nicht einfügbar"
|
||||
ER_ADMIN_WRONG_MRG_TABLE
|
||||
eng "Table '%-.64s' is differently defined or of non-MyISAM type or doesn't exist"
|
||||
ER_FOREIGN_SERVER_EXISTS
|
||||
eng "The foreign server, %s, you are trying to create already exists."
|
||||
ER_FOREIGN_SERVER_DOESNT_EXIST
|
||||
eng "The foreign server name you are trying to reference does not exist. Data source error: %-.64s"
|
||||
ger "Die externe Verbindung, auf die Sie zugreifen wollen, existiert nicht. Datenquellenfehlermeldung: %-.64s"
|
||||
ER_ILLEGAL_HA_CREATE_OPTION
|
||||
eng "Table storage engine '%-.64s' does not support the create option '%.64s'"
|
||||
ger "Speicher-Engine '%-.64s' der Tabelle unterstützt die Option '%.64s' nicht"
|
||||
@ -5848,9 +5878,6 @@ ER_BINLOG_ROW_WRONG_TABLE_DEF
|
||||
ER_BINLOG_ROW_RBR_TO_SBR
|
||||
eng "Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events"
|
||||
ger "Slave, die mit --log-slave-updates laufen, müssen zeilenbasiertes Loggen verwenden, um zeilenbasierte Binärlog-Ereignisse loggen zu können"
|
||||
ER_FOREIGN_SERVER_DOESNT_EXIST
|
||||
eng "The foreign server name you are trying to reference does not exist. Data source error: %-.64s"
|
||||
ger "Die externe Verbindung, auf die Sie zugreifen wollen, existiert nicht. Datenquellenfehlermeldung: %-.64s"
|
||||
ER_EVENT_ALREADY_EXISTS
|
||||
eng "Event '%-.192s' already exists"
|
||||
ger "Event '%-.192s' existiert bereits"
|
||||
@ -5901,7 +5928,9 @@ ER_EVENT_DATA_TOO_LONG
|
||||
ER_DROP_INDEX_FK
|
||||
eng "Cannot drop index '%-.192s': needed in a foreign key constraint"
|
||||
ger "Kann Index '%-.192s' nicht löschen: wird für einen Fremdschlüssel benötigt"
|
||||
ER_WARN_DEPRECATED_SYNTAX
|
||||
# When using this error message, use the ER_WARN_DEPRECATED_SYNTAX error
|
||||
# code. See, for example, code in mysql_priv.h.
|
||||
ER_WARN_DEPRECATED_SYNTAX_WITH_VER
|
||||
eng "The syntax '%s' is deprecated and will be removed in MySQL %s. Please use %s instead"
|
||||
ger "Die Syntax '%s' ist veraltet und wird in MySQL %s entfernt. Bitte benutzen Sie statt dessen %s"
|
||||
ER_CANT_WRITE_LOCK_LOG_TABLE
|
||||
@ -5916,9 +5945,6 @@ ER_FOREIGN_DUPLICATE_KEY 23000 S1009
|
||||
ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE
|
||||
eng "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use mysql_upgrade to fix this error."
|
||||
ger "Spaltenanzahl von mysql.%s falsch. %d erwartet, aber %d erhalten. Erzeugt mit MySQL %d, jetzt unter %d. Bitte benutzen Sie mysql_upgrade, um den Fehler zu beheben"
|
||||
ER_REMOVED_SPACES
|
||||
eng "Leading spaces are removed from name '%s'"
|
||||
ger "Führende Leerzeichen werden aus dem Namen '%s' entfernt"
|
||||
ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR
|
||||
eng "Cannot switch out of the row-based binary log format when the session has open temporary tables"
|
||||
ger "Kann nicht aus dem zeilenbasierten Binärlog-Format herauswechseln, wenn die Sitzung offene temporäre Tabellen hat"
|
||||
@ -5975,9 +6001,6 @@ ER_BASE64_DECODE_ERROR
|
||||
eng "Decoding of base64 string failed"
|
||||
swe "Avkodning av base64 sträng misslyckades"
|
||||
ger "Der Server hat keine zeilenbasierte Replikation"
|
||||
ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA
|
||||
eng "Triggers can not be created on system tables"
|
||||
ger "Trigger können nicht auf Systemtabellen erzeugt werden"
|
||||
ER_EVENT_RECURSION_FORBIDDEN
|
||||
eng "Recursion of EVENT DDL statements is forbidden when body is present"
|
||||
ger "Rekursivität von EVENT-DDL-Anweisungen ist unzulässig wenn ein Hauptteil (Body) existiert"
|
||||
@ -5987,27 +6010,12 @@ ER_EVENTS_DB_ERROR
|
||||
ER_ONLY_INTEGERS_ALLOWED
|
||||
eng "Only integers allowed as number here"
|
||||
ger "An dieser Stelle sind nur Ganzzahlen zulässig"
|
||||
ER_AUTOINC_READ_FAILED
|
||||
eng "Failed to read auto-increment value from storage engine"
|
||||
ger "Lesen des Autoincrement-Werts von der Speicher-Engine fehlgeschlagen"
|
||||
ER_USERNAME
|
||||
eng "user name"
|
||||
ger "Benutzername"
|
||||
ER_HOSTNAME
|
||||
eng "host name"
|
||||
ger "Hostname"
|
||||
ER_WRONG_STRING_LENGTH
|
||||
eng "String '%-.70s' is too long for %s (should be no longer than %d)"
|
||||
ger "String '%-.70s' ist zu lang für %s (sollte nicht länger sein als %d)"
|
||||
ER_UNSUPORTED_LOG_ENGINE
|
||||
eng "This storage engine cannot be used for log tables""
|
||||
ger "Diese Speicher-Engine kann für Logtabellen nicht verwendet werden"
|
||||
ER_BAD_LOG_STATEMENT
|
||||
eng "You cannot '%s' a log table if logging is enabled"
|
||||
ger "Sie können eine Logtabelle nicht '%s', wenn Loggen angeschaltet ist"
|
||||
ER_NON_INSERTABLE_TABLE
|
||||
eng "The target table %-.100s of the %s is not insertable-into"
|
||||
ger "Die Zieltabelle %-.100s von %s ist nicht einfügbar"
|
||||
ER_CANT_RENAME_LOG_TABLE
|
||||
eng "Cannot rename '%s'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to '%s'"
|
||||
ger "Kann '%s' nicht umbenennen. Wenn Loggen angeschaltet ist, müssen beim Umbenennen zu/von einer Logtabelle zwei Tabellen angegeben werden: die Logtabelle zu einer Archivtabelle und eine weitere Tabelle zurück zu '%s'"
|
||||
@ -6023,6 +6031,8 @@ ER_WRONG_PARAMETERS_TO_STORED_FCT 42000
|
||||
ER_NATIVE_FCT_NAME_COLLISION
|
||||
eng "This function '%-.192s' has the same name as a native function"
|
||||
ger "Die Funktion '%-.192s' hat denselben Namen wie eine native Funktion"
|
||||
# When using this error message, use the ER_DUP_ENTRY error code. See, for
|
||||
# example, code in handler.cc.
|
||||
ER_DUP_ENTRY_WITH_KEY_NAME 23000 S1009
|
||||
cze "Zvojen-Bý klíè '%-.64s' (èíslo klíèe '%-.192s')"
|
||||
dan "Ens værdier '%-.64s' for indeks '%-.192s'"
|
||||
@ -6059,8 +6069,6 @@ ER_SLAVE_INCIDENT
|
||||
eng "The incident %s occured on the master. Message: %-.64s"
|
||||
ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT
|
||||
eng "Table has no partition for some existing values"
|
||||
ER_ADMIN_WRONG_MRG_TABLE
|
||||
eng "Table '%-.64s' is differently defined or of non-MyISAM type or doesn't exist"
|
||||
ER_BINLOG_UNSAFE_STATEMENT
|
||||
eng "Statement is not safe to log in statement format."
|
||||
swe "Detta är inte säkert att logga i statement-format."
|
||||
|
@ -695,6 +695,8 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
if (duplic == DUP_REPLACE &&
|
||||
(!table->triggers || !table->triggers->has_delete_triggers()))
|
||||
table->file->extra(HA_EXTRA_WRITE_CAN_REPLACE);
|
||||
if (duplic == DUP_UPDATE)
|
||||
table->file->extra(HA_EXTRA_INSERT_WITH_UPDATE);
|
||||
/*
|
||||
let's *try* to start bulk inserts. It won't necessary
|
||||
start them as values_list.elements should be greater than
|
||||
@ -2546,6 +2548,8 @@ bool Delayed_insert::handle_inserts(void)
|
||||
table->file->extra(HA_EXTRA_WRITE_CAN_REPLACE);
|
||||
using_opt_replace= 1;
|
||||
}
|
||||
if (info.handle_duplicates == DUP_UPDATE)
|
||||
table->file->extra(HA_EXTRA_INSERT_WITH_UPDATE);
|
||||
thd.clear_error(); // reset error for binlog
|
||||
if (write_record(&thd, table, &info))
|
||||
{
|
||||
@ -2890,6 +2894,8 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
if (info.handle_duplicates == DUP_REPLACE &&
|
||||
(!table->triggers || !table->triggers->has_delete_triggers()))
|
||||
table->file->extra(HA_EXTRA_WRITE_CAN_REPLACE);
|
||||
if (info.handle_duplicates == DUP_UPDATE)
|
||||
table->file->extra(HA_EXTRA_INSERT_WITH_UPDATE);
|
||||
thd->no_trans_update.stmt= FALSE;
|
||||
thd->abort_on_warning= (!info.ignore &&
|
||||
(thd->variables.sql_mode &
|
||||
@ -3481,6 +3487,8 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
if (info.handle_duplicates == DUP_REPLACE &&
|
||||
(!table->triggers || !table->triggers->has_delete_triggers()))
|
||||
table->file->extra(HA_EXTRA_WRITE_CAN_REPLACE);
|
||||
if (info.handle_duplicates == DUP_UPDATE)
|
||||
table->file->extra(HA_EXTRA_INSERT_WITH_UPDATE);
|
||||
if (!thd->prelocked_mode)
|
||||
table->file->ha_start_bulk_insert((ha_rows) 0);
|
||||
thd->no_trans_update.stmt= FALSE;
|
||||
|
@ -523,6 +523,7 @@ static bool set_up_field_array(TABLE *table,
|
||||
|
||||
SYNOPSIS
|
||||
create_full_part_field_array()
|
||||
thd Thread handle
|
||||
table TABLE object for which partition fields are set-up
|
||||
part_info Reference to partitioning data structure
|
||||
|
||||
@ -537,11 +538,12 @@ static bool set_up_field_array(TABLE *table,
|
||||
This function is called from fix_partition_func
|
||||
*/
|
||||
|
||||
static bool create_full_part_field_array(TABLE *table,
|
||||
static bool create_full_part_field_array(THD *thd, TABLE *table,
|
||||
partition_info *part_info)
|
||||
{
|
||||
bool result= FALSE;
|
||||
Field **ptr;
|
||||
my_bitmap_map *bitmap_buf;
|
||||
DBUG_ENTER("create_full_part_field_array");
|
||||
|
||||
if (!part_info->is_sub_partitioned())
|
||||
@ -578,6 +580,35 @@ static bool create_full_part_field_array(TABLE *table,
|
||||
part_info->full_part_field_array= field_array;
|
||||
part_info->no_full_part_fields= no_part_fields;
|
||||
}
|
||||
|
||||
/*
|
||||
Initialize the set of all fields used in partition and subpartition
|
||||
expression. Required for testing of partition fields in write_set
|
||||
when updating. We need to set all bits in read_set because the row
|
||||
may need to be inserted in a different [sub]partition.
|
||||
*/
|
||||
if (!(bitmap_buf= (my_bitmap_map*)
|
||||
thd->alloc(bitmap_buffer_size(table->s->fields))))
|
||||
{
|
||||
mem_alloc_error(bitmap_buffer_size(table->s->fields));
|
||||
result= TRUE;
|
||||
goto end;
|
||||
}
|
||||
if (bitmap_init(&part_info->full_part_field_set, bitmap_buf,
|
||||
table->s->fields, FALSE))
|
||||
{
|
||||
mem_alloc_error(table->s->fields);
|
||||
result= TRUE;
|
||||
goto end;
|
||||
}
|
||||
/*
|
||||
full_part_field_array may be NULL if storage engine supports native
|
||||
partitioning.
|
||||
*/
|
||||
if ((ptr= part_info->full_part_field_array))
|
||||
for (; *ptr; ptr++)
|
||||
bitmap_set_bit(&part_info->full_part_field_set, (*ptr)->field_index);
|
||||
|
||||
end:
|
||||
DBUG_RETURN(result);
|
||||
}
|
||||
@ -1636,7 +1667,7 @@ bool fix_partition_func(THD *thd, TABLE *table,
|
||||
my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0));
|
||||
goto end;
|
||||
}
|
||||
if (unlikely(create_full_part_field_array(table, part_info)))
|
||||
if (unlikely(create_full_part_field_array(thd, table, part_info)))
|
||||
goto end;
|
||||
if (unlikely(check_primary_key(table)))
|
||||
goto end;
|
||||
|
@ -228,6 +228,15 @@ void write_core(int sig)
|
||||
void write_core(int sig)
|
||||
{
|
||||
signal(sig, SIG_DFL);
|
||||
#ifdef HAVE_gcov
|
||||
/*
|
||||
For GCOV build, crashing will prevent the writing of code coverage
|
||||
information from this process, causing gcov output to be incomplete.
|
||||
So we force the writing of coverage information here before terminating.
|
||||
*/
|
||||
extern void __gcov_flush(void);
|
||||
__gcov_flush();
|
||||
#endif
|
||||
pthread_kill(pthread_self(), sig);
|
||||
#if defined(P_MYID) && !defined(SCO)
|
||||
/* On Solaris, the above kill is not enough */
|
||||
|
@ -1548,7 +1548,6 @@ bool ha_archive::is_crashed() const
|
||||
int ha_archive::check(THD* thd, HA_CHECK_OPT* check_opt)
|
||||
{
|
||||
int rc= 0;
|
||||
uchar *buf;
|
||||
const char *old_proc_info;
|
||||
ha_rows count= share->rows_recorded;
|
||||
DBUG_ENTER("ha_archive::check");
|
||||
@ -1557,27 +1556,14 @@ int ha_archive::check(THD* thd, HA_CHECK_OPT* check_opt)
|
||||
/* Flush any waiting data */
|
||||
azflush(&(share->archive_write), Z_SYNC_FLUSH);
|
||||
|
||||
/*
|
||||
First we create a buffer that we can use for reading rows, and can pass
|
||||
to get_row().
|
||||
*/
|
||||
if (!(buf= (uchar*) my_malloc(table->s->reclength, MYF(MY_WME))))
|
||||
rc= HA_ERR_OUT_OF_MEM;
|
||||
|
||||
/*
|
||||
Now we will rewind the archive file so that we are positioned at the
|
||||
start of the file.
|
||||
*/
|
||||
init_archive_reader();
|
||||
|
||||
if (!rc)
|
||||
read_data_header(&archive);
|
||||
|
||||
if (!rc)
|
||||
while (!(rc= get_row(&archive, buf)))
|
||||
count--;
|
||||
|
||||
my_free((char*)buf, MYF(0));
|
||||
read_data_header(&archive);
|
||||
while (!(rc= get_row(&archive, table->record[0])))
|
||||
count--;
|
||||
|
||||
thd_proc_info(thd, old_proc_info);
|
||||
|
||||
|
@ -590,6 +590,7 @@ int ha_tina::find_current_row(uchar *buf)
|
||||
int eoln_len;
|
||||
my_bitmap_map *org_bitmap;
|
||||
int error;
|
||||
bool read_all;
|
||||
DBUG_ENTER("ha_tina::find_current_row");
|
||||
|
||||
/*
|
||||
@ -601,6 +602,8 @@ int ha_tina::find_current_row(uchar *buf)
|
||||
local_saved_data_file_length, &eoln_len)) == 0)
|
||||
DBUG_RETURN(HA_ERR_END_OF_FILE);
|
||||
|
||||
/* We must read all columns in case a table is opened for update */
|
||||
read_all= !bitmap_is_clear_all(table->write_set);
|
||||
/* Avoid asserts in ::store() for columns that are not going to be updated */
|
||||
org_bitmap= dbug_tmp_use_all_columns(table, table->write_set);
|
||||
error= HA_ERR_CRASHED_ON_USAGE;
|
||||
@ -678,7 +681,7 @@ int ha_tina::find_current_row(uchar *buf)
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (bitmap_is_set(table->read_set, (*field)->field_index))
|
||||
if (read_all || bitmap_is_set(table->read_set, (*field)->field_index))
|
||||
(*field)->store(buffer.ptr(), buffer.length(), buffer.charset());
|
||||
}
|
||||
next_position= end_offset + eoln_len;
|
||||
|
@ -388,6 +388,11 @@
|
||||
/* Variables for federated share methods */
|
||||
static HASH federated_open_tables; // To track open tables
|
||||
pthread_mutex_t federated_mutex; // To init the hash
|
||||
static char ident_quote_char= '`'; // Character for quoting
|
||||
// identifiers
|
||||
static char value_quote_char= '\''; // Character for quoting
|
||||
// literals
|
||||
static const int bulk_padding= 64; // bytes "overhead" in packet
|
||||
|
||||
/* Variables used when chopping off trailing characters */
|
||||
static const uint sizeof_trailing_comma= sizeof(", ") - 1;
|
||||
@ -415,7 +420,7 @@ static handler *federated_create_handler(handlerton *hton,
|
||||
/* Function we use in the creation of our hash to get key */
|
||||
|
||||
static uchar *federated_get_key(FEDERATED_SHARE *share, size_t *length,
|
||||
my_bool not_used __attribute__ ((unused)))
|
||||
my_bool not_used __attribute__ ((unused)))
|
||||
{
|
||||
*length= share->share_key_length;
|
||||
return (uchar*) share->share_key;
|
||||
@ -477,6 +482,57 @@ int federated_done(void *p)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@brief Append identifiers to the string.
|
||||
|
||||
@param[in,out] string The target string.
|
||||
@param[in] name Identifier name
|
||||
@param[in] length Length of identifier name in bytes
|
||||
@param[in] quote_char Quote char to use for quoting identifier.
|
||||
|
||||
@return Operation Status
|
||||
@retval FALSE OK
|
||||
@retval TRUE There was an error appending to the string.
|
||||
|
||||
@note This function is based upon the append_identifier() function
|
||||
in sql_show.cc except that quoting always occurs.
|
||||
*/
|
||||
|
||||
static bool append_ident(String *string, const char *name, uint length,
|
||||
const char quote_char)
|
||||
{
|
||||
bool result;
|
||||
uint clen;
|
||||
const char *name_end;
|
||||
DBUG_ENTER("append_ident");
|
||||
|
||||
if (quote_char)
|
||||
{
|
||||
string->reserve(length * 2 + 2);
|
||||
if ((result= string->append("e_char, 1, system_charset_info)))
|
||||
goto err;
|
||||
|
||||
for (name_end= name+length; name < name_end; name+= clen)
|
||||
{
|
||||
uchar c= *(uchar *) name;
|
||||
if (!(clen= my_mbcharlen(system_charset_info, c)))
|
||||
clen= 1;
|
||||
if (clen == 1 && c == (uchar) quote_char &&
|
||||
(result= string->append("e_char, 1, system_charset_info)))
|
||||
goto err;
|
||||
if ((result= string->append(name, clen, string->charset())))
|
||||
goto err;
|
||||
}
|
||||
result= string->append("e_char, 1, system_charset_info);
|
||||
}
|
||||
else
|
||||
result= string->append(name, length, system_charset_info);
|
||||
|
||||
err:
|
||||
DBUG_RETURN(result);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Check (in create) whether the tables exists, and that it can be connected to
|
||||
|
||||
@ -495,7 +551,6 @@ int federated_done(void *p)
|
||||
static int check_foreign_data_source(FEDERATED_SHARE *share,
|
||||
bool table_create_flag)
|
||||
{
|
||||
char escaped_table_name[NAME_LEN*2];
|
||||
char query_buffer[FEDERATED_QUERY_BUFFER_SIZE];
|
||||
char error_buffer[FEDERATED_QUERY_BUFFER_SIZE];
|
||||
uint error_code;
|
||||
@ -536,7 +591,6 @@ static int check_foreign_data_source(FEDERATED_SHARE *share,
|
||||
}
|
||||
else
|
||||
{
|
||||
int escaped_table_name_length= 0;
|
||||
/*
|
||||
Since we do not support transactions at this version, we can let the
|
||||
client API silently reconnect. For future versions, we will need more
|
||||
@ -551,14 +605,10 @@ static int check_foreign_data_source(FEDERATED_SHARE *share,
|
||||
|
||||
the query will be: SELECT * FROM `tablename` WHERE 1=0
|
||||
*/
|
||||
query.append(STRING_WITH_LEN("SELECT * FROM `"));
|
||||
escaped_table_name_length=
|
||||
escape_string_for_mysql(&my_charset_bin, (char*)escaped_table_name,
|
||||
sizeof(escaped_table_name),
|
||||
share->table_name,
|
||||
share->table_name_length);
|
||||
query.append(escaped_table_name, escaped_table_name_length);
|
||||
query.append(STRING_WITH_LEN("` WHERE 1=0"));
|
||||
query.append(STRING_WITH_LEN("SELECT * FROM "));
|
||||
append_ident(&query, share->table_name, share->table_name_length,
|
||||
ident_quote_char);
|
||||
query.append(STRING_WITH_LEN(" WHERE 1=0"));
|
||||
|
||||
if (mysql_real_query(mysql, query.ptr(), query.length()))
|
||||
{
|
||||
@ -907,6 +957,7 @@ ha_federated::ha_federated(handlerton *hton,
|
||||
mysql(0), stored_result(0)
|
||||
{
|
||||
trx_next= 0;
|
||||
bzero(&bulk_insert, sizeof(bulk_insert));
|
||||
}
|
||||
|
||||
|
||||
@ -969,9 +1020,8 @@ uint ha_federated::convert_row_to_internal_format(uchar *record,
|
||||
static bool emit_key_part_name(String *to, KEY_PART_INFO *part)
|
||||
{
|
||||
DBUG_ENTER("emit_key_part_name");
|
||||
if (to->append(STRING_WITH_LEN("`")) ||
|
||||
to->append(part->field->field_name) ||
|
||||
to->append(STRING_WITH_LEN("`")))
|
||||
if (append_ident(to, part->field->field_name,
|
||||
strlen(part->field->field_name), ident_quote_char))
|
||||
DBUG_RETURN(1); // Out of memory
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
@ -1515,20 +1565,20 @@ static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table)
|
||||
query.append(STRING_WITH_LEN("SELECT "));
|
||||
for (field= table->field; *field; field++)
|
||||
{
|
||||
query.append(STRING_WITH_LEN("`"));
|
||||
query.append((*field)->field_name);
|
||||
query.append(STRING_WITH_LEN("`, "));
|
||||
append_ident(&query, (*field)->field_name,
|
||||
strlen((*field)->field_name), ident_quote_char);
|
||||
query.append(STRING_WITH_LEN(", "));
|
||||
}
|
||||
/* chops off trailing comma */
|
||||
query.length(query.length() - sizeof_trailing_comma);
|
||||
|
||||
query.append(STRING_WITH_LEN(" FROM `"));
|
||||
query.append(tmp_share.table_name, tmp_share.table_name_length);
|
||||
query.append(STRING_WITH_LEN("`"));
|
||||
DBUG_PRINT("info", ("calling alloc_root"));
|
||||
query.append(STRING_WITH_LEN(" FROM "));
|
||||
|
||||
append_ident(&query, tmp_share.table_name,
|
||||
tmp_share.table_name_length, ident_quote_char);
|
||||
|
||||
if (!(share= (FEDERATED_SHARE *) memdup_root(&mem_root, (char*)&tmp_share, sizeof(*share))) ||
|
||||
!(share->select_query= (char*) strmake_root(&mem_root, query.ptr(), query.length())))
|
||||
!(share->select_query= (char*) strmake_root(&mem_root, query.ptr(), query.length() + 1)))
|
||||
goto error;
|
||||
|
||||
share->use_count= 0;
|
||||
@ -1669,6 +1719,8 @@ int ha_federated::open(const char *name, int mode, uint test_if_locked)
|
||||
table->s->reclength);
|
||||
DBUG_PRINT("info", ("ref_length: %u", ref_length));
|
||||
|
||||
reset();
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
@ -1741,6 +1793,82 @@ static inline uint field_in_record_is_null(TABLE *table,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@brief Construct the INSERT statement.
|
||||
|
||||
@details This method will construct the INSERT statement and appends it to
|
||||
the supplied query string buffer.
|
||||
|
||||
@return
|
||||
@retval FALSE No error
|
||||
@retval TRUE Failure
|
||||
*/
|
||||
|
||||
bool ha_federated::append_stmt_insert(String *query)
|
||||
{
|
||||
char insert_buffer[FEDERATED_QUERY_BUFFER_SIZE];
|
||||
Field **field;
|
||||
uint tmp_length;
|
||||
bool added_field= FALSE;
|
||||
|
||||
/* The main insert query string */
|
||||
String insert_string(insert_buffer, sizeof(insert_buffer), &my_charset_bin);
|
||||
DBUG_ENTER("ha_federated::append_stmt_insert");
|
||||
|
||||
insert_string.length(0);
|
||||
|
||||
if (replace_duplicates)
|
||||
insert_string.append(STRING_WITH_LEN("REPLACE INTO "));
|
||||
else if (ignore_duplicates && !insert_dup_update)
|
||||
insert_string.append(STRING_WITH_LEN("INSERT IGNORE INTO "));
|
||||
else
|
||||
insert_string.append(STRING_WITH_LEN("INSERT INTO "));
|
||||
append_ident(&insert_string, share->table_name, share->table_name_length,
|
||||
ident_quote_char);
|
||||
tmp_length= insert_string.length();
|
||||
insert_string.append(STRING_WITH_LEN(" ("));
|
||||
|
||||
/*
|
||||
loop through the field pointer array, add any fields to both the values
|
||||
list and the fields list that match the current query id
|
||||
*/
|
||||
for (field= table->field; *field; field++)
|
||||
{
|
||||
if (bitmap_is_set(table->write_set, (*field)->field_index))
|
||||
{
|
||||
/* append the field name */
|
||||
append_ident(&insert_string, (*field)->field_name,
|
||||
strlen((*field)->field_name), ident_quote_char);
|
||||
|
||||
/* append commas between both fields and fieldnames */
|
||||
/*
|
||||
unfortunately, we can't use the logic if *(fields + 1) to
|
||||
make the following appends conditional as we don't know if the
|
||||
next field is in the write set
|
||||
*/
|
||||
insert_string.append(STRING_WITH_LEN(", "));
|
||||
added_field= TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (added_field)
|
||||
{
|
||||
/* Remove trailing comma. */
|
||||
insert_string.length(insert_string.length() - sizeof_trailing_comma);
|
||||
insert_string.append(STRING_WITH_LEN(") "));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If there were no fields, we don't want to add a closing paren. */
|
||||
insert_string.length(tmp_length);
|
||||
}
|
||||
|
||||
insert_string.append(STRING_WITH_LEN(" VALUES "));
|
||||
|
||||
DBUG_RETURN(query->append(insert_string));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
write_row() inserts a row. No extra() hint is given currently if a bulk load
|
||||
is happeneding. buf() is a byte array of data. You can use the field
|
||||
@ -1757,69 +1885,14 @@ static inline uint field_in_record_is_null(TABLE *table,
|
||||
|
||||
int ha_federated::write_row(uchar *buf)
|
||||
{
|
||||
/*
|
||||
I need a bool again, in 5.0, I used table->s->fields to accomplish this.
|
||||
This worked as a flag that says there are fields with values or not.
|
||||
In 5.1, this value doesn't work the same, and I end up with the code
|
||||
truncating open parenthesis:
|
||||
|
||||
the statement "INSERT INTO t1 VALUES ()" ends up being first built
|
||||
in two strings
|
||||
"INSERT INTO t1 ("
|
||||
and
|
||||
" VALUES ("
|
||||
|
||||
If there are fields with values, they get appended, with commas, and
|
||||
the last loop, a trailing comma is there
|
||||
|
||||
"INSERT INTO t1 ( col1, col2, colN, "
|
||||
|
||||
" VALUES ( 'val1', 'val2', 'valN', "
|
||||
|
||||
Then, if there are fields, it should decrement the string by ", " length.
|
||||
|
||||
"INSERT INTO t1 ( col1, col2, colN"
|
||||
" VALUES ( 'val1', 'val2', 'valN'"
|
||||
|
||||
Then it adds a close paren to both - if there are fields
|
||||
|
||||
"INSERT INTO t1 ( col1, col2, colN)"
|
||||
" VALUES ( 'val1', 'val2', 'valN')"
|
||||
|
||||
Then appends both together
|
||||
"INSERT INTO t1 ( col1, col2, colN) VALUES ( 'val1', 'val2', 'valN')"
|
||||
|
||||
So... the problem, is if you have the original statement:
|
||||
|
||||
"INSERT INTO t1 VALUES ()"
|
||||
|
||||
Which is legitimate, but if the code thinks there are fields
|
||||
|
||||
"INSERT INTO t1 ("
|
||||
" VALUES ( "
|
||||
|
||||
If the field flag is set, but there are no commas, reduces the
|
||||
string by strlen(", ")
|
||||
|
||||
"INSERT INTO t1 "
|
||||
" VALUES "
|
||||
|
||||
Then adds the close parenthesis
|
||||
|
||||
"INSERT INTO t1 )"
|
||||
" VALUES )"
|
||||
|
||||
So, I have to use a bool as before, set in the loop where fields and commas
|
||||
are appended to the string
|
||||
*/
|
||||
my_bool commas_added= FALSE;
|
||||
char insert_buffer[FEDERATED_QUERY_BUFFER_SIZE];
|
||||
char values_buffer[FEDERATED_QUERY_BUFFER_SIZE];
|
||||
char insert_field_value_buffer[STRING_BUFFER_USUAL_SIZE];
|
||||
Field **field;
|
||||
uint tmp_length;
|
||||
int error= 0;
|
||||
bool use_bulk_insert;
|
||||
bool auto_increment_update_required= (table->next_number_field != NULL);
|
||||
|
||||
/* The main insert query string */
|
||||
String insert_string(insert_buffer, sizeof(insert_buffer), &my_charset_bin);
|
||||
/* The string containing the values to be added to the insert */
|
||||
String values_string(values_buffer, sizeof(values_buffer), &my_charset_bin);
|
||||
/* The actual value of the field, to be added to the values_string */
|
||||
@ -1830,7 +1903,6 @@ int ha_federated::write_row(uchar *buf)
|
||||
DBUG_ENTER("ha_federated::write_row");
|
||||
|
||||
values_string.length(0);
|
||||
insert_string.length(0);
|
||||
insert_field_value_string.length(0);
|
||||
ha_statistic_increment(&SSV::ha_write_count);
|
||||
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT)
|
||||
@ -1838,14 +1910,19 @@ int ha_federated::write_row(uchar *buf)
|
||||
|
||||
/*
|
||||
start both our field and field values strings
|
||||
We must disable multi-row insert for "INSERT...ON DUPLICATE KEY UPDATE"
|
||||
Ignore duplicates is always true when insert_dup_update is true.
|
||||
When replace_duplicates == TRUE, we can safely enable multi-row insert.
|
||||
When performing multi-row insert, we only collect the columns values for
|
||||
the row. The start of the statement is only created when the first
|
||||
row is copied in to the bulk_insert string.
|
||||
*/
|
||||
insert_string.append(STRING_WITH_LEN("INSERT INTO `"));
|
||||
insert_string.append(share->table_name, share->table_name_length);
|
||||
insert_string.append('`');
|
||||
insert_string.append(STRING_WITH_LEN(" ("));
|
||||
if (!(use_bulk_insert= bulk_insert.str &&
|
||||
(!insert_dup_update || replace_duplicates)))
|
||||
append_stmt_insert(&values_string);
|
||||
|
||||
values_string.append(STRING_WITH_LEN(" VALUES "));
|
||||
values_string.append(STRING_WITH_LEN(" ("));
|
||||
tmp_length= values_string.length();
|
||||
|
||||
/*
|
||||
loop through the field pointer array, add any fields to both the values
|
||||
@ -1855,7 +1932,6 @@ int ha_federated::write_row(uchar *buf)
|
||||
{
|
||||
if (bitmap_is_set(table->write_set, (*field)->field_index))
|
||||
{
|
||||
commas_added= TRUE;
|
||||
if ((*field)->is_null())
|
||||
values_string.append(STRING_WITH_LEN(" NULL "));
|
||||
else
|
||||
@ -1863,15 +1939,13 @@ int ha_federated::write_row(uchar *buf)
|
||||
bool needs_quote= (*field)->str_needs_quotes();
|
||||
(*field)->val_str(&insert_field_value_string);
|
||||
if (needs_quote)
|
||||
values_string.append('\'');
|
||||
values_string.append(value_quote_char);
|
||||
insert_field_value_string.print(&values_string);
|
||||
if (needs_quote)
|
||||
values_string.append('\'');
|
||||
values_string.append(value_quote_char);
|
||||
|
||||
insert_field_value_string.length(0);
|
||||
}
|
||||
/* append the field name */
|
||||
insert_string.append((*field)->field_name);
|
||||
|
||||
/* append commas between both fields and fieldnames */
|
||||
/*
|
||||
@ -1879,7 +1953,6 @@ int ha_federated::write_row(uchar *buf)
|
||||
make the following appends conditional as we don't know if the
|
||||
next field is in the write set
|
||||
*/
|
||||
insert_string.append(STRING_WITH_LEN(", "));
|
||||
values_string.append(STRING_WITH_LEN(", "));
|
||||
}
|
||||
}
|
||||
@ -1890,26 +1963,53 @@ int ha_federated::write_row(uchar *buf)
|
||||
AND, we don't want to chop off the last char '('
|
||||
insert will be "INSERT INTO t1 VALUES ();"
|
||||
*/
|
||||
if (commas_added)
|
||||
if (values_string.length() > tmp_length)
|
||||
{
|
||||
insert_string.length(insert_string.length() - sizeof_trailing_comma);
|
||||
/* chops off leading commas */
|
||||
/* chops off trailing comma */
|
||||
values_string.length(values_string.length() - sizeof_trailing_comma);
|
||||
insert_string.append(STRING_WITH_LEN(") "));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* chops off trailing ) */
|
||||
insert_string.length(insert_string.length() - sizeof_trailing_closeparen);
|
||||
}
|
||||
|
||||
/* we always want to append this, even if there aren't any fields */
|
||||
values_string.append(STRING_WITH_LEN(") "));
|
||||
|
||||
/* add the values */
|
||||
insert_string.append(values_string);
|
||||
if (use_bulk_insert)
|
||||
{
|
||||
/*
|
||||
Send the current bulk insert out if appending the current row would
|
||||
cause the statement to overflow the packet size, otherwise set
|
||||
auto_increment_update_required to FALSE as no query was executed.
|
||||
*/
|
||||
if (bulk_insert.length + values_string.length() + bulk_padding >
|
||||
mysql->net.max_packet_size && bulk_insert.length)
|
||||
{
|
||||
error= mysql_real_query(mysql, bulk_insert.str, bulk_insert.length);
|
||||
bulk_insert.length= 0;
|
||||
}
|
||||
else
|
||||
auto_increment_update_required= FALSE;
|
||||
|
||||
if (bulk_insert.length == 0)
|
||||
{
|
||||
char insert_buffer[FEDERATED_QUERY_BUFFER_SIZE];
|
||||
String insert_string(insert_buffer, sizeof(insert_buffer),
|
||||
&my_charset_bin);
|
||||
insert_string.length(0);
|
||||
append_stmt_insert(&insert_string);
|
||||
dynstr_append_mem(&bulk_insert, insert_string.ptr(),
|
||||
insert_string.length());
|
||||
}
|
||||
else
|
||||
dynstr_append_mem(&bulk_insert, ",", 1);
|
||||
|
||||
if (mysql_real_query(mysql, insert_string.ptr(), insert_string.length()))
|
||||
dynstr_append_mem(&bulk_insert, values_string.ptr(),
|
||||
values_string.length());
|
||||
}
|
||||
else
|
||||
{
|
||||
error= mysql_real_query(mysql, values_string.ptr(),
|
||||
values_string.length());
|
||||
}
|
||||
|
||||
if (error)
|
||||
{
|
||||
DBUG_RETURN(stash_remote_error());
|
||||
}
|
||||
@ -1917,12 +2017,79 @@ int ha_federated::write_row(uchar *buf)
|
||||
If the table we've just written a record to contains an auto_increment
|
||||
field, then store the last_insert_id() value from the foreign server
|
||||
*/
|
||||
if (table->next_number_field)
|
||||
if (auto_increment_update_required)
|
||||
update_auto_increment();
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@brief Prepares the storage engine for bulk inserts.
|
||||
|
||||
@param[in] rows estimated number of rows in bulk insert
|
||||
or 0 if unknown.
|
||||
|
||||
@details Initializes memory structures required for bulk insert.
|
||||
*/
|
||||
|
||||
void ha_federated::start_bulk_insert(ha_rows rows)
|
||||
{
|
||||
uint page_size;
|
||||
DBUG_ENTER("ha_federated::start_bulk_insert");
|
||||
|
||||
dynstr_free(&bulk_insert);
|
||||
|
||||
/**
|
||||
We don't bother with bulk-insert semantics when the estimated rows == 1
|
||||
The rows value will be 0 if the server does not know how many rows
|
||||
would be inserted. This can occur when performing INSERT...SELECT
|
||||
*/
|
||||
|
||||
if (rows == 1)
|
||||
DBUG_VOID_RETURN;
|
||||
|
||||
page_size= (uint) my_getpagesize();
|
||||
|
||||
if (init_dynamic_string(&bulk_insert, NULL, page_size, page_size))
|
||||
DBUG_VOID_RETURN;
|
||||
|
||||
bulk_insert.length= 0;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@brief End bulk insert.
|
||||
|
||||
@details This method will send any remaining rows to the remote server.
|
||||
Finally, it will deinitialize the bulk insert data structure.
|
||||
|
||||
@return Operation status
|
||||
@retval 0 No error
|
||||
@retval != 0 Error occured at remote server. Also sets my_errno.
|
||||
*/
|
||||
|
||||
int ha_federated::end_bulk_insert()
|
||||
{
|
||||
int error= 0;
|
||||
DBUG_ENTER("ha_federated::end_bulk_insert");
|
||||
|
||||
if (bulk_insert.str && bulk_insert.length)
|
||||
{
|
||||
if (mysql_real_query(mysql, bulk_insert.str, bulk_insert.length))
|
||||
error= stash_remote_error();
|
||||
else
|
||||
if (table->next_number_field)
|
||||
update_auto_increment();
|
||||
}
|
||||
|
||||
dynstr_free(&bulk_insert);
|
||||
|
||||
DBUG_RETURN(my_errno= error);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
ha_federated::update_auto_increment
|
||||
|
||||
@ -1952,9 +2119,9 @@ int ha_federated::optimize(THD* thd, HA_CHECK_OPT* check_opt)
|
||||
query.length(0);
|
||||
|
||||
query.set_charset(system_charset_info);
|
||||
query.append(STRING_WITH_LEN("OPTIMIZE TABLE `"));
|
||||
query.append(share->table_name, share->table_name_length);
|
||||
query.append(STRING_WITH_LEN("`"));
|
||||
query.append(STRING_WITH_LEN("OPTIMIZE TABLE "));
|
||||
append_ident(&query, share->table_name, share->table_name_length,
|
||||
ident_quote_char);
|
||||
|
||||
if (mysql_real_query(mysql, query.ptr(), query.length()))
|
||||
{
|
||||
@ -1974,9 +2141,9 @@ int ha_federated::repair(THD* thd, HA_CHECK_OPT* check_opt)
|
||||
query.length(0);
|
||||
|
||||
query.set_charset(system_charset_info);
|
||||
query.append(STRING_WITH_LEN("REPAIR TABLE `"));
|
||||
query.append(share->table_name, share->table_name_length);
|
||||
query.append(STRING_WITH_LEN("`"));
|
||||
query.append(STRING_WITH_LEN("REPAIR TABLE "));
|
||||
append_ident(&query, share->table_name, share->table_name_length,
|
||||
ident_quote_char);
|
||||
if (check_opt->flags & T_QUICK)
|
||||
query.append(STRING_WITH_LEN(" QUICK"));
|
||||
if (check_opt->flags & T_EXTEND)
|
||||
@ -2053,9 +2220,13 @@ int ha_federated::update_row(const uchar *old_data, uchar *new_data)
|
||||
update_string.length(0);
|
||||
where_string.length(0);
|
||||
|
||||
update_string.append(STRING_WITH_LEN("UPDATE `"));
|
||||
update_string.append(share->table_name);
|
||||
update_string.append(STRING_WITH_LEN("` SET "));
|
||||
if (ignore_duplicates)
|
||||
update_string.append(STRING_WITH_LEN("UPDATE IGNORE "));
|
||||
else
|
||||
update_string.append(STRING_WITH_LEN("UPDATE "));
|
||||
append_ident(&update_string, share->table_name,
|
||||
share->table_name_length, ident_quote_char);
|
||||
update_string.append(STRING_WITH_LEN(" SET "));
|
||||
|
||||
/*
|
||||
In this loop, we want to match column names to values being inserted
|
||||
@ -2071,7 +2242,9 @@ int ha_federated::update_row(const uchar *old_data, uchar *new_data)
|
||||
{
|
||||
if (bitmap_is_set(table->write_set, (*field)->field_index))
|
||||
{
|
||||
update_string.append((*field)->field_name);
|
||||
uint field_name_length= strlen((*field)->field_name);
|
||||
append_ident(&update_string, (*field)->field_name, field_name_length,
|
||||
ident_quote_char);
|
||||
update_string.append(STRING_WITH_LEN(" = "));
|
||||
|
||||
if ((*field)->is_null())
|
||||
@ -2083,10 +2256,10 @@ int ha_federated::update_row(const uchar *old_data, uchar *new_data)
|
||||
bool needs_quote= (*field)->str_needs_quotes();
|
||||
(*field)->val_str(&field_value);
|
||||
if (needs_quote)
|
||||
update_string.append('\'');
|
||||
update_string.append(value_quote_char);
|
||||
field_value.print(&update_string);
|
||||
if (needs_quote)
|
||||
update_string.append('\'');
|
||||
update_string.append(value_quote_char);
|
||||
field_value.length(0);
|
||||
tmp_restore_column_map(table->read_set, old_map);
|
||||
}
|
||||
@ -2095,7 +2268,9 @@ int ha_federated::update_row(const uchar *old_data, uchar *new_data)
|
||||
|
||||
if (bitmap_is_set(table->read_set, (*field)->field_index))
|
||||
{
|
||||
where_string.append((*field)->field_name);
|
||||
uint field_name_length= strlen((*field)->field_name);
|
||||
append_ident(&where_string, (*field)->field_name, field_name_length,
|
||||
ident_quote_char);
|
||||
if (field_in_record_is_null(table, *field, (char*) old_data))
|
||||
where_string.append(STRING_WITH_LEN(" IS NULL "));
|
||||
else
|
||||
@ -2105,10 +2280,10 @@ int ha_federated::update_row(const uchar *old_data, uchar *new_data)
|
||||
(*field)->val_str(&field_value,
|
||||
(old_data + (*field)->offset(record)));
|
||||
if (needs_quote)
|
||||
where_string.append('\'');
|
||||
where_string.append(value_quote_char);
|
||||
field_value.print(&where_string);
|
||||
if (needs_quote)
|
||||
where_string.append('\'');
|
||||
where_string.append(value_quote_char);
|
||||
field_value.length(0);
|
||||
}
|
||||
where_string.append(STRING_WITH_LEN(" AND "));
|
||||
@ -2165,9 +2340,10 @@ int ha_federated::delete_row(const uchar *buf)
|
||||
DBUG_ENTER("ha_federated::delete_row");
|
||||
|
||||
delete_string.length(0);
|
||||
delete_string.append(STRING_WITH_LEN("DELETE FROM `"));
|
||||
delete_string.append(share->table_name);
|
||||
delete_string.append(STRING_WITH_LEN("` WHERE "));
|
||||
delete_string.append(STRING_WITH_LEN("DELETE FROM "));
|
||||
append_ident(&delete_string, share->table_name,
|
||||
share->table_name_length, ident_quote_char);
|
||||
delete_string.append(STRING_WITH_LEN(" WHERE "));
|
||||
|
||||
for (Field **field= table->field; *field; field++)
|
||||
{
|
||||
@ -2175,8 +2351,9 @@ int ha_federated::delete_row(const uchar *buf)
|
||||
found++;
|
||||
if (bitmap_is_set(table->read_set, cur_field->field_index))
|
||||
{
|
||||
append_ident(&delete_string, (*field)->field_name,
|
||||
strlen((*field)->field_name), ident_quote_char);
|
||||
data_string.length(0);
|
||||
delete_string.append(cur_field->field_name);
|
||||
if (cur_field->is_null())
|
||||
{
|
||||
delete_string.append(STRING_WITH_LEN(" IS NULL "));
|
||||
@ -2187,10 +2364,10 @@ int ha_federated::delete_row(const uchar *buf)
|
||||
delete_string.append(STRING_WITH_LEN(" = "));
|
||||
cur_field->val_str(&data_string);
|
||||
if (needs_quote)
|
||||
delete_string.append('\'');
|
||||
delete_string.append(value_quote_char);
|
||||
data_string.print(&delete_string);
|
||||
if (needs_quote)
|
||||
delete_string.append('\'');
|
||||
delete_string.append(value_quote_char);
|
||||
}
|
||||
delete_string.append(STRING_WITH_LEN(" AND "));
|
||||
}
|
||||
@ -2680,7 +2857,6 @@ int ha_federated::info(uint flag)
|
||||
{
|
||||
char error_buffer[FEDERATED_QUERY_BUFFER_SIZE];
|
||||
char status_buf[FEDERATED_QUERY_BUFFER_SIZE];
|
||||
char escaped_table_name[FEDERATED_QUERY_BUFFER_SIZE];
|
||||
int error;
|
||||
uint error_code;
|
||||
MYSQL_RES *result= 0;
|
||||
@ -2693,13 +2869,9 @@ int ha_federated::info(uint flag)
|
||||
if (flag & (HA_STATUS_VARIABLE | HA_STATUS_CONST))
|
||||
{
|
||||
status_query_string.length(0);
|
||||
status_query_string.append(STRING_WITH_LEN("SHOW TABLE STATUS LIKE '"));
|
||||
escape_string_for_mysql(&my_charset_bin, (char *)escaped_table_name,
|
||||
sizeof(escaped_table_name),
|
||||
share->table_name,
|
||||
share->table_name_length);
|
||||
status_query_string.append(escaped_table_name);
|
||||
status_query_string.append(STRING_WITH_LEN("'"));
|
||||
status_query_string.append(STRING_WITH_LEN("SHOW TABLE STATUS LIKE "));
|
||||
append_ident(&status_query_string, share->table_name,
|
||||
share->table_name_length, value_quote_char);
|
||||
|
||||
if (mysql_real_query(mysql, status_query_string.ptr(),
|
||||
status_query_string.length()))
|
||||
@ -2770,6 +2942,65 @@ error:
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@brief Handles extra signals from MySQL server
|
||||
|
||||
@param[in] operation Hint for storage engine
|
||||
|
||||
@return Operation Status
|
||||
@retval 0 OK
|
||||
*/
|
||||
int ha_federated::extra(ha_extra_function operation)
|
||||
{
|
||||
DBUG_ENTER("ha_federated::extra");
|
||||
switch (operation) {
|
||||
case HA_EXTRA_IGNORE_DUP_KEY:
|
||||
ignore_duplicates= TRUE;
|
||||
break;
|
||||
case HA_EXTRA_NO_IGNORE_DUP_KEY:
|
||||
insert_dup_update= FALSE;
|
||||
ignore_duplicates= FALSE;
|
||||
break;
|
||||
case HA_EXTRA_WRITE_CAN_REPLACE:
|
||||
replace_duplicates= TRUE;
|
||||
break;
|
||||
case HA_EXTRA_WRITE_CANNOT_REPLACE:
|
||||
/*
|
||||
We use this flag to ensure that we do not create an "INSERT IGNORE"
|
||||
statement when inserting new rows into the remote table.
|
||||
*/
|
||||
replace_duplicates= FALSE;
|
||||
break;
|
||||
case HA_EXTRA_INSERT_WITH_UPDATE:
|
||||
insert_dup_update= TRUE;
|
||||
break;
|
||||
default:
|
||||
/* do nothing */
|
||||
DBUG_PRINT("info",("unhandled operation: %d", (uint) operation));
|
||||
}
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@brief Reset state of file to after 'open'.
|
||||
|
||||
@detail This function is called after every statement for all tables
|
||||
used by that statement.
|
||||
|
||||
@return Operation status
|
||||
@retval 0 OK
|
||||
*/
|
||||
|
||||
int ha_federated::reset(void)
|
||||
{
|
||||
insert_dup_update= FALSE;
|
||||
ignore_duplicates= FALSE;
|
||||
replace_duplicates= FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Used to delete all rows in a table. Both for cases of truncate and
|
||||
for cases where the optimizer realizes that all rows will be
|
||||
@ -2791,9 +3022,9 @@ int ha_federated::delete_all_rows()
|
||||
query.length(0);
|
||||
|
||||
query.set_charset(system_charset_info);
|
||||
query.append(STRING_WITH_LEN("TRUNCATE `"));
|
||||
query.append(share->table_name);
|
||||
query.append(STRING_WITH_LEN("`"));
|
||||
query.append(STRING_WITH_LEN("TRUNCATE "));
|
||||
append_ident(&query, share->table_name, share->table_name_length,
|
||||
ident_quote_char);
|
||||
|
||||
/*
|
||||
TRUNCATE won't return anything in mysql_affected_rows
|
||||
@ -2901,6 +3132,9 @@ int ha_federated::stash_remote_error()
|
||||
DBUG_ENTER("ha_federated::stash_remote_error()");
|
||||
remote_error_number= mysql_errno(mysql);
|
||||
strmake(remote_error_buf, mysql_error(mysql), sizeof(remote_error_buf)-1);
|
||||
if (remote_error_number == ER_DUP_ENTRY ||
|
||||
remote_error_number == ER_DUP_KEY)
|
||||
DBUG_RETURN(HA_ERR_FOUND_DUPP_KEY);
|
||||
DBUG_RETURN(HA_FEDERATED_ERROR_WITH_REMOTE_SYSTEM);
|
||||
}
|
||||
|
||||
|
@ -88,6 +88,9 @@ class ha_federated: public handler
|
||||
MYSQL_ROW_OFFSET current_position; // Current position used by ::position()
|
||||
int remote_error_number;
|
||||
char remote_error_buf[FEDERATED_QUERY_BUFFER_SIZE];
|
||||
bool ignore_duplicates, replace_duplicates;
|
||||
bool insert_dup_update;
|
||||
DYNAMIC_STRING bulk_insert;
|
||||
|
||||
private:
|
||||
/*
|
||||
@ -102,6 +105,14 @@ private:
|
||||
bool records_in_range, bool eq_range);
|
||||
int stash_remote_error();
|
||||
|
||||
bool append_stmt_insert(String *query);
|
||||
|
||||
int read_next(uchar *buf, MYSQL_RES *result);
|
||||
int index_read_idx_with_result_set(uchar *buf, uint index,
|
||||
const uchar *key,
|
||||
uint key_len,
|
||||
ha_rkey_function find_flag,
|
||||
MYSQL_RES **result);
|
||||
public:
|
||||
ha_federated(handlerton *hton, TABLE_SHARE *table_arg);
|
||||
~ha_federated() {}
|
||||
@ -189,6 +200,8 @@ public:
|
||||
int open(const char *name, int mode, uint test_if_locked); // required
|
||||
int close(void); // required
|
||||
|
||||
void start_bulk_insert(ha_rows rows);
|
||||
int end_bulk_insert();
|
||||
int write_row(uchar *buf);
|
||||
int update_row(const uchar *old_data, uchar *new_data);
|
||||
int delete_row(const uchar *buf);
|
||||
@ -217,6 +230,7 @@ public:
|
||||
int rnd_pos(uchar *buf, uchar *pos); //required
|
||||
void position(const uchar *record); //required
|
||||
int info(uint); //required
|
||||
int extra(ha_extra_function operation);
|
||||
|
||||
void update_auto_increment(void);
|
||||
int repair(THD* thd, HA_CHECK_OPT* check_opt);
|
||||
@ -231,18 +245,12 @@ public:
|
||||
|
||||
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
|
||||
enum thr_lock_type lock_type); //required
|
||||
virtual bool get_error_message(int error, String *buf);
|
||||
bool get_error_message(int error, String *buf);
|
||||
int external_lock(THD *thd, int lock_type);
|
||||
int connection_commit();
|
||||
int connection_rollback();
|
||||
int connection_autocommit(bool state);
|
||||
int execute_simple_query(const char *query, int len);
|
||||
|
||||
int read_next(uchar *buf, MYSQL_RES *result);
|
||||
int index_read_idx_with_result_set(uchar *buf, uint index,
|
||||
const uchar *key,
|
||||
uint key_len,
|
||||
ha_rkey_function find_flag,
|
||||
MYSQL_RES **result);
|
||||
int reset(void);
|
||||
};
|
||||
|
||||
|
@ -623,7 +623,7 @@ convert_error_code_to_mysql(
|
||||
|
||||
} else if (error == (int) DB_TABLE_NOT_FOUND) {
|
||||
|
||||
return(HA_ERR_KEY_NOT_FOUND);
|
||||
return(HA_ERR_NO_SUCH_TABLE);
|
||||
|
||||
} else if (error == (int) DB_TOO_BIG_RECORD) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user