Commit Graph

350 Commits

Author SHA1 Message Date
jingxiaobing
5c9823738b remote config support variables.json 2018-07-27 14:50:21 +08:00
wangbin579
72c78b9620 Fix problems related to affected rows when update backends 2018-07-27 10:41:40 +08:00
wangbin579
8a8a4a3d1c Fix event_set problems 2018-07-27 09:23:04 +08:00
wangbin579
2374bb00d3 Merge branch 'master' into multi-process-version2 2018-07-26 14:07:06 +08:00
wangbin579
de9e9299e0 Fix read AGAIN related problems 2018-07-26 10:11:23 +08:00
wangbin579
8620fc8ef5 Close listen fd without event del when creating new workers 2018-07-25 17:07:42 +08:00
jingxiaobing
0bd76905fe fix auth switch response duplication, it happens on PHP malformed handshake 2018-07-25 16:28:50 +08:00
wangbin579
7b657f139b Merge master and admin processes 2018-07-25 14:49:28 +08:00
wangbin579
bd8fa43055 Optimize log 2018-07-24 18:17:20 +08:00
wangbin579
b40a587d28 Merge master 2018-07-23 15:08:28 +08:00
wangbin579
9dd848afae Set dist tran false when meeting 'set autocommit=1' without needing to send 2018-07-23 11:33:21 +08:00
wangbin579
9aad33dc8c Refix the problem related to 'in single tran, but visit multi servers' 2018-07-20 10:33:11 +08:00
wangbin579
dd16670369 Add process id for some admin result 2018-07-19 15:37:30 +08:00
wangbin579
6bbb8c4713 Merge branch 'master' into multi-process 2018-07-19 14:56:55 +08:00
wangbin579
229c080cf0 Fix typo 2018-07-19 14:56:35 +08:00
wangbin579
21bb21e5e6 Merge branch 'master' into multi-process 2018-07-19 11:01:27 +08:00
wangbin579
3ec1805498 Fix more problems for two workers 2018-07-19 11:00:33 +08:00
wangbin579
b6e144c58c Fix some problems for two workers 2018-07-19 09:25:06 +08:00
wangbin579
b92a4dbc85 Add config for worker's admin conn 2018-07-18 18:42:15 +08:00
jingxiaobing
bb752907f0 admin: CREATE SINGLE TABLE 2018-07-18 18:26:55 +08:00
wangbin579
a612c07ef3 Fix some problems related admin sql resp merging 2018-07-18 17:38:40 +08:00
tsthght
600144c937 refine 'config reload' error message 2018-07-18 16:11:10 +08:00
wangbin579
4a8bafb621 Fix packet id problems for admin merging 2018-07-17 13:01:52 +08:00
wangbin579
eb288a08cb This version could do admin login 2018-07-17 10:52:20 +08:00
wangbin579
5779dadbf5 Add framework for retrieving resp info 2018-07-16 18:37:36 +08:00
wangbin579
2c55648eb9 Merge branch 'master' into multi-process 2018-07-16 14:46:24 +08:00
wangbin579
c169508bdc call create conns after 30 seconds 2018-07-13 14:49:50 +08:00
wangbin579
faf1e8d994 Do merge 2018-07-13 14:40:28 +08:00
tsthght
1db027952c use g_get_current_dir instead of get_current_dir_name 2018-07-13 13:37:57 +08:00
wangbin579
f89e5cc939 Fix several issues related to trans 2018-07-13 12:04:37 +08:00
wangbin579
bbe5f4e202 Fix several issues related to trans 2018-07-13 12:02:45 +08:00
wangbin579
16391089da Close conn when meeting 'in single tran, but visit multi servers for con' 2018-07-12 14:17:13 +08:00
jingxiaobing
b2abd4075e add option: allow-nested-subquery 2018-07-11 18:30:59 +08:00
wangbin579
023acf7634 Merge branch 'master' into multi-process 2018-07-10 09:17:46 +08:00
wangbin579
2d8b011c27 Add check when assigning default db 2018-07-10 09:03:38 +08:00
wangbin579
e640c14b84 Merge branch 'master' of https://github.com/Lede-Inc/cetus 2018-07-09 16:44:54 +08:00
wangbin579
beeca02c30 Fix change user problems 2018-07-09 16:44:27 +08:00
liuyanlei25
089f94b18f modify monitor: default check slave delay; default slave-delay-down=10s,slave-delay-recover=1s; change check_slave_delay_msec truncation;admin hascheck_slave_delay_msec only when cetus has salve and monitor delays 2018-07-09 16:36:47 +08:00
wangbin579
debbaa4166 Do not close admin client prematurely when maintained 2018-07-09 15:48:34 +08:00
wangbin579
a85adde8a6 Fix seg fault revealed by tcpcopy 2018-07-09 10:53:11 +08:00
wangbin579
9694bac985 Add event for timer 2018-07-06 20:10:02 +08:00
wangbin579
a15dc6e3c8 Close client connection gracefully when maintaining 2018-07-06 18:31:48 +08:00
wangbin579
ecde9b345e Purify sharding plan when reused 2018-07-06 18:02:13 +08:00
jingxiaobing
311f2a6560 fix bug: sharding key of IN-expr 2018-07-06 11:13:08 +08:00
wangbin579
66a0f3fba5 Add admin worker_channel 2018-07-05 16:20:04 +08:00
wangbin579
809b0608f9 Change channel to parent_child_channel 2018-07-05 15:19:53 +08:00
wangbin579
f1a2934f73 Add code for admin process 2018-07-04 17:07:11 +08:00
wangbin579
5743ea5441 Add code for sending sql to workers 2018-07-04 14:13:50 +08:00
wangbin579
323f1e46f9 Merge branch 'master' into multi-process 2018-07-03 10:09:55 +08:00
wangbin579
72e9565780 Fix segfault problems revealed by tcpcopy 2018-07-03 09:27:40 +08:00
wangbin579
aaac1cbc0c Merge branch 'master' into multi-process 2018-07-02 16:48:30 +08:00
wangbin579
658f963d5c Optimize create connections using event timers 2018-07-02 15:10:00 +08:00
jingxiaobing
0370e73bc6 modulo of negative number 2018-07-02 11:38:42 +08:00
wangbin579
85a526a818 Fix prepare stmt problems when slave > 1 2018-07-02 10:31:41 +08:00
wangbin579
4efc464e2c Try to fix prepare stmt problems 2018-06-29 16:38:21 +08:00
wangbin579
41d8430749 Fix connection creation revealed by user and coredump problems revealed by tcpcopy 2018-06-29 12:30:54 +08:00
wangbin579
5f39b9d0e1 Fix help 2018-06-28 17:32:54 +08:00
wangbin579
ecfcf5e180 Add sql result merge for admin 2018-06-28 17:30:48 +08:00
wangbin579
bf197d1d68 Fix compile warnings 2018-06-26 11:01:22 +08:00
wangbin579
697f3b36d9 Fix warnings 2018-06-22 16:32:16 +08:00
wangbin579
42d59d4a52 Change log and fix warnings,etc 2018-06-22 16:26:29 +08:00
wangbin579
3516a8abe6 merge master 2018-06-22 16:02:03 +08:00
wangbin579
54268b7afd Add log for debug 2018-06-22 11:33:28 +08:00
jingxiaobing
67e86045f2 Merge branch 'shard-online', refactor admin-plugin 2018-06-21 16:22:40 +08:00
wangbin579
862bc135d6 Add signal processing for multi-process 2018-06-21 11:14:54 +08:00
jingxiaobing
ed43510977 reject single table subquery in WHERE clause 2018-06-20 16:42:39 +08:00
jingxiaobing
692aa2780e fix bug: read-only server should choose from active backends 2018-06-14 15:47:29 +08:00
jingxiaobing
48613d0481 admin: work around for navicat login 2018-06-11 11:40:23 +08:00
jingxiaobing
afa51c3baa admin: check param for UPDATE BACKENDS; add con_timeout 2018-06-07 15:15:32 +08:00
jingxiaobing
05fe02ea2c remove libevent, use libev 2018-06-06 16:05:33 +08:00
jingxiaobing
f246fa2ff7 admin: follow changes from master, "save settings" 2018-06-05 14:52:00 +08:00
jingxiaobing
5fb0bfbdde admin: use semicolon to end a SQL 2018-06-05 11:38:19 +08:00
jingxiaobing
f3e733c1ab Merge branch 'master' into shard-online
Conflicts:
	plugins/admin/admin-plugin.c
