Loading Docs/manual.texi +11 −0 Original line number Diff line number Diff line Loading @@ -30091,6 +30091,15 @@ mysql> select OCTET_LENGTH('text'); Note that for @code{CHAR_LENGTH()}, multi-byte characters are only counted once. @findex BIT_LENGTH() @item BIT_LENGTH(str) Returns the length of the string @code{str} in bits: @example mysql> select BIT_LENGTH('text'); -> 32 @end example @findex LOCATE() @findex POSITION() @item LOCATE(substr,str) Loading Loading @@ -47996,6 +48005,8 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}. @itemize @bullet @item ODBC compatibility: added @code{BIT_LENGTH()} function. @item Added @code{CAST()} and @code{CONVERT()} functions. @item Changed order of how keys are created in tables. mysql-test/r/func_str.result +3 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,9 @@ hellomonty select length('\n\t\r\b\0\_\%\\'); length('\n\t\r\b\0\_\%\\') 10 select bit_length('\n\t\r\b\0\_\%\\'); bit_length('\n\t\r\b\0\_\%\\') 80 select concat('monty',' was here ','again'),length('hello'),char(ascii('h')); concat('monty',' was here ','again') length('hello') char(ascii('h')) monty was here again 5 h Loading mysql-test/r/handler.result +1 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,7 @@ a b handler t2 read next; a b 18 eee alter table t1 type=MyISAM; handler t2 read next; a b 19 fff Loading mysql-test/t/func_str.test +1 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ drop table if exists t1; select 'hello',"'hello'",'""hello""','''h''e''l''l''o''',"hel""lo",'hel\'lo'; select 'hello' 'monty'; select length('\n\t\r\b\0\_\%\\'); select bit_length('\n\t\r\b\0\_\%\\'); select concat('monty',' was here ','again'),length('hello'),char(ascii('h')); select locate('he','hello'),locate('he','hello',2),locate('lo','hello',2) ; select instr('hello','HE'), instr('hello',binary 'HE'), instr(binary 'hello','HE'); Loading mysql-test/t/handler.test +2 −0 Original line number Diff line number Diff line Loading @@ -58,8 +58,10 @@ handler t2 read a=(19) where b="yyy"; handler t2 read first; handler t2 read next; alter table t1 type=MyISAM; handler t2 read next; !$1064 handler t2 read last; handler t2 close; drop table if exists t1; Loading
Docs/manual.texi +11 −0 Original line number Diff line number Diff line Loading @@ -30091,6 +30091,15 @@ mysql> select OCTET_LENGTH('text'); Note that for @code{CHAR_LENGTH()}, multi-byte characters are only counted once. @findex BIT_LENGTH() @item BIT_LENGTH(str) Returns the length of the string @code{str} in bits: @example mysql> select BIT_LENGTH('text'); -> 32 @end example @findex LOCATE() @findex POSITION() @item LOCATE(substr,str) Loading Loading @@ -47996,6 +48005,8 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}. @itemize @bullet @item ODBC compatibility: added @code{BIT_LENGTH()} function. @item Added @code{CAST()} and @code{CONVERT()} functions. @item Changed order of how keys are created in tables.
mysql-test/r/func_str.result +3 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,9 @@ hellomonty select length('\n\t\r\b\0\_\%\\'); length('\n\t\r\b\0\_\%\\') 10 select bit_length('\n\t\r\b\0\_\%\\'); bit_length('\n\t\r\b\0\_\%\\') 80 select concat('monty',' was here ','again'),length('hello'),char(ascii('h')); concat('monty',' was here ','again') length('hello') char(ascii('h')) monty was here again 5 h Loading
mysql-test/r/handler.result +1 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,7 @@ a b handler t2 read next; a b 18 eee alter table t1 type=MyISAM; handler t2 read next; a b 19 fff Loading
mysql-test/t/func_str.test +1 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ drop table if exists t1; select 'hello',"'hello'",'""hello""','''h''e''l''l''o''',"hel""lo",'hel\'lo'; select 'hello' 'monty'; select length('\n\t\r\b\0\_\%\\'); select bit_length('\n\t\r\b\0\_\%\\'); select concat('monty',' was here ','again'),length('hello'),char(ascii('h')); select locate('he','hello'),locate('he','hello',2),locate('lo','hello',2) ; select instr('hello','HE'), instr('hello',binary 'HE'), instr(binary 'hello','HE'); Loading
mysql-test/t/handler.test +2 −0 Original line number Diff line number Diff line Loading @@ -58,8 +58,10 @@ handler t2 read a=(19) where b="yyy"; handler t2 read first; handler t2 read next; alter table t1 type=MyISAM; handler t2 read next; !$1064 handler t2 read last; handler t2 close; drop table if exists t1;