Dmitry Grigoryev writes:
> Hello
>
> I have followed problem:
>
> Table:
> CREATE TABLE test (
> field1 mediumtext
> );
>
> Insert:
> INSERT INTO test VALUES ('2222222(100 Kb of '2')222');
>
> Select1:
> SELECT field1 FROM test;
> OK. I get 100 Kb of '2'.
>
> Select2:
> SET CHARACTER SET cp1251_koi8;
> SELECT field1 FROM test;
> ??? I get only 34465 byte.
>
> I use mysql 3.23.33, 4.0.0-alpha on FreeBSD 4.3, 4.4.
>
> If I use text instead mediumtext Select2 work correctly. But I use string >65 Kb.
> If I use longtext, longblob or mediumblob problem repeat.
>
> Can I use long string with SET CHARACTER SET cp1251_koi8 option?
>
> ---
> Dmitry Grigoryev
Hi!
Thank you for your bug report, which helped us fix the above bug. A
fix will come up in the next 3.23 and 4.0 releases.
This is a patch that fixes a bug in 4.0.1 :
*** ../mysql-4.1/sql/convert.cc Tue Mar 12 19:57:54 2002
--- sql/convert.cc Thu Mar 28 15:36:58 2002
***************
*** 466,472 ****
packet->realloc(packet_length+5+length))
return 1;
char *to=(char*) net_store_length((char*) packet->ptr()+packet_length,
! length);
for (const char *end=from+length ; from != end ; from++)
*to++= to_map[(uchar) *from];
--- 456,462 ----
packet->realloc(packet_length+5+length))
return 1;
char *to=(char*) net_store_length((char*) packet->ptr()+packet_length,
! (ulonglong)length);
for (const char *end=from+length ; from != end ; from++)
*to++= to_map[(uchar) *from];
--
Regards,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com
---------------------------------------------------------------------
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