Please ignore the previous patch. I was ignoring the relevance of escaping tables and columns with ` ` for "bad" names.

This next one takes name escaping into account:

--- debian-start.inc.sh.orig    2009-01-06 14:51:44.000000000 +0000
+++ debian-start.inc.sh.ansi    2009-01-06 18:08:06.000000000 +0000
@@ -18,10 +18,10 @@
   tempfile=`tempfile`
   # We have to use xargs in this case, because a for loop barfs on the
   # spaces in the thing to be looped over.
-  LC_ALL=C $MYSQL --skip-column-names --batch -e  '
-      select concat("select count(*) into @discard from `",
-                    TABLE_SCHEMA, "`.`", TABLE_NAME, "`")
-      from information_schema.TABLES where ENGINE="MyISAM"' | \
+  LC_ALL=C $MYSQL --skip-column-names --batch -e  "
+      SELECT CONCAT('SELECT COUNT(*) INTO @discard FROM \`',
+                    TABLE_SCHEMA, '\`.\`', TABLE_NAME, '\`' )
+      FROM information_schema.TABLES WHERE ENGINE='MyISAM'" | \
     xargs -i $MYSQL --skip-column-names --silent --batch \
                     --force -e "{}" >$tempfile
   if [ -s $tempfile ]; then



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to