amoeba 问题
安装amoeba并配置好连接数据库后发现使用mysqlslap来做测试会报错mysqlslap: Cannot run query CREATE TABLE `t1` (intcol1 INT(32) ,charcol1 VARCHAR(128)) ERROR : No database selected
mysqlslap -a --only-print 后语句为
DROP SCHEMA IF EXISTS `mysqlslap`;
CREATE SCHEMA `mysqlslap`;
use mysqlslap;
CREATE TABLE `t1` (intcol1 INT(32) ,charcol1 VARCHAR(128));
然后手动连接amoeba后运行
Welcome to the MySQL monitor.Commands end with ; or \g.
Your MySQL connection id is 7611421
Server version: 5.1.45-mysql-amoeba-proxy-3.0.4-BETA Source distribution
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> DROP SCHEMA IF EXISTS `mysqlslap`;
Query OK, 0 rows affected (0.01 sec)
CREATE SCHEMA `mysqlslap`;
mysql> CREATE SCHEMA `mysqlslap`;
Query OK, 1 row affected (0.00 sec)
mysql> use mysqlslap;
Database changed
mysql> CREATE TABLE `t1` (intcol1 INT(32) ,charcol1 VARCHAR(128));
ERROR 1046 (3D000): No database selected
通过实验发现amoeba 里用use `databasename`;有很大机率会失效,并且该语句会在下个语句运行时才运行:
mysql> use mysasdf;
Database changed
mysql> show tables;
ERROR 1049 (42000): Unknown database 'mysasdf'.
amoeba的稳定性不会这么烂吧,我一直还怀疑amoeba把两个语句分两个连接完成了,不过测试默认的mysql库又都是成功的,很费解求高手
页:
[1]