#! /bin/bash MYSQL_HOST=127.0.0.1 MYSQL_PORT=3306 MYSQL_USER=root MYSQL_PASS=root MYSQL_PATH=/home/linzx/mysql_5.7_3306_5721/app/mysql/bin/mysql MYSQL_DB=tt JAVA_PATH=/usr/ibm/java/ibm-java-x86_64-80/bin/java JCONN_FILE=mysql-connector-java-5.1.40-bin.jar ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"create database if not exists ${MYSQL_DB}; use ${MYSQL_DB}; drop table if exists t1; create table t1 ( a int ); set @x:=0; insert into t1 select @x:=@x+1 from information_schema.columns limit 1000; " echo ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"truncate performance_schema.events_statements_summary_by_digest" ${JAVA_PATH} -cp .:./${JCONN_FILE} TestUsePrep ${MYSQL_HOST} ${MYSQL_PORT} ${MYSQL_USER} ${MYSQL_PASS} ${MYSQL_DB} 0 0 0 ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"select * from performance_schema.events_statements_summary_by_digest" echo ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"truncate performance_schema.events_statements_summary_by_digest" ${JAVA_PATH} -cp .:./${JCONN_FILE} TestUsePrep ${MYSQL_HOST} ${MYSQL_PORT} ${MYSQL_USER} ${MYSQL_PASS} ${MYSQL_DB} 0 0 1 ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"select * from performance_schema.events_statements_summary_by_digest" echo ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"truncate performance_schema.events_statements_summary_by_digest" ${JAVA_PATH} -cp .:./${JCONN_FILE} TestUsePrep ${MYSQL_HOST} ${MYSQL_PORT} ${MYSQL_USER} ${MYSQL_PASS} ${MYSQL_DB} 0 1 0 ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"select * from performance_schema.events_statements_summary_by_digest" echo ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"truncate performance_schema.events_statements_summary_by_digest" ${JAVA_PATH} -cp .:./${JCONN_FILE} TestUsePrep ${MYSQL_HOST} ${MYSQL_PORT} ${MYSQL_USER} ${MYSQL_PASS} ${MYSQL_DB} 0 1 1 ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"select * from performance_schema.events_statements_summary_by_digest" echo ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"truncate performance_schema.events_statements_summary_by_digest" ${JAVA_PATH} -cp .:./${JCONN_FILE} TestUsePrep ${MYSQL_HOST} ${MYSQL_PORT} ${MYSQL_USER} ${MYSQL_PASS} ${MYSQL_DB} 1 0 0 ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"select * from performance_schema.events_statements_summary_by_digest" echo ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"truncate performance_schema.events_statements_summary_by_digest" ${JAVA_PATH} -cp .:./${JCONN_FILE} TestUsePrep ${MYSQL_HOST} ${MYSQL_PORT} ${MYSQL_USER} ${MYSQL_PASS} ${MYSQL_DB} 1 0 1 ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"select * from performance_schema.events_statements_summary_by_digest" echo ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"truncate performance_schema.events_statements_summary_by_digest" ${JAVA_PATH} -cp .:./${JCONN_FILE} TestUsePrep ${MYSQL_HOST} ${MYSQL_PORT} ${MYSQL_USER} ${MYSQL_PASS} ${MYSQL_DB} 1 1 0 ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"select * from performance_schema.events_statements_summary_by_digest" echo ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"truncate performance_schema.events_statements_summary_by_digest" ${JAVA_PATH} -cp .:./${JCONN_FILE} TestUsePrep ${MYSQL_HOST} ${MYSQL_PORT} ${MYSQL_USER} ${MYSQL_PASS} ${MYSQL_DB} 1 1 1 ${MYSQL_PATH} -h${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASS} -e"select * from performance_schema.events_statements_summary_by_digest"