2018-06-04 16:57:37 +08:00
wangbin579
c13f742ce2 Don't set backend state when meeting connection errors 2018-06-04 14:28:49 +08:00
jingxiaobing
09bf0f6444 follow changes: show maintain; admin version in SHLO 2018-06-04 11:00:48 +08:00
wangbin579
b2a8bde98d Create conns when backend's state is changed to up,etc 2018-06-04 09:37:52 +08:00
tsthght
3a3c41bcf1 fix bug: 'update backends set' can cause problem in some cases 2018-06-01 18:01:35 +08:00
wangbin579
e4391b4152 Add read timeout processing for admin 2018-06-01 17:06:50 +08:00
jingxiaobing
6328fb854b admin config reload user 2018-06-01 15:47:32 +08:00
jingxiaobing
d6fc0a78df follow changes of admin_set_config; add admin_config_reload 2018-06-01 14:15:10 +08:00
wangbin579
cac785e2e7 Fix max conn alive time problems 2018-06-01 09:06:03 +08:00
jingxiaobing
4742b9c90b admin: discriminate shard/rw mode 2018-05-31 18:36:31 +08:00
jingxiaobing
f073746e7a Merge branch 'master' into shard-online
Conflicts:
	plugins/admin/admin-plugin.c
2018-05-31 10:30:35 +08:00
jingxiaobing
bcc8f297cb add some verification for CREATE VDB 2018-05-31 10:27:37 +08:00
jingxiaobing
eec052ddf7 UPDATE BACKENDS accept list of equations;
DATETIME partitions first parsed as STR, then convert to int64_t
2018-05-30 14:46:39 +08:00
wangbin579
0d47df7a39 Add option for xa commit or xa rollback read timeout setting 2018-05-30 11:38:26 +08:00
liuyanlei25
82b49864d5 fix cetus-shard and cetus-rw admin display 2018-05-25 20:55:36 +08:00
jingxiaobing
ca32bc0c8f changes of sharding config save to file 2018-05-25 20:21:03 +08:00
liuyanlei25
a5d964adc5 fix ip interception feature 2018-05-25 10:47:58 +08:00
wangbin579
f01cd5b16e Compatible with pymysql 2018-05-25 09:25:15 +08:00
jingxiaobing
cbd0e2b1e6 admin-plugin implemented with lex&parser 2018-05-24 20:37:21 +08:00
jingxiaobing
50de6a3b20 make sharding_partition_t self managable 2018-05-23 16:17:45 +08:00
wangbin579
b3501eb2c6 Fix several problems revealed by static analysis 2018-05-21 15:14:39 +08:00
jingxiaobing
5f3a73c8f1 check plugin type earlier 2018-05-21 11:36:37 +08:00
jingxiaobing
e2defcf76c Merge branch 'vdb2table' 2018-05-18 14:49:15 +08:00
tsthght
aec4b411ca fix bug: config set key=val may be wrong 2018-05-18 09:04:56 +08:00
wangbin579
2536c633a1 Optimize code hinted by coverity scan and cppcheck 2018-05-17 18:01:41 +08:00
jingxiaobing
913b6a8987 compatible with mysql5.1 authentication 2018-05-17 14:24:42 +08:00
tsthght
e7cc024441 fix bug:'set maintain' command is no correct effected rows 2018-05-17 10:16:15 +08:00
wangbin579
1e68639524 Add options for client idle timeout 2018-05-16 18:56:18 +08:00
jingxiaobing
c0fa3f3128 Merge branch 'auth-switch', #44 mysql8 client can login after switch to mysql_native_password
Conflicts:
	plugins/admin/admin-plugin.c
2018-05-16 18:19:59 +08:00
jingxiaobing
dea8ae911d implement server-side auth switch, now mysql8 client can login 2018-05-16 17:57:23 +08:00
wangbin579
2549cc5abd Fix warnings 2018-05-16 17:30:56 +08:00
wangbin579
6b21ee9062 Disable transaction for admin 2018-05-16 17:11:23 +08:00
liuyanlei25
b2b75a75bf Ip whitelist or blacklist supports ip range 2018-05-16 15:42:49 +08:00
tsthght
f1c06ad88b new feature: show maintain status 2018-05-16 15:30:51 +08:00
tsthght
a64da7468e fix error:select conn_num from backends 2018-05-16 13:48:26 +08:00
tsthght
db2d616426 fix error:admin command may match incorrectly 2018-05-15 19:37:02 +08:00
tsthght
32fb5f4e76 fix concurrency problems temporarily 2018-05-15 17:38:16 +08:00
jingxiaobing
e4e0cbdf61 Merge branch 'ssl-support', Closes #7 2018-05-11 15:16:15 +08:00
jingxiaobing
2e93afac01 Add --ssl option, default to false, when set to true, client can connect with SSL
User must provide 'server-key.pem' and 'server-cert.pem' in the --conf-dir, which can be generated by mysqld
2018-05-11 15:11:38 +08:00
tsthght
c1074eb629
Merge pull request #50 from tsthght/bug/save_settings
#49
2018-05-11 10:51:31 +08:00
tsthght
8dd872c892 remove newfile need not report error 2018-05-11 10:23:01 +08:00
wangbin
b36adde0c0
Merge pull request #48 from wangbin579/master
Fix set autocommit related problems
2018-05-10 09:10:23 +08:00
wangbin579
65966050bf Fix set autocommit related problems 2018-05-10 09:07:16 +08:00
jingxiaobing
dad2fccd48 Merge branch 'master' into ssl-support
Conflicts:
	plugins/admin/admin-plugin.c
