List:Internals« Previous MessageNext Message »
From:paul Date:March 12 2005 4:16am
Subject:bk commit - mysqldoc tree (paul:1.2714)
View as plain text  
Below is the list of changes that have just been committed into a local
mysqldoc repository of paul. When paul does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.2714 05/03/11 22:16:18 paul@stripped +1 -0
  manual.texi:
    Remove useless paragraph.
    Rephrase "case sensitive" discussion in terms of collation
    rather than binary strings.

  Docs/manual.texi
    1.2544 05/03/11 22:15:05 paul@stripped +20 -15
    Remove useless paragraph.
    Rephrase "case sensitive" discussion in terms of collation
    rather than binary strings.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	paul
# Host:	frost.snake.net
# Root:	/Volumes/frost2/MySQL/bk/mysqldoc

--- 1.2543/Docs/manual.texi	2005-03-11 20:17:40 -06:00
+++ 1.2544/Docs/manual.texi	2005-03-11 22:15:05 -06:00
@@ -94945,27 +94945,32 @@
 some character sets that are never case insensitive, such as @code{czech}).
 This means that if you search with @code{@var{col_name} LIKE 'a%'}, you get all
 column values that start with @code{A} or @code{a}. If you want to make this
-search case sensitive, make sure that one of the operands is a binary string.
-You can do this with the @code{BINARY} operator. Write the condition as either
-@code{BINARY @var{col_name} LIKE 'a%'} or @code{@var{col_name} LIKE BINARY 'a%'}.
+search case sensitive, make sure that one of the operands has a case sensitive
+or binary collation. For example, if you are comparing a column and a string
+that both have the @code{latin1} character set, you can use the @code{COLLATE}
+operator to cause either operand to have the @code{latin1_general_cs} or
+@code{latin1_bin} collation.  For example:
 
-If you want a column always to be treated in case-sensitive fashion,
-declare it as @code{BINARY}. @xref{CREATE TABLE, , @code{CREATE TABLE}}.
+@example
+@var{col_name} COLLATE latin1_general_cs LIKE 'a%'
+@var{col_name} LIKE 'a%' COLLATE latin1_general_cs
+@var{col_name} COLLATE latin1_bin LIKE 'a%'
+@var{col_name} LIKE 'a%' COLLATE latin1_bin
+@end example
+
+If you want a column always to be treated in case-sensitive fashion, declare
+it with a case sensitive or binary collation.
+@xref{CREATE TABLE, , @code{CREATE TABLE}}.
+
+Before MySQL 4.1, @code{COLLATE} is unavailable. Use the @code{BINARY}
+operator in expressions to treat a string as a binary string: @code{BINARY
+@var{col_name} LIKE 'a%'} or @code{@var{col_name} LIKE BINARY 'a%'}.
+In column declarations, use the @code{BINARY} attribute.
 
 Simple comparison operations (@code{>=, >, =, <, <=}, sorting, and grouping)
 are based on each character's ``sort value.'' Characters with the same
 sort value (such as @samp{E}, @samp{e}, and @samp{@'e}) are treated as the
 same character.
-
-If you are using Chinese data in the so-called @code{big5} encoding, you
-want to make all character columns @code{BINARY}. This works because the
-sorting order of @code{big5} encoding characters is based on the order of
-ASCII codes. As of MySQL 4.1, you can explicitly declare that a column should
-use the @code{big5} character set:
-
-@example
-CREATE TABLE t (name CHAR(40) CHARACTER SET big5);
-@end example
 
 
 @node Using DATE, Problems with NULL, Case sensitivity, Query Issues
Thread
bk commit - mysqldoc tree (paul:1.2714)paul12 Mar