2008/3/17, Jan ONDREJ (SAL) <[EMAIL PROTECTED]>:
> Hello,
>
>   when trying to create openser mysql databases using UTF-8 as mysql default
>  encoding, create scripts fails with:
>
>  [EMAIL PROTECTED] openserctl]$ openserdbctl create
>  MySQL password for root:
>  INFO: test server charset
>  INFO: creating database openser ...
>  ERROR 1071 (42000) at line 2: Specified key was too long; max key length is
>  1000 bytes
>  ERROR: Creating core tables failed!
>
>  Can somebody lower some string lengths to avoid this problem?
>  I think UTF-8 is a preffered encoding for most cases.

Well known issue for us - take a look at that BZ item:

http://sourceforge.net/tracker/index.php?func=detail&aid=1605410&group_id=139143&atid=743020

Seemt that suggested solution isn't enough - my colleague created
another one simple patch, but he mails it directly to Bogdan-Andrei
Iancu instead of re-opening this Bugzilla ticket and this patch was
lost in tons of mails :)

His patch applied.
--- /usr/src/openser/scripts/openserdbctl.mysql 2008-02-14 01:48:31.000000000 
+0300
+++ /home/bugman/openserdbctl.mysql     2008-02-22 16:38:28.000000000 +0300
@@ -103,10 +103,10 @@
 {
        if [ -n "$PW" ]; then
                CURRCHARSET=`echo "show variables like 
'%character_set_server%'" | $CMD "-p$PW" | $AWK '{print $2}' | $SED -e 1d`
-               ALLCHARSETS=`echo "show character set" | $CMD "-p$PW" | $AWK 
'{print $1}' | $SED -e 1d | $GREP -iv utf8\|ucs2`
+               ALLCHARSETS=`echo "show character set" | $CMD "-p$PW" | $AWK 
'{print $1}' | $SED -e 1d | $GREP -iv -e "utf8\|ucs2"`
        else
                CURRCHARSET=`echo "show variables like 
'%character_set_server%'" | $CMD | $AWK '{print $2}' | $SED -e 1d`
-               ALLCHARSETS=`echo "show character set" | $CMD | $AWK '{print 
$1}' | $SED -e 1d | $GREP -iv utf8\|ucs2`
+               ALLCHARSETS=`echo "show character set" | $CMD | $AWK '{print 
$1}' | $SED -e 1d | $GREP -iv -e "utf8\|ucs2"`
        fi
 
        while [ `echo "$ALLCHARSETS" | $GREP -icw $CURRCHARSET`  = "0" ]
_______________________________________________
Devel mailing list
Devel@lists.openser.org
http://lists.openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to