From 57b6bb4a66cf78dd77272fce4ffdf883c11cdfa3 Mon Sep 17 00:00:00 2001 From: lars Date: Mon, 24 May 2010 01:08:07 +0000 Subject: [PATCH] use binary mode for string comparison (force case-sensitive matching) --- mythtv/channel_sort_mythtv.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mythtv/channel_sort_mythtv.sh b/mythtv/channel_sort_mythtv.sh index ed896d8..836e98b 100755 --- a/mythtv/channel_sort_mythtv.sh +++ b/mythtv/channel_sort_mythtv.sh @@ -92,7 +92,7 @@ test $# -gt 0 && ACTION="$1" case "$ACTION" in get) # get distinct names and ignore empty lines - echo "SELECT DISTINCT name FROM channel ORDER BY LPAD(channum, 3, 0) ASC;" \ + echo "SELECT DISTINCT name FROM channel ORDER BY LPAD(channum, 3, 0) BINARY;" \ | send_mysql_statement \ | grep -v "^$" ;; @@ -104,7 +104,7 @@ case "$ACTION" in cat - | grep -v "^$" | while read channel; do # escape single quotes channel=$(echo "$channel" | sed "s/'/\\\\'/g") - echo "update channel set channum=$current_num where name='$channel';" + echo "update channel set channum=$current_num where name='$channel' BINARY;" current_num=$((current_num + 1)) done ) | send_mysql_statement