Generate sqls to test mysql database
|-- config.cnf db config
|-- connect-mysql.sh connect db
|-- create-table.sh create table with multiprocess
|-- insert-table.sh insert data with multiprocess
|-- PowerSqlgen.sh shortcut of sqls
`-- README.md
./PowerSqlgen.sh
_____ _____ _
| __ \ / ____| | |
| |__) |____ _____ _ _| (___ __ _| | __ _ ___ _ __
| ___/ _ \ \ /\ / / _ \ '__\___ \ / _ | |/ _ |/ _ \ '_ \
| | | (_) \ V V / __/ | ____) | (_| | | (_| | __/ | | |
|_| \___/ \_/\_/ \___|_| |_____/ \__, |_|\__, |\___|_| |_|
| | __/ |
|_| |___/
------------------------------------------------------------
usage:
sh PowerSqlgen.sh create_db ${db_name}
sh PowerSqlgen.sh create_table ${table_id_start} ${table_id_end} ${db_name} ${table_name}
sh PowerSqlgen.sh insert ${key_id_start} ${key_id_end} ${db_name} ${table_name} ${table_id_start} ${table_id_end}
sh PowerSqlgen.sh get_table_count ${db_name} ${table_name} ${table_id_start} ${table_id_end}
sh PowerSqlgen.sh update ${key_id_start} ${key_id_end} ${db_name} ${table_name} ${table_id_start} ${table_id_end}
sh PowerSqlgen.sh delete_table ${table_id_start} ${table_id_end} ${db_name} ${table_name}
------------------------------------------------------------
example:
sh PowerSqlgen.sh create_db PowerSqlgen_test
sh PowerSqlgen.sh create_table 1 300 PowerSqlgen_test meta_tablet_1
sh PowerSqlgen.sh insert 1 10000 PowerSqlgen_test meta_tablet_1 1 10
sh PowerSqlgen.sh get_table_count PowerSqlgen_test meta_tablet_1 60 70
sh PowerSqlgen.sh update 60 70 PowerSqlgen_test meta_tablet_1 1 10
sh PowerSqlgen.sh delete_table 1 100 PowerSqlgen_test meta_tablet_1