Skip to content

Commit

Permalink
文档目录调整
Browse files Browse the repository at this point in the history
  • Loading branch information
linzhiqiang0514 committed Dec 29, 2014
1 parent e4de20f commit 0e234dc
Show file tree
Hide file tree
Showing 112 changed files with 87 additions and 180 deletions.
180 changes: 0 additions & 180 deletions 1.0/Changelog_MyCat1.0.html

This file was deleted.

Binary file removed 1.0/MyCat_In_Action_中文版.doc
Binary file not shown.
Binary file removed 1.0/MyCat专家系列之Mycat前世今生.doc
Binary file not shown.
Binary file removed 1.0/Mycat Q&A.docx
Binary file not shown.
Binary file removed 1.0/Mycat命令行监控指南.docx
Binary file not shown.
Binary file removed 1.0/Mycat性能测试指南.docx
Binary file not shown.
Binary file removed 1.0/Mycat性能调优指南.docx
Binary file not shown.
Binary file removed 1.0/Mycat高级功能测试案例.docx
Binary file not shown.
Binary file removed 1.1/MyCAT性能测试案例集.wps
Binary file not shown.
Binary file removed 1.1/MyCat_In_Action_中文版.doc
Binary file not shown.
Binary file removed 1.1/Mycat Q&A.docx
Binary file not shown.
Binary file removed 1.1/Mycat性能调优指南.docx
Binary file not shown.
Binary file removed Mycat_Develope_Guide.docx
Binary file not shown.
Binary file removed Mycat最权威Mysql主从配置手册.docx
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added history/MyCAT的S级别任务.docx
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added history/Mycat Q&A.docx
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file added 入门指南/MyCat_In_Advanced.doc
Binary file not shown.
Binary file added 入门指南/MyCat_安装指南(linux).doc
Binary file not shown.
Binary file not shown.
56 changes: 56 additions & 0 deletions 入门指南/sequnce-sql.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
DROP TABLE IF EXISTS MYCAT_SEQUENCE;
CREATE TABLE MYCAT_SEQUENCE ( name VARCHAR(50) NOT NULL, current_value INT NOT NULL, increment INT NOT NULL DEFAULT 100, PRIMARY KEY (name) ) ENGINE=InnoDB;

-- ----------------------------
-- Function structure for `mycat_seq_currval`
-- ----------------------------
DROP FUNCTION IF EXISTS `mycat_seq_currval`;
DELIMITER ;;
CREATE DEFINER=`root`@`%` FUNCTION `mycat_seq_currval`(seq_name VARCHAR(50)) RETURNS varchar(64) CHARSET latin1
DETERMINISTIC
BEGIN
DECLARE retval VARCHAR(64);
SET retval="-999999999,null";
SELECT concat(CAST(current_value AS CHAR),",",CAST(increment AS CHAR) ) INTO retval FROM MYCAT_SEQUENCE WHERE name = seq_name;
RETURN retval ;
END
;;
DELIMITER ;

-- ----------------------------
-- Function structure for `mycat_seq_nextval`
-- ----------------------------
DROP FUNCTION IF EXISTS `mycat_seq_nextval`;
DELIMITER ;;
CREATE DEFINER=`root`@`%` FUNCTION `mycat_seq_nextval`(seq_name VARCHAR(50)) RETURNS varchar(64) CHARSET latin1
DETERMINISTIC
BEGIN
UPDATE MYCAT_SEQUENCE
SET current_value = current_value + increment WHERE name = seq_name;
RETURN mycat_seq_currval(seq_name);
END
;;
DELIMITER ;

-- ----------------------------
-- Function structure for `mycat_seq_setval`
-- ----------------------------
DROP FUNCTION IF EXISTS `mycat_seq_setval`;
DELIMITER ;;
CREATE DEFINER=`root`@`%` FUNCTION `mycat_seq_setval`(seq_name VARCHAR(50), value INTEGER) RETURNS varchar(64) CHARSET latin1
DETERMINISTIC
BEGIN
UPDATE MYCAT_SEQUENCE
SET current_value = value
WHERE name = seq_name;
RETURN mycat_seq_currval(seq_name);
END
;;
DELIMITER ;

INSERT INTO MYCAT_SEQUENCE VALUES ('GLOBAL', 0, 100);
SELECT MYCAT_SEQ_SETVAL('GLOBAL', 1);
SELECT MYCAT_SEQ_CURRVAL('GLOBAL');
SELECT MYCAT_SEQ_NEXTVAL('GLOBAL');


File renamed without changes.
File renamed without changes.
Binary file added 开发指南/github个人使用笔记.doc
Binary file not shown.
Binary file added 开发指南/mycat路由解析开发指南.docx
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file added 设计文档/Mycat智能优化设计方案.doc
Binary file not shown.
Binary file added 设计文档/Mycat运行时序图.vsd
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

1.在包含employee的分片上创建存储过程:
/*!mycat: sql=select sharding_id from employee */ create procedure proc_rtn_list(in v_in int) begin select * from employee where sharding_id=v_in;end;

2.调用存储过程, 通过注解指定在哪个分片上执行:
/*!mycat: sql=select sharding_id from employee where sharding_id=10000*/ call proc_rtn_list(10000);

3.出现问题:
"[Err] 1312 - PROCEDURE db1.proc_rtn_list can't return a result set in the given context"

4.解决方案:修改代码 org.opencloudb.mysql.nio包内的MySQLConnection类, 取消第85行的注释.

5.遗留问题:
调用存储过程后, 客户端没有收到相应的报文, 导致一直处于等待状态, 而不是正常的显示"mysql> ", 求大侠抓包解决, 看下mysql直连情况下,返回的这个报文跟Mycat的有哪些不同, 解决这个问题



14 changes: 14 additions & 0 deletions 设计文档/mycat同步实现的设计.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
����A��ͬ����SQL������˳��д��B��C

���� 1 ����2
update xx from table1 where id =1 update yy from table where id=1
������1 �ȷ��أ�����Ҫ��֤A�Ĵ���ͬ��SQL�������2��B��C����ִ��
������Ҫ�첽��������1 commit���Զ�commit)����Ժ󣬲Ž�SQLͬʱ����BCִ�У�
BCִ����ɺ󣬲�ִ����һ������2



���˼·��ÿ��DataNode��Ƭ��ά��һ������ͬ����SQL˳����У��첽ִ�У�����Ҫͬ����SQL������A��ִ����ɺ󣬼���˶��У��첽�����ڵ�ִ�У�ִ��ʧ�ܵĽڵ㣬�����Ӷ������Ƴ������ٿ��ã�


��SQL������ʱ����Sessino��û��ִ�й��޸����ݵ�SQL����������Է����������ͬ��SQL����Ϊ�յķ�Ƭִ�У�������ֻ����д�ڵ�
Binary file added 设计文档/一亿组数据排序.docx
Binary file not shown.
Binary file not shown.
Binary file added 进阶文档/MyCat主键自增字段开启.docx
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file added 进阶文档/Mycat性能调优指南.docx
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file added 进阶文档/mycat+percona_cluster.docx
Binary file not shown.

0 comments on commit 0e234dc

Please sign in to comment.