List:Commits« Previous MessageNext Message »
From:paul Date:January 25 2006 8:49pm
Subject:svn commit - mysqldoc@docsrva: r1037 - in trunk: . refman-4.1 refman-5.0 refman-5.1
View as plain text  
Author: paul
Date: 2006-01-25 21:49:37 +0100 (Wed, 25 Jan 2006)
New Revision: 1037

Log:
 r2529@kite-hub:  paul | 2006-01-25 14:49:24 -0600
 Generalize some string statements to include binary strings.


Modified:
   trunk/
   trunk/refman-4.1/charset.xml
   trunk/refman-4.1/language-structure.xml
   trunk/refman-4.1/sql-syntax.xml
   trunk/refman-4.1/storage-engines.xml
   trunk/refman-5.0/charset.xml
   trunk/refman-5.0/language-structure.xml
   trunk/refman-5.0/sql-syntax.xml
   trunk/refman-5.0/storage-engines.xml
   trunk/refman-5.1/charset.xml
   trunk/refman-5.1/language-structure.xml
   trunk/refman-5.1/sql-syntax.xml
   trunk/refman-5.1/storage-engines.xml


Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:6663
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:2527
   + b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:6663
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:2529

Modified: trunk/refman-4.1/charset.xml
===================================================================
--- trunk/refman-4.1/charset.xml	2006-01-25 20:04:45 UTC (rev 1036)
+++ trunk/refman-4.1/charset.xml	2006-01-25 20:49:37 UTC (rev 1037)
@@ -1936,6 +1936,24 @@
       </para>
 
       <para>
+        If a string input or function result is a binary string, the
+        string has no character set or collation. This can be check by
+        using the <literal>CHARSET()</literal> and
+        <literal>COLLATION()</literal> functions, both of which return
+        <literal>binary</literal> to indicate that their argument is a
+        binary string:
+      </para>
+
+<programlisting>
+mysql&gt; <userinput>SELECT CHARSET(BINARY 'a'), COLLATION(BINARY 'a');</userinput>
++---------------------+-----------------------+
+| CHARSET(BINARY 'a') | COLLATION(BINARY 'a') |
++---------------------+-----------------------+
+| binary              | binary                |
++---------------------+-----------------------+
+</programlisting>
+
+      <para>
         For operations that combine multiple string inputs and return a
         single string output, the <quote>aggregation rules</quote> of
         standard SQL apply for determining the collation of the result:

Modified: trunk/refman-4.1/language-structure.xml
===================================================================
--- trunk/refman-4.1/language-structure.xml	2006-01-25 20:04:45 UTC (rev 1036)
+++ trunk/refman-4.1/language-structure.xml	2006-01-25 20:49:37 UTC (rev 1037)
@@ -94,9 +94,10 @@
       <title>&title-string-syntax;</title>
 
       <para>
