actiontech / dble Goto Github PK
View Code? Open in Web Editor NEWA High Scalability Middle-ware for MySQL Sharding
Home Page: https://opensource.actionsky.com
License: GNU General Public License v2.0
A High Scalability Middle-ware for MySQL Sharding
Home Page: https://opensource.actionsky.com
License: GNU General Public License v2.0
Raised by: @sevenFH
As titled.
This issue is internal, and will not be migrated.
Raised by: helingyun
Steps:
case1 : select a.k from test1 a inner join test2 b where a.k = b.k limit 4000000
case2 : select a.k from test1 a inner join test2 b where a.k = b.k limit 100
* Command:
./sysbench --test=../db/select.lua --mysql-table-engine=innodb --mysql-user=action --mysql-password=action --mysql-port=8066 --mysql-host=10.186.17.107 --mysql-db=hly_test --max-requests=0 --max-time=120 --oltp-tables-count=2 --report-interval=1 --oltp-nontrx-mode=select --oltp-table-size=50000000 --num-threads=512 run
Case1 found:
Case2 works find
Raised by: @sevenFH
Effects:
Raised by: @sevenFH
As titled.
Raised by: @sevenFH
As titled.
Raised by: @sevenFH
Steps:
date_patch
, whose id
is date type.select max(id) from date_patch
twice, returns
select min(id) from date_patch
twice, returns
This issue is internal, and will not be migrated.
Raised by: @FlyingMao
As titled.
Raised by: @yanhuqing666
Steps:
Enable XA, XA commands are sent to data-node, but dble doesn't receive ack of XA commands.
Raised by: @sevenFH
Steps:
select id,count(id) 'ids' from test1;
Raised by: @FlyingMao
Steps:
function event(thread_id)
local table_name
local a=sb_rand(1, oltp_table_size-1)
local b=a+1
table_name = "sbtest".. sb_rand_uniform(1, oltp_tables_count)
rs = db_query("SELECT max(pad) from " .. table_name .. " where id between " .. a .. " and " ..b)
end
Raised by: @sevenFH
Steps:
select avg(data) as avg1,avg(data) as avg_data from test1;
avg1
value is correct, while avg_data
value miss its dotRaised by: @zhunina
Steps:
create table binary_columns(
id int primary key,
c_binary binary(255)
);
load data local infile '/opt/loaddata/binary_columns' into table binary_columns fields terminated by ',' lines terminated by '\r\n' (id,c_binary);
id=19
: c_binary
is '000000000...000', while '' was expectedRaised by: @sevenFH
As titled.
Raised by: @zhunina
Steps:
create table sbtest1(id int,name varchar(8),p_id int primary key auto_increment);
id
GLOBAL.HISIDS=
GLOBAL.MINID=10001
GLOBAL.MAXID=20000
GLOBAL.CURID=10000
insert into sbtest1(id,name,p_id) values(1,'a',next value for MYCATSEQ_GLOBAL);
(1,‘a’,10001)
insert into sbtest1(id,name,p_id) values(2,'a',next value for MYCATSEQ_GLOBAL),(3,'a',next value for MYCATSEQ_GLOBAL),(4,'a',next value for MYCATSEQ_GLOBAL);
(2,'a',10002),(3,'a',10002),(4,'a',10002)
, which is not correctExpectation:
Step 5 should give increment values of global sequence.
Raised by: @sunsun314
As titled.
Raised by: @sevenFH
Steps:
insert into district (d_w_id, number, name) values (001,2,'aaa'),(002,3,'bbb');
ERROR 1064 (HY000): ChildTable multi insert not provided
Raised by: @FlyingMao
Steps:
set lower_case_table_names=0
CREATE TABLE sbtest1 (
id int(10) unsigned NOT NULL,
k int(10) unsigned NOT NULL DEFAULT '0',
c char(120) NOT NULL DEFAULT '',
pad int(11) NOT NULL,
PRIMARY KEY (id),
KEY k_1 (k)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
insert into sbtest1 values (1,1,1,1),(2,2,2,2);
Error 1064(HY000):can't find table [SBTEST1] define in schema:sbtest
Raised by: @sevenFH
As titled.
Raised by: @sunsun314
schemas works find with dble case-sensitive settings, except user schema which is specified when login.
Raised by: @sevenFH
Log:
2016-12-16 14:50:14.061 WARN [$_NIOREACTOR-1-RW] (io.mycat.server.ServerConnection.routeEndExecuteSQL(ServerConnection.java:299)) - ServerConnection [id=1, schema=TESTDB, host=10.186.23.12, user=test,txIsolation=3, autocommit=true, schema=TESTDB]insert into enum_patch_integer values (1,1,'computer') err:java.sql.SQLNonTransientException: bad insert sql (sharding column:ID not provided,INSERT INTO enum_patch_integer
VALUES (1, 1, 'computer')
java.sql.SQLNonTransientException: bad insert sql (sharding column:ID not provided,INSERT INTO enum_patch_integer
VALUES (1, 1, 'computer')
at io.mycat.route.parser.druid.impl.DruidInsertParser.parserSingleInsert(DruidInsertParser.java:162) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.route.parser.druid.impl.DruidInsertParser.statementParse(DruidInsertParser.java:70) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.route.parser.druid.impl.DefaultDruidParser.parser(DefaultDruidParser.java:64) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.route.impl.DruidMycatRouteStrategy.routeNormalSqlWithAST(DruidMycatRouteStrategy.java:79) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.route.impl.AbstractRouteStrategy.route(AbstractRouteStrategy.java:81) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.route.RouteService.route(RouteService.java:133) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.server.ServerConnection.routeEndExecuteSQL(ServerConnection.java:291) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.server.ServerConnection.execute(ServerConnection.java:240) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.server.ServerQueryHandler.query(ServerQueryHandler.java:144) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.net.FrontendConnection.query(FrontendConnection.java:324) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.net.FrontendConnection.query(FrontendConnection.java:344) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.net.handler.FrontendCommandHandler.handle(FrontendCommandHandler.java:71) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.net.FrontendConnection.rawHandle(FrontendConnection.java:500) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.net.FrontendConnection.handle(FrontendConnection.java:482) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.net.AbstractConnection.onReadData(AbstractConnection.java:322) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.net.NIOSocketWR.asynRead(NIOSocketWR.java:190) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.net.AbstractConnection.asynRead(AbstractConnection.java:274) ~[Action_Mycat-0.2.1-DEV.jar:?]
at io.mycat.net.NIOReactor$RW.run(NIOReactor.java:102) ~[Action_Mycat-0.2.1-DEV.jar:?]
at java.lang.Thread.run(Thread.java:745) [?:1.7.0_79]
Raised by: @sunsun314
if alter column is sharding column or join column, alter should be disabled with error message.
Raised by: @yanhuqing666
Steps:
Global table with consistency check, query update with where in (char_column)
Relates:
MyCATApache/Mycat-Server#1319
Analysis:
Parser doesn't override toString()
of where
Raised by: @sevenFH
Steps:
p_id
, sub sharding-key is f_id
, sub join-key is f_id
begin
insert into parent_table (p_id, name, f_id) values ('008','aaa','008'); //add data to parent
insert into child_table (d_id, name, c_id) values (4,'aaa','008'); //add data to sub
Raised by: @FlyingMao
Steps:
set isolation
in data-node's general logRaised by: @sevenFH
Steps:
global_table
ERROR 1064 (HY000): op table not in schema----GLOBAL_TABLE DROP|ADD|CHANGE
alter table global_table drop name; //drop column
alter table global_table add name1 char(10); //add column
alter table global_table change name name char(15); //alter column type
alter table global_table change name name1 varchar(10); //update column name
alter table global_table drop index global_table_inx; //drop index
This issue is internal, and will not be migrated.
Raised by: @yanhuqing666
Steps:
Global table with consistency check, query insert ...on duplicate...
, when there is duplication,
_mycat_op_time
isn't updated.
Raised by: @FlyingMao
Steps:
lock table sbtest1 read;
select * from sbtest2;
select * from sbtest2;
unlock tables;
select * from sbtest2;
Error 1105(HY000):MySQL Error Packet{Length=56,id=1}
Analysis:
Data-node general log shows there is a rollback after first select.
Raised by: @sevenFH
As titled.
SQL: select ... from ... order by colunm2,id
Raised by: @yanhuqing666
As titled.
Raised by: @yanhuqing666
As titled.
Raised by: @sevenFH
Raised by: @FlyingMao
Steps:
create table aly_test (orderID int(11),R_REGIONKEY int(11) primary key,R_NAME varchar(50),R_COMMENT varchar(50));
insert into aly_test (orderID,R_REGIONKEY,R_NAME,R_COMMENT) values (1,1, 'Eastern','test001'),(3,3, 'Northern','test003'),(2,2, 'Western','test002'),(4,4, 'Southern','test004');
alter table aly_test engine=INNODB;
begin;
update aly_test set R_COMMENT='25-989-741-4444' where orderID=1;
select * from aly_test;
commit;
Log:
From general log:
set autocommit=0
before updateset autocommit=0
before selectautocommit=0
Raised by: @sevenFH
Steps:
select * from aly_test group by id having count(*) >= 1;
select * from aly_test group by id;
. having clause is missing.Raised by: helingyun
Steps:
select * from xxx where id=?
Raised by: @ditdb
Dble is handling only COM_QUERY
of management commands.
Raised by: @yanhuqing666
Steps:
As titled.
Relates:
MyCATApache/Mycat-Server#1195 pull request involved this issue
Raised by: @yanhuqing666
data consistency may fail between data-nodes in implicit transaction
Raised by: @sevenFH
Steps:
create view view1 as select * from fixed_patch_uniform;
ERROR 1064 (HY000): op table not in schema----VIEW
Raised by: @sevenFH
Steps:
mysql> begin;
Query OK, 0 rows affected (0.00 sec)
mysql> update parent_table set name = 'hhh' where f_id='001';
Query OK, 1 row affected (0.00 sec)
Rows matched: 0 Changed: 0 Warnings: 0
mysql> exit
mysql> select trx_id,trx_mysql_thread_id,trx_state from information_schema.INNODB_TRX;
+---------+---------------------+-----------+
| trx_id | trx_mysql_thread_id | trx_state |
+---------+---------------------+-----------+
| 1324669 | 314 | RUNNING |
| 1324668 | 316 | RUNNING |
+---------+---------------------+-----------+
2 rows in set (0.00 sec)
mysql> update parent_table set name = 'hhh' where f_id='002';
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
Raised by: @zhunina
Steps:
create table set_columns(
id int primary key,
c_set set('s','m','x')
);
return error: ERROR 1064 (HY000): error SET
Log:
2016-12-09 11:26:40,556 [WARN ][$_NIOREACTOR-3-RW] ServerConnection [id=1, schema=TESTDB, host=10.186.21.74, user=test,txIsolation=3, autocommit=true, schema=TESTDB]create table set_columns(
INFO | jvm 1 | 2016/12/09 11:26:40 | id int primary key,
INFO | jvm 1 | 2016/12/09 11:26:40 | c_set set('s','m','x')
INFO | jvm 1 | 2016/12/09 11:26:40 | ) err:com.alibaba.druid.sql.parser.ParserException: error SET com.alibaba.druid.sql.parser.ParserException: error SET
INFO | jvm 1 | 2016/12/09 11:26:40 | at com.alibaba.druid.sql.parser.SQLExprParser.name(SQLExprParser.java:974)
INFO | jvm 1 | 2016/12/09 11:26:40 | at com.alibaba.druid.sql.parser.SQLExprParser.parseDataType(SQLExprParser.java:1624)
INFO | jvm 1 | 2016/12/09 11:26:40 | at com.alibaba.druid.sql.dialect.mysql.parser.MySqlExprParser.parseColumn(MySqlExprParser.java:537)
INFO | jvm 1 | 2016/12/09 11:26:40 | at com.alibaba.druid.sql.dialect.mysql.parser.MySqlCreateTableParser.parseCrateTable(MySqlCreateTableParser.java:114)
INFO | jvm 1 | 2016/12/09 11:26:40 | at com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseCreate(MySqlStatementParser.java:342)
INFO | jvm 1 | 2016/12/09 11:26:40 | at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:194)
INFO | jvm 1 | 2016/12/09 11:26:40 | at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatement(SQLStatementParser.java:2065)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.server.interceptor.impl.GlobalTableUtil.handleDDLSQL(GlobalTableUtil.java:127)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.server.interceptor.impl.GlobalTableUtil.consistencyInterceptor(GlobalTableUtil.java:100)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.server.interceptor.impl.GlobalTableUtil.interceptSQL(GlobalTableUtil.java:83)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.server.interceptor.impl.DefaultSqlInterceptor.interceptSQL(DefaultSqlInterceptor.java:56)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.route.impl.AbstractRouteStrategy.route(AbstractRouteStrategy.java:43)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.route.RouteService.route(RouteService.java:133)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.server.ServerConnection.routeEndExecuteSQL(ServerConnection.java:273)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.server.ServerConnection.execute(ServerConnection.java:222)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.server.ServerQueryHandler.query(ServerQueryHandler.java:136)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.net.FrontendConnection.query(FrontendConnection.java:317)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.net.FrontendConnection.query(FrontendConnection.java:337)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.net.handler.FrontendCommandHandler.handle(FrontendCommandHandler.java:71)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.net.FrontendConnection.rawHandle(FrontendConnection.java:478)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.net.FrontendConnection.handle(FrontendConnection.java:460)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.net.AbstractConnection.onReadData(AbstractConnection.java:321)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.net.NIOSocketWR.asynRead(NIOSocketWR.java:190)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.net.AbstractConnection.asynRead(AbstractConnection.java:273)
INFO | jvm 1 | 2016/12/09 11:26:40 | at io.mycat.net.NIOReactor$RW.run(NIOReactor.java:102)
INFO | jvm 1 | 2016/12/09 11:26:40 | at java.lang.Thread.run(Thread.java:722)
INFO | jvm 1 | 2016/12/09 11:26:40 | (io.mycat.server.ServerConnection:ServerConnection.java:281)
Raised by: @yanhuqing666
Refer:
Raised by: @yanhuqing666
Steps:
Calculating routes of between A and B
, A is of data-node a, B is of data-node b, and a index is no less than b index, the routes result is wrong.
Raised by: @yanhuqing666
Route could be calculated by meta data of data-nodes
Steps:
set session transaction isolation level READ UNCOMMITTED;
select * from sbtest1;
tx_isolation
is set successfullyselect @@session.tx_isolation;
REPEATABLE-READ
READ UNCOMMITTED
Raised by: @yanhuqing666
Steps:
mysql> select * from char_columns;
+----+--------+
| id | c_char |
+----+--------+
| 1 | 512 |
+----+--------+
1 row in set (0.01 sec)
mysql> select min(id) from char_columns;
+------+
| MIN0 |
+------+
| 0 |
+------+
1 row in set (0.01 sec)
Raised by: @sevenFH
As titled.
Raised by: @FlyingMao
Steps:
select sum(id) from sbtest1 where id between a and a+3;
(a is random number between 1-50000000)./sysbench --test=/usr/local/sysbench-1.0/db/select32.lua --mysql-user=test --mysql-password=test --mysql-port=8066 --mysql-host=10.186.23.70 --oltp_auto_inc=off --max-time=300 --max-requests=0 --report-interval=10 --num-threads=1 run
Error in Java :double free or cprruption(out):0x00007fcc9c121360
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.