118 changed files with 34166 additions and 521 deletions
-
2storage/tokudb/CMakeLists.txt
-
10storage/tokudb/PerconaFT/CMakeLists.txt
-
5storage/tokudb/PerconaFT/buildheader/make_tdb.cc
-
3storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake
-
9storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc
-
3storage/tokudb/PerconaFT/ft/cachetable/cachetable.h
-
97storage/tokudb/PerconaFT/ft/ft-ops.cc
-
3storage/tokudb/PerconaFT/ft/ft.cc
-
19storage/tokudb/PerconaFT/ft/node.cc
-
20storage/tokudb/PerconaFT/ft/node.h
-
43storage/tokudb/PerconaFT/ft/serialize/ft-serialize.cc
-
23storage/tokudb/PerconaFT/ft/serialize/ft-serialize.h
-
689storage/tokudb/PerconaFT/ft/serialize/ft_node-serialize.cc
-
69storage/tokudb/PerconaFT/ft/serialize/ft_node-serialize.h
-
2storage/tokudb/PerconaFT/ft/txn/roll.cc
-
9storage/tokudb/PerconaFT/ft/txn/txn.cc
-
5storage/tokudb/PerconaFT/ft/txn/txn.h
-
150storage/tokudb/PerconaFT/locktree/lock_request.cc
-
23storage/tokudb/PerconaFT/locktree/lock_request.h
-
44storage/tokudb/PerconaFT/locktree/locktree.cc
-
33storage/tokudb/PerconaFT/locktree/locktree.h
-
13storage/tokudb/PerconaFT/locktree/manager.cc
-
100storage/tokudb/PerconaFT/locktree/tests/kill_waiter.cc
-
3storage/tokudb/PerconaFT/locktree/tests/lock_request_killed.cc
-
1storage/tokudb/PerconaFT/locktree/tests/lock_request_not_killed.cc
-
91storage/tokudb/PerconaFT/locktree/tests/lock_request_start_release_wait.cc
-
121storage/tokudb/PerconaFT/locktree/tests/lock_request_start_retry_race.cc
-
133storage/tokudb/PerconaFT/locktree/tests/lock_request_start_retry_race_3.cc
-
135storage/tokudb/PerconaFT/locktree/tests/lock_request_start_retry_wait_race_2.cc
-
77storage/tokudb/PerconaFT/portability/toku_debug_sync.h
-
3storage/tokudb/PerconaFT/portability/toku_portability.h
-
9storage/tokudb/PerconaFT/src/tests/test_iterate_live_transactions.cc
-
3storage/tokudb/PerconaFT/src/tests/test_stress0.cc
-
9storage/tokudb/PerconaFT/src/tests/transactional_fileops.cc
-
38storage/tokudb/PerconaFT/src/ydb.cc
-
22storage/tokudb/PerconaFT/src/ydb_row_lock.cc
-
8storage/tokudb/PerconaFT/src/ydb_txn.cc
-
8storage/tokudb/PerconaFT/tools/CMakeLists.txt
-
2storage/tokudb/PerconaFT/tools/ftverify.cc
-
3storage/tokudb/PerconaFT/tools/tokuftdump.cc
-
124storage/tokudb/ha_tokudb.cc
-
41storage/tokudb/ha_tokudb.h
-
8storage/tokudb/hatoku_hton.cc
-
26storage/tokudb/mysql-test/tokudb/r/kill_query_blocked_in_lt.result
-
5storage/tokudb/mysql-test/tokudb/r/locks-select-update-3.result
-
56storage/tokudb/mysql-test/tokudb/t/kill_query_blocked_in_lt.test
-
10storage/tokudb/mysql-test/tokudb/t/locks-select-update-3.test
-
2storage/tokudb/mysql-test/tokudb_backup/r/rpl_safe_slave.result
-
3storage/tokudb/mysql-test/tokudb_backup/t/rpl_safe_slave.inc
-
42storage/tokudb/mysql-test/tokudb_rpl/include/rpl_tokudb_row_img_general_loop.inc
-
32storage/tokudb/mysql-test/tokudb_rpl/r/rpl_not_null_tokudb.result
-
40storage/tokudb/mysql-test/tokudb_rpl/r/rpl_row_basic_3tokudb.result
-
15storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_commit_after_flush.result
-
554storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_insert_id.result
-
82storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_insert_id_pk.result
-
29storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_multi_update.result
-
60storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_multi_update2.result
-
202storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_multi_update3.result
-
2183storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_crash_safe.result
-
4739storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_img_blobs.result
-
3681storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_img_eng_full.result
-
3522storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_img_eng_min.result
-
3522storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_img_eng_noblob.result
-
3505storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_img_idx_full.result
-
3530storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_img_idx_min.result
-
3530storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_img_idx_noblob.result
-
275storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_log.result
-
51storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_lower_case_table_names.result
-
60storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_sp003.result
-
47storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_sp006.result
-
32storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_trig004.result
-
274storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_stm_log.result
-
1773storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_stm_mixed_crash_safe.result
-
48storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_stm_mixed_lower_case_table_names.result
-
4storage/tokudb/mysql-test/tokudb_rpl/t/rpl_not_null_tokudb.test
-
12storage/tokudb/mysql-test/tokudb_rpl/t/rpl_row_basic_3tokudb.test
-
6storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_commit_after_flush.test
-
1storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_insert_id-master.opt
-
1storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_insert_id-slave.opt
-
7storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_insert_id.test
-
7storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_insert_id_pk.test
-
4storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_multi_update.test
-
1storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_multi_update2-slave.opt
-
14storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_multi_update2.test
-
13storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_multi_update3.test
-
1storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_row_crash_safe-master.opt
-
1storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_row_crash_safe-slave.opt
-
19storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_row_crash_safe.test
-
1storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_row_img_blobs.cnf
-
53storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_row_img_blobs.test
-
1storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_row_img_eng_full.cnf
-
50storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_row_img_eng_full.test
-
1storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_row_img_eng_min.cnf
-
42storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_row_img_eng_min.test
-
1storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_row_img_eng_noblob.cnf
-
42storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_row_img_eng_noblob.test
-
1storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_row_img_idx_full.cnf
-
38storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_row_img_idx_full.test
-
1storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_row_img_idx_min.cnf
-
41storage/tokudb/mysql-test/tokudb_rpl/t/rpl_tokudb_row_img_idx_min.test
689
storage/tokudb/PerconaFT/ft/serialize/ft_node-serialize.cc
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,100 @@ |
|||
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
|||
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
|
|||
|
|||
// test the lock manager kill waiter function
|
|||
|
|||
#include "locktree.h"
|
|||
#include "lock_request.h"
|
|||
#include "test.h"
|
|||
#include "locktree_unit_test.h"
|
|||
#include <thread>
|
|||
#include <atomic>
|
|||
|
|||
namespace toku { |
|||
|
|||
const uint64_t my_lock_wait_time = 1000 * 1000; |
|||
const uint64_t my_killed_time = 500 * 1000; |
|||
const int n_locks = 4; |
|||
|
|||
static int my_killed_callback(void) { |
|||
if (1) fprintf(stderr, "%s:%u %s\n", __FILE__, __LINE__, __FUNCTION__); |
|||
return 0; |
|||
} |
|||
|
|||
static void locktree_release_lock(locktree *lt, TXNID txn_id, const DBT *left, const DBT *right) { |
|||
range_buffer buffer; |
|||
buffer.create(); |
|||
buffer.append(left, right); |
|||
lt->release_locks(txn_id, &buffer); |
|||
buffer.destroy(); |
|||
} |
|||
|
|||
static void wait_lock(lock_request *lr, std::atomic_int *done) { |
|||
int r = lr->wait(my_lock_wait_time, my_killed_time, my_killed_callback); |
|||
assert(r == DB_LOCK_NOTGRANTED); |
|||
*done = 1; |
|||
} |
|||
|
|||
static void test_kill_waiter(void) { |
|||
int r; |
|||
|
|||
locktree_manager mgr; |
|||
mgr.create(nullptr, nullptr, nullptr, nullptr); |
|||
|
|||
DICTIONARY_ID dict_id = { 1 }; |
|||
locktree *lt = mgr.get_lt(dict_id, dbt_comparator, nullptr); |
|||
|
|||
const DBT *one = get_dbt(1); |
|||
|
|||
lock_request locks[n_locks]; |
|||
std::thread waiters[n_locks-1]; |
|||
for (int i = 0; i < n_locks; i++) { |
|||
locks[i].create(); |
|||
locks[i].set(lt, i+1, one, one, lock_request::type::WRITE, false, &waiters[i]); |
|||
} |
|||
|
|||
// txn 'n_locks' grabs the lock
|
|||
r = locks[n_locks-1].start(); |
|||
assert_zero(r); |
|||
|
|||
for (int i = 0; i < n_locks-1; i++) { |
|||
r = locks[i].start(); |
|||
assert(r == DB_LOCK_NOTGRANTED); |
|||
} |
|||
|
|||
std::atomic_int done[n_locks-1]; |
|||
for (int i = 0; i < n_locks-1; i++) { |
|||
done[i] = 0; |
|||
waiters[i] = std::thread(wait_lock, &locks[i], &done[i]); |
|||
} |
|||
|
|||
for (int i = 0; i < n_locks-1; i++) { |
|||
assert(!done[i]); |
|||
} |
|||
|
|||
sleep(1); |
|||
for (int i = 0; i < n_locks-1; i++) { |
|||
mgr.kill_waiter(&waiters[i]); |
|||
while (!done[i]) sleep(1); |
|||
waiters[i].join(); |
|||
for (int j = i+1; j < n_locks-1; j++) |
|||
assert(!done[j]); |
|||
} |
|||
|
|||
locktree_release_lock(lt, n_locks, one, one); |
|||
|
|||
for (int i = 0; i < n_locks; i++) { |
|||
locks[i].destroy(); |
|||
} |
|||
|
|||
mgr.release_lt(lt); |
|||
mgr.destroy(); |
|||
} |
|||
|
|||
} /* namespace toku */ |
|||
|
|||
int main(void) { |
|||
toku::test_kill_waiter(); |
|||
return 0; |
|||
} |
|||
|
|||
@ -0,0 +1,91 @@ |
|||
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
|||
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
|
|||
|
|||
// test the race between start, release, and wait. since start does not put
|
|||
// its lock request into the pending set, the blocking txn could release its
|
|||
// lock before the first txn waits. this will block the first txn because its
|
|||
// lock request is not known when the lock is released. the bug fix is to try
|
|||
// again when lock retries are locked out.
|
|||
|
|||
#include "lock_request.h"
|
|||
#include <atomic>
|
|||
#include <thread>
|
|||
#include "locktree.h"
|
|||
#include "locktree_unit_test.h"
|
|||
#include "test.h"
|
|||
|
|||
namespace toku { |
|||
|
|||
const uint64_t my_lock_wait_time = 1000 * 1000; // ms
|
|||
const uint64_t my_killed_time = 1 * 1000; // ms
|
|||
|
|||
static uint64_t t_wait; |
|||
|
|||
static int my_killed_callback(void) { |
|||
uint64_t t_now = toku_current_time_microsec(); |
|||
assert(t_now >= t_wait); |
|||
if (t_now - t_wait >= my_killed_time * 1000) |
|||
abort(); |
|||
return 0; |
|||
} |
|||
|
|||
static void locktree_release_lock(locktree *lt, |
|||
TXNID txn_id, |
|||
const DBT *left, |
|||
const DBT *right) { |
|||
range_buffer buffer; |
|||
buffer.create(); |
|||
buffer.append(left, right); |
|||
lt->release_locks(txn_id, &buffer); |
|||
buffer.destroy(); |
|||
} |
|||
|
|||
static void test_start_release_wait(void) { |
|||
int r; |
|||
|
|||
locktree_manager mgr; |
|||
mgr.create(nullptr, nullptr, nullptr, nullptr); |
|||
|
|||
DICTIONARY_ID dict_id = {1}; |
|||
locktree *lt = mgr.get_lt(dict_id, dbt_comparator, nullptr); |
|||
|
|||
const DBT *one = get_dbt(1); |
|||
|
|||
// a locks one
|
|||
lock_request a; |
|||
a.create(); |
|||
a.set(lt, 1, one, one, lock_request::type::WRITE, false); |
|||
r = a.start(); |
|||
assert(r == 0); |
|||
|
|||
// b tries to lock one, fails
|
|||
lock_request b; |
|||
b.create(); |
|||
b.set(lt, 2, one, one, lock_request::type::WRITE, false); |
|||
r = b.start(); |
|||
assert(r == DB_LOCK_NOTGRANTED); |
|||
|
|||
// a releases its lock
|
|||
locktree_release_lock(lt, 1, one, one); |
|||
|
|||
// b waits for one, gets locks immediately
|
|||
t_wait = toku_current_time_microsec(); |
|||
r = b.wait(my_lock_wait_time, my_killed_time, my_killed_callback); |
|||
assert(r == 0); |
|||
|
|||
// b releases its lock so we can exit cleanly
|
|||
locktree_release_lock(lt, 2, one, one); |
|||
|
|||
a.destroy(); |
|||
b.destroy(); |
|||
|
|||
mgr.release_lt(lt); |
|||
mgr.destroy(); |
|||
} |
|||
|
|||
} /* namespace toku */ |
|||
|
|||
int main(void) { |
|||
toku::test_start_release_wait(); |
|||
return 0; |
|||
} |
|||
@ -0,0 +1,133 @@ |
|||
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
|||
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
|
|||
#ident "$Id$"
|
|||
/*======
|
|||
This file is part of PerconaFT. |
|||
|
|||
|
|||
Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. |
|||
|
|||
PerconaFT is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License, version 2, |
|||
as published by the Free Software Foundation. |
|||
|
|||
PerconaFT is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License |
|||
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
|||
---------------------------------------- |
|||
|
|||
PerconaFT is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Affero General Public License, version 3, |
|||
as published by the Free Software Foundation. |
|||
|
|||
PerconaFT is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Affero General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Affero General Public License |
|||
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
|
|||
======= */ |
|||
|
|||
#ident \
|
|||
"Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved." |
|||
|
|||
#include "lock_request.h"
|
|||
#include <pthread.h>
|
|||
#include <iostream>
|
|||
#include <thread>
|
|||
#include "locktree.h"
|
|||
#include "test.h"
|
|||
|
|||
// Suppose that 3 threads are running a lock acquire, release, retry sequence.
|
|||
// There is a race in the retry algorithm with 2 threads running lock retry
|
|||
// simultaneously. The first thread to run retry sets a flag that will cause
|
|||
// the second thread to skip the lock retries. If the first thread progressed
|
|||
// past the contended lock, then the second threa will HANG until its lock timer
|
|||
// pops, even when the contended lock is no longer held.
|
|||
|
|||
// This test exposes this problem as a test hang. The group retry algorithm
|
|||
// fixes the race in the lock request retry algorihm and this test should no
|
|||
// longer hang.
|
|||
|
|||
namespace toku { |
|||
|
|||
// use 1000 when after_retry_all is implemented, otherwise use 100000
|
|||
static const int n_tests = 1000; // 100000;
|
|||
|
|||
static void after_retry_all(void) { usleep(10000); } |
|||
|
|||
static void run_locker(locktree *lt, |
|||
TXNID txnid, |
|||
const DBT *key, |
|||
pthread_barrier_t *b) { |
|||
for (int i = 0; i < n_tests; i++) { |
|||
int r; |
|||
r = pthread_barrier_wait(b); |
|||
assert(r == 0 || r == PTHREAD_BARRIER_SERIAL_THREAD); |
|||
|
|||
lock_request request; |
|||
request.create(); |
|||
|
|||
request.set(lt, txnid, key, key, lock_request::type::WRITE, false); |
|||
|
|||
// try to acquire the lock
|
|||
r = request.start(); |
|||
if (r == DB_LOCK_NOTGRANTED) { |
|||
// wait for the lock to be granted
|
|||
r = request.wait(1000 * 1000); |
|||
} |
|||
|
|||
if (r == 0) { |
|||
// release the lock
|
|||
range_buffer buffer; |
|||
buffer.create(); |
|||
buffer.append(key, key); |
|||
lt->release_locks(txnid, &buffer); |
|||
buffer.destroy(); |
|||
|
|||
// retry pending lock requests
|
|||
lock_request::retry_all_lock_requests(lt, after_retry_all); |
|||
} |
|||
|
|||
request.destroy(); |
|||
memset(&request, 0xab, sizeof request); |
|||
|
|||
toku_pthread_yield(); |
|||
if ((i % 10) == 0) |
|||
std::cerr << std::this_thread::get_id() << " " << i |
|||
<< std::endl; |
|||
} |
|||
} |
|||
|
|||
} /* namespace toku */ |
|||
|
|||
int main(void) { |
|||
toku::locktree lt; |
|||
DICTIONARY_ID dict_id = {1}; |
|||
lt.create(nullptr, dict_id, toku::dbt_comparator); |
|||
|
|||
const DBT *one = toku::get_dbt(1); |
|||
|
|||
const int n_workers = 3; |
|||
std::thread worker[n_workers]; |
|||
pthread_barrier_t b; |
|||
int r = pthread_barrier_init(&b, nullptr, n_workers); |
|||
assert(r == 0); |
|||
for (int i = 0; i < n_workers; i++) { |
|||
worker[i] = std::thread(toku::run_locker, <, i, one, &b); |
|||
} |
|||
for (int i = 0; i < n_workers; i++) { |
|||
worker[i].join(); |
|||
} |
|||
r = pthread_barrier_destroy(&b); |
|||
assert(r == 0); |
|||
lt.release_reference(); |
|||
lt.destroy(); |
|||
return 0; |
|||
} |
|||
@ -0,0 +1,135 @@ |
|||
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
|||
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
|
|||
#ident "$Id$"
|
|||
/*======
|
|||
This file is part of PerconaFT. |
|||
|
|||
|
|||
Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. |
|||
|
|||
PerconaFT is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License, version 2, |
|||
as published by the Free Software Foundation. |
|||
|
|||
PerconaFT is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License |
|||
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
|||
---------------------------------------- |
|||
|
|||
PerconaFT is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Affero General Public License, version 3, |
|||
as published by the Free Software Foundation. |
|||
|
|||
PerconaFT is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Affero General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Affero General Public License |
|||
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>.
|
|||
======= */ |
|||
|
|||
#ident \
|
|||
"Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved." |
|||
|
|||
#include "lock_request.h"
|
|||
#include <pthread.h>
|
|||
#include <iostream>
|
|||
#include <thread>
|
|||
#include "locktree.h"
|
|||
#include "test.h"
|
|||
|
|||
// Suppose that 2 threads are running a lock acquire, release, retry sequence.
|
|||
// There is a race between the acquire and the release with 2 threads.
|
|||
// If thread 1 acquires a lock, and thread 2 tries to acquire the same lock and
|
|||
// fails, thread 1 may release its lock and retry pending lock requests BEFORE
|
|||
// thread 2 adds itself to the pending lock requests. If this happens, then
|
|||
// thread 2 will HANG until its lock timer expires even when the lock it is
|
|||
// waiting for is FREE.
|
|||
|
|||
// This test exposes this problem as a test hang. If the race is fixed, then
|
|||
// the test runs to completion.
|
|||
|
|||
namespace toku { |
|||
|
|||
static void start_before_pending(void) { usleep(10000); } |
|||
|
|||
static void run_locker(locktree *lt, |
|||
TXNID txnid, |
|||
const DBT *key, |
|||
pthread_barrier_t *b) { |
|||
for (int i = 0; i < 100000; i++) { |
|||
int r; |
|||
r = pthread_barrier_wait(b); |
|||
assert(r == 0 || r == PTHREAD_BARRIER_SERIAL_THREAD); |
|||
|
|||
lock_request request; |
|||
request.create(); |
|||
request.set(lt, txnid, key, key, lock_request::type::WRITE, false); |
|||
|
|||
// if the callback is included, then the race is easy to reproduce.
|
|||
// Otherwise, several test runs may be required before the race
|
|||
// happens.
|
|||
request.set_start_before_pending_test_callback( |
|||
start_before_pending); |
|||
|
|||
// try to acquire the lock
|
|||
r = request.start(); |
|||
if (r == DB_LOCK_NOTGRANTED) { |
|||
// wait for the lock to be granted
|
|||
r = request.wait(1000 * 1000); |
|||
} |
|||
|
|||
if (r == 0) { |
|||
// release the lock
|
|||
range_buffer buffer; |
|||
buffer.create(); |
|||
buffer.append(key, key); |
|||
lt->release_locks(txnid, &buffer); |
|||
buffer.destroy(); |
|||
|
|||
// retry pending lock requests
|
|||
lock_request::retry_all_lock_requests(lt); |
|||
} |
|||
|
|||
request.destroy(); |
|||
memset(&request, 0xab, sizeof request); |
|||
|
|||
toku_pthread_yield(); |
|||
if ((i % 10) == 0) |
|||
std::cerr << std::this_thread::get_id() << " " << i |
|||
<< std::endl; |
|||
} |
|||
} |
|||
|
|||
} /* namespace toku */ |
|||
|
|||
int main(void) { |
|||
toku::locktree lt; |
|||
DICTIONARY_ID dict_id = {1}; |
|||
lt.create(nullptr, dict_id, toku::dbt_comparator); |
|||
|
|||
const DBT *one = toku::get_dbt(1); |
|||
|
|||
const int n_workers = 2; |
|||
std::thread worker[n_workers]; |
|||
pthread_barrier_t b; |
|||
int r = pthread_barrier_init(&b, nullptr, n_workers); |
|||
assert(r == 0); |
|||
for (int i = 0; i < n_workers; i++) { |
|||
worker[i] = std::thread(toku::run_locker, <, i, one, &b); |
|||
} |
|||
for (int i = 0; i < n_workers; i++) { |
|||
worker[i].join(); |
|||
} |
|||
r = pthread_barrier_destroy(&b); |
|||
assert(r == 0); |
|||
lt.release_reference(); |
|||
lt.destroy(); |
|||
return 0; |
|||
} |
|||
@ -0,0 +1,77 @@ |
|||
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
|||
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4: |
|||
#ident "$Id$" |
|||
/*====== |
|||
This file is part of PerconaFT. |
|||
|
|||
|
|||
Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. |
|||
|
|||
PerconaFT is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License, version 2, |
|||
as published by the Free Software Foundation. |
|||
|
|||
PerconaFT is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License |
|||
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
---------------------------------------- |
|||
|
|||
PerconaFT is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Affero General Public License, version 3, |
|||
as published by the Free Software Foundation. |
|||
|
|||
PerconaFT is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Affero General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Affero General Public License |
|||
along with PerconaFT. If not, see <http://www.gnu.org/licenses/>. |
|||
======= */ |
|||
|
|||
#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved." |
|||
|
|||
#pragma once |
|||
|
|||
struct tokutxn; |
|||
|
|||
#if defined(ENABLED_DEBUG_SYNC) |
|||
|
|||
/* |
|||
the below macros are defined in my_global.h, which is included in m_string.h, |
|||
the same macros are defined in TokuSetupCompiler.cmake as compiler options, |
|||
undefine them here to avoid build errors |
|||
*/ |
|||
#undef __STDC_FORMAT_MACROS |
|||
#undef __STDC_LIMIT_MACROS |
|||
|
|||
#include "m_string.h" |
|||
#include "debug_sync.h" |
|||
|
|||
void toku_txn_get_client_id(struct tokutxn *txn, |
|||
uint64_t *client_id, |
|||
void **client_extra); |
|||
|
|||
inline void toku_debug_sync(struct tokutxn *txn, const char *sync_point_name) { |
|||
uint64_t client_id; |
|||
void *client_extra; |
|||
THD *thd; |
|||
|
|||
if (likely(!opt_debug_sync_timeout)) |
|||
return; |
|||
|
|||
toku_txn_get_client_id(txn, &client_id, &client_extra); |
|||
thd = reinterpret_cast<THD *>(client_extra); |
|||
debug_sync(thd, sync_point_name, strlen(sync_point_name)); |
|||
} |
|||
|
|||
#else // defined(ENABLED_DEBUG_SYNC) |
|||
|
|||
inline void toku_debug_sync(struct tokutxn *, const char *) {}; |
|||
|
|||
#endif // defined(ENABLED_DEBUG_SYNC) |
|||
@ -0,0 +1,26 @@ |
|||
### connection default |
|||
CREATE TABLE t (a INT PRIMARY KEY, b INT) ENGINE=TokuDB; |
|||
INSERT INTO t (a, b) VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), |
|||
(6, 6), (7, 7), (8, 8), (9, 9), (10, 10), |
|||
(11, 11), (12, 12), (13, 13), (14, 14), (15, 15), |
|||
(16, 16), (17, 17), (18, 18), (19, 19), (20, 20); |
|||
### connection con1 |
|||
SET DEBUG_SYNC= 'toku_range_lock_granted_immediately SIGNAL lock_granted WAIT_FOR lock_granted_continue'; |
|||
UPDATE t SET b=1 WHERE a BETWEEN 5 AND 10; |
|||
### connection default |
|||
SET DEBUG_SYNC= 'now WAIT_FOR lock_granted'; |
|||
### connection con2 |
|||
SET DEBUG_SYNC= 'toku_range_lock_before_wait SIGNAL lock_not_granted WAIT_FOR lock_not_granted_continue'; |
|||
SET DEBUG_SYNC= 'toku_range_lock_not_granted_after_wait SIGNAL lock_not_granted_after_wait'; |
|||
UPDATE t SET b=1 WHERE a BETWEEN 5 AND 10; |
|||
### connection default |
|||
SET DEBUG_SYNC= 'now SIGNAL lock_not_granted_continue WAIT_FOR lock_not_granted'; |
|||
KILL QUERY con2_id |
|||
SET DEBUG_SYNC= 'now SIGNAL lock_granted_continue WAIT_FOR lock_not_granted_after_wait'; |
|||
### connection con1 |
|||
### reap |
|||
### connection con2 |
|||
### reap |
|||
ERROR 70100: Query execution was interrupted |
|||
### connection default |
|||
DROP TABLE t; |
|||
@ -0,0 +1,56 @@ |
|||
--source include/have_tokudb.inc |
|||
--source include/have_debug_sync.inc |
|||
|
|||
--echo ### connection default |
|||
|
|||
CREATE TABLE t (a INT PRIMARY KEY, b INT) ENGINE=TokuDB; |
|||
|
|||
INSERT INTO t (a, b) VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), |
|||
(6, 6), (7, 7), (8, 8), (9, 9), (10, 10), |
|||
(11, 11), (12, 12), (13, 13), (14, 14), (15, 15), |
|||
(16, 16), (17, 17), (18, 18), (19, 19), (20, 20); |
|||
|
|||
--connect(con1, localhost, root) |
|||
--connect(con2, localhost, root) |
|||
|
|||
--connection con1 |
|||
--echo ### connection con1 |
|||
SET DEBUG_SYNC= 'toku_range_lock_granted_immediately SIGNAL lock_granted WAIT_FOR lock_granted_continue'; |
|||
--send UPDATE t SET b=1 WHERE a BETWEEN 5 AND 10 |
|||
|
|||
--connection default |
|||
--echo ### connection default |
|||
SET DEBUG_SYNC= 'now WAIT_FOR lock_granted'; |
|||
|
|||
--connection con2 |
|||
--echo ### connection con2 |
|||
--let $con2_id= `SELECT CONNECTION_ID()` |
|||
SET DEBUG_SYNC= 'toku_range_lock_before_wait SIGNAL lock_not_granted WAIT_FOR lock_not_granted_continue'; |
|||
SET DEBUG_SYNC= 'toku_range_lock_not_granted_after_wait SIGNAL lock_not_granted_after_wait'; |
|||
--send UPDATE t SET b=1 WHERE a BETWEEN 5 AND 10 |
|||
|
|||
--connection default |
|||
--echo ### connection default |
|||
SET DEBUG_SYNC= 'now SIGNAL lock_not_granted_continue WAIT_FOR lock_not_granted'; |
|||
|
|||
--disable_query_log |
|||
--eval KILL QUERY $con2_id |
|||
--enable_query_log |
|||
--echo KILL QUERY con2_id |
|||
SET DEBUG_SYNC= 'now SIGNAL lock_granted_continue WAIT_FOR lock_not_granted_after_wait'; |
|||
|
|||
--connection con1 |
|||
--echo ### connection con1 |
|||
--echo ### reap |
|||
--reap |
|||
|
|||
--connection con2 |
|||
--echo ### connection con2 |
|||
--echo ### reap |
|||
--error ER_QUERY_INTERRUPTED |
|||
--reap |
|||
|
|||
--connection default |
|||
--echo ### connection default |
|||
|
|||
DROP TABLE t; |
|||
@ -0,0 +1,42 @@ |
|||
# |
|||
# This is a helper script for rpl_row_img.test. It creates |
|||
# all combinations MyISAM / InnoDB in a three server replication |
|||
# chain. Each engine combination is tested against the current |
|||
# seetings for binlog_row_image (on each server). |
|||
# |
|||
# The test script that is executed on every combination is the |
|||
# only argument to this wrapper script. See below. |
|||
# |
|||
# This script takes one parameter: |
|||
# - $row_img_test_script |
|||
# the name of the test script to include in every combination |
|||
# |
|||
# Sample usage: |
|||
# -- let $row_img_test_script= extra/rpl_tests/rpl_row_img.test |
|||
# -- source include/rpl_row_img_general_loop.test |
|||
|
|||
|
|||
-- let $engine_type_a= 2 |
|||
-- let $server_1_engine= TokuDB |
|||
while($engine_type_a) |
|||
{ |
|||
-- let $engine_type_b= 2 |
|||
-- let $server_2_engine= TokuDB |
|||
while($engine_type_b) |
|||
{ |
|||
-- let $engine_type_c= 2 |
|||
-- let $server_3_engine= TokuDB |
|||
while($engine_type_c) |
|||
{ |
|||
-- echo ### engines: $server_1_engine, $server_2_engine, $server_3_engine |
|||
-- source $row_img_test_script |
|||
|
|||
-- let $server_3_engine= InnoDB |
|||
-- dec $engine_type_c |
|||
} |
|||
-- let $server_2_engine= InnoDB |
|||
-- dec $engine_type_b |
|||
} |
|||
-- let $server_1_engine= InnoDB |
|||
-- dec $engine_type_a |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
include/master-slave.inc |
|||
Warnings: |
|||
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
|||
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. |
|||
[connection master] |
|||
CREATE TABLE t1 (a INT) ENGINE=tokudb; |
|||
begin; |
|||
insert into t1 values(1); |
|||
flush tables with read lock; |
|||
commit; |
|||
include/sync_slave_sql_with_master.inc |
|||
unlock tables; |
|||
drop table t1; |
|||
include/sync_slave_sql_with_master.inc |
|||
include/rpl_end.inc |
|||
@ -0,0 +1,554 @@ |
|||
# |
|||
# Setup |
|||
# |
|||
# |
|||
# See if queries that use both auto_increment and LAST_INSERT_ID() |
|||
# are replicated well |
|||
# |
|||
# We also check how the foreign_key_check variable is replicated |
|||
# |
|||
include/master-slave.inc |
|||
Warnings: |
|||
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
|||
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. |
|||
[connection master] |
|||
SET @old_concurrent_insert= @@global.concurrent_insert; |
|||
SET @@global.concurrent_insert= 0; |
|||
create table t1(a int auto_increment, key(a)) engine=tokudb; |
|||
create table t2(b int auto_increment, c int, key(b)) engine=tokudb; |
|||
insert into t1 values (1),(2),(3); |
|||
insert into t1 values (null); |
|||
insert into t2 values (null,last_insert_id()); |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t1 ORDER BY a; |
|||
a |
|||
1 |
|||
2 |
|||
3 |
|||
4 |
|||
select * from t2 ORDER BY b; |
|||
b c |
|||
1 4 |
|||
drop table t1; |
|||
drop table t2; |
|||
create table t1(a int auto_increment, key(a)) engine=tokudb; |
|||
create table t2(b int auto_increment, c int, key(b), foreign key(b) references t1(a)) engine=tokudb; |
|||
SET FOREIGN_KEY_CHECKS=0; |
|||
insert into t1 values (10); |
|||
insert into t1 values (null),(null),(null); |
|||
insert into t2 values (5,0); |
|||
insert into t2 values (null,last_insert_id()); |
|||
SET FOREIGN_KEY_CHECKS=1; |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t1; |
|||
a |
|||
10 |
|||
11 |
|||
12 |
|||
13 |
|||
select * from t2; |
|||
b c |
|||
5 0 |
|||
6 11 |
|||
# |
|||
# check if INSERT SELECT in auto_increment is well replicated (bug #490) |
|||
# |
|||
drop table t2; |
|||
drop table t1; |
|||
create table t1(a int auto_increment, key(a)) engine=tokudb; |
|||
create table t2(b int auto_increment, c int, key(b)) engine=tokudb; |
|||
insert into t1 values (10); |
|||
insert into t1 values (null),(null),(null); |
|||
insert into t2 values (5,0); |
|||
insert into t2 (c) select * from t1 ORDER BY a; |
|||
select * from t2 ORDER BY b; |
|||
b c |
|||
5 0 |
|||
6 10 |
|||
7 11 |
|||
8 12 |
|||
9 13 |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t1 ORDER BY a; |
|||
a |
|||
10 |
|||
11 |
|||
12 |
|||
13 |
|||
select * from t2 ORDER BY b; |
|||
b c |
|||
5 0 |
|||
6 10 |
|||
7 11 |
|||
8 12 |
|||
9 13 |
|||
drop table t1; |
|||
drop table t2; |
|||
include/sync_slave_sql_with_master.inc |
|||
# |
|||
# Bug#8412: Error codes reported in binary log for CHARACTER SET, |
|||
# FOREIGN_KEY_CHECKS |
|||
# |
|||
SET TIMESTAMP=1000000000; |
|||
CREATE TABLE t1 ( a INT UNIQUE ) engine=tokudb; |
|||
SET FOREIGN_KEY_CHECKS=0; |
|||
INSERT INTO t1 VALUES (1),(1); |
|||
Got one of the listed errors |
|||
include/sync_slave_sql_with_master.inc |
|||
drop table t1; |
|||
include/sync_slave_sql_with_master.inc |
|||
# |
|||
# Bug#14553: NULL in WHERE resets LAST_INSERT_ID |
|||
# |
|||
set @@session.sql_auto_is_null=1; |
|||
create table t1(a int auto_increment, key(a)) engine=tokudb; |
|||
create table t2(a int) engine=tokudb; |
|||
insert into t1 (a) values (null); |
|||
insert into t2 (a) select a from t1 where a is null; |
|||
insert into t2 (a) select a from t1 where a is null; |
|||
select * from t2; |
|||
a |
|||
1 |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t2; |
|||
a |
|||
1 |
|||
drop table t1; |
|||
drop table t2; |
|||
# |
|||
# End of 4.1 tests |
|||
# |
|||
# |
|||
# BUG#15728: LAST_INSERT_ID function inside a stored function returns 0 |
|||
# |
|||
# The solution is not to reset last_insert_id on enter to sub-statement. |
|||
# |
|||
drop function if exists bug15728; |
|||
drop function if exists bug15728_insert; |
|||
drop table if exists t1, t2; |
|||
create table t1 ( |
|||
id int not null auto_increment, |
|||
last_id int, |
|||
primary key (id) |
|||
) engine=tokudb; |
|||
create function bug15728() returns int(11) |
|||
return last_insert_id(); |
|||
insert into t1 (last_id) values (0); |
|||
insert into t1 (last_id) values (last_insert_id()); |
|||
insert into t1 (last_id) values (bug15728()); |
|||
create table t2 ( |
|||
id int not null auto_increment, |
|||
last_id int, |
|||
primary key (id) |
|||
) engine=tokudb; |
|||
create function bug15728_insert() returns int(11) modifies sql data |
|||
begin |
|||
insert into t2 (last_id) values (bug15728()); |
|||
return bug15728(); |
|||
end| |
|||
create trigger t1_bi before insert on t1 for each row |
|||
begin |
|||
declare res int; |
|||
select bug15728_insert() into res; |
|||
set NEW.last_id = res; |
|||
end| |
|||
insert into t1 (last_id) values (0); |
|||
drop trigger t1_bi; |
|||
select last_insert_id(); |
|||
last_insert_id() |
|||
4 |
|||
select bug15728_insert(); |
|||
bug15728_insert() |
|||
2 |
|||
select last_insert_id(); |
|||
last_insert_id() |
|||
4 |
|||
insert into t1 (last_id) values (bug15728()); |
|||
select last_insert_id(); |
|||
last_insert_id() |
|||
5 |
|||
drop procedure if exists foo; |
|||
create procedure foo() |
|||
begin |
|||
declare res int; |
|||
insert into t2 (last_id) values (bug15728()); |
|||
insert into t1 (last_id) values (bug15728()); |
|||
end| |
|||
call foo(); |
|||
select * from t1; |
|||
id last_id |
|||
1 0 |
|||
2 1 |
|||
3 2 |
|||
4 1 |
|||
5 4 |
|||
6 3 |
|||
select * from t2; |
|||
id last_id |
|||
1 3 |
|||
2 4 |
|||
3 5 |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t1; |
|||
id last_id |
|||
1 0 |
|||
2 1 |
|||
3 2 |
|||
4 1 |
|||
5 4 |
|||
6 3 |
|||
select * from t2; |
|||
id last_id |
|||
1 3 |
|||
2 4 |
|||
3 5 |
|||
drop function bug15728; |
|||
drop function bug15728_insert; |
|||
drop table t1,t2; |
|||
drop procedure foo; |
|||
create table t1 (n int primary key auto_increment not null, |
|||
b int, unique(b)) engine=tokudb; |
|||
set sql_log_bin=0; |
|||
insert into t1 values(null,100); |
|||
replace into t1 values(null,50),(null,100),(null,150); |
|||
select * from t1 order by n; |
|||
n b |
|||
2 50 |
|||
3 100 |
|||
4 150 |
|||
truncate table t1; |
|||
set sql_log_bin=1; |
|||
insert into t1 values(null,100); |
|||
select * from t1 order by n; |
|||
n b |
|||
1 100 |
|||
include/sync_slave_sql_with_master.inc |
|||
insert into t1 values(null,200),(null,300); |
|||
delete from t1 where b <> 100; |
|||
select * from t1 order by n; |
|||
n b |
|||
1 100 |
|||
replace into t1 values(null,100),(null,350); |
|||
select * from t1 order by n; |
|||
n b |
|||
2 100 |
|||
3 350 |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t1 order by n; |
|||
n b |
|||
2 100 |
|||
3 350 |
|||
insert into t1 values (NULL,400),(3,500),(NULL,600) on duplicate key UPDATE n=1000; |
|||
select * from t1 order by n; |
|||
n b |
|||
2 100 |
|||
4 400 |
|||
5 600 |
|||
1000 350 |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t1 order by n; |
|||
n b |
|||
2 100 |
|||
4 400 |
|||
5 600 |
|||
1000 350 |
|||
drop table t1; |
|||
create table t1 (n int primary key auto_increment not null, |
|||
b int, unique(b)) engine=tokudb; |
|||
insert into t1 values(null,100); |
|||
select * from t1 order by n; |
|||
n b |
|||
1 100 |
|||
include/sync_slave_sql_with_master.inc |
|||
insert into t1 values(null,200),(null,300); |
|||
delete from t1 where b <> 100; |
|||
select * from t1 order by n; |
|||
n b |
|||
1 100 |
|||
insert into t1 values(null,100),(null,350) on duplicate key update n=2; |
|||
select * from t1 order by n; |
|||
n b |
|||
2 100 |
|||
3 350 |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t1 order by n; |
|||
n b |
|||
2 100 |
|||
3 350 |
|||
drop table t1; |
|||
include/sync_slave_sql_with_master.inc |
|||
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT, |
|||
UNIQUE(b)) ENGINE=tokudb; |
|||
INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; |
|||
SELECT * FROM t1 ORDER BY a; |
|||
a b |
|||
1 10 |
|||
2 2 |
|||
include/sync_slave_sql_with_master.inc |
|||
SELECT * FROM t1 ORDER BY a; |
|||
a b |
|||
1 10 |
|||
2 2 |
|||
drop table t1; |
|||
CREATE TABLE t1 ( |
|||
id bigint(20) unsigned NOT NULL auto_increment, |
|||
field_1 int(10) unsigned NOT NULL, |
|||
field_2 varchar(255) NOT NULL, |
|||
field_3 varchar(255) NOT NULL, |
|||
PRIMARY KEY (id), |
|||
UNIQUE KEY field_1 (field_1, field_2) |
|||
) ENGINE=tokudb; |
|||
CREATE TABLE t2 ( |
|||
field_a int(10) unsigned NOT NULL, |
|||
field_b varchar(255) NOT NULL, |
|||
field_c varchar(255) NOT NULL |
|||
) ENGINE=tokudb; |
|||
INSERT INTO t2 (field_a, field_b, field_c) VALUES (1, 'a', '1a'); |
|||
INSERT INTO t2 (field_a, field_b, field_c) VALUES (2, 'b', '2b'); |
|||
INSERT INTO t2 (field_a, field_b, field_c) VALUES (3, 'c', '3c'); |
|||
INSERT INTO t2 (field_a, field_b, field_c) VALUES (4, 'd', '4d'); |
|||
INSERT INTO t2 (field_a, field_b, field_c) VALUES (5, 'e', '5e'); |
|||
INSERT INTO t1 (field_1, field_2, field_3) |
|||
SELECT t2.field_a, t2.field_b, t2.field_c |
|||
FROM t2 |
|||
ON DUPLICATE KEY UPDATE |
|||
t1.field_3 = t2.field_c; |
|||
INSERT INTO t2 (field_a, field_b, field_c) VALUES (6, 'f', '6f'); |
|||
INSERT INTO t1 (field_1, field_2, field_3) |
|||
SELECT t2.field_a, t2.field_b, t2.field_c |
|||
FROM t2 |
|||
ON DUPLICATE KEY UPDATE |
|||
t1.field_3 = t2.field_c; |
|||
SELECT * FROM t1 ORDER BY id; |
|||
id field_1 field_2 field_3 |
|||
1 1 a 1a |
|||
2 2 b 2b |
|||
3 3 c 3c |
|||
4 4 d 4d |
|||
5 5 e 5e |
|||
8 6 f 6f |
|||
include/sync_slave_sql_with_master.inc |
|||
SELECT * FROM t1 ORDER BY id; |
|||
id field_1 field_2 field_3 |
|||
1 1 a 1a |
|||
2 2 b 2b |
|||
3 3 c 3c |
|||
4 4 d 4d |
|||
5 5 e 5e |
|||
8 6 f 6f |
|||
drop table t1, t2; |
|||
DROP PROCEDURE IF EXISTS p1; |
|||
DROP TABLE IF EXISTS t1, t2; |
|||
SELECT LAST_INSERT_ID(0); |
|||
LAST_INSERT_ID(0) |
|||
0 |
|||
CREATE TABLE t1 ( |
|||
id INT NOT NULL DEFAULT 0, |
|||
last_id INT, |
|||
PRIMARY KEY (id) |
|||
) ENGINE=tokudb; |
|||
CREATE TABLE t2 ( |
|||
id INT NOT NULL AUTO_INCREMENT, |
|||
last_id INT, |
|||
PRIMARY KEY (id) |
|||
) ENGINE=tokudb; |
|||
CREATE PROCEDURE p1() |
|||
BEGIN |
|||
INSERT INTO t2 (last_id) VALUES (LAST_INSERT_ID()); |
|||
INSERT INTO t1 (last_id) VALUES (LAST_INSERT_ID()); |
|||
END| |
|||
CALL p1(); |
|||
SELECT * FROM t1 ORDER BY id; |
|||
id last_id |
|||
0 1 |
|||
SELECT * FROM t2 ORDER BY id; |
|||
id last_id |
|||
1 0 |
|||
include/sync_slave_sql_with_master.inc |
|||
SELECT * FROM t1 ORDER BY id; |
|||
id last_id |
|||
0 1 |
|||
SELECT * FROM t2 ORDER BY id; |
|||
id last_id |
|||
1 0 |
|||
DROP PROCEDURE p1; |
|||
DROP TABLE t1, t2; |
|||
DROP PROCEDURE IF EXISTS p1; |
|||
DROP FUNCTION IF EXISTS f1; |
|||
DROP FUNCTION IF EXISTS f2; |
|||
DROP FUNCTION IF EXISTS f3; |
|||
DROP TABLE IF EXISTS t1, t2; |
|||
CREATE TABLE t1 ( |
|||
i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, |
|||
j INT DEFAULT 0 |
|||
) ENGINE=tokudb; |
|||
CREATE TABLE t2 (i INT) ENGINE=tokudb; |
|||
CREATE PROCEDURE p1() |
|||
BEGIN |
|||
INSERT INTO t1 (i) VALUES (NULL); |
|||
INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); |
|||
INSERT INTO t1 (i) VALUES (NULL), (NULL); |
|||
INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); |
|||
END | |
|||
CREATE FUNCTION f1() RETURNS INT MODIFIES SQL DATA |
|||
BEGIN |
|||
INSERT INTO t1 (i) VALUES (NULL); |
|||
INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); |
|||
INSERT INTO t1 (i) VALUES (NULL), (NULL); |
|||
INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); |
|||
RETURN 0; |
|||
END | |
|||
CREATE FUNCTION f2() RETURNS INT NOT DETERMINISTIC |
|||
RETURN LAST_INSERT_ID() | |
|||
CREATE FUNCTION f3() RETURNS INT MODIFIES SQL DATA |
|||
BEGIN |
|||
INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); |
|||
RETURN 0; |
|||
END | |
|||
INSERT INTO t1 VALUES (NULL, -1); |
|||
CALL p1(); |
|||
SELECT f1(); |
|||
f1() |
|||
0 |
|||
INSERT INTO t1 VALUES (NULL, f2()), (NULL, LAST_INSERT_ID()), |
|||
(NULL, LAST_INSERT_ID()), (NULL, f2()), (NULL, f2()); |
|||
INSERT INTO t1 VALUES (NULL, f2()); |
|||
INSERT INTO t1 VALUES (NULL, 0), (NULL, LAST_INSERT_ID()); |
|||
UPDATE t1 SET j= -1 WHERE i IS NULL; |
|||
INSERT INTO t1 (i) VALUES (NULL); |
|||
INSERT INTO t1 (i) VALUES (NULL); |
|||
SELECT f3(); |
|||
f3() |
|||
0 |
|||
SELECT * FROM t1 ORDER BY i; |
|||
i j |
|||
1 -1 |
|||
2 0 |
|||
3 0 |
|||
4 0 |
|||
5 0 |
|||
6 0 |
|||
7 0 |
|||
8 3 |
|||
9 3 |
|||
10 3 |
|||
11 3 |
|||
12 3 |
|||
13 8 |
|||
14 -1 |
|||
15 13 |
|||
16 0 |
|||
17 0 |
|||
SELECT * FROM t2 ORDER BY i; |
|||
i |
|||
2 |
|||
3 |
|||
5 |
|||
6 |
|||
16 |
|||
include/sync_slave_sql_with_master.inc |
|||
SELECT * FROM t1; |
|||
i j |
|||
1 -1 |
|||
2 0 |
|||
3 0 |
|||
4 0 |
|||
5 0 |
|||
6 0 |
|||
7 0 |
|||
8 3 |
|||
9 3 |
|||
10 3 |
|||
11 3 |
|||
12 3 |
|||
13 8 |
|||
14 -1 |
|||
15 13 |
|||
16 0 |
|||
17 0 |
|||
SELECT * FROM t2; |
|||
i |
|||
2 |
|||
3 |
|||
5 |
|||
6 |
|||
16 |
|||
DROP PROCEDURE p1; |
|||
DROP FUNCTION f1; |
|||
DROP FUNCTION f2; |
|||
DROP FUNCTION f3; |
|||
DROP TABLE t1, t2; |
|||
include/sync_slave_sql_with_master.inc |
|||
# |
|||
# End of 5.0 tests |
|||
# |
|||
create table t2 ( |
|||
id int not null auto_increment, |
|||
last_id int, |
|||
primary key (id) |
|||
) engine=tokudb; |
|||
truncate table t2; |
|||
create table t1 (id tinyint primary key) engine=tokudb; |
|||
create function insid() returns int |
|||
begin |
|||
insert into t2 (last_id) values (0); |
|||
return 0; |
|||
end| |
|||
set sql_log_bin=0; |
|||
insert into t2 (id) values(1),(2),(3); |
|||
delete from t2; |
|||
set sql_log_bin=1; |
|||
select insid(); |
|||
insid() |
|||
0 |
|||
set sql_log_bin=0; |
|||
insert into t2 (id) values(5),(6),(7); |
|||
delete from t2 where id>=5; |
|||
set sql_log_bin=1; |
|||
insert into t1 select insid(); |
|||
select * from t1 order by id; |
|||
id |
|||
0 |
|||
select * from t2 order by id; |
|||
id last_id |
|||
4 0 |
|||
8 0 |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t1 order by id; |
|||
id |
|||
0 |
|||
select * from t2 order by id; |
|||
id last_id |
|||
4 0 |
|||
8 0 |
|||
drop table t1; |
|||
drop function insid; |
|||
truncate table t2; |
|||
create table t1 (n int primary key auto_increment not null, |
|||
b int, unique(b)) engine=tokudb; |
|||
create procedure foo() |
|||
begin |
|||
insert into t1 values(null,10); |
|||
insert ignore into t1 values(null,10); |
|||
insert ignore into t1 values(null,10); |
|||
insert into t2 values(null,3); |
|||
end| |
|||
call foo(); |
|||
select * from t1 order by n; |
|||
n b |
|||
1 10 |
|||
select * from t2 order by id; |
|||
id last_id |
|||
1 3 |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t1 order by n; |
|||
n b |
|||
1 10 |
|||
select * from t2 order by id; |
|||
id last_id |
|||
1 3 |
|||
drop table t1, t2; |
|||
drop procedure foo; |
|||
SET @@global.concurrent_insert= @old_concurrent_insert; |
|||
set @@session.sql_auto_is_null=default; |
|||
include/rpl_end.inc |
|||
@ -0,0 +1,82 @@ |
|||
include/master-slave.inc |
|||
Warnings: |
|||
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
|||
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. |
|||
[connection master] |
|||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT."); |
|||
create table t1(a int auto_increment, primary key(a)); |
|||
create table t2(b int auto_increment, c int, primary key(b)); |
|||
insert into t1 values (1),(2),(3); |
|||
insert into t1 values (null); |
|||
insert into t2 values (null,last_insert_id()); |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t1 ORDER BY a; |
|||
a |
|||
1 |
|||
2 |
|||
3 |
|||
4 |
|||
select * from t2 ORDER BY b; |
|||
b c |
|||
1 4 |
|||
drop table t1; |
|||
drop table t2; |
|||
create table t1(a int auto_increment, key(a)) engine=tokudb; |
|||
create table t2(b int auto_increment, c int, key(b), foreign key(b) references t1(a)) engine=tokudb; |
|||
SET FOREIGN_KEY_CHECKS=0; |
|||
insert into t1 values (10); |
|||
insert into t1 values (null),(null),(null); |
|||
insert into t2 values (5,0); |
|||
insert into t2 values (null,last_insert_id()); |
|||
SET FOREIGN_KEY_CHECKS=1; |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t1; |
|||
a |
|||
10 |
|||
11 |
|||
12 |
|||
13 |
|||
select * from t2; |
|||
b c |
|||
5 0 |
|||
6 11 |
|||
drop table t2; |
|||
drop table t1; |
|||
create table t1(a int auto_increment, primary key(a)); |
|||
create table t2(b int auto_increment, c int, primary key(b)); |
|||
insert into t1 values (10); |
|||
insert into t1 values (null),(null),(null); |
|||
insert into t2 values (5,0); |
|||
insert into t2 (c) select * from t1 ORDER BY a; |
|||
select * from t2 ORDER BY b; |
|||
b c |
|||
5 0 |
|||
6 10 |
|||
7 11 |
|||
8 12 |
|||
9 13 |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t1 ORDER BY a; |
|||
a |
|||
10 |
|||
11 |
|||
12 |
|||
13 |
|||
select * from t2 ORDER BY b; |
|||
b c |
|||
5 0 |
|||
6 10 |
|||
7 11 |
|||
8 12 |
|||
9 13 |
|||
drop table t1; |
|||
drop table t2; |
|||
include/sync_slave_sql_with_master.inc |
|||
SET TIMESTAMP=1000000000; |
|||
CREATE TABLE t1 ( a INT UNIQUE ); |
|||
SET FOREIGN_KEY_CHECKS=0; |
|||
INSERT INTO t1 VALUES (1),(1); |
|||
Got one of the listed errors |
|||
include/sync_slave_sql_with_master.inc |
|||
drop table t1; |
|||
include/rpl_end.inc |
|||
@ -0,0 +1,29 @@ |
|||
include/master-slave.inc |
|||
Warnings: |
|||
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
|||
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. |
|||
[connection master] |
|||
call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.'); |
|||
CREATE TABLE t1 ( |
|||
a int unsigned not null auto_increment primary key, |
|||
b int unsigned |
|||
) ENGINE=TokuDB; |
|||
CREATE TABLE t2 ( |
|||
a int unsigned not null auto_increment primary key, |
|||
b int unsigned |
|||
) ENGINE=TokuDB; |
|||
INSERT INTO t1 VALUES (NULL, 0); |
|||
INSERT INTO t1 SELECT NULL, 0 FROM t1; |
|||
INSERT INTO t2 VALUES (NULL, 0), (NULL,1); |
|||
SELECT * FROM t1 ORDER BY a; |
|||
a b |
|||
1 0 |
|||
2 0 |
|||
SELECT * FROM t2 ORDER BY a; |
|||
a b |
|||
1 0 |
|||
2 1 |
|||
UPDATE t1, t2 SET t1.b = t2.b WHERE t1.a = t2.a; |
|||
include/sync_slave_sql_with_master.inc |
|||
drop table t1, t2; |
|||
include/rpl_end.inc |
|||
@ -0,0 +1,60 @@ |
|||
include/master-slave.inc |
|||
Warnings: |
|||
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
|||
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. |
|||
[connection master] |
|||
call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT'); |
|||
drop table if exists t1,t2; |
|||
CREATE TABLE t1 ( |
|||
a int unsigned not null auto_increment primary key, |
|||
b int unsigned |
|||
) ENGINE=TokuDB; |
|||
CREATE TABLE t2 ( |
|||
a int unsigned not null auto_increment primary key, |
|||
b int unsigned |
|||
) ENGINE=TokuDB; |
|||
INSERT INTO t1 VALUES (NULL, 0); |
|||
INSERT INTO t1 SELECT NULL, 0 FROM t1; |
|||
INSERT INTO t2 VALUES (NULL, 0), (NULL,1); |
|||
SELECT * FROM t1 ORDER BY a; |
|||
a b |
|||
1 0 |
|||
2 0 |
|||
SELECT * FROM t2 ORDER BY a; |
|||
a b |
|||
1 0 |
|||
2 1 |
|||
UPDATE t1, t2 SET t1.b = (t2.b+4) WHERE t1.a = t2.a; |
|||
SELECT * FROM t1 ORDER BY a; |
|||
a b |
|||
1 4 |
|||
2 5 |
|||
SELECT * FROM t2 ORDER BY a; |
|||
a b |
|||
1 0 |
|||
2 1 |
|||
SELECT * FROM t1 ORDER BY a; |
|||
a b |
|||
1 4 |
|||
2 5 |
|||
SELECT * FROM t2 ORDER BY a; |
|||
a b |
|||
1 0 |
|||
2 1 |
|||
drop table t1,t2; |
|||
include/sync_slave_sql_with_master.inc |
|||
reset master; |
|||
RESET MASTER; |
|||
CREATE TABLE t1 ( a INT ); |
|||
INSERT INTO t1 VALUES (0); |
|||
UPDATE t1, (SELECT 3 as b) AS x SET t1.a = x.b; |
|||
select * from t1; |
|||
a |
|||
3 |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t1; |
|||
a |
|||
3 |
|||
drop table t1; |
|||
include/sync_slave_sql_with_master.inc |
|||
include/rpl_end.inc |
|||
@ -0,0 +1,202 @@ |
|||
include/master-slave.inc |
|||
Warnings: |
|||
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
|||
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. |
|||
[connection master] |
|||
call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.'); |
|||
|
|||
-------- Test for BUG#9361 -------- |
|||
CREATE TABLE t1 ( |
|||
a int unsigned not null auto_increment primary key, |
|||
b int unsigned |
|||
) ENGINE=TokuDB; |
|||
CREATE TABLE t2 ( |
|||
a int unsigned not null auto_increment primary key, |
|||
b int unsigned |
|||
) ENGINE=TokuDB; |
|||
INSERT INTO t1 VALUES (NULL, 0); |
|||
INSERT INTO t1 SELECT NULL, 0 FROM t1; |
|||
INSERT INTO t2 VALUES (NULL, 0), (NULL,1); |
|||
SELECT * FROM t1 ORDER BY a; |
|||
a b |
|||
1 0 |
|||
2 0 |
|||
SELECT * FROM t2 ORDER BY a; |
|||
a b |
|||
1 0 |
|||
2 1 |
|||
UPDATE t2, (SELECT a FROM t1 ORDER BY a) AS t SET t2.b = t.a+5 ; |
|||
SELECT * FROM t1 ORDER BY a; |
|||
a b |
|||
1 0 |
|||
2 0 |
|||
SELECT * FROM t2 ORDER BY a; |
|||
a b |
|||
1 6 |
|||
2 6 |
|||
include/sync_slave_sql_with_master.inc |
|||
SELECT * FROM t1 ORDER BY a; |
|||
a b |
|||
1 0 |
|||
2 0 |
|||
SELECT * FROM t2 ORDER BY a; |
|||
a b |
|||
1 6 |
|||
2 6 |
|||
drop table t1,t2; |
|||
|
|||
-------- Test 1 for BUG#9361 -------- |
|||
DROP TABLE IF EXISTS t1; |
|||
DROP TABLE IF EXISTS t2; |
|||
CREATE TABLE t1 ( |
|||
a1 char(30), |
|||
a2 int, |
|||
a3 int, |
|||
a4 char(30), |
|||
a5 char(30) |
|||
); |
|||
CREATE TABLE t2 ( |
|||
b1 int, |
|||
b2 char(30) |
|||
); |
|||
INSERT INTO t1 VALUES ('Yes', 1, NULL, 'foo', 'bar'); |
|||
INSERT INTO t2 VALUES (1, 'baz'); |
|||
UPDATE t1 a, t2 |
|||
SET a.a1 = 'No' |
|||
WHERE a.a2 = |
|||
(SELECT b1 |
|||
FROM t2 |
|||
WHERE b2 = 'baz') |
|||
AND a.a3 IS NULL |
|||
AND a.a4 = 'foo' |
|||
AND a.a5 = 'bar'; |
|||
include/sync_slave_sql_with_master.inc |
|||
SELECT * FROM t1; |
|||
a1 a2 a3 a4 a5 |
|||
No 1 NULL foo bar |
|||
SELECT * FROM t2; |
|||
b1 b2 |
|||
1 baz |
|||
DROP TABLE t1, t2; |
|||
|
|||
-------- Test 2 for BUG#9361 -------- |
|||
DROP TABLE IF EXISTS t1; |
|||
DROP TABLE IF EXISTS t2; |
|||
DROP TABLE IF EXISTS t3; |
|||
CREATE TABLE t1 ( |
|||
i INT, |
|||
j INT, |
|||
x INT, |
|||
y INT, |
|||
z INT |
|||
); |
|||
CREATE TABLE t2 ( |
|||
i INT, |
|||
k INT, |
|||
x INT, |
|||
y INT, |
|||
z INT |
|||
); |
|||
CREATE TABLE t3 ( |
|||
j INT, |
|||
k INT, |
|||
x INT, |
|||
y INT, |
|||
z INT |
|||
); |
|||
INSERT INTO t1 VALUES ( 1, 2,13,14,15); |
|||
INSERT INTO t2 VALUES ( 1, 3,23,24,25); |
|||
INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); |
|||
UPDATE t1 AS a |
|||
INNER JOIN t2 AS b |
|||
ON a.i = b.i |
|||
INNER JOIN t3 AS c |
|||
ON a.j = c.j AND b.k = c.k |
|||
SET a.x = b.x, |
|||
a.y = b.y, |
|||
a.z = ( |
|||
SELECT sum(z) |
|||
FROM t3 |
|||
WHERE y = 34 |
|||
) |
|||
WHERE b.x = 23; |
|||
include/sync_slave_sql_with_master.inc |
|||
SELECT * FROM t1; |
|||
i j x y z |
|||
1 2 23 24 71 |
|||
DROP TABLE t1, t2, t3; |
|||
DROP TABLE IF EXISTS t1; |
|||
Warnings: |
|||
Note 1051 Unknown table 'test.t1' |
|||
DROP TABLE IF EXISTS t2; |
|||
Warnings: |
|||
Note 1051 Unknown table 'test.t2' |
|||
CREATE TABLE t1 ( |
|||
idp int(11) NOT NULL default '0', |
|||
idpro int(11) default NULL, |
|||
price decimal(19,4) default NULL, |
|||
PRIMARY KEY (idp) |
|||
); |
|||
CREATE TABLE t2 ( |
|||
idpro int(11) NOT NULL default '0', |
|||
price decimal(19,4) default NULL, |
|||
nbprice int(11) default NULL, |
|||
PRIMARY KEY (idpro) |
|||
); |
|||
INSERT INTO t1 VALUES |
|||
(1,1,'3.0000'), |
|||
(2,2,'1.0000'), |
|||
(3,1,'1.0000'), |
|||
(4,1,'4.0000'), |
|||
(5,3,'2.0000'), |
|||
(6,2,'4.0000'); |
|||
INSERT INTO t2 VALUES |
|||
(1,'0.0000',0), |
|||
(2,'0.0000',0), |
|||
(3,'0.0000',0); |
|||
update |
|||
t2 |
|||
join |
|||
( select idpro, min(price) as min_price, count(*) as nbr_price |
|||
from t1 |
|||
where idpro>0 and price>0 |
|||
group by idpro |
|||
) as table_price |
|||
on t2.idpro = table_price.idpro |
|||
set t2.price = table_price.min_price, |
|||
t2.nbprice = table_price.nbr_price; |
|||
select "-- MASTER AFTER JOIN --" as ""; |
|||
|
|||
-- MASTER AFTER JOIN -- |
|||
select * from t1; |
|||
idp idpro price |
|||
1 1 3.0000 |
|||
2 2 1.0000 |
|||
3 1 1.0000 |
|||
4 1 4.0000 |
|||
5 3 2.0000 |
|||
6 2 4.0000 |
|||
select * from t2; |
|||
idpro price nbprice |
|||
1 1.0000 3 |
|||
2 1.0000 2 |
|||
3 2.0000 1 |
|||
include/sync_slave_sql_with_master.inc |
|||
select "-- SLAVE AFTER JOIN --" as ""; |
|||
|
|||
-- SLAVE AFTER JOIN -- |
|||
select * from t1; |
|||
idp idpro price |
|||
1 1 3.0000 |
|||
2 2 1.0000 |
|||
3 1 1.0000 |
|||
4 1 4.0000 |
|||
5 3 2.0000 |
|||
6 2 4.0000 |
|||
select * from t2; |
|||
idpro price nbprice |
|||
1 1.0000 3 |
|||
2 1.0000 2 |
|||
3 2.0000 1 |
|||
DROP TABLE t1, t2; |
|||
include/rpl_end.inc |
|||
2183
storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_crash_safe.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
4739
storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_img_blobs.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
3681
storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_img_eng_full.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
3522
storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_img_eng_min.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
3522
storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_img_eng_noblob.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
3505
storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_img_idx_full.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
3530
storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_img_idx_min.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
3530
storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_row_img_idx_noblob.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,275 @@ |
|||
include/master-slave.inc |
|||
Warnings: |
|||
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
|||
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. |
|||
[connection master] |
|||
include/sync_slave_sql_with_master.inc |
|||
include/stop_slave.inc |
|||
include/wait_for_slave_to_stop.inc |
|||
reset master; |
|||
reset slave; |
|||
start slave; |
|||
include/wait_for_slave_to_start.inc |
|||
create table t1(n int not null auto_increment primary key)ENGINE=TokuDB; |
|||
insert into t1 values (NULL); |
|||
drop table t1; |
|||
create table t1 (word char(20) not null)ENGINE=TokuDB; |
|||
load data infile 'LOAD_FILE' into table t1 ignore 1 lines; |
|||
select count(*) from t1; |
|||
count(*) |
|||
69 |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB |
|||
master-bin.000001 # Query # # BEGIN |
|||
master-bin.000001 # Table_map # # table_id: # (test.t1) |
|||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F |
|||
master-bin.000001 # Xid # # COMMIT /* XID */ |
|||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ |
|||
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=TokuDB |
|||
master-bin.000001 # Query # # BEGIN |
|||
master-bin.000001 # Table_map # # table_id: # (test.t1) |
|||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F |
|||
master-bin.000001 # Xid # # COMMIT /* XID */ |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
master-bin.000001 # Query # # BEGIN |
|||
master-bin.000001 # Table_map # # table_id: # (test.t1) |
|||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F |
|||
master-bin.000001 # Xid # # COMMIT /* XID */ |
|||
flush logs; |
|||
create table t3 (a int)ENGINE=TokuDB; |
|||
select * from t1 order by 1 asc; |
|||
word |
|||
Aarhus |
|||
Aaron |
|||
Aaron |
|||
Ababa |
|||
Ababa |
|||
aback |
|||
aback |
|||
abaft |
|||
abaft |
|||
abandon |
|||
abandon |
|||
abandoned |
|||
abandoned |
|||
abandoning |
|||
abandoning |
|||
abandonment |
|||
abandonment |
|||
abandons |
|||
abandons |
|||
abase |
|||
abased |
|||
abasement |
|||
abasements |
|||
abases |
|||
abash |
|||
abashed |
|||
abashes |
|||
abashing |
|||
abasing |
|||
abate |
|||
abated |
|||
abatement |
|||
abatements |
|||
abater |
|||
abates |
|||
abating |
|||
Abba |
|||
abbe |
|||
abbey |
|||
abbeys |
|||
abbot |
|||
abbots |
|||
Abbott |
|||
abbreviate |
|||
abbreviated |
|||
abbreviates |
|||
abbreviating |
|||
abbreviation |
|||
abbreviations |
|||
Abby |
|||
abdomen |
|||
abdomens |
|||
abdominal |
|||
abduct |
|||
abducted |
|||
abduction |
|||
abductions |
|||
abductor |
|||
abductors |
|||
abducts |
|||
Abe |
|||
abed |
|||
Abel |
|||
Abelian |
|||
Abelson |
|||
Aberdeen |
|||
Abernathy |
|||
aberrant |
|||
aberration |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t1 order by 1 asc; |
|||
word |
|||
Aarhus |
|||
Aaron |
|||
Aaron |
|||
Ababa |
|||
Ababa |
|||
aback |
|||
aback |
|||
abaft |
|||
abaft |
|||
abandon |
|||
abandon |
|||
abandoned |
|||
abandoned |
|||
abandoning |
|||
abandoning |
|||
abandonment |
|||
abandonment |
|||
abandons |
|||
abandons |
|||
abase |
|||
abased |
|||
abasement |
|||
abasements |
|||
abases |
|||
abash |
|||
abashed |
|||
abashes |
|||
abashing |
|||
abasing |
|||
abate |
|||
abated |
|||
abatement |
|||
abatements |
|||
abater |
|||
abates |
|||
abating |
|||
Abba |
|||
abbe |
|||
abbey |
|||
abbeys |
|||
abbot |
|||
abbots |
|||
Abbott |
|||
abbreviate |
|||
abbreviated |
|||
abbreviates |
|||
abbreviating |
|||
abbreviation |
|||
abbreviations |
|||
Abby |
|||
abdomen |
|||
abdomens |
|||
abdominal |
|||
abduct |
|||
abducted |
|||
abduction |
|||
abductions |
|||
abductor |
|||
abductors |
|||
abducts |
|||
Abe |
|||
abed |
|||
Abel |
|||
Abelian |
|||
Abelson |
|||
Aberdeen |
|||
Abernathy |
|||
aberrant |
|||
aberration |
|||
flush logs; |
|||
include/stop_slave.inc |
|||
include/start_slave.inc |
|||
create table t2 (n int)ENGINE=TokuDB; |
|||
insert into t2 values (1); |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB |
|||
master-bin.000001 # Query # # BEGIN |
|||
master-bin.000001 # Table_map # # table_id: # (test.t1) |
|||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F |
|||
master-bin.000001 # Xid # # COMMIT /* XID */ |
|||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ |
|||
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=TokuDB |
|||
master-bin.000001 # Query # # BEGIN |
|||
master-bin.000001 # Table_map # # table_id: # (test.t1) |
|||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F |
|||
master-bin.000001 # Xid # # COMMIT /* XID */ |
|||
master-bin.000001 # Rotate # # master-bin.000002;pos=POS |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=TokuDB |
|||
master-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=TokuDB |
|||
master-bin.000002 # Query # # BEGIN |
|||
master-bin.000002 # Table_map # # table_id: # (test.t2) |
|||
master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F |
|||
master-bin.000002 # Xid # # COMMIT /* XID */ |
|||
show binary logs; |
|||
Log_name File_size |
|||
master-bin.000001 # |
|||
master-bin.000002 # |
|||
include/sync_slave_sql_with_master.inc |
|||
show binary logs; |
|||
Log_name File_size |
|||
slave-bin.000001 # |
|||
slave-bin.000002 # |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
slave-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB |
|||
slave-bin.000001 # Query # # BEGIN |
|||
slave-bin.000001 # Table_map # # table_id: # (test.t1) |
|||
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F |
|||
slave-bin.000001 # Xid # # COMMIT /* XID */ |
|||
slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ |
|||
slave-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=TokuDB |
|||
slave-bin.000001 # Query # # BEGIN |
|||
slave-bin.000001 # Table_map # # table_id: # (test.t1) |
|||
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F |
|||
slave-bin.000001 # Xid # # COMMIT /* XID */ |
|||
slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=TokuDB |
|||
slave-bin.000001 # Rotate # # slave-bin.000002;pos=POS |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=TokuDB |
|||
slave-bin.000002 # Query # # BEGIN |
|||
slave-bin.000002 # Table_map # # table_id: # (test.t2) |
|||
slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F |
|||
slave-bin.000002 # Xid # # COMMIT /* XID */ |
|||
include/check_slave_is_running.inc |
|||
show binlog events in 'slave-bin.000005' from 4; |
|||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log |
|||
DROP TABLE t1; |
|||
DROP TABLE t2; |
|||
DROP TABLE t3; |
|||
include/rpl_reset.inc |
|||
create table t1(a int auto_increment primary key, b int); |
|||
insert into t1 values (NULL, 1); |
|||
set insert_id=5; |
|||
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int) |
|||
master-bin.000001 # Query # # BEGIN |
|||
master-bin.000001 # Table_map # # table_id: # (test.t1) |
|||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Query # # BEGIN |
|||
master-bin.000001 # Table_map # # table_id: # (test.t1) |
|||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F |
|||
master-bin.000001 # Query # # COMMIT |
|||
select * from t1; |
|||
a b |
|||
1 1 |
|||
5 1 |
|||
6 1 |
|||
drop table t1; |
|||
include/sync_slave_sql_with_master.inc |
|||
include/rpl_end.inc |
|||
@ -0,0 +1,51 @@ |
|||
include/master-slave.inc |
|||
Warnings: |
|||
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
|||
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. |
|||
[connection master] |
|||
******** [ MASTER ] ******** |
|||
CREATE DATABASE BUG_37656; |
|||
use BUG_37656; |
|||
show databases like 'BUG_37656'; |
|||
Database (BUG_37656) |
|||
BUG_37656 |
|||
******** [ SLAVE ] ******** |
|||
show databases like 'bug_37656'; |
|||
Database (bug_37656) |
|||
bug_37656 |
|||
******** [ MASTER ] ******** |
|||
CREATE TABLE T1 (a int); |
|||
CREATE TABLE T2 (b int) ENGINE=TokuDB; |
|||
CREATE TABLE T3 (txt TEXT); |
|||
show tables; |
|||
Tables_in_BUG_37656 |
|||
T1 |
|||
T2 |
|||
T3 |
|||
******** [ SLAVE ] ******** |
|||
use bug_37656; |
|||
show tables; |
|||
Tables_in_bug_37656 |
|||
t2 |
|||
t3 |
|||
CREATE TABLE t1 (a INT); |
|||
******** [ MASTER ] ******** |
|||
use BUG_37656; |
|||
INSERT INTO T1 VALUES (1); |
|||
INSERT INTO T2 VALUES (1); |
|||
use test; |
|||
INSERT INTO BUG_37656.T1 VALUES (2); |
|||
INSERT INTO BUG_37656.T2 VALUES (2); |
|||
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE BUG_37656.T3; |
|||
******** [ SLAVE ] ******** |
|||
include/diff_tables.inc [master:BUG_37656.T2, slave:bug_37656.t2] |
|||
include/diff_tables.inc [master:BUG_37656.T3, slave:bug_37656.t3] |
|||
******** [ MASTER ] ******** |
|||
DROP DATABASE BUG_37656; |
|||
include/rpl_reset.inc |
|||
CREATE DATABASE B50653; |
|||
USE B50653; |
|||
CREATE PROCEDURE b50653_proc() BEGIN SELECT 1; END; |
|||
DROP PROCEDURE b50653_proc; |
|||
DROP DATABASE B50653; |
|||
include/rpl_end.inc |
|||
@ -0,0 +1,60 @@ |
|||
include/master-slave.inc |
|||
Warnings: |
|||
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
|||
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. |
|||
[connection master] |
|||
DROP PROCEDURE IF EXISTS test.p1; |
|||
DROP PROCEDURE IF EXISTS test.p2; |
|||
DROP TABLE IF EXISTS test.t1; |
|||
CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=TOKUDB; |
|||
CREATE PROCEDURE test.p1() |
|||
BEGIN |
|||
INSERT INTO test.t1 VALUES (4); |
|||
SELECT get_lock("test", 100); |
|||
UPDATE test.t1 set a=a+4 WHERE a=4; |
|||
END| |
|||
CREATE PROCEDURE test.p2() |
|||
BEGIN |
|||
UPDATE test.t1 SET a=a+1; |
|||
END| |
|||
SELECT get_lock("test", 200); |
|||
get_lock("test", 200) |
|||
1 |
|||
CALL test.p1(); |
|||
CALL test.p2(); |
|||
SELECT release_lock("test"); |
|||
release_lock("test") |
|||
1 |
|||
get_lock("test", 100) |
|||
1 |
|||
SELECT release_lock("test"); |
|||
release_lock("test") |
|||
1 |
|||
SELECT * FROM test.t1; |
|||
a |
|||
5 |
|||
include/sync_slave_sql_with_master.inc |
|||
SELECT * FROM test.t1; |
|||
a |
|||
5 |
|||
DROP TABLE IF EXISTS test.t1; |
|||
CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=TOKUDB; |
|||
CALL test.p2(); |
|||
CALL test.p1(); |
|||
get_lock("test", 100) |
|||
1 |
|||
SELECT release_lock("test"); |
|||
release_lock("test") |
|||
1 |
|||
SELECT * FROM test.t1; |
|||
a |
|||
8 |
|||
include/sync_slave_sql_with_master.inc |
|||
SELECT * FROM test.t1; |
|||
a |
|||
8 |
|||
DROP PROCEDURE IF EXISTS test.p1; |
|||
DROP PROCEDURE IF EXISTS test.p2; |
|||
DROP TABLE IF EXISTS test.t1; |
|||
include/sync_slave_sql_with_master.inc |
|||
include/rpl_end.inc |
|||
@ -0,0 +1,47 @@ |
|||
include/master-slave.inc |
|||
Warnings: |
|||
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
|||
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. |
|||
[connection master] |
|||
DROP TABLE IF EXISTS t1; |
|||
DROP TABLE IF EXISTS t2; |
|||
DROP PROCEDURE IF EXISTS p1; |
|||
DROP PROCEDURE IF EXISTS p2; |
|||
CREATE TABLE IF NOT EXISTS t1(name CHAR(16), birth DATE,PRIMARY KEY(name))ENGINE=TokuDB; |
|||
CREATE TABLE IF NOT EXISTS t2(name CHAR(16), age INT ,PRIMARY KEY(name))ENGINE=TokuDB; |
|||
CREATE PROCEDURE p1() |
|||
BEGIN |
|||
DECLARE done INT DEFAULT 0; |
|||
DECLARE spa CHAR(16); |
|||
DECLARE spb INT; |
|||
DECLARE cur1 CURSOR FOR SELECT name, |
|||
(YEAR(CURDATE())-YEAR(birth))-(RIGHT(CURDATE(),5)<RIGHT(birth,5)) |
|||
FROM t1; |
|||
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; |
|||
OPEN cur1; |
|||
SET AUTOCOMMIT=0; |
|||
REPEAT |
|||
FETCH cur1 INTO spa, spb; |
|||
IF NOT done THEN |
|||
START TRANSACTION; |
|||
INSERT INTO t2 VALUES (spa,spb); |
|||
COMMIT; |
|||
END IF; |
|||
UNTIL done END REPEAT; |
|||
SET AUTOCOMMIT=1; |
|||
CLOSE cur1; |
|||
END| |
|||
CREATE PROCEDURE p2() |
|||
BEGIN |
|||
INSERT INTO t1 VALUES ('MySQL','1993-02-04'),('ROCKS', '1990-08-27'),('Texas', '1999-03-30'),('kyle','2005-1-1'); |
|||
END| |
|||
CALL p2(); |
|||
include/sync_slave_sql_with_master.inc |
|||
CALL p1(); |
|||
include/sync_slave_sql_with_master.inc |
|||
DROP TABLE t1; |
|||
DROP TABLE t2; |
|||
DROP PROCEDURE p1; |
|||
DROP PROCEDURE p2; |
|||
include/sync_slave_sql_with_master.inc |
|||
include/rpl_end.inc |
|||
@ -0,0 +1,32 @@ |
|||
include/master-slave.inc |
|||
Warnings: |
|||
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
|||
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. |
|||
[connection master] |
|||
DROP TRIGGER test.t1_bi_t2; |
|||
DROP TABLE IF EXISTS test.t1; |
|||
DROP TABLE IF EXISTS test.t2; |
|||
CREATE TABLE test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d FLOAT, PRIMARY KEY(n))ENGINE=TOKUDB; |
|||
CREATE TABLE test.t2 (n MEDIUMINT NOT NULL, f FLOAT, PRIMARY KEY(n))ENGINE=TOKUDB; |
|||
CREATE TRIGGER test.t1_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW INSERT INTO test.t1 VALUES (NULL, 1.234)// |
|||
INSERT INTO test.t2 VALUES (1, 0.0); |
|||
INSERT INTO test.t2 VALUES (1, 0.0); |
|||
Got one of the listed errors |
|||
select * from test.t1; |
|||
n d |
|||
1 1.234 |
|||
select * from test.t2; |
|||
n f |
|||
1 0 |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from test.t1; |
|||
n d |
|||
1 1.234 |
|||
select * from test.t2; |
|||
n f |
|||
1 0 |
|||
DROP TRIGGER test.t1_bi_t2; |
|||
DROP TABLE test.t1; |
|||
DROP TABLE test.t2; |
|||
include/sync_slave_sql_with_master.inc |
|||
include/rpl_end.inc |
|||
@ -0,0 +1,274 @@ |
|||
include/master-slave.inc |
|||
Warnings: |
|||
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
|||
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. |
|||
[connection master] |
|||
include/sync_slave_sql_with_master.inc |
|||
include/stop_slave.inc |
|||
include/wait_for_slave_to_stop.inc |
|||
reset master; |
|||
reset slave; |
|||
start slave; |
|||
include/wait_for_slave_to_start.inc |
|||
create table t1(n int not null auto_increment primary key)ENGINE=TokuDB; |
|||
insert into t1 values (NULL); |
|||
drop table t1; |
|||
create table t1 (word char(20) not null)ENGINE=TokuDB; |
|||
load data infile 'LOAD_FILE' into table t1 ignore 1 lines; |
|||
select count(*) from t1; |
|||
count(*) |
|||
69 |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB |
|||
master-bin.000001 # Query # # BEGIN |
|||
master-bin.000001 # Intvar # # INSERT_ID=1 |
|||
master-bin.000001 # Query # # use `test`; insert into t1 values (NULL) |
|||
master-bin.000001 # Xid # # COMMIT /* XID */ |
|||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ |
|||
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=TokuDB |
|||
master-bin.000001 # Query # # BEGIN |
|||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# |
|||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=# |
|||
master-bin.000001 # Xid # # COMMIT /* XID */ |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
master-bin.000001 # Query # # BEGIN |
|||
master-bin.000001 # Intvar # # INSERT_ID=1 |
|||
master-bin.000001 # Query # # use `test`; insert into t1 values (NULL) |
|||
master-bin.000001 # Xid # # COMMIT /* XID */ |
|||
flush logs; |
|||
create table t3 (a int)ENGINE=TokuDB; |
|||
select * from t1 order by 1 asc; |
|||
word |
|||
Aarhus |
|||
Aaron |
|||
Aaron |
|||
Ababa |
|||
Ababa |
|||
aback |
|||
aback |
|||
abaft |
|||
abaft |
|||
abandon |
|||
abandon |
|||
abandoned |
|||
abandoned |
|||
abandoning |
|||
abandoning |
|||
abandonment |
|||
abandonment |
|||
abandons |
|||
abandons |
|||
abase |
|||
abased |
|||
abasement |
|||
abasements |
|||
abases |
|||
abash |
|||
abashed |
|||
abashes |
|||
abashing |
|||
abasing |
|||
abate |
|||
abated |
|||
abatement |
|||
abatements |
|||
abater |
|||
abates |
|||
abating |
|||
Abba |
|||
abbe |
|||
abbey |
|||
abbeys |
|||
abbot |
|||
abbots |
|||
Abbott |
|||
abbreviate |
|||
abbreviated |
|||
abbreviates |
|||
abbreviating |
|||
abbreviation |
|||
abbreviations |
|||
Abby |
|||
abdomen |
|||
abdomens |
|||
abdominal |
|||
abduct |
|||
abducted |
|||
abduction |
|||
abductions |
|||
abductor |
|||
abductors |
|||
abducts |
|||
Abe |
|||
abed |
|||
Abel |
|||
Abelian |
|||
Abelson |
|||
Aberdeen |
|||
Abernathy |
|||
aberrant |
|||
aberration |
|||
include/sync_slave_sql_with_master.inc |
|||
select * from t1 order by 1 asc; |
|||
word |
|||
Aarhus |
|||
Aaron |
|||
Aaron |
|||
Ababa |
|||
Ababa |
|||
aback |
|||
aback |
|||
abaft |
|||
abaft |
|||
abandon |
|||
abandon |
|||
abandoned |
|||
abandoned |
|||
abandoning |
|||
abandoning |
|||
abandonment |
|||
abandonment |
|||
abandons |
|||
abandons |
|||
abase |
|||
abased |
|||
abasement |
|||
abasements |
|||
abases |
|||
abash |
|||
abashed |
|||
abashes |
|||
abashing |
|||
abasing |
|||
abate |
|||
abated |
|||
abatement |
|||
abatements |
|||
abater |
|||
abates |
|||
abating |
|||
Abba |
|||
abbe |
|||
abbey |
|||
abbeys |
|||
abbot |
|||
abbots |
|||
Abbott |
|||
abbreviate |
|||
abbreviated |
|||
abbreviates |
|||
abbreviating |
|||
abbreviation |
|||
abbreviations |
|||
Abby |
|||
abdomen |
|||
abdomens |
|||
abdominal |
|||
abduct |
|||
abducted |
|||
abduction |
|||
abductions |
|||
abductor |
|||
abductors |
|||
abducts |
|||
Abe |
|||
abed |
|||
Abel |
|||
Abelian |
|||
Abelson |
|||
Aberdeen |
|||
Abernathy |
|||
aberrant |
|||
aberration |
|||
flush logs; |
|||
include/stop_slave.inc |
|||
include/start_slave.inc |
|||
create table t2 (n int)ENGINE=TokuDB; |
|||
insert into t2 values (1); |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB |
|||
master-bin.000001 # Query # # BEGIN |
|||
master-bin.000001 # Intvar # # INSERT_ID=1 |
|||
master-bin.000001 # Query # # use `test`; insert into t1 values (NULL) |
|||
master-bin.000001 # Xid # # COMMIT /* XID */ |
|||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ |
|||
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=TokuDB |
|||
master-bin.000001 # Query # # BEGIN |
|||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# |
|||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=# |
|||
master-bin.000001 # Xid # # COMMIT /* XID */ |
|||
master-bin.000001 # Rotate # # master-bin.000002;pos=POS |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=TokuDB |
|||
master-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=TokuDB |
|||
master-bin.000002 # Query # # BEGIN |
|||
master-bin.000002 # Query # # use `test`; insert into t2 values (1) |
|||
master-bin.000002 # Xid # # COMMIT /* XID */ |
|||
show binary logs; |
|||
Log_name File_size |
|||
master-bin.000001 # |
|||
master-bin.000002 # |
|||
include/sync_slave_sql_with_master.inc |
|||
show binary logs; |
|||
Log_name File_size |
|||
slave-bin.000001 # |
|||
slave-bin.000002 # |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
slave-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB |
|||
slave-bin.000001 # Query # # BEGIN |
|||
slave-bin.000001 # Intvar # # INSERT_ID=1 |
|||
slave-bin.000001 # Query # # use `test`; insert into t1 values (NULL) |
|||
slave-bin.000001 # Xid # # COMMIT /* XID */ |
|||
slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ |
|||
slave-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=TokuDB |
|||
slave-bin.000001 # Query # # BEGIN |
|||
slave-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# |
|||
slave-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../tmp/SQL_LOAD-<SERVER UUID>-<MASTER server-id>-<file-id>.<extension>' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=# |
|||
slave-bin.000001 # Xid # # COMMIT /* XID */ |
|||
slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=TokuDB |
|||
slave-bin.000001 # Rotate # # slave-bin.000002;pos=POS |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=TokuDB |
|||
slave-bin.000002 # Query # # BEGIN |
|||
slave-bin.000002 # Query # # use `test`; insert into t2 values (1) |
|||
slave-bin.000002 # Xid # # COMMIT /* XID */ |
|||
include/check_slave_is_running.inc |
|||
show binlog events in 'slave-bin.000005' from 4; |
|||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log |
|||
DROP TABLE t1; |
|||
DROP TABLE t2; |
|||
DROP TABLE t3; |
|||
include/rpl_reset.inc |
|||
create table t1(a int auto_increment primary key, b int); |
|||
insert into t1 values (NULL, 1); |
|||
set insert_id=5; |
|||
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int) |
|||
master-bin.000001 # Query # # BEGIN |
|||
master-bin.000001 # Intvar # # INSERT_ID=1 |
|||
master-bin.000001 # Query # # use `test`; insert into t1 values (NULL, 1) |
|||
master-bin.000001 # Query # # COMMIT |
|||
master-bin.000001 # Query # # BEGIN |
|||
master-bin.000001 # Intvar # # LAST_INSERT_ID=1 |
|||
master-bin.000001 # Intvar # # INSERT_ID=5 |
|||
master-bin.000001 # Query # # use `test`; insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()) |
|||
master-bin.000001 # Query # # COMMIT |
|||
select * from t1; |
|||
a b |
|||
1 1 |
|||
5 1 |
|||
6 1 |
|||
drop table t1; |
|||
include/sync_slave_sql_with_master.inc |
|||
include/rpl_end.inc |
|||
1773
storage/tokudb/mysql-test/tokudb_rpl/r/rpl_tokudb_stm_mixed_crash_safe.result
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,48 @@ |
|||
include/master-slave.inc |
|||
Warnings: |
|||
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
|||
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. |
|||
[connection master] |
|||
******** [ MASTER ] ******** |
|||
CREATE DATABASE BUG_37656; |
|||
use BUG_37656; |
|||
show databases like 'BUG_37656'; |
|||
Database (BUG_37656) |
|||
BUG_37656 |
|||
******** [ SLAVE ] ******** |
|||
show databases like 'bug_37656'; |
|||
Database (bug_37656) |
|||
bug_37656 |
|||
******** [ MASTER ] ******** |
|||
CREATE TABLE T1 (a int); |
|||
CREATE TABLE T2 (b int) ENGINE=TokuDB; |
|||
CREATE TABLE T3 (txt TEXT); |
|||
show tables; |
|||
Tables_in_BUG_37656 |
|||
T1 |
|||
T2 |
|||
T3 |
|||
******** [ SLAVE ] ******** |
|||
use bug_37656; |
|||
show tables; |
|||
Tables_in_bug_37656 |
|||
t2 |
|||
t3 |
|||
CREATE TABLE t1 (a INT); |
|||
******** [ MASTER ] ******** |
|||
use BUG_37656; |
|||
INSERT INTO T1 VALUES (1); |
|||
INSERT INTO T2 VALUES (1); |
|||
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE BUG_37656.T3; |
|||
******** [ SLAVE ] ******** |
|||
include/diff_tables.inc [master:BUG_37656.T2, slave:bug_37656.t2] |
|||
include/diff_tables.inc [master:BUG_37656.T3, slave:bug_37656.t3] |
|||
******** [ MASTER ] ******** |
|||
DROP DATABASE BUG_37656; |
|||
include/rpl_reset.inc |
|||
CREATE DATABASE B50653; |
|||
USE B50653; |
|||
CREATE PROCEDURE b50653_proc() BEGIN SELECT 1; END; |
|||
DROP PROCEDURE b50653_proc; |
|||
DROP DATABASE B50653; |
|||
include/rpl_end.inc |
|||
@ -1,11 +1,11 @@ |
|||
-- source include/have_tokudb.inc |
|||
-- source include/have_binlog_format_row.inc |
|||
-- source include/master-slave.inc |
|||
--source include/have_tokudb.inc |
|||
--source include/have_binlog_format_row.inc |
|||
--source include/master-slave.inc |
|||
|
|||
connection slave; |
|||
let $bit_field_special = ALL_LOSSY; |
|||
let $type= 'INNODB' ; |
|||
let $extra_index= ; |
|||
-- source extra/rpl_tests/rpl_row_basic.test |
|||
let $type = 'TokuDB'; |
|||
let $extra_index = ; |
|||
--source extra/rpl_tests/rpl_row_basic.test |
|||
|
|||
--source include/rpl_end.inc |
|||
@ -0,0 +1,6 @@ |
|||
-- source include/not_ndb_default.inc |
|||
-- source include/have_tokudb.inc |
|||
-- source include/master-slave.inc |
|||
let $engine_type=tokudb; |
|||
-- source extra/rpl_tests/rpl_commit_after_flush.test |
|||
--source include/rpl_end.inc |
|||
@ -0,0 +1 @@ |
|||
${?PB_HOST_SPECIFIC_MYSQLD_ARGS} |
|||
@ -0,0 +1 @@ |
|||
${?PB_HOST_SPECIFIC_MYSQLD_ARGS} |
|||
@ -0,0 +1,7 @@ |
|||
################################# |
|||
# Wrapper for rpl_insert_id.test# |
|||
################################# |
|||
-- source include/not_ndb_default.inc |
|||
-- source include/have_tokudb.inc |
|||
let $engine_type=tokudb; |
|||
-- source extra/rpl_tests/rpl_insert_id.test |
|||
@ -0,0 +1,7 @@ |
|||
################################# |
|||
# Wrapper for rpl_insert_id.test# |
|||
################################# |
|||
-- source include/not_ndb_default.inc |
|||
-- source include/have_tokudb.inc |
|||
let $engine_type=tokudb; |
|||
-- source extra/rpl_tests/rpl_insert_id_pk.test |
|||
@ -0,0 +1,4 @@ |
|||
-- source include/not_ndb_default.inc |
|||
-- source include/have_tokudb.inc |
|||
let $engine_type=TokuDB; |
|||
-- source extra/rpl_tests/rpl_multi_update.test |
|||
@ -0,0 +1 @@ |
|||
--replicate-ignore-table=nothing.sensible |
|||
@ -0,0 +1,14 @@ |
|||
####################################################### |
|||
# Wrapper for rpl_multi_update2.test to allow multi # |
|||
# Engines to reuse test code. By JBM 2006-02-15 # |
|||
# Added comments section and to skip when ndb is # |
|||
# Default engine. # |
|||
####################################################### |
|||
--source include/not_gtid_enabled.inc |
|||
--source include/not_ndb_default.inc |
|||
--source include/have_tokudb.inc |
|||
--source include/master-slave.inc |
|||
call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT'); |
|||
let $engine_type=TokuDB; |
|||
--source extra/rpl_tests/rpl_multi_update2.test |
|||
--source include/rpl_end.inc |
|||
@ -0,0 +1,13 @@ |
|||
####################################################### |
|||
# Wrapper for rpl_multi_update3.test to allow multi # |
|||
# Engines to reuse test code. By JBM 2006-02-15 # |
|||
# Added comments section and to skip when ndb is # |
|||
# Default engine. # |
|||
####################################################### |
|||
--source include/have_tokudb.inc |
|||
--source include/not_ndb_default.inc |
|||
--source include/master-slave.inc |
|||
call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.'); |
|||
let $engine_type=TokuDB; |
|||
--source extra/rpl_tests/rpl_multi_update3.test |
|||
--source include/rpl_end.inc |
|||
@ -0,0 +1 @@ |
|||
--transaction_isolation=READ-COMMITTED |
|||
@ -0,0 +1 @@ |
|||
--skip-slave-start --relay-log-info-repository=TABLE --relay-log-recovery=1 --transaction_isolation=READ-COMMITTED |
|||
@ -0,0 +1,19 @@ |
|||
# This test takes long time, so only run it with the --big-test mtr-flag. |
|||
--source include/big_test.inc |
|||
--source include/not_embedded.inc |
|||
--source include/not_valgrind.inc |
|||
--source include/have_debug.inc |
|||
--source include/have_tokudb.inc |
|||
--source include/have_binlog_format_row.inc |
|||
--source include/not_mts_slave_parallel_workers.inc |
|||
--source include/master-slave.inc |
|||
|
|||
call mtr.add_suppression('Attempting backtrace'); |
|||
call mtr.add_suppression("Recovery from master pos .* and file master-bin.000001"); |
|||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); |
|||
call mtr.add_suppression(".* InnoDB: Warning: allocated tablespace .*, old maximum was .*"); |
|||
|
|||
let $engine_type=TokuDB; |
|||
let $database_name=test; |
|||
--source extra/rpl_tests/rpl_crash_safe.test |
|||
--source include/rpl_end.inc |
|||
@ -0,0 +1 @@ |
|||
!include suite/rpl/t/rpl_row_img.cnf |
|||
@ -0,0 +1,53 @@ |
|||
#Want to skip this test from daily Valgrind execution |
|||
--source include/no_valgrind_without_big.inc |
|||
|
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
# |
|||
# This file contains tests for WL#5096. |
|||
# |
|||
|
|||
-- let $rpl_topology= 1->2->3 |
|||
-- source include/rpl_init.inc |
|||
-- source include/have_binlog_format_row.inc |
|||
|
|||
# |
|||
# WL#5096 Tests. |
|||
# |
|||
|
|||
# |
|||
# Tests combinations of binlog-row-image against mixes of MyISAM and InnoDB |
|||
# storage engines on all three servers. |
|||
# |
|||
# All the combinarions need not to be separated into their own files as |
|||
# the tests for indexes and engines mixes are, because noblobs test script |
|||
# does not take too long time, thence we do not risk triggering PB2 timeout |
|||
# on valgrind runs. |
|||
# |
|||
|
|||
## NOBLOB |
|||
|
|||
-- let $row_img_set=server_1:NOBLOB:N,server_2:NOBLOB:Y,server_3:NOBLOB:Y |
|||
-- source include/rpl_row_img_set.inc |
|||
|
|||
-- let $row_img_test_script= extra/rpl_tests/rpl_row_img_blobs.test |
|||
-- source suite/tokudb.rpl/include/rpl_tokudb_row_img_general_loop.inc |
|||
|
|||
## MINIMAL |
|||
|
|||
-- let $row_img_set=server_1:MINIMAL:N,server_2:MINIMAL:Y,server_3:MINIMAL:Y |
|||
-- source include/rpl_row_img_set.inc |
|||
|
|||
-- let $row_img_test_script= extra/rpl_tests/rpl_row_img_blobs.test |
|||
-- source suite/tokudb.rpl/include/rpl_tokudb_row_img_general_loop.inc |
|||
|
|||
## FULL |
|||
|
|||
-- let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y |
|||
-- source include/rpl_row_img_set.inc |
|||
|
|||
-- let $row_img_test_script= extra/rpl_tests/rpl_row_img_blobs.test |
|||
-- source suite/tokudb.rpl/include/rpl_tokudb_row_img_general_loop.inc |
|||
|
|||
|
|||
-- source include/rpl_end.inc |
|||
@ -0,0 +1 @@ |
|||
!include suite/rpl/t/rpl_row_img.cnf |
|||
@ -0,0 +1,50 @@ |
|||
#Want to skip this test from daily Valgrind execution |
|||
-- source include/no_valgrind_without_big.inc |
|||
# |
|||
# This file contains tests for WL#5096 and bug fixes. |
|||
# |
|||
|
|||
-- source include/have_binlog_format_row.inc |
|||
-- source include/not_gtid_enabled.inc |
|||
|
|||
-- let $rpl_topology= 1->2->3 |
|||
-- source include/rpl_init.inc |
|||
|
|||
-- connection server_1 |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
-- connection server_2 |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
-- connection server_3 |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
-- connection server_1 |
|||
|
|||
# |
|||
# WL#5096 |
|||
# |
|||
|
|||
# |
|||
# Tests for different storage engines on each server, |
|||
# but same index structure on tables. The tests are conducted |
|||
# using FULL binlog-row-image on all servers. |
|||
# |
|||
|
|||
-- let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y |
|||
-- source include/rpl_row_img_set.inc |
|||
|
|||
-- let $row_img_test_script= extra/rpl_tests/rpl_row_img.test |
|||
-- source suite/tokudb.rpl/include/rpl_tokudb_row_img_general_loop.inc |
|||
|
|||
# |
|||
# BUG#49100 |
|||
# |
|||
|
|||
-- echo ### Testing with TokuDB storage engine |
|||
|
|||
-- let $engine=TokuDB |
|||
-- source extra/rpl_tests/rpl_row_empty_imgs.test |
|||
|
|||
|
|||
-- source include/rpl_end.inc |
|||
@ -0,0 +1 @@ |
|||
!include suite/rpl/t/rpl_row_img.cnf |
|||
@ -0,0 +1,42 @@ |
|||
#Want to skip this test from daily Valgrind execution |
|||
-- source include/no_valgrind_without_big.inc |
|||
# |
|||
# This file contains tests for WL#5096 and bug fixes. |
|||
# |
|||
|
|||
-- let $rpl_topology= 1->2->3 |
|||
-- source include/rpl_init.inc |
|||
-- source include/have_binlog_format_row.inc |
|||
|
|||
-- connection server_1 |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
-- connection server_2 |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
-- connection server_3 |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
-- connection server_1 |
|||
|
|||
# |
|||
# WL#5096 |
|||
# |
|||
|
|||
# |
|||
# Tests for different storage engines on each server, |
|||
# but same index structure on tables. The tests are conducted |
|||
# using MINIMAL binlog-row-image on all servers. |
|||
# |
|||
|
|||
-- let $row_img_set=server_1:MINIMAL:N,server_2:MINIMAL:Y,server_3:MINIMAL:Y |
|||
-- source include/rpl_row_img_set.inc |
|||
|
|||
-- let $row_img_test_script= extra/rpl_tests/rpl_row_img.test |
|||
-- source suite/tokudb.rpl/include/rpl_tokudb_row_img_general_loop.inc |
|||
|
|||
-- let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y |
|||
-- source include/rpl_row_img_set.inc |
|||
|
|||
|
|||
-- source include/rpl_end.inc |
|||
@ -0,0 +1 @@ |
|||
!include suite/rpl/t/rpl_row_img.cnf |
|||
@ -0,0 +1,42 @@ |
|||
#Want to skip this test from daily Valgrind execution |
|||
-- source include/no_valgrind_without_big.inc |
|||
# |
|||
# This file contains tests for WL#5096 and bug fixes. |
|||
# |
|||
|
|||
-- let $rpl_topology= 1->2->3 |
|||
-- source include/rpl_init.inc |
|||
-- source include/have_binlog_format_row.inc |
|||
|
|||
-- connection server_1 |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
-- connection server_2 |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
-- connection server_3 |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
-- connection server_1 |
|||
|
|||
# |
|||
# WL#5096 |
|||
# |
|||
|
|||
# |
|||
# Tests for different storage engines on each server, |
|||
# but same index structure on tables. The tests are conducted |
|||
# using NOBLOB binlog-row-image on all servers. |
|||
# |
|||
|
|||
-- let $row_img_set=server_1:NOBLOB:N,server_2:NOBLOB:Y,server_3:NOBLOB:Y |
|||
-- source include/rpl_row_img_set.inc |
|||
|
|||
-- let $row_img_test_script= extra/rpl_tests/rpl_row_img.test |
|||
-- source suite/tokudb.rpl/include/rpl_tokudb_row_img_general_loop.inc |
|||
|
|||
-- let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y |
|||
-- source include/rpl_row_img_set.inc |
|||
|
|||
|
|||
-- source include/rpl_end.inc |
|||
@ -0,0 +1 @@ |
|||
!include suite/rpl/t/rpl_row_img.cnf |
|||
@ -0,0 +1,38 @@ |
|||
#Want to skip this test from daily Valgrind execution |
|||
-- source include/no_valgrind_without_big.inc |
|||
# |
|||
# This file contains tests for WL#5096. |
|||
# |
|||
|
|||
-- let $rpl_topology= 1->2->3 |
|||
-- source include/rpl_init.inc |
|||
-- source include/have_binlog_format_row.inc |
|||
|
|||
-- connection server_1 |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
-- connection server_2 |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
-- connection server_3 |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
-- connection server_1 |
|||
|
|||
# |
|||
# WL#5096 Tests. |
|||
# |
|||
|
|||
# |
|||
# Tests FULL image against a mix of MyISAM and InnoDB engines on |
|||
# each of the three servers. |
|||
# |
|||
|
|||
-- let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y |
|||
-- source include/rpl_row_img_set.inc |
|||
|
|||
-- let $row_img_test_script= extra/rpl_tests/rpl_row_img_diff_indexes.test |
|||
-- source suite/tokudb.rpl/include/rpl_tokudb_row_img_general_loop.inc |
|||
|
|||
|
|||
-- source include/rpl_end.inc |
|||
@ -0,0 +1 @@ |
|||
!include suite/rpl/t/rpl_row_img.cnf |
|||
@ -0,0 +1,41 @@ |
|||
#Want to skip this test from daily Valgrind execution |
|||
--source include/no_valgrind_without_big.inc |
|||
# |
|||
# This file contains tests for WL#5096. |
|||
# |
|||
|
|||
--let $rpl_topology= 1->2->3 |
|||
--source include/rpl_init.inc |
|||
-- source include/have_binlog_format_row.inc |
|||
|
|||
-- connection server_1 |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
-- connection server_2 |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
-- connection server_3 |
|||
-- source include/have_innodb.inc |
|||
-- source include/have_tokudb.inc |
|||
-- connection server_1 |
|||
|
|||
# |
|||
# WL#5096 Tests. |
|||
# |
|||
|
|||
# |
|||
# Tests MINIMAL image against a mix of MyISAM and InnoDB engines on |
|||
# each of the three servers. |
|||
# |
|||
|
|||
-- let $row_img_set=server_1:MINIMAL:N,server_2:MINIMAL:Y,server_3:MINIMAL:Y |
|||
-- source include/rpl_row_img_set.inc |
|||
|
|||
-- let $row_img_test_script= extra/rpl_tests/rpl_row_img_diff_indexes.test |
|||
-- source suite/tokudb.rpl/include/rpl_tokudb_row_img_general_loop.inc |
|||
|
|||
-- let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y |
|||
-- source include/rpl_row_img_set.inc |
|||
|
|||
|
|||
-- source include/rpl_end.inc |
|||
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue