2
The following SQL statements need to be executed
3
directly to the backend server, otherwise they will affect the
8
'grant select,insert,update,delete on test.* to user1@localhost identified by "user"',
9
'grant select,insert,update,delete on test.* to user2@localhost identified by "user"',
10
'drop table if exists test.t1',
11
'create table test.t1 (id int)'
15
-- starts a fake replication system
17
simulate_replication()
20
local rw_splitting_options = {
21
["proxy-backend-addresses"] = PROXY_HOST .. ':' .. PROXY_MASTER_PORT ,
22
["proxy-read-only-backend-addresses"] = PROXY_HOST .. ':' .. PROXY_SLAVE_PORT ,
23
["proxy-address"] = PROXY_HOST .. ':' .. PROXY_PORT ,
24
["admin-address"] = PROXY_HOST .. ':' .. ADMIN_PORT ,
25
["pid-file"] = PROXY_PIDFILE,
26
["proxy-lua-script"] = 'bug_30867.lua',
30
-- starts a Proxy with r/w splitting
32
start_proxy('bug_30867', rw_splitting_options)