-        A string is a sequence of characters, enclosed within either
-        single quote (&lsquo;<literal>'</literal>&rsquo;) or double
-        quote (&lsquo;<literal>"</literal>&rsquo;) characters. Examples:
+        A string is a sequence of bytes or characters, enclosed within
+        either single quote (&lsquo;<literal>'</literal>&rsquo;) or
+        double quote (&lsquo;<literal>"</literal>&rsquo;) characters.
+        Examples:
       </para>
 
 <programlisting>
@@ -112,7 +113,18 @@
       </para>
 
       <para>
-        As of MySQL 4.1.1, string literals may have an optional
+        As of MySQL 4.1.1, a <firstterm>binary string</firstterm> is a
+        string of bytes that has no character set or collation. A
+        <firstterm>non-binary string</firstterm> is a string of
+        characters that has a character set and collation. For both
+        types of strings, comparisons are based on the numeric values of
+        the string unit. For binary strings, the unit is the byte. For
+        non-binary strings the unit is the character and some character
+        sets allow multi-byte characters.
+      </para>
+
+      <para>
+        Also as of MySQL 4.1.1, string literals may have an optional
         character set introducer and <literal>COLLATE</literal> clause:
       </para>
 

Modified: trunk/refman-4.1/sql-syntax.xml
===================================================================
--- trunk/refman-4.1/sql-syntax.xml	2006-01-25 20:04:45 UTC (rev 1036)
+++ trunk/refman-4.1/sql-syntax.xml	2006-01-25 20:49:37 UTC (rev 1037)
@@ -1255,8 +1255,11 @@
   | TIME
   | TIMESTAMP
   | DATETIME
+  | YEAR
   | CHAR(<replaceable>length</replaceable>) [BINARY | ASCII | UNICODE]
   | VARCHAR(<replaceable>length</replaceable>) [BINARY]
+  | BINARY(<replaceable>length</replaceable>)
+  | VARBINARY(<replaceable>length</replaceable>)
   | TINYBLOB
   | BLOB
   | MEDIUMBLOB

Modified: trunk/refman-4.1/storage-engines.xml
===================================================================
--- trunk/refman-4.1/storage-engines.xml	2006-01-25 20:04:45 UTC (rev 1036)
+++ trunk/refman-4.1/storage-engines.xml	2006-01-25 20:49:37 UTC (rev 1037)
@@ -1048,10 +1048,10 @@
 
           <listitem>
             <para>
-              <literal>CHAR</literal> columns are space-padded to the
-              column width. This is also true for
-              <literal>NUMERIC</literal>, and <literal>DECIMAL</literal>
-              columns.
+              <literal>CHAR</literal> and <literal>BINARY</literal>
+              columns are space-padded to the column width. This is also
+              true for <literal>NUMERIC</literal>, and
+              <literal>DECIMAL</literal> columns.
             </para>
           </listitem>
 

Modified: trunk/refman-5.0/charset.xml
===================================================================
--- trunk/refman-5.0/charset.xml	2006-01-25 20:04:45 UTC (rev 1036)
+++ trunk/refman-5.0/charset.xml	2006-01-25 20:49:37 UTC (rev 1037)
@@ -1848,6 +1848,24 @@
       </para>
 
       <para>
+        If a string input or function result is a binary string, the
+        string has no character set or collation. This can be check by
+        using the <literal>CHARSET()</literal> and
+        <literal>COLLATION()</literal> functions, both of which return
+        <literal>binary</literal> to indicate that their argument is a
+        binary string:
+      </para>
+
+<programlisting>
+mysql&gt; <userinput>SELECT CHARSET(BINARY 'a'), COLLATION(BINARY 'a');</userinput>
++---------------------+-----------------------+
+| CHARSET(BINARY 'a') | COLLATION(BINARY 'a') |
++---------------------+-----------------------+
+| binary              | binary                |
++---------------------+-----------------------+
+</programlisting>
+
+      <para>
         For operations that combine multiple string inputs and return a
         single string output, the <quote>aggregation rules</quote> of
         standard SQL apply for determining the collation of the result:

Modified: trunk/refman-5.0/language-structure.xml
===================================================================
--- trunk/refman-5.0/language-structure.xml	2006-01-25 20:04:45 UTC (rev 1036)
+++ trunk/refman-5.0/language-structure.xml	2006-01-25 20:49:37 UTC (rev 1037)
@@ -94,9 +94,10 @@
       <title>&title-string-syntax;</title>
 
       <para>
-        A string is a sequence of characters, enclosed within either
-        single quote (&lsquo;<literal>'</literal>&rsquo;) or double
-        quote (&lsquo;<literal>"</literal>&rsquo;) characters. Examples:
+        A string is a sequence of bytes or characters, enclosed within
+        either single quote (&lsquo;<literal>'</literal>&rsquo;) or
+        double quote (&lsquo;<literal>"</literal>&rsquo;) characters.
+        Examples:
       </para>
 
 <programlisting>
@@ -112,6 +113,17 @@
       </para>
 
       <para>
+        A <firstterm>binary string</firstterm> is a string of bytes that
+        has no character set or collation. A <firstterm>non-binary
+        string</firstterm> is a string of characters that has a
+        character set and collation. For both types of strings,
+        comparisons are based on the numeric values of the string unit.
+        For binary strings, the unit is the byte. For non-binary strings
+        the unit is the character and some character sets allow
+        multi-byte characters.
+      </para>
+
+      <para>
         String literals may have an optional character set introducer
         and <literal>COLLATE</literal> clause:
       </para>

Modified: trunk/refman-5.0/sql-syntax.xml
===================================================================
--- trunk/refman-5.0/sql-syntax.xml	2006-01-25 20:04:45 UTC (rev 1036)
+++ trunk/refman-5.0/sql-syntax.xml	2006-01-25 20:49:37 UTC (rev 1037)
@@ -1298,8 +1298,11 @@
   | TIME
   | TIMESTAMP
   | DATETIME
+  | YEAR
   | CHAR(<replaceable>length</replaceable>) [BINARY | ASCII | UNICODE]
   | VARCHAR(<replaceable>length</replaceable>) [BINARY]
+  | BINARY(<replaceable>length</replaceable>)
+  | VARBINARY(<replaceable>length</replaceable>)
   | TINYBLOB
   | BLOB
   | MEDIUMBLOB

Modified: trunk/refman-5.0/storage-engines.xml
===================================================================
--- trunk/refman-5.0/storage-engines.xml	2006-01-25 20:04:45 UTC (rev 1036)
+++ trunk/refman-5.0/storage-engines.xml	2006-01-25 20:49:37 UTC (rev 1037)
@@ -1064,6 +1064,10 @@
               column width. This is also true for
               <literal>NUMERIC</literal>, and <literal>DECIMAL</literal>
               columns created before MySQL 5.0.3.
+              <literal>BINARY</literal> columns are space-padded to the
+              column width before MySQL 5.0.15. As of 5.0.15,
+              <literal>BINARY</literal> columns are padded with
+              <literal>0x00</literal> bytes.
             </para>
           </listitem>
 

Modified: trunk/refman-5.1/charset.xml
===================================================================
--- trunk/refman-5.1/charset.xml	2006-01-25 20:04:45 UTC (rev 1036)
+++ trunk/refman-5.1/charset.xml	2006-01-25 20:49:37 UTC (rev 1037)
@@ -1840,6 +1840,24 @@
       </para>
 
       <para>
+        If a string input or function result is a binary string, the
+        string has no character set or collation. This can be check by
+        using the <literal>CHARSET()</literal> and
+        <literal>COLLATION()</literal> functions, both of which return
+        <literal>binary</literal> to indicate that their argument is a
+        binary string:
+      </para>
+
+<programlisting>
+mysql&gt; <userinput>SELECT CHARSET(BINARY 'a'), COLLATION(BINARY 'a');</userinput>
++---------------------+-----------------------+
+| CHARSET(BINARY 'a') | COLLATION(BINARY 'a') |
++---------------------+-----------------------+
+| binary              | binary                |
++---------------------+-----------------------+
+</programlisting>
+
+      <para>
         For operations that combine multiple string inputs and return a
         single string output, the <quote>aggregation rules</quote> of
         standard SQL apply for determining the collation of the result:

Modified: trunk/refman-5.1/language-structure.xml
===================================================================
--- trunk/refman-5.1/language-structure.xml	2006-01-25 20:04:45 UTC (rev 1036)
+++ trunk/refman-5.1/language-structure.xml	2006-01-25 20:49:37 UTC (rev 1037)
@@ -94,9 +94,10 @@
       <title>&title-string-syntax;</title>
 
       <para>
-        A string is a sequence of characters, enclosed within either
-        single quote (&lsquo;<literal>'</literal>&rsquo;) or double
-        quote (&lsquo;<literal>"</literal>&rsquo;) characters. Examples:
+        A string is a sequence of bytes or characters, enclosed within
+        either single quote (&lsquo;<literal>'</literal>&rsquo;) or
+        double quote (&lsquo;<literal>"</literal>&rsquo;) characters.
+        Examples:
       </para>
 
 <programlisting>
@@ -112,6 +113,17 @@
       </para>
 
       <para>
+        A <firstterm>binary string</firstterm> is a string of bytes that
+        has no character set or collation. A <firstterm>non-binary
+        string</firstterm> is a string of characters that has a
+        character set and collation. For both types of strings,
+        comparisons are based on the numeric values of the string unit.
+        For binary strings, the unit is the byte. For non-binary strings
+        the unit is the character and some character sets allow
+        multi-byte characters.
+      </para>
+
+      <para>
         String literals may have an optional character set introducer
         and <literal>COLLATE</literal> clause:
       </para>

Modified: trunk/refman-5.1/sql-syntax.xml
===================================================================
--- trunk/refman-5.1/sql-syntax.xml	2006-01-25 20:04:45 UTC (rev 1036)
+++ trunk/refman-5.1/sql-syntax.xml	2006-01-25 20:49:37 UTC (rev 1037)
@@ -1516,8 +1516,11 @@
   | TIME
   | TIMESTAMP
   | DATETIME
+  | YEAR
   | CHAR(<replaceable>length</replaceable>) [BINARY | ASCII | UNICODE]
   | VARCHAR(<replaceable>length</replaceable>) [BINARY]
+  | BINARY(<replaceable>length</replaceable>)
+  | VARBINARY(<replaceable>length</replaceable>)
   | TINYBLOB
   | BLOB
   | MEDIUMBLOB

Modified: trunk/refman-5.1/storage-engines.xml
===================================================================
--- trunk/refman-5.1/storage-engines.xml	2006-01-25 20:04:45 UTC (rev 1036)
+++ trunk/refman-5.1/storage-engines.xml	2006-01-25 20:49:37 UTC (rev 1037)
@@ -1039,7 +1039,8 @@
           <listitem>
             <para>
               <literal>CHAR</literal> columns are space-padded to the
-              column width.
+              column width. <literal>BINARY</literal> columns are padded
+              with <literal>0x00</literal> bytes to the column width.
             </para>
           </listitem>
 

Thread
svn commit - mysqldoc@docsrva: r1037 - in trunk: . refman-4.1 refman-5.0 refman-5.1paul25 Jan