>Description:
If a SET coumn contains values with , (comma), it's impossible to
distinguish values with a , from multiple values.
>How-To-Repeat:

mysql> alter table test add SetCol SET ('BLONDE', 'TALL', 'BLONDE,TALL');
Query OK, 0 rows affected (0.01 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> insert into test set SetCol = 'BLONDE\,TALL';
Query OK, 1 row affected (0.01 sec)

mysql> insert into test set SetCol = 'BLONDE,TALL';
Query OK, 1 row affected (0.00 sec)

mysql> select * from tes
test         test.SetCol  
mysql> select * from test;
+-----+-------------+
| ID  | SetCol      |
+-----+-------------+
| 001 | BLONDE,TALL |
| 002 | BLONDE,TALL |
+-----+-------------+
2 rows in set (0.00 sec)

Now, if I need to parse the value of SetCol, how can I differentiate the
value in SetCol for ID == 001 and ID == 002?  The first value is just one
value (BLONDE,TALL), while ID == 002 returned two values for SetCol (BLONDE
and TALL).
>Fix:
A fix might be to escape the , in the ID == 001 case, like when returning:
'BLONDE\,TALL', because that also was, what the column was set to.

>Submitter-Id:  <submitter ID>
>Originator:    Alexander Skwar
>Organization:
  Alexander Skwar
  -- 
  How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
  Homepage:     http://www.digitalprojects.com   |   http://www.iso-top.de
     iso-top.de - Die günstige Art an Linux Distributionen zu kommen
>
>MySQL support: none
>Synopsis:      Values of SET cols with , cannot be differentiated
>Severity:      serious
>Priority:      high
>Category:      mysql
>Class:         sw-bug
>Release:       mysql-3.23.38 (Linux-Mandrake MySQL RPM)
>Server: /usr/bin/mysqladmin  Ver 8.20 Distrib 3.23.38, for pc-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version          3.23.38
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/lib/mysql/mysql.sock
Uptime:                 7 hours 59 min 52 sec

Threads: 10  Questions: 2837  Slow queries: 0  Opens: 355  Flush tables: 1  Open 
tables: 11 Queries per second avg: 0.099
>Environment:
        
System: Linux teich.garten.digitalprojects.com 2.4.3-27mdk #1 Mon May 7 19:20:27 CEST 
2001 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.96/specs
gcc version 2.96 20000731 (Linux-Mandrake 8.1 2.96-0.53mdk)
Compilation info: CC='gcc'  CFLAGS='-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro 
-march=i586 -ffast-math -fno-strength-reduce -fno-omit-frame-pointer'  CXX='g++'  
CXXFLAGS='-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math 
-fno-strength-reduce -fno-omit-frame-pointer'  LDFLAGS=''
LIBC: 
lrwxrwxrwx    1 root     root           13 Mai 27 23:05 /lib/libc.so.6 -> libc-2.2.3.so
-rwxr-xr-x    1 root     root      1242344 Mai 29 15:58 /lib/libc-2.2.3.so
-rw-r--r--    1 root     root     26897924 Mai 29 15:21 /usr/lib/libc.a
-rw-r--r--    1 root     root          178 Mai 29 15:21 /usr/lib/libc.so
-rw-r--r--    1 root     root      2330246 Jun  1 10:05 /usr/lib/libc-client.a
Configure command: ./configure  --enable-shared --enable-thread-safe-client 
--enable-assembler --with-mysqld-user=mysql 
--with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/ 
--with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/usr/sbin 
--sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql 
--infodir=/usr/share/info --includedir=/usr/include --mandir=/usr/share/man 
--with-berkeley-db --without-innobase '--with-comment=Linux-Mandrake MySQL RPM'


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to