0.在mycat1.4中做好配置
1.首先在物理数据库上创建sbtest
2.在sbtest中创建10个sbtest表从1到10
这里之所以要手工建是因为sysbench自动建表功能在mycat上不可以用
CREATE TABLE `sbtest1` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`k` int(10) unsigned NOT NULL DEFAULT '0',
`c` char(120) NOT NULL DEFAULT '',
`pad` char(60) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `k_1` (`k`)
) ENGINE=InnoDB AUTO_INCREMENT=9999991 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for sbtest10
-- ----------------------------
CREATE TABLE `sbtest10` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`k` int(10) unsigned NOT NULL DEFAULT '0',
`c` char(120) NOT NULL DEFAULT '',
`pad` char(60) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `k_1` (`k`)
) ENGINE=InnoDB AUTO_INCREMENT=9999991 DEFAULT CHARSET=utf8;
-- ----------------------------