centos下安装和使用mysql测试工具super-smack
时间:2010-10-23 来源:sunss
centos5.4
[root@26 super-smack-1.3]# uname -a
Linux 26 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
1.前提步骤
1 yum -y install mysql-devel
2 yum -y install flex
3 yum -y install byacc
4 yum -y install bison
2.安装super-smack
1 wget http: //vegan.net/tony/supersmack/super-smack-1.3.tar.gz2 tar zxvf super-smack-1.3.tar.gz
3 cd super-smack-1.3
4 LIBZ_LIB="-lm"
5 ./configure --prefix=/usr/local/super-smack --with-mysql --with-mysql-lib=/usr/local/mysql/lib/mysql/ --with-mysql-include=/usr/local/mysql/include/mysql/ --with-datadir=/usr/local/super-smack/smack-data/
6 make
7 make install
会遇到下面错误:
解决办法:
修改文件super-smack-1.3/src/query.cc
第193行:
< int len = 0, num_recs = 0;
修改成:
> long len = 0; int num_recs = 0;
第199,200行
< int str_len = (*i).first.length();
< if((unsigned)p + str_len + 3 *sizeof(int) < (unsigned)p_end )
修改成:
> long str_len = (*i).first.length();
> if((long)p + str_len + 3 *sizeof(int) < (long)p_end )
第219行
< len = (unsigned)p - (unsigned)buf;
修改成:
> len = (long)p - (long)buf;
附改造后的文件:
query.rar
3.下面就来看看如何使用吧
相关阅读 更多 +
排行榜 更多 +