-
Notifications
You must be signed in to change notification settings - Fork 43
Updates -- fix pt for show replica command change, and mysql default … #403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,15 +96,15 @@ start_minio() { | |
-v ~/minio/data:/data \ | ||
-e "MINIO_ROOT_USER=admin" \ | ||
-e "MINIO_ROOT_PASSWORD=password" \ | ||
quay.io/minio/minio server /data --console-address ":9001" | ||
minio/minio:latest server /data --console-address ":9001" | ||
fi | ||
fi | ||
|
||
# Poll the health endpoint | ||
echo -n "Waiting for MinIO to become ready" | ||
for i in {1..20}; do | ||
if curl -s -o /dev/null -w "%{http_code}" http://localhost:9000/minio/health/ready | grep -q 200; then | ||
echo -n "\n MinIO is ready!" | ||
echo -e "\n MinIO is ready!\n" | ||
return | ||
fi | ||
echo -n "." | ||
|
@@ -231,8 +231,33 @@ start_server() { | |
} | ||
|
||
sysbench_create_load() { | ||
# Get MySQL version | ||
MYSQL_VERSION_OUTPUT=$($PS_DIR/bin/mysqld --version 2>/dev/null) | ||
|
||
if [ $? -ne 0 ]; then | ||
echo "Error: Could not get MySQL version" | ||
exit 1 | ||
fi | ||
|
||
# Extract full version number | ||
MYSQL_VERSION=$(echo "$MYSQL_VERSION_OUTPUT" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1) | ||
|
||
if [ -z "$MYSQL_VERSION" ]; then | ||
echo "Error: Could not parse MySQL version" | ||
exit 1 | ||
fi | ||
|
||
echo "Detected MySQL version: $MYSQL_VERSION" | ||
|
||
# Convert version to numeric for easy comparison (e.g., 8.0.35 becomes 80035, 5.7.44 becomes 50744) | ||
VERSION_NUMERIC=$(echo "$MYSQL_VERSION" | awk -F. '{printf "%d%02d%02d", $1, $2, $3}') | ||
TARGET_VERSION=80000 # 8.0.0 | ||
# Create user | ||
$PS_DIR/bin/mysql -A -uroot -S $SOCKET -e "CREATE USER sysbench@'%' IDENTIFIED WITH mysql_native_password BY 'test';" | ||
if [ "$VERSION_NUMERIC" -ge "$TARGET_VERSION" ]; then | ||
$PS_DIR/bin/mysql -A -uroot -S $SOCKET -e "CREATE USER sysbench@'%' IDENTIFIED BY 'test';" | ||
else | ||
$PS_DIR/bin/mysql -A -uroot -S $SOCKET -e "CREATE USER sysbench@'%' IDENTIFIED WITH mysql_native_password BY 'test';" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For all 80 versions and above we are going without specifying any plugin which shall use the default plugin, this else condition will come into effect in run when it's less than 8.0 (ie, 5.7). Even in case of 5.7 we can create user without specifying the auth plugin and by default it would use mysql_native_password. IMO, just removing WITH mysql_native_password is enough from the create user query. |
||
fi | ||
$PS_DIR/bin/mysql -A -uroot -S $SOCKET -e "GRANT ALL ON *.* TO sysbench@'%';" | ||
$PS_DIR/bin/mysql -A -uroot -S $SOCKET -e "DROP DATABASE IF EXISTS sbtest;CREATE DATABASE sbtest;" | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be [ "$VERSION" -ge "080000" ] && [ "$VERSION" -lt "080400" ]