<commit_before>#!/bin/bash

service mysql start

MYSQL_INIT_SCRIPT=/tmp/mysql-init.sql

if [ ! -f $MYSQL_INIT_SCRIPT ]; then
  if  [ -z $MYSQL_ROOT_PASSWORD ]; then
    export MYSQL_ROOT_PASSWORD=root
  fi

  cat > $MYSQL_INIT_SCRIPT \
<<-EOSQL
DELETE FROM mysql.user;
CREATE USER 'root'@'%' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}';
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
DROP DATABASE IF EXISTS test;
EOSQL

  mysql -u root --password=root < $MYSQL_INIT_SCRIPT
fi

if [ -n $1 ] && [ -x $1 ]; then
  exec "$@"
else
  exec tail -f /var/log/mysql/error.log
fi
<commit_msg>fix sql init script and startup command<commit_after>#!/bin/bash

service mysql start

MYSQL_INIT_SCRIPT=/tmp/mysql-init.sql

if [ ! -f $MYSQL_INIT_SCRIPT ]; then
  if  [ -z $MYSQL_ROOT_PASSWORD ]; then
    export MYSQL_ROOT_PASSWORD=root
  fi

  cat > $MYSQL_INIT_SCRIPT \
<<-EOSQL
DELETE FROM mysql.user;
FLUSH PRIVILEGES;
CREATE USER 'root'@'%' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}';
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
DROP DATABASE IF EXISTS test;
EOSQL

  mysql --user=root --password=root < $MYSQL_INIT_SCRIPT
fi

if [ -n $1 ] && [ -x $1 ]; then
  exec "$@"
else
  exec tail -f /var/log/mysql/error.log
fi

{'fraction_non_alphanumeric': 0.13585209003215434, 'fraction_numerical': 0.003215434083601286, 'mean_word_length': 3.8443579766536966, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5415183', 'n_tokens_mistral': 537, 'n_tokens_neox': 520, 'n_words': 133}