[debian-mysql] Bug#481154: mysql-server-5.0: script for checking crashed tables fail, if special characters are in table/column name

Felix Rublack frubi1988 at gmail.com
Wed May 14 06:23:44 UTC 2008


Package: mysql-server-5.0
Version: 5.0.51a-6
Severity: normal
Tags: patch

The script doing some checks after the startup of the MySQL server, generates
invalid SQL queries, if table or column names contain special characters. I
created a patch, which quotes the names and the script run without any 
problems.

diff -ur mysql-dfsg-5.0-5.0.51a.orig/debian/additions/debian-start.inc.sh 
mysql-dfsg-5.0-5.0.51a/debian/additions/debian-start.inc.sh
--- mysql-dfsg-5.0-5.0.51a.orig/debian/additions/debian-start.inc.sh    
2008-05-14 08:13:14.774336649 +0200
+++ mysql-dfsg-5.0-5.0.51a/debian/additions/debian-start.inc.sh 2008-05-14 
08:16:08.746343377 +0200
@@ -19,8 +19,8 @@
   # 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) 
+      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 

 
Greetings

Felix Rublack

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.24-1-powerpc
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mysql-server-5.0 depends on:
ii  adduser                3.107             add and remove users and groups
ii  debconf [debconf-2.0]  1.5.21            Debian configuration management 
sy
ii  libc6                  2.7-11            GNU C Library: Shared libraries
ii  libdbi-perl            1.604-1+b1        Perl5 database interface by Tim 
Bu
ii  libgcc1                1:4.3.0-4         GCC support library
ii  libmysqlclient15off    5.0.51a-6         MySQL database client library
ii  libncurses5            5.6+20080503-1    Shared libraries for terminal 
hand
ii  libreadline5           5.2-3             GNU readline and history 
libraries
ii  libstdc++6             4.3.0-4           The GNU Standard C++ Library v3
ii  libwrap0               7.6.q-15          Wietse Venema's TCP wrappers 
libra
ii  lsb-base               3.2-12            Linux Standard Base 3.2 init 
scrip
ii  mysql-client-5.0       5.0.51a-6         MySQL database client binaries
ii  mysql-common           5.0.51a-6         MySQL database common files
ii  passwd                 1:4.1.1-1         change and administer password 
and
ii  perl                   5.10.0-10         Larry Wall's Practical Extraction 
ii  psmisc                 22.6-1            Utilities that use the proc 
filesy
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

Versions of packages mysql-server-5.0 recommends:
ii  bsd-mailx [mailx]  8.1.2-0.20071201cvs-3 A simple mail user agent
ii  libhtml-template-p 2.9-1                 HTML::Template : A module for 
usin
ii  mailx              1:20071201-3          Transitional package for mailx 
ren

-- debconf information excluded





More information about the pkg-mysql-maint mailing list