2018-05-09 14:52:45 +08:00
wangbin
c9e5ba13e9
Merge pull request #41 from tsthght/feature/saveconfig
1 support save settings 2 fix some bugs about show/set variables
2018-05-09 09:24:11 +08:00
jingxiaobing
fb6135262e OpenSSL basic support, not yet compatible with compression 2018-05-03 16:31:41 +08:00
tsthght
3848861646 1 support save settings 2 fix some bugs about show/set variables 2018-05-02 09:17:08 +08:00
tsthght
db11d4af10 support sharding key type int64 2018-04-25 16:42:32 +08:00
wangbin
652d862a98
Update shard-plugin.c 2018-04-17 11:50:49 +08:00
jingxiaobing
1b153b61ae use GHashTable<(schema, table), sharding_table_t*> to quick find table info
shard_conf_get_fixed_group() don't need a `db` parameter, just pick from all groups
2018-04-12 11:15:47 +08:00
jingxiaobing
f712e4ea94 vdb define sharding method for tables, not for schemas 2018-04-11 17:45:33 +08:00
wangbin579
02c2d3817b Try to add tcmalloc support 2018-04-04 15:19:12 +08:00
wangbin579
ed61769cf7 Add pending event check when prematured returned 2018-04-02 16:27:32 +08:00
liuyanlei25
73466e94f7 update admin.md and admin-plugin.c 2018-03-30 18:20:15 +08:00
wangbin579
ce978e117c Add timeout for idle conn, etc 2018-03-28 17:05:12 +08:00
wangbin
c98e26f022
Merge pull request #16 from wangbin579/master
Don't set master down from monitor,etc
2018-03-27 13:53:34 +08:00
wangbin579
f24eefc266 Don't set master down from monitor,etc 2018-03-27 10:46:43 +08:00
jingxiaobing
59cead53a1 Forbid complex aggregate function on sharded SQL, Closes #12 2018-03-26 17:10:42 +08:00
wangbin579
687e7603af Remove MySQL old password 2018-03-23 10:19:27 +08:00
wangbin
a1bf6525dd
Merge pull request #9 from lazio579/master
Change pmd(from spockproxy) to ss
2018-03-22 11:41:27 +08:00
lazio579
bbc52d87b2 Change pmd(from spockproxy) to ss 2018-03-22 11:36:38 +08:00
jingxiaobing
620c3e6ff8 use from SQL rather than default db when analyzing JOIN condition 2018-03-21 18:44:41 +08:00
jingxiaobing
da3f969485 validate config file, vdb partition count must equal to group count 2018-03-21 17:22:43 +08:00
lazio579
35da263e43 Optimize salt seed supply 2018-03-21 14:50:34 +08:00
lazio579
3524013f5e Format code by indent 2018-03-20 14:19:44 +08:00
lazio579
ea3b3f84a1 Don't use upper case for struct 2018-03-20 11:59:11 +08:00
lazio579
7dbf02c8a0 Prepare for indent 2018-03-20 11:45:13 +08:00
lazio579
cc43dc719e Remove typedef in c files 2018-03-19 15:59:07 +08:00
lazio579
5cf749ef0a use reset conn instead of chang user when mysql > 5.7 2018-03-19 11:08:40 +08:00
lazio579
a20b1080d6 Use master server when last query processing has affected rows 2018-03-16 11:58:09 +08:00
lazio579
0e6a298400 Don't put proxy and shard together in one compilation and fix several warnings 2018-03-15 10:27:22 +08:00
tsthght
beffde2139 remove compilation errors 2018-03-15 09:49:40 +08:00
lazio579
93a5c18a29 Add GPL2 related info to files 2018-03-14 11:27:27 +08:00
lazio579
0407ee84f2 Fix group by without aggr fun problems and refactor SIMPLE_PARSER 2018-03-12 15:52:54 +08:00
lazio579
1ecdbe6393 Refactor is_read_ro_server_allowed setting 2018-03-09 11:26:42 +08:00
lazio579
dc85d2618e Fix xa transaction problems(using slave connections) 2018-03-08 17:11:23 +08:00
lazio579
e55d882e10 Fix typo 2018-03-06 18:23:34 +08:00
lazio579
0af842272e Add files to cetus project 2018-03-06 14:00:39 +08:00