This commit is contained in:
2024-12-24 13:40:15 +08:00
parent 4a0e19cc8b
commit 17fca60282
28 changed files with 50 additions and 38 deletions

View File

@@ -32,9 +32,9 @@ function Print {
function Quit {
Print killing greatsql ...
mysqladmin shutdown || true
greatsqladmin shutdown || true
while :; do
pkill -f mysqld && Print killing greatsql ... || break
pkill -f greatsqld && Print killing greatsql ... || break
sleep 1
done
Print Container stopped.
@@ -71,7 +71,7 @@ function ImportInitSql {
}
function StartProc {
mysqld &
greatsqld &
PIDS="$PIDS $!"
while sleep 1; do
[ -e $SOCK_FILE ] && break || echo -n .
@@ -88,7 +88,7 @@ function Main {
Init
StartProc
trap "GOT_SIGTERM=1; Print Got SIGTERM ..." SIGTERM
while [ -z "$GOT_SIGTERM" ] && sleep 1; do
while [ -z "$GOT_SIGTERM" ] && sleep 2; do
for pid in $PIDS; do
[ ! -e /proc/$pid ] && Print Unexpected error! && exit
done

View File

@@ -29,7 +29,9 @@ gpgcheck=0\n\
&& rm -f /tmp/greatsql-devel* /tmp/greatsql-mysql-router-* \
&& rpm -ivh /tmp/greatsql-*.rpm \
&& ln -s /usr/bin/mysql /usr/bin/greatsql \
&& ln -s /usr/sbin/mysqld /usr/sbin/greatsqld \
&& ln -s /usr/bin/mysqldump /usr/bin/greatsqldump \
&& ln -s /usr/bin/mysqladmin /usr/bin/greatsqladmin \
&& rm -rf /usr/sbin/mysqld-debug \
/var/cache/yum \
/var/lib/yum \
@@ -55,10 +57,6 @@ lock-wait-timeout = 3600\n\
open-files-limit = 65535\n\
back-log = 1024\n\
max-connections = 512\n\
lock-wait-timeout = 3600\n\
open-files-limit = 65535\n\
back-log = 1024\n\
max-connections = 512\n\
max-connect-errors = 1000000\n\
table-open-cache = 1024\n\
table-definition-cache = 1024\n\