Commit 35dcc130 authored by Georgi Kodinov's avatar Georgi Kodinov

merge

parents 98501767 0f3493a4
......@@ -671,8 +671,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
char query[1024],*end;
MYSQL_RES *result;
MYSQL_ROW row;
ulong rows;
LINT_INIT(rows);
ulong UNINIT_VAR(rows);
if (mysql_select_db(mysql,db))
{
......
......@@ -1563,13 +1563,13 @@ struct parse *p;
register struct re_guts *g;
{
register sop *scan;
sop *start;
register sop *newstart;
sop *UNINIT_VAR(start);
register sop *UNINIT_VAR(newstart);
register sopno newlen;
register sop s;
register char *cp;
register sopno i;
LINT_INIT(start); LINT_INIT(newstart);
/* avoid making error situations worse */
if (p->error != 0)
return;
......
......@@ -17,6 +17,7 @@
config=".my.cnf.$$"
command=".mysql.$$"
mysql_client=""
trap "interrupt" 2
......@@ -37,10 +38,26 @@ prepare() {
chmod 600 $config $command
}
find_mysql_client()
{
for n in ./bin/mysql mysql
do
$n --no-defaults --help > /dev/null 2>&1
status=$?
if test $status -eq 0
then
mysql_client=$n
return
fi
done
echo "Can't find a 'mysql' client in PATH or ./bin"
exit 1
}
do_query() {
echo "$1" >$command
#sed 's,^,> ,' < $command # Debugging
mysql --defaults-file=$config <$command
$mysql_client --defaults-file=$config <$command
return $?
}
......@@ -204,6 +221,7 @@ cleanup() {
# The actual script starts here
prepare
find_mysql_client
set_echo_compat
echo
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment