Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c99470b3
Commit
c99470b3
authored
Nov 13, 2019
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.4 into 10.5
parents
29b11cff
49019dde
Changes
70
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
70 changed files
with
2877 additions
and
171 deletions
+2877
-171
sql/sql_list.h
sql/sql_list.h
+6
-0
storage/innobase/btr/btr0btr.cc
storage/innobase/btr/btr0btr.cc
+12
-4
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+88
-147
storage/innobase/include/dict0dict.h
storage/innobase/include/dict0dict.h
+1
-1
storage/innobase/include/page0page.h
storage/innobase/include/page0page.h
+6
-6
storage/innobase/include/trx0sys.h
storage/innobase/include/trx0sys.h
+2
-2
storage/innobase/include/trx0undo.h
storage/innobase/include/trx0undo.h
+12
-11
storage/innobase/mtr/mtr0log.cc
storage/innobase/mtr/mtr0log.cc
+3
-0
storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi0_deinit.inc
...spider/regression/e1121/include/load_data_ddi0_deinit.inc
+3
-0
storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi0_init.inc
...t/spider/regression/e1121/include/load_data_ddi0_init.inc
+4
-0
storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi1_deinit.inc
...spider/regression/e1121/include/load_data_ddi1_deinit.inc
+3
-0
storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi1_init.inc
...t/spider/regression/e1121/include/load_data_ddi1_init.inc
+4
-0
storage/spider/mysql-test/spider/regression/e1121/include/load_data_deinit.inc
...test/spider/regression/e1121/include/load_data_deinit.inc
+11
-0
storage/spider/mysql-test/spider/regression/e1121/include/load_data_init.inc
...l-test/spider/regression/e1121/include/load_data_init.inc
+25
-0
storage/spider/mysql-test/spider/regression/e1121/r/load_data_ddi0.result
...ysql-test/spider/regression/e1121/r/load_data_ddi0.result
+75
-0
storage/spider/mysql-test/spider/regression/e1121/r/load_data_ddi1.result
...ysql-test/spider/regression/e1121/r/load_data_ddi1.result
+75
-0
storage/spider/mysql-test/spider/regression/e1121/r/load_data_ignore_ddi0.result
...st/spider/regression/e1121/r/load_data_ignore_ddi0.result
+95
-0
storage/spider/mysql-test/spider/regression/e1121/r/load_data_ignore_ddi1.result
...st/spider/regression/e1121/r/load_data_ignore_ddi1.result
+75
-0
storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ddi0.result
...est/spider/regression/e1121/r/load_data_local_ddi0.result
+84
-0
storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ddi1.result
...est/spider/regression/e1121/r/load_data_local_ddi1.result
+75
-0
storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ignore_ddi0.result
...der/regression/e1121/r/load_data_local_ignore_ddi0.result
+95
-0
storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ignore_ddi1.result
...der/regression/e1121/r/load_data_local_ignore_ddi1.result
+75
-0
storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_replace_ddi0.result
...er/regression/e1121/r/load_data_local_replace_ddi0.result
+104
-0
storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_replace_ddi1.result
...er/regression/e1121/r/load_data_local_replace_ddi1.result
+75
-0
storage/spider/mysql-test/spider/regression/e1121/r/load_data_replace_ddi0.result
...t/spider/regression/e1121/r/load_data_replace_ddi0.result
+104
-0
storage/spider/mysql-test/spider/regression/e1121/r/load_data_replace_ddi1.result
...t/spider/regression/e1121/r/load_data_replace_ddi1.result
+75
-0
storage/spider/mysql-test/spider/regression/e1121/t/load_data.inc
...spider/mysql-test/spider/regression/e1121/t/load_data.inc
+76
-0
storage/spider/mysql-test/spider/regression/e1121/t/load_data_ddi0.test
.../mysql-test/spider/regression/e1121/t/load_data_ddi0.test
+8
-0
storage/spider/mysql-test/spider/regression/e1121/t/load_data_ddi1.test
.../mysql-test/spider/regression/e1121/t/load_data_ddi1.test
+8
-0
storage/spider/mysql-test/spider/regression/e1121/t/load_data_ignore_ddi0.test
...test/spider/regression/e1121/t/load_data_ignore_ddi0.test
+8
-0
storage/spider/mysql-test/spider/regression/e1121/t/load_data_ignore_ddi1.test
...test/spider/regression/e1121/t/load_data_ignore_ddi1.test
+8
-0
storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ddi0.test
...-test/spider/regression/e1121/t/load_data_local_ddi0.test
+8
-0
storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ddi1.test
...-test/spider/regression/e1121/t/load_data_local_ddi1.test
+8
-0
storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ignore_ddi0.test
...pider/regression/e1121/t/load_data_local_ignore_ddi0.test
+8
-0
storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ignore_ddi1.test
...pider/regression/e1121/t/load_data_local_ignore_ddi1.test
+8
-0
storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_replace_ddi0.test
...ider/regression/e1121/t/load_data_local_replace_ddi0.test
+8
-0
storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_replace_ddi1.test
...ider/regression/e1121/t/load_data_local_replace_ddi1.test
+8
-0
storage/spider/mysql-test/spider/regression/e1121/t/load_data_replace_ddi0.test
...est/spider/regression/e1121/t/load_data_replace_ddi0.test
+8
-0
storage/spider/mysql-test/spider/regression/e1121/t/load_data_replace_ddi1.test
...est/spider/regression/e1121/t/load_data_replace_ddi1.test
+8
-0
storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi0_deinit.inc
...regression/e112122/include/load_data_part_ddi0_deinit.inc
+3
-0
storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi0_init.inc
...r/regression/e112122/include/load_data_part_ddi0_init.inc
+4
-0
storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi1_deinit.inc
...regression/e112122/include/load_data_part_ddi1_deinit.inc
+3
-0
storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi1_init.inc
...r/regression/e112122/include/load_data_part_ddi1_init.inc
+4
-0
storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_deinit.inc
...ider/regression/e112122/include/load_data_part_deinit.inc
+14
-0
storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_init.inc
...spider/regression/e112122/include/load_data_part_init.inc
+52
-0
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ddi0.result
...st/spider/regression/e112122/r/load_data_part_ddi0.result
+95
-0
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ddi1.result
...st/spider/regression/e112122/r/load_data_part_ddi1.result
+95
-0
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ignore_ddi0.result
...er/regression/e112122/r/load_data_part_ignore_ddi0.result
+114
-0
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ignore_ddi1.result
...er/regression/e112122/r/load_data_part_ignore_ddi1.result
+95
-0
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ddi0.result
...der/regression/e112122/r/load_data_part_local_ddi0.result
+103
-0
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ddi1.result
...der/regression/e112122/r/load_data_part_local_ddi1.result
+95
-0
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ignore_ddi0.result
...ression/e112122/r/load_data_part_local_ignore_ddi0.result
+114
-0
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ignore_ddi1.result
...ression/e112122/r/load_data_part_local_ignore_ddi1.result
+95
-0
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_replace_ddi0.result
...ession/e112122/r/load_data_part_local_replace_ddi0.result
+123
-0
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_replace_ddi1.result
...ession/e112122/r/load_data_part_local_replace_ddi1.result
+95
-0
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_replace_ddi0.result
...r/regression/e112122/r/load_data_part_replace_ddi0.result
+123
-0
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_replace_ddi1.result
...r/regression/e112122/r/load_data_part_replace_ddi1.result
+95
-0
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part.inc
...mysql-test/spider/regression/e112122/t/load_data_part.inc
+100
-0
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ddi0.test
...test/spider/regression/e112122/t/load_data_part_ddi0.test
+8
-0
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ddi1.test
...test/spider/regression/e112122/t/load_data_part_ddi1.test
+8
-0
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ignore_ddi0.test
...ider/regression/e112122/t/load_data_part_ignore_ddi0.test
+8
-0
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ignore_ddi1.test
...ider/regression/e112122/t/load_data_part_ignore_ddi1.test
+8
-0
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ddi0.test
...pider/regression/e112122/t/load_data_part_local_ddi0.test
+8
-0
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ddi1.test
...pider/regression/e112122/t/load_data_part_local_ddi1.test
+8
-0
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ignore_ddi0.test
...egression/e112122/t/load_data_part_local_ignore_ddi0.test
+8
-0
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ignore_ddi1.test
...egression/e112122/t/load_data_part_local_ignore_ddi1.test
+8
-0
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_replace_ddi0.test
...gression/e112122/t/load_data_part_local_replace_ddi0.test
+8
-0
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_replace_ddi1.test
...gression/e112122/t/load_data_part_local_replace_ddi1.test
+8
-0
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_replace_ddi0.test
...der/regression/e112122/t/load_data_part_replace_ddi0.test
+8
-0
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_replace_ddi1.test
...der/regression/e112122/t/load_data_part_replace_ddi1.test
+8
-0
No files found.
sql/sql_list.h
View file @
c99470b3
...
...
@@ -569,6 +569,12 @@ template <class T> class List :public base_list
}
T
&
operator
*
()
{
return
*
static_cast
<
T
*>
(
node
->
info
);
}
T
*
operator
->
()
{
return
static_cast
<
T
*>
(
node
->
info
);
}
bool
operator
==
(
const
typename
List
<
T
>::
iterator
&
rhs
)
{
return
node
==
rhs
.
node
;
}
bool
operator
!=
(
const
typename
List
<
T
>::
iterator
&
rhs
)
{
...
...
storage/innobase/btr/btr0btr.cc
View file @
c99470b3
...
...
@@ -1161,8 +1161,12 @@ btr_create(
btr_page_set_index_id
(
page
,
page_zip
,
index_id
,
mtr
);
/* Set the next node and previous node fields */
btr_page_set_next
(
page
,
page_zip
,
FIL_NULL
,
mtr
);
btr_page_set_prev
(
page
,
page_zip
,
FIL_NULL
,
mtr
);
compile_time_assert
(
FIL_PAGE_NEXT
==
FIL_PAGE_PREV
+
4
);
compile_time_assert
(
FIL_NULL
==
0xffffffff
);
mlog_memset
(
block
,
FIL_PAGE_PREV
,
8
,
0xff
,
mtr
);
if
(
UNIV_LIKELY_NULL
(
page_zip
))
{
memset
(
page_zip
->
data
+
FIL_PAGE_PREV
,
0xff
,
8
);
}
/* We reset the free bits for the page in a separate
mini-transaction to allow creation of several trees in the
...
...
@@ -1939,8 +1943,12 @@ btr_root_raise_and_insert(
btr_page_create
(
new_block
,
new_page_zip
,
index
,
level
,
mtr
);
/* Set the next node and previous node fields of new page */
btr_page_set_next
(
new_page
,
new_page_zip
,
FIL_NULL
,
mtr
);
btr_page_set_prev
(
new_page
,
new_page_zip
,
FIL_NULL
,
mtr
);
compile_time_assert
(
FIL_PAGE_NEXT
==
FIL_PAGE_PREV
+
4
);
compile_time_assert
(
FIL_NULL
==
0xffffffff
);
mlog_memset
(
new_block
,
FIL_PAGE_PREV
,
8
,
0xff
,
mtr
);
if
(
UNIV_LIKELY_NULL
(
new_page_zip
))
{
memset
(
new_page_zip
->
data
+
FIL_PAGE_PREV
,
0xff
,
8
);
}
/* Copy the records from root to the new page one by one. */
...
...
storage/innobase/handler/handler0alter.cc
View file @
c99470b3
This diff is collapsed.
Click to expand it.
storage/innobase/include/dict0dict.h
View file @
c99470b3
...
...
@@ -37,7 +37,7 @@ extern bool innodb_table_stats_not_found;
extern
bool
innodb_index_stats_not_found
;
/** the first table or index ID for other than hard-coded system tables */
#define DICT_HDR_FIRST_ID 10
constexpr
uint8_t
DICT_HDR_FIRST_ID
=
10
;
/********************************************************************//**
Get the database name length in a table name.
...
...
storage/innobase/include/page0page.h
View file @
c99470b3
...
...
@@ -158,12 +158,12 @@ Otherwise written as 0. @see PAGE_ROOT_AUTO_INC */
not necessarily collation order;
this record may have been deleted */
/* Directions of cursor movement */
#define PAGE_LEFT 1
#define PAGE_RIGHT 2
#define PAGE_SAME_REC 3
#define PAGE_SAME_PAGE 4
#define PAGE_NO_DIRECTION 5
/* Directions of cursor movement
(stored in PAGE_DIRECTION field)
*/
constexpr
uint16_t
PAGE_LEFT
=
1
;
constexpr
uint16_t
PAGE_RIGHT
=
2
;
constexpr
uint16_t
PAGE_SAME_REC
=
3
;
constexpr
uint16_t
PAGE_SAME_PAGE
=
4
;
constexpr
uint16_t
PAGE_NO_DIRECTION
=
5
;
#ifndef UNIV_INNOCHECKSUM
...
...
storage/innobase/include/trx0sys.h
View file @
c99470b3
...
...
@@ -344,9 +344,9 @@ FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID. */
/*-------------------------------------------------------------*/
/** Contents of TRX_SYS_DOUBLEWRITE_MAGIC */
#define TRX_SYS_DOUBLEWRITE_MAGIC_N 536853855
constexpr
uint32_t
TRX_SYS_DOUBLEWRITE_MAGIC_N
=
536853855
;
/** Contents of TRX_SYS_DOUBLEWRITE_SPACE_ID_STORED */
#define TRX_SYS_DOUBLEWRITE_SPACE_ID_STORED_N 1783657386
constexpr
uint32_t
TRX_SYS_DOUBLEWRITE_SPACE_ID_STORED_N
=
1783657386
;
/** Size of the doublewrite block in pages */
#define TRX_SYS_DOUBLEWRITE_BLOCK_SIZE FSP_EXTENT_SIZE
...
...
storage/innobase/include/trx0undo.h
View file @
c99470b3
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 201
8
, MariaDB Corporation.
Copyright (c) 2017, 201
9
, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -308,16 +308,17 @@ trx_undo_mem_create_at_db_start(trx_rseg_t* rseg, ulint id, ulint page_no,
and delete markings: in short,
modifys (the name 'UPDATE' is a
historical relic) */
/* States of an undo log segment */
#define TRX_UNDO_ACTIVE 1
/* contains an undo log of an active
transaction */
#define TRX_UNDO_CACHED 2
/* cached for quick reuse */
#define TRX_UNDO_TO_FREE 3
/* insert undo segment can be freed */
#define TRX_UNDO_TO_PURGE 4
/* update undo segment will not be
reused: it can be freed in purge when
all undo data in it is removed */
#define TRX_UNDO_PREPARED 5
/* contains an undo log of an
prepared transaction */
/* TRX_UNDO_STATE values of an undo log segment */
/** contains an undo log of an active transaction */
constexpr
uint16_t
TRX_UNDO_ACTIVE
=
1
;
/** cached for quick reuse */
constexpr
uint16_t
TRX_UNDO_CACHED
=
2
;
/** old_insert undo segment that can be freed */
constexpr
uint16_t
TRX_UNDO_TO_FREE
=
3
;
/** can be freed in purge when all undo data in it is removed */
constexpr
uint16_t
TRX_UNDO_TO_PURGE
=
4
;
/** contains an undo log of a prepared transaction */
constexpr
uint16_t
TRX_UNDO_PREPARED
=
5
;
#ifndef UNIV_INNOCHECKSUM
...
...
storage/innobase/mtr/mtr0log.cc
View file @
c99470b3
...
...
@@ -139,6 +139,7 @@ mlog_parse_nbytes(
ut_ad
(
type
<=
MLOG_8BYTES
||
type
==
MLOG_MEMSET
);
ut_a
(
!
page
||
!
page_zip
||
type
==
MLOG_MEMSET
||
!
fil_page_index_page_check
(
page
));
if
(
end_ptr
<
ptr
+
2
)
{
return
NULL
;
...
...
@@ -164,6 +165,8 @@ mlog_parse_nbytes(
if
(
page
)
{
memset
(
page
+
offset
,
*
ptr
,
val
);
if
(
page_zip
)
{
ut_ad
(
offset
+
val
<=
PAGE_DATA
||
!
fil_page_index_page_check
(
page
));
memset
(
static_cast
<
page_zip_des_t
*>
(
page_zip
)
->
data
+
offset
,
*
ptr
,
val
);
}
...
...
storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi0_deinit.inc
0 → 100644
View file @
c99470b3
--
connection
master_1
set
session
spider_direct_dup_insert
=
@
old_spider_direct_dup_insert
;
--
source
load_data_deinit
.
inc
storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi0_init.inc
0 → 100644
View file @
c99470b3
--
source
load_data_init
.
inc
--
connection
master_1
set
@
old_spider_direct_dup_insert
=
@@
spider_direct_dup_insert
;
set
session
spider_direct_dup_insert
=
0
;
storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi1_deinit.inc
0 → 100644
View file @
c99470b3
--
connection
master_1
set
session
spider_direct_dup_insert
=
@
old_spider_direct_dup_insert
;
--
source
load_data_deinit
.
inc
storage/spider/mysql-test/spider/regression/e1121/include/load_data_ddi1_init.inc
0 → 100644
View file @
c99470b3
--
source
load_data_init
.
inc
--
connection
master_1
set
@
old_spider_direct_dup_insert
=
@@
spider_direct_dup_insert
;
set
session
spider_direct_dup_insert
=
1
;
storage/spider/mysql-test/spider/regression/e1121/include/load_data_deinit.inc
0 → 100644
View file @
c99470b3
--
let
$MASTER_1_COMMENT_2_1
=
$MASTER_1_COMMENT_2_1_BACKUP
--
let
$CHILD2_1_DROP_TABLES
=
$CHILD2_1_DROP_TABLES_BACKUP
--
let
$CHILD2_1_CREATE_TABLES
=
$CHILD2_1_CREATE_TABLES_BACKUP
--
let
$CHILD2_1_SELECT_TABLES
=
$CHILD2_1_SELECT_TABLES_BACKUP
--
disable_warnings
--
disable_query_log
--
disable_result_log
--
source
../../
t
/
test_deinit
.
inc
--
enable_result_log
--
enable_query_log
--
enable_warnings
storage/spider/mysql-test/spider/regression/e1121/include/load_data_init.inc
0 → 100644
View file @
c99470b3
--
disable_warnings
--
disable_query_log
--
disable_result_log
--
source
../../
t
/
test_init
.
inc
--
enable_result_log
--
enable_query_log
--
enable_warnings
--
let
$MASTER_1_COMMENT_2_1_BACKUP
=
$MASTER_1_COMMENT_2_1
let
$MASTER_1_COMMENT_2_1
=
COMMENT
=
'table "tbl_a", srv "s_2_1"'
;
--
let
$CHILD2_1_DROP_TABLES_BACKUP
=
$CHILD2_1_DROP_TABLES
let
$CHILD2_1_DROP_TABLES
=
DROP
TABLE
IF
EXISTS
tbl_a
;
--
let
$CHILD2_1_CREATE_TABLES_BACKUP
=
$CHILD2_1_CREATE_TABLES
let
$CHILD2_1_CREATE_TABLES
=
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
val
int
NOT
NULL
,
PRIMARY
KEY
(
pkey
)
)
$CHILD2_1_ENGINE
$CHILD2_1_CHARSET
;
--
let
$CHILD2_1_SELECT_TABLES_BACKUP
=
$CHILD2_1_SELECT_TABLES
let
$CHILD2_1_SELECT_TABLES
=
SELECT
pkey
,
val
FROM
tbl_a
ORDER
BY
pkey
;
let
$CHILD2_1_SELECT_ARGUMENT1
=
SELECT
argument
FROM
mysql
.
general_log
WHERE
argument
LIKE
'%`tbl_a`%'
;
storage/spider/mysql-test/spider/regression/e1121/r/load_data_ddi0.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 0;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
TRUNCATE tbl_a;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e1121/r/load_data_ddi1.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 1;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
TRUNCATE tbl_a;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e1121/r/load_data_ignore_ddi0.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 0;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
Warnings:
Warning 1062 Duplicate entry '0' for key 'PRIMARY'
Warning 1062 Duplicate entry '1' for key 'PRIMARY'
Warning 1062 Duplicate entry '2' for key 'PRIMARY'
Warning 1062 Duplicate entry '3' for key 'PRIMARY'
Warning 1062 Duplicate entry '4' for key 'PRIMARY'
Warning 1062 Duplicate entry '5' for key 'PRIMARY'
Warning 1062 Duplicate entry '6' for key 'PRIMARY'
Warning 1062 Duplicate entry '7' for key 'PRIMARY'
Warning 1062 Duplicate entry '8' for key 'PRIMARY'
Warning 1062 Duplicate entry '9' for key 'PRIMARY'
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(2,2)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(4,4)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(6,6)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(8,8)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e1121/r/load_data_ignore_ddi1.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 1;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority ignore into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ddi0.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 0;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
TRUNCATE tbl_a;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(2,2)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(4,4)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(6,6)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(8,8)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ddi1.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 1;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
TRUNCATE tbl_a;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority ignore into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ignore_ddi0.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 0;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
Warnings:
Warning 1062 Duplicate entry '0' for key 'PRIMARY'
Warning 1062 Duplicate entry '1' for key 'PRIMARY'
Warning 1062 Duplicate entry '2' for key 'PRIMARY'
Warning 1062 Duplicate entry '3' for key 'PRIMARY'
Warning 1062 Duplicate entry '4' for key 'PRIMARY'
Warning 1062 Duplicate entry '5' for key 'PRIMARY'
Warning 1062 Duplicate entry '6' for key 'PRIMARY'
Warning 1062 Duplicate entry '7' for key 'PRIMARY'
Warning 1062 Duplicate entry '8' for key 'PRIMARY'
Warning 1062 Duplicate entry '9' for key 'PRIMARY'
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(2,2)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(4,4)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(6,6)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(8,8)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_ignore_ddi1.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 1;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority ignore into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_replace_ddi0.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 0;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 0 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 0,`val` = 0 where `pkey` = 0 and `val` = 1 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 1 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 1,`val` = 1 where `pkey` = 1 and `val` = 2 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(2,2)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 2 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 2,`val` = 2 where `pkey` = 2 and `val` = 3 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 3 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 3,`val` = 3 where `pkey` = 3 and `val` = 4 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(4,4)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 4 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 4,`val` = 4 where `pkey` = 4 and `val` = 5 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 5 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 5,`val` = 5 where `pkey` = 5 and `val` = 6 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(6,6)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 6 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 6,`val` = 6 where `pkey` = 6 and `val` = 7 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 7 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 7,`val` = 7 where `pkey` = 7 and `val` = 8 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(8,8)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 8 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 8,`val` = 8 where `pkey` = 8 and `val` = 9 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 9 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 9,`val` = 9 where `pkey` = 9 and `val` = 10 limit 1
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e1121/r/load_data_local_replace_ddi1.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 1;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
replace into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e1121/r/load_data_replace_ddi0.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 0;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 0 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 0,`val` = 0 where `pkey` = 0 and `val` = 1 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 1 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 1,`val` = 1 where `pkey` = 1 and `val` = 2 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(2,2)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 2 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 2,`val` = 2 where `pkey` = 2 and `val` = 3 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 3 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 3,`val` = 3 where `pkey` = 3 and `val` = 4 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(4,4)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 4 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 4,`val` = 4 where `pkey` = 4 and `val` = 5 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 5 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 5,`val` = 5 where `pkey` = 5 and `val` = 6 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(6,6)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 6 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 6,`val` = 6 where `pkey` = 6 and `val` = 7 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 7 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 7,`val` = 7 where `pkey` = 7 and `val` = 8 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(8,8)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 8 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 8,`val` = 8 where `pkey` = 8 and `val` = 9 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 9 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 9,`val` = 9 where `pkey` = 9 and `val` = 10 limit 1
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e1121/r/load_data_replace_ddi1.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 1;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
replace into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e1121/t/load_data.inc
0 → 100644
View file @
c99470b3
--
echo
--
echo
this
test
is
for
MDEV
-
18987
--
echo
--
echo
drop
and
create
databases
--
connection
master_1
--
disable_warnings
CREATE
DATABASE
auto_test_local
;
USE
auto_test_local
;
--
connection
child2_1
SET
@
old_log_output
=
@@
global
.
log_output
;
SET
GLOBAL
log_output
=
'TABLE,FILE'
;
CREATE
DATABASE
auto_test_remote
;
USE
auto_test_remote
;
--
enable_warnings
--
echo
--
echo
create
table
and
insert
--
connection
child2_1
--
disable_query_log
echo
CHILD2_1_CREATE_TABLES
;
eval
$CHILD2_1_CREATE_TABLES
;
--
enable_query_log
TRUNCATE
TABLE
mysql
.
general_log
;
--
connection
master_1
--
disable_query_log
echo
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
val
int
NOT
NULL
,
PRIMARY
KEY
(
pkey
)
)
MASTER_1_ENGINE
MASTER_1_CHARSET
MASTER_1_COMMENT_2_1
;
eval
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
val
int
NOT
NULL
,
PRIMARY
KEY
(
pkey
)
)
$MASTER_1_ENGINE
$MASTER_1_CHARSET
$MASTER_1_COMMENT_2_1
;
--
enable_query_log
INSERT
INTO
tbl_a
(
pkey
,
val
)
VALUES
(
0
,
0
),(
1
,
1
),(
2
,
2
),(
3
,
3
),(
4
,
4
),(
5
,
5
),(
6
,
6
),(
7
,
7
),(
8
,
8
),(
9
,
9
);
--
disable_query_log
--
echo
SELECT
pkey
,
val
INTO
OUTFILE
'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv'
FROM
tbl_a
ORDER
BY
pkey
;
eval
SELECT
pkey
,
val
INTO
OUTFILE
'$MYSQLTEST_VARDIR/tmp/spider_outfile.tsv'
FROM
tbl_a
ORDER
BY
pkey
;
--
enable_query_log
eval
$COMMAND_BEFORE_LOAD_DATA
;
--
echo
--
echo
select
test
1
--
connection
child2_1
TRUNCATE
TABLE
mysql
.
general_log
;
--
connection
master_1
--
disable_query_log
--
echo
LOAD
DATA
$OPTION_LOCAL
INFILE
'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv'
$OPTION_WORD
INTO
TABLE
tbl_a
;
eval
LOAD
DATA
$OPTION_LOCAL
INFILE
'$MYSQLTEST_VARDIR/tmp/spider_outfile.tsv'
$OPTION_WORD
INTO
TABLE
tbl_a
;
--
enable_query_log
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
spider_outfile
.
tsv
--
connection
child2_1
eval
$CHILD2_1_SELECT_ARGUMENT1
;
eval
$CHILD2_1_SELECT_TABLES
;
--
echo
--
echo
deinit
--
disable_warnings
--
connection
master_1
DROP
DATABASE
IF
EXISTS
auto_test_local
;
--
connection
child2_1
DROP
DATABASE
IF
EXISTS
auto_test_remote
;
SET
GLOBAL
log_output
=
@
old_log_output
;
--
enable_warnings
storage/spider/mysql-test/spider/regression/e1121/t/load_data_ddi0.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_ddi0_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
TRUNCATE
tbl_a
--
let
OPTION_LOCAL
=
--
let
OPTION_WORD
=
--
source
load_data
.
inc
--
source
../
include
/
load_data_ddi0_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e1121/t/load_data_ddi1.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_ddi1_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
TRUNCATE
tbl_a
--
let
OPTION_LOCAL
=
--
let
OPTION_WORD
=
--
source
load_data
.
inc
--
source
../
include
/
load_data_ddi1_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e1121/t/load_data_ignore_ddi0.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_ddi0_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
--
let
OPTION_WORD
=
IGNORE
--
source
load_data
.
inc
--
source
../
include
/
load_data_ddi0_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e1121/t/load_data_ignore_ddi1.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_ddi1_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
--
let
OPTION_WORD
=
IGNORE
--
source
load_data
.
inc
--
source
../
include
/
load_data_ddi1_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ddi0.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_ddi0_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
TRUNCATE
tbl_a
--
let
OPTION_LOCAL
=
LOCAL
--
let
OPTION_WORD
=
--
source
load_data
.
inc
--
source
../
include
/
load_data_ddi0_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ddi1.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_ddi1_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
TRUNCATE
tbl_a
--
let
OPTION_LOCAL
=
LOCAL
--
let
OPTION_WORD
=
--
source
load_data
.
inc
--
source
../
include
/
load_data_ddi1_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ignore_ddi0.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_ddi0_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
LOCAL
--
let
OPTION_WORD
=
IGNORE
--
source
load_data
.
inc
--
source
../
include
/
load_data_ddi0_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_ignore_ddi1.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_ddi1_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
LOCAL
--
let
OPTION_WORD
=
IGNORE
--
source
load_data
.
inc
--
source
../
include
/
load_data_ddi1_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_replace_ddi0.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_ddi0_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
LOCAL
--
let
OPTION_WORD
=
REPLACE
--
source
load_data
.
inc
--
source
../
include
/
load_data_ddi0_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e1121/t/load_data_local_replace_ddi1.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_ddi1_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
LOCAL
--
let
OPTION_WORD
=
REPLACE
--
source
load_data
.
inc
--
source
../
include
/
load_data_ddi1_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e1121/t/load_data_replace_ddi0.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_ddi0_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
--
let
OPTION_WORD
=
REPLACE
--
source
load_data
.
inc
--
source
../
include
/
load_data_ddi0_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e1121/t/load_data_replace_ddi1.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_ddi1_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
--
let
OPTION_WORD
=
REPLACE
--
source
load_data
.
inc
--
source
../
include
/
load_data_ddi1_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi0_deinit.inc
0 → 100644
View file @
c99470b3
--
connection
master_1
set
session
spider_direct_dup_insert
=
@
old_spider_direct_dup_insert
;
--
source
load_data_part_deinit
.
inc
storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi0_init.inc
0 → 100644
View file @
c99470b3
--
source
load_data_part_init
.
inc
--
connection
master_1
set
@
old_spider_direct_dup_insert
=
@@
spider_direct_dup_insert
;
set
session
spider_direct_dup_insert
=
0
;
storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi1_deinit.inc
0 → 100644
View file @
c99470b3
--
connection
master_1
set
session
spider_direct_dup_insert
=
@
old_spider_direct_dup_insert
;
--
source
load_data_part_deinit
.
inc
storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_ddi1_init.inc
0 → 100644
View file @
c99470b3
--
source
load_data_part_init
.
inc
--
connection
master_1
set
@
old_spider_direct_dup_insert
=
@@
spider_direct_dup_insert
;
set
session
spider_direct_dup_insert
=
1
;
storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_deinit.inc
0 → 100644
View file @
c99470b3
--
let
$MASTER_1_COMMENT_2_1
=
$MASTER_1_COMMENT_2_1_BACKUP
--
let
$CHILD2_1_DROP_TABLES
=
$CHILD2_1_DROP_TABLES_BACKUP
--
let
$CHILD2_1_CREATE_TABLES
=
$CHILD2_1_CREATE_TABLES_BACKUP
--
let
$CHILD2_1_SELECT_TABLES
=
$CHILD2_1_SELECT_TABLES_BACKUP
--
let
$CHILD2_2_DROP_TABLES
=
$CHILD2_2_DROP_TABLES_BACKUP
--
let
$CHILD2_2_CREATE_TABLES
=
$CHILD2_2_CREATE_TABLES_BACKUP
--
let
$CHILD2_2_SELECT_TABLES
=
$CHILD2_2_SELECT_TABLES_BACKUP
--
disable_warnings
--
disable_query_log
--
disable_result_log
--
source
../../
t
/
test_deinit
.
inc
--
enable_result_log
--
enable_query_log
--
enable_warnings
storage/spider/mysql-test/spider/regression/e112122/include/load_data_part_init.inc
0 → 100644
View file @
c99470b3
--
disable_warnings
--
disable_query_log
--
disable_result_log
--
source
../../
t
/
test_init
.
inc
if
(
!
$HAVE_PARTITION
)
{
--
source
load_data_part_deinit
.
inc
--
enable_result_log
--
enable_query_log
--
enable_warnings
skip
Test
requires
partitioning
;
}
--
enable_result_log
--
enable_query_log
--
enable_warnings
--
let
$MASTER_1_COMMENT_2_1_BACKUP
=
$MASTER_1_COMMENT_2_1
let
$MASTER_1_COMMENT_2_1
=
COMMENT
=
'table "tbl_a"'
PARTITION
BY
KEY
(
pkey
)
(
PARTITION
pt1
COMMENT
=
'srv "s_2_1"'
,
PARTITION
pt2
COMMENT
=
'srv "s_2_2"'
);
--
let
$CHILD2_1_DROP_TABLES_BACKUP
=
$CHILD2_1_DROP_TABLES
let
$CHILD2_1_DROP_TABLES
=
DROP
TABLE
IF
EXISTS
tbl_a
;
--
let
$CHILD2_1_CREATE_TABLES_BACKUP
=
$CHILD2_1_CREATE_TABLES
let
$CHILD2_1_CREATE_TABLES
=
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
val
int
NOT
NULL
,
PRIMARY
KEY
(
pkey
)
)
$CHILD2_1_ENGINE
$CHILD2_1_CHARSET
;
--
let
$CHILD2_1_SELECT_TABLES_BACKUP
=
$CHILD2_1_SELECT_TABLES
let
$CHILD2_1_SELECT_TABLES
=
SELECT
pkey
,
val
FROM
tbl_a
ORDER
BY
pkey
;
let
$CHILD2_1_SELECT_ARGUMENT1
=
SELECT
argument
FROM
mysql
.
general_log
WHERE
argument
LIKE
'%`tbl_a`%'
;
--
let
$CHILD2_2_DROP_TABLES_BACKUP
=
$CHILD2_2_DROP_TABLES
let
$CHILD2_2_DROP_TABLES
=
DROP
TABLE
IF
EXISTS
tbl_a
;
--
let
$CHILD2_2_CREATE_TABLES_BACKUP
=
$CHILD2_2_CREATE_TABLES
let
$CHILD2_2_CREATE_TABLES
=
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
val
int
NOT
NULL
,
PRIMARY
KEY
(
pkey
)
)
$CHILD2_2_ENGINE
$CHILD2_2_CHARSET
;
--
let
$CHILD2_2_SELECT_TABLES_BACKUP
=
$CHILD2_2_SELECT_TABLES
let
$CHILD2_2_SELECT_TABLES
=
SELECT
pkey
,
val
FROM
tbl_a
ORDER
BY
pkey
;
let
$CHILD2_2_SELECT_ARGUMENT1
=
SELECT
argument
FROM
mysql
.
general_log
WHERE
argument
LIKE
'%`tbl_a`%'
;
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ddi0.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 0;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
connection child2_2;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote2;
USE auto_test_remote2;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection child2_2;
CHILD2_2_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
TRUNCATE tbl_a;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection child2_2;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1),(3,3),(5,5),(7,7),(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
1 1
3 3
5 5
7 7
9 9
connection child2_2;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0),(2,2),(4,4),(6,6),(8,8)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
2 2
4 4
6 6
8 8
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection child2_2;
DROP DATABASE IF EXISTS auto_test_remote2;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ddi1.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 1;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
connection child2_2;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote2;
USE auto_test_remote2;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection child2_2;
CHILD2_2_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
TRUNCATE tbl_a;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection child2_2;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1),(3,3),(5,5),(7,7),(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
1 1
3 3
5 5
7 7
9 9
connection child2_2;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0),(2,2),(4,4),(6,6),(8,8)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
2 2
4 4
6 6
8 8
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection child2_2;
DROP DATABASE IF EXISTS auto_test_remote2;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ignore_ddi0.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 0;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
connection child2_2;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote2;
USE auto_test_remote2;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection child2_2;
CHILD2_2_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection child2_2;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
Warnings:
Warning 1062 Duplicate entry '0' for key 'PRIMARY'
Warning 1062 Duplicate entry '1' for key 'PRIMARY'
Warning 1062 Duplicate entry '2' for key 'PRIMARY'
Warning 1062 Duplicate entry '3' for key 'PRIMARY'
Warning 1062 Duplicate entry '4' for key 'PRIMARY'
Warning 1062 Duplicate entry '5' for key 'PRIMARY'
Warning 1062 Duplicate entry '6' for key 'PRIMARY'
Warning 1062 Duplicate entry '7' for key 'PRIMARY'
Warning 1062 Duplicate entry '8' for key 'PRIMARY'
Warning 1062 Duplicate entry '9' for key 'PRIMARY'
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
1 2
3 4
5 6
7 8
9 10
connection child2_2;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0)
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(2,2)
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(4,4)
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(6,6)
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(8,8)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 1
2 3
4 5
6 7
8 9
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection child2_2;
DROP DATABASE IF EXISTS auto_test_remote2;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_ignore_ddi1.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 1;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
connection child2_2;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote2;
USE auto_test_remote2;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection child2_2;
CHILD2_2_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection child2_2;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority ignore into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1),(3,3),(5,5),(7,7),(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
1 2
3 4
5 6
7 8
9 10
connection child2_2;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority ignore into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0),(2,2),(4,4),(6,6),(8,8)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 1
2 3
4 5
6 7
8 9
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection child2_2;
DROP DATABASE IF EXISTS auto_test_remote2;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ddi0.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 0;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
connection child2_2;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote2;
USE auto_test_remote2;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection child2_2;
CHILD2_2_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
TRUNCATE tbl_a;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection child2_2;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
1 1
3 3
5 5
7 7
9 9
connection child2_2;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0)
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(2,2)
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(4,4)
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(6,6)
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(8,8)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
2 2
4 4
6 6
8 8
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection child2_2;
DROP DATABASE IF EXISTS auto_test_remote2;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ddi1.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 1;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
connection child2_2;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote2;
USE auto_test_remote2;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection child2_2;
CHILD2_2_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
TRUNCATE tbl_a;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection child2_2;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority ignore into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1),(3,3),(5,5),(7,7),(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
1 1
3 3
5 5
7 7
9 9
connection child2_2;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority ignore into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0),(2,2),(4,4),(6,6),(8,8)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
2 2
4 4
6 6
8 8
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection child2_2;
DROP DATABASE IF EXISTS auto_test_remote2;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ignore_ddi0.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 0;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
connection child2_2;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote2;
USE auto_test_remote2;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection child2_2;
CHILD2_2_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection child2_2;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
Warnings:
Warning 1062 Duplicate entry '0' for key 'PRIMARY'
Warning 1062 Duplicate entry '1' for key 'PRIMARY'
Warning 1062 Duplicate entry '2' for key 'PRIMARY'
Warning 1062 Duplicate entry '3' for key 'PRIMARY'
Warning 1062 Duplicate entry '4' for key 'PRIMARY'
Warning 1062 Duplicate entry '5' for key 'PRIMARY'
Warning 1062 Duplicate entry '6' for key 'PRIMARY'
Warning 1062 Duplicate entry '7' for key 'PRIMARY'
Warning 1062 Duplicate entry '8' for key 'PRIMARY'
Warning 1062 Duplicate entry '9' for key 'PRIMARY'
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
1 2
3 4
5 6
7 8
9 10
connection child2_2;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0)
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(2,2)
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(4,4)
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(6,6)
insert high_priority into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(8,8)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 1
2 3
4 5
6 7
8 9
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection child2_2;
DROP DATABASE IF EXISTS auto_test_remote2;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_ignore_ddi1.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 1;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
connection child2_2;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote2;
USE auto_test_remote2;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection child2_2;
CHILD2_2_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection child2_2;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' IGNORE INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority ignore into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1),(3,3),(5,5),(7,7),(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
1 2
3 4
5 6
7 8
9 10
connection child2_2;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert high_priority ignore into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0),(2,2),(4,4),(6,6),(8,8)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 1
2 3
4 5
6 7
8 9
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection child2_2;
DROP DATABASE IF EXISTS auto_test_remote2;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_replace_ddi0.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 0;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
connection child2_2;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote2;
USE auto_test_remote2;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection child2_2;
CHILD2_2_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection child2_2;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 1 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 1,`val` = 1 where `pkey` = 1 and `val` = 2 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 3 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 3,`val` = 3 where `pkey` = 3 and `val` = 4 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 5 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 5,`val` = 5 where `pkey` = 5 and `val` = 6 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 7 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 7,`val` = 7 where `pkey` = 7 and `val` = 8 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 9 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 9,`val` = 9 where `pkey` = 9 and `val` = 10 limit 1
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
1 1
3 3
5 5
7 7
9 9
connection child2_2;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0)
select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 0 for update
update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 0,`val` = 0 where `pkey` = 0 and `val` = 1 limit 1
insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(2,2)
select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 2 for update
update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 2,`val` = 2 where `pkey` = 2 and `val` = 3 limit 1
insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(4,4)
select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 4 for update
update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 4,`val` = 4 where `pkey` = 4 and `val` = 5 limit 1
insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(6,6)
select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 6 for update
update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 6,`val` = 6 where `pkey` = 6 and `val` = 7 limit 1
insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(8,8)
select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 8 for update
update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 8,`val` = 8 where `pkey` = 8 and `val` = 9 limit 1
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
2 2
4 4
6 6
8 8
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection child2_2;
DROP DATABASE IF EXISTS auto_test_remote2;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_local_replace_ddi1.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 1;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
connection child2_2;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote2;
USE auto_test_remote2;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection child2_2;
CHILD2_2_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection child2_2;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
replace into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1),(3,3),(5,5),(7,7),(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
1 1
3 3
5 5
7 7
9 9
connection child2_2;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
replace into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0),(2,2),(4,4),(6,6),(8,8)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
2 2
4 4
6 6
8 8
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection child2_2;
DROP DATABASE IF EXISTS auto_test_remote2;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_replace_ddi0.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 0;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
connection child2_2;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote2;
USE auto_test_remote2;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection child2_2;
CHILD2_2_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection child2_2;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 1 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 1,`val` = 1 where `pkey` = 1 and `val` = 2 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(3,3)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 3 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 3,`val` = 3 where `pkey` = 3 and `val` = 4 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(5,5)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 5 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 5,`val` = 5 where `pkey` = 5 and `val` = 6 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(7,7)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 7 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 7,`val` = 7 where `pkey` = 7 and `val` = 8 limit 1
insert into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(9,9)
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 9 for update
update ignore `auto_test_remote`.`tbl_a` set `pkey` = 9,`val` = 9 where `pkey` = 9 and `val` = 10 limit 1
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
1 1
3 3
5 5
7 7
9 9
connection child2_2;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0)
select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 0 for update
update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 0,`val` = 0 where `pkey` = 0 and `val` = 1 limit 1
insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(2,2)
select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 2 for update
update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 2,`val` = 2 where `pkey` = 2 and `val` = 3 limit 1
insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(4,4)
select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 4 for update
update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 4,`val` = 4 where `pkey` = 4 and `val` = 5 limit 1
insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(6,6)
select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 6 for update
update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 6,`val` = 6 where `pkey` = 6 and `val` = 7 limit 1
insert into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(8,8)
select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 8 for update
update ignore `auto_test_remote2`.`tbl_a` set `pkey` = 8,`val` = 8 where `pkey` = 8 and `val` = 9 limit 1
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
2 2
4 4
6 6
8 8
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection child2_2;
DROP DATABASE IF EXISTS auto_test_remote2;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e112122/r/load_data_part_replace_ddi1.result
0 → 100644
View file @
c99470b3
for master_1
for child2
child2_1
child2_2
child2_3
for child3
connection master_1;
set @old_spider_direct_dup_insert= @@spider_direct_dup_insert;
set session spider_direct_dup_insert= 1;
this test is for MDEV-18987
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
connection child2_2;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote2;
USE auto_test_remote2;
create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection child2_2;
CHILD2_2_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
val int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
INSERT INTO tbl_a (pkey,val) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
SELECT pkey,val INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' FROM tbl_a ORDER BY pkey;
UPDATE tbl_a SET val = val + 1;
select test 1
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection child2_2;
TRUNCATE TABLE mysql.general_log;
connection master_1;
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv' REPLACE INTO TABLE tbl_a;
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
replace into `auto_test_remote`.`tbl_a`(`pkey`,`val`)values(1,1),(3,3),(5,5),(7,7),(9,9)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
1 1
3 3
5 5
7 7
9 9
connection child2_2;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%';
argument
replace into `auto_test_remote2`.`tbl_a`(`pkey`,`val`)values(0,0),(2,2),(4,4),(6,6),(8,8)
SELECT argument FROM mysql.general_log WHERE argument LIKE '%`tbl_a`%'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
pkey val
0 0
2 2
4 4
6 6
8 8
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
connection child2_2;
DROP DATABASE IF EXISTS auto_test_remote2;
SET GLOBAL log_output = @old_log_output;
connection master_1;
set session spider_direct_dup_insert= @old_spider_direct_dup_insert;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
end of test
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part.inc
0 → 100644
View file @
c99470b3
--
echo
--
echo
this
test
is
for
MDEV
-
18987
--
echo
--
echo
drop
and
create
databases
--
connection
master_1
--
disable_warnings
CREATE
DATABASE
auto_test_local
;
USE
auto_test_local
;
--
connection
child2_1
SET
@
old_log_output
=
@@
global
.
log_output
;
SET
GLOBAL
log_output
=
'TABLE,FILE'
;
CREATE
DATABASE
auto_test_remote
;
USE
auto_test_remote
;
--
connection
child2_2
SET
@
old_log_output
=
@@
global
.
log_output
;
SET
GLOBAL
log_output
=
'TABLE,FILE'
;
CREATE
DATABASE
auto_test_remote2
;
USE
auto_test_remote2
;
--
enable_warnings
--
echo
--
echo
create
table
and
insert
--
connection
child2_1
--
disable_query_log
echo
CHILD2_1_CREATE_TABLES
;
eval
$CHILD2_1_CREATE_TABLES
;
--
enable_query_log
TRUNCATE
TABLE
mysql
.
general_log
;
--
connection
child2_2
--
disable_query_log
echo
CHILD2_2_CREATE_TABLES
;
eval
$CHILD2_2_CREATE_TABLES
;
--
enable_query_log
TRUNCATE
TABLE
mysql
.
general_log
;
--
connection
master_1
--
disable_query_log
echo
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
val
int
NOT
NULL
,
PRIMARY
KEY
(
pkey
)
)
MASTER_1_ENGINE
MASTER_1_CHARSET
MASTER_1_COMMENT_2_1
;
eval
CREATE
TABLE
tbl_a
(
pkey
int
NOT
NULL
,
val
int
NOT
NULL
,
PRIMARY
KEY
(
pkey
)
)
$MASTER_1_ENGINE
$MASTER_1_CHARSET
$MASTER_1_COMMENT_2_1
;
--
enable_query_log
INSERT
INTO
tbl_a
(
pkey
,
val
)
VALUES
(
0
,
0
),(
1
,
1
),(
2
,
2
),(
3
,
3
),(
4
,
4
),(
5
,
5
),(
6
,
6
),(
7
,
7
),(
8
,
8
),(
9
,
9
);
--
disable_query_log
--
echo
SELECT
pkey
,
val
INTO
OUTFILE
'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv'
FROM
tbl_a
ORDER
BY
pkey
;
eval
SELECT
pkey
,
val
INTO
OUTFILE
'$MYSQLTEST_VARDIR/tmp/spider_outfile.tsv'
FROM
tbl_a
ORDER
BY
pkey
;
--
enable_query_log
eval
$COMMAND_BEFORE_LOAD_DATA
;
--
echo
--
echo
select
test
1
--
connection
child2_1
TRUNCATE
TABLE
mysql
.
general_log
;
--
connection
child2_2
TRUNCATE
TABLE
mysql
.
general_log
;
--
connection
master_1
--
disable_query_log
--
echo
LOAD
DATA
$OPTION_LOCAL
INFILE
'MYSQLTEST_VARDIR/tmp/spider_outfile.tsv'
$OPTION_WORD
INTO
TABLE
tbl_a
;
eval
LOAD
DATA
$OPTION_LOCAL
INFILE
'$MYSQLTEST_VARDIR/tmp/spider_outfile.tsv'
$OPTION_WORD
INTO
TABLE
tbl_a
;
--
enable_query_log
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
spider_outfile
.
tsv
--
connection
child2_1
eval
$CHILD2_1_SELECT_ARGUMENT1
;
eval
$CHILD2_1_SELECT_TABLES
;
--
connection
child2_2
eval
$CHILD2_2_SELECT_ARGUMENT1
;
eval
$CHILD2_2_SELECT_TABLES
;
--
echo
--
echo
deinit
--
disable_warnings
--
connection
master_1
DROP
DATABASE
IF
EXISTS
auto_test_local
;
--
connection
child2_1
DROP
DATABASE
IF
EXISTS
auto_test_remote
;
SET
GLOBAL
log_output
=
@
old_log_output
;
--
connection
child2_2
DROP
DATABASE
IF
EXISTS
auto_test_remote2
;
SET
GLOBAL
log_output
=
@
old_log_output
;
--
enable_warnings
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ddi0.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_part_ddi0_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
TRUNCATE
tbl_a
--
let
OPTION_LOCAL
=
--
let
OPTION_WORD
=
--
source
load_data_part
.
inc
--
source
../
include
/
load_data_part_ddi0_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ddi1.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_part_ddi1_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
TRUNCATE
tbl_a
--
let
OPTION_LOCAL
=
--
let
OPTION_WORD
=
--
source
load_data_part
.
inc
--
source
../
include
/
load_data_part_ddi1_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ignore_ddi0.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_part_ddi0_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
--
let
OPTION_WORD
=
IGNORE
--
source
load_data_part
.
inc
--
source
../
include
/
load_data_part_ddi0_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_ignore_ddi1.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_part_ddi1_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
--
let
OPTION_WORD
=
IGNORE
--
source
load_data_part
.
inc
--
source
../
include
/
load_data_part_ddi1_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ddi0.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_part_ddi0_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
TRUNCATE
tbl_a
--
let
OPTION_LOCAL
=
LOCAL
--
let
OPTION_WORD
=
--
source
load_data_part
.
inc
--
source
../
include
/
load_data_part_ddi0_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ddi1.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_part_ddi1_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
TRUNCATE
tbl_a
--
let
OPTION_LOCAL
=
LOCAL
--
let
OPTION_WORD
=
--
source
load_data_part
.
inc
--
source
../
include
/
load_data_part_ddi1_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ignore_ddi0.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_part_ddi0_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
LOCAL
--
let
OPTION_WORD
=
IGNORE
--
source
load_data_part
.
inc
--
source
../
include
/
load_data_part_ddi0_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_ignore_ddi1.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_part_ddi1_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
LOCAL
--
let
OPTION_WORD
=
IGNORE
--
source
load_data_part
.
inc
--
source
../
include
/
load_data_part_ddi1_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_replace_ddi0.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_part_ddi0_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
LOCAL
--
let
OPTION_WORD
=
REPLACE
--
source
load_data_part
.
inc
--
source
../
include
/
load_data_part_ddi0_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_local_replace_ddi1.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_part_ddi1_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
LOCAL
--
let
OPTION_WORD
=
REPLACE
--
source
load_data_part
.
inc
--
source
../
include
/
load_data_part_ddi1_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_replace_ddi0.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_part_ddi0_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
--
let
OPTION_WORD
=
REPLACE
--
source
load_data_part
.
inc
--
source
../
include
/
load_data_part_ddi0_deinit
.
inc
--
echo
--
echo
end
of
test
storage/spider/mysql-test/spider/regression/e112122/t/load_data_part_replace_ddi1.test
0 → 100644
View file @
c99470b3
--
source
../
include
/
load_data_part_ddi1_init
.
inc
--
let
COMMAND_BEFORE_LOAD_DATA
=
UPDATE
tbl_a
SET
val
=
val
+
1
--
let
OPTION_LOCAL
=
--
let
OPTION_WORD
=
REPLACE
--
source
load_data_part
.
inc
--
source
../
include
/
load_data_part_ddi1_deinit
.
inc
--
echo
--
echo
end
of
test
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment