List:Commits« Previous MessageNext Message »
From:paul Date:April 12 2008 1:50am
Subject:svn commit - mysqldoc@docsrva: r10460 - in trunk: . dynamic-docs/changelog it/refman-5.1 pt/refman-5.1 refman-5.1 refman-6.0
View as plain text  
Author: paul
Date: 2008-04-12 03:50:00 +0200 (Sat, 12 Apr 2008)
New Revision: 10460

Log:
 r30626@frost:  paul | 2008-04-11 20:49:12 -0500
 Document bugfix:
 Bug#32753: PAD_CHAR_TO_FULL_LENGTH is not documented and interferes with
 grant tables
 
 Also documented the PAD_CHAR_TO_FULL_LENGTH SQL mode. (Added in 5.1.20
 but never documented.)


Modified:
   trunk/dynamic-docs/changelog/mysqld-1.xml
   trunk/it/refman-5.1/data-types.xml
   trunk/it/refman-5.1/dba-core.xml
   trunk/pt/refman-5.1/data-types.xml
   trunk/pt/refman-5.1/dba-core.xml
   trunk/refman-5.1/data-types.xml
   trunk/refman-5.1/dba-core.xml
   trunk/refman-6.0/data-types.xml
   trunk/refman-6.0/dba-core.xml

Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:35828
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:30616
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:30647
   + 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:35828
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:30626
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:30647


Modified: trunk/dynamic-docs/changelog/mysqld-1.xml
===================================================================
--- trunk/dynamic-docs/changelog/mysqld-1.xml	2008-04-11 18:38:18 UTC (rev 10459)
+++ trunk/dynamic-docs/changelog/mysqld-1.xml	2008-04-12 01:50:00 UTC (rev 10460)
Changed blocks: 1, Lines Added: 61, Lines Deleted: 0; 1931 bytes

@@ -15549,4 +15549,65 @@
 
   </logentry>
 
+  <logentry entrytype="feature">
+
+    <tags>
+      <manual type="PAD_CHAR_TO_FULL_LENGTH"/>
+      <manual type="sql_mode"/>
+    </tags>
+
+    <versions>
+      <version ver="5.1.20"/>
+    </versions>
+
+    <message>
+
+      <para>
+        Added a new <literal>PAD_CHAR_TO_FULL_LENGTH</literal> SQL mode.
+        By default, trailing spaces are trimmed from
+        <literal>CHAR</literal> column values on retrieval. If
+        <literal>PAD_CHAR_TO_FULL_LENGTH</literal> is enabled, trimming
+        does not occur and retrieved <literal>CHAR</literal> values are
+        padded to their full length. This mode does not apply to
+        <literal>VARCHAR</literal> columns, for which trailing spaces
+        are retained on retrieval.
+      </para>
+
+    </message>
+
+  </logentry>
+
+  <logentry entrytype="bug">
+
+    <tags>
+      <manual type="PAD_CHAR_TO_FULL_LENGTH"/>
+      <manual type="sql_mode"/>
+      <manual type="privileges"/>
+    </tags>
+
+    <bugs>
+      <fixes bugid="32753"/>
+    </bugs>
+
+    <versions>
+      <version ver="5.1.24"/>
+      <version ver="6.0.5"/>
+    </versions>
+
+    <message>
+
+      <para>
+        Enabling the <literal>PAD_CHAR_TO_FULL_LENGTH</literal> SQL mode
+        caused privilege-loading operations (such as <literal>FLUSH
+        PRIVILEGES</literal>) to include trailing spaces from grant
+        table values stored in <literal>CHAR</literal> columns.
+        Authentication for incoming connections failed as a result. Now
+        privilege loading does not include trailing spaces, regardless
+        of SQL mode.
+      </para>
+
+    </message>
+
+  </logentry>
+
 </changelog>


Modified: trunk/it/refman-5.1/data-types.xml
===================================================================
--- trunk/it/refman-5.1/data-types.xml	2008-04-11 18:38:18 UTC (rev 10459)
+++ trunk/it/refman-5.1/data-types.xml	2008-04-12 01:50:00 UTC (rev 10460)
Changed blocks: 2, Lines Added: 5, Lines Deleted: 2; 1030 bytes

@@ -1357,7 +1357,9 @@
           <note>
             <para>
               Trailing spaces are removed when <literal>CHAR</literal>
-              values are retrieved.
+              values are retrieved unless the
+              <literal>PAD_CHAR_TO_FULL_LENGTH</literal> SQL mode is
+              enabled.
             </para>
           </note>
 

@@ -3926,7 +3928,8 @@
         can be any value from 0 to 255. When <literal>CHAR</literal>
         values are stored, they are right-padded with spaces to the
         specified length. When <literal>CHAR</literal> values are
-        retrieved, trailing spaces are removed.
+        retrieved, trailing spaces are removed unless the
+        <literal>PAD_CHAR_TO_FULL_LENGTH</literal> SQL mode is enabled.
       </para>
 
       <para>


Modified: trunk/it/refman-5.1/dba-core.xml
===================================================================
--- trunk/it/refman-5.1/dba-core.xml	2008-04-11 18:38:18 UTC (rev 10459)
+++ trunk/it/refman-5.1/dba-core.xml	2008-04-12 01:50:00 UTC (rev 10460)
Changed blocks: 1, Lines Added: 56, Lines Deleted: 0; 2234 bytes

@@ -10710,6 +10710,62 @@
         <listitem>
           <para>
             <indexterm>
+              <primary>PAD_CHAR_TO_FULL_LENGTH SQL mode</primary>
+            </indexterm>
+
+            <literal>PAD_CHAR_TO_FULL_LENGTH</literal>
+          </para>
+
+          <para>
+            By default, trailing spaces are trimmed from
+            <literal>CHAR</literal> column values on retrieval. If
+            <literal>PAD_CHAR_TO_FULL_LENGTH</literal> is enabled,
+            trimming does not occur and retrieved
+            <literal>CHAR</literal> values are padded to their full
+            length. This mode does not apply to
+            <literal>VARCHAR</literal> columns, for which trailing
+            spaces are retained on retrieval. This mode was added in
+            MySQL 5.1.20.
+          </para>
+
+<programlisting>
+<!--
+mysql> DROP TABLE IF EXISTS t1;
+Query OK, 0 rows affected (0.00 sec)
+-->
+mysql&gt; <userinput>CREATE TABLE t1 (c1 CHAR(10));</userinput>
+Query OK, 0 rows affected (0.37 sec)
+
+mysql&gt; <userinput>INSERT INTO t1 (c1) VALUES('xy');</userinput>
+Query OK, 1 row affected (0.01 sec)
+
+mysql&gt; <userinput>SET sql_mode = '';</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>SELECT c1, CHAR_LENGTH(c1) FROM t1;</userinput>
++------+-----------------+
+| c1   | CHAR_LENGTH(c1) |
++------+-----------------+
+| xy   |               2 | 
++------+-----------------+
+1 row in set (0.00 sec)
+
+mysql&gt; <userinput>SET sql_mode = 'PAD_CHAR_TO_FULL_LENGTH';</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>SELECT c1, CHAR_LENGTH(c1) FROM t1;</userinput>
++------------+-----------------+
+| c1         | CHAR_LENGTH(c1) |
++------------+-----------------+
+| xy         |              10 | 
++------------+-----------------+
+1 row in set (0.00 sec)
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            <indexterm>
               <primary>PIPES_AS_CONCAT SQL mode</primary>
             </indexterm>
 


Modified: trunk/pt/refman-5.1/data-types.xml
===================================================================
--- trunk/pt/refman-5.1/data-types.xml	2008-04-11 18:38:18 UTC (rev 10459)
+++ trunk/pt/refman-5.1/data-types.xml	2008-04-12 01:50:00 UTC (rev 10460)
Changed blocks: 2, Lines Added: 5, Lines Deleted: 2; 1030 bytes

@@ -1357,7 +1357,9 @@
           <note>
             <para>
               Trailing spaces are removed when <literal>CHAR</literal>
-              values are retrieved.
+              values are retrieved unless the
+              <literal>PAD_CHAR_TO_FULL_LENGTH</literal> SQL mode is
+              enabled.
             </para>
           </note>
 

@@ -3926,7 +3928,8 @@
         can be any value from 0 to 255. When <literal>CHAR</literal>
         values are stored, they are right-padded with spaces to the
         specified length. When <literal>CHAR</literal> values are
-        retrieved, trailing spaces are removed.
+        retrieved, trailing spaces are removed unless the
+        <literal>PAD_CHAR_TO_FULL_LENGTH</literal> SQL mode is enabled.
       </para>
 
       <para>


Modified: trunk/pt/refman-5.1/dba-core.xml
===================================================================
--- trunk/pt/refman-5.1/dba-core.xml	2008-04-11 18:38:18 UTC (rev 10459)
+++ trunk/pt/refman-5.1/dba-core.xml	2008-04-12 01:50:00 UTC (rev 10460)
Changed blocks: 1, Lines Added: 56, Lines Deleted: 0; 2234 bytes

@@ -10710,6 +10710,62 @@
         <listitem>
           <para>
             <indexterm>
+              <primary>PAD_CHAR_TO_FULL_LENGTH SQL mode</primary>
+            </indexterm>
+
+            <literal>PAD_CHAR_TO_FULL_LENGTH</literal>
+          </para>
+
+          <para>
+            By default, trailing spaces are trimmed from
+            <literal>CHAR</literal> column values on retrieval. If
+            <literal>PAD_CHAR_TO_FULL_LENGTH</literal> is enabled,
+            trimming does not occur and retrieved
+            <literal>CHAR</literal> values are padded to their full
+            length. This mode does not apply to
+            <literal>VARCHAR</literal> columns, for which trailing
+            spaces are retained on retrieval. This mode was added in
+            MySQL 5.1.20.
+          </para>
+
+<programlisting>
+<!--
+mysql> DROP TABLE IF EXISTS t1;
+Query OK, 0 rows affected (0.00 sec)
+-->
+mysql&gt; <userinput>CREATE TABLE t1 (c1 CHAR(10));</userinput>
+Query OK, 0 rows affected (0.37 sec)
+
+mysql&gt; <userinput>INSERT INTO t1 (c1) VALUES('xy');</userinput>
+Query OK, 1 row affected (0.01 sec)
+
+mysql&gt; <userinput>SET sql_mode = '';</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>SELECT c1, CHAR_LENGTH(c1) FROM t1;</userinput>
++------+-----------------+
+| c1   | CHAR_LENGTH(c1) |
++------+-----------------+
+| xy   |               2 | 
++------+-----------------+
+1 row in set (0.00 sec)
+
+mysql&gt; <userinput>SET sql_mode = 'PAD_CHAR_TO_FULL_LENGTH';</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>SELECT c1, CHAR_LENGTH(c1) FROM t1;</userinput>
++------------+-----------------+
+| c1         | CHAR_LENGTH(c1) |
++------------+-----------------+
+| xy         |              10 | 
++------------+-----------------+
+1 row in set (0.00 sec)
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            <indexterm>
               <primary>PIPES_AS_CONCAT SQL mode</primary>
             </indexterm>
 


Modified: trunk/refman-5.1/data-types.xml
===================================================================
--- trunk/refman-5.1/data-types.xml	2008-04-11 18:38:18 UTC (rev 10459)
+++ trunk/refman-5.1/data-types.xml	2008-04-12 01:50:00 UTC (rev 10460)
Changed blocks: 2, Lines Added: 5, Lines Deleted: 2; 1021 bytes

@@ -1357,7 +1357,9 @@
           <note>
             <para>
               Trailing spaces are removed when <literal>CHAR</literal>
-              values are retrieved.
+              values are retrieved unless the
+              <literal>PAD_CHAR_TO_FULL_LENGTH</literal> SQL mode is
+              enabled.
             </para>
           </note>
 

@@ -3929,7 +3931,8 @@
         can be any value from 0 to 255. When <literal>CHAR</literal>
         values are stored, they are right-padded with spaces to the
         specified length. When <literal>CHAR</literal> values are
-        retrieved, trailing spaces are removed.
+        retrieved, trailing spaces are removed unless the
+        <literal>PAD_CHAR_TO_FULL_LENGTH</literal> SQL mode is enabled.
       </para>
 
       <para>


Modified: trunk/refman-5.1/dba-core.xml
===================================================================
--- trunk/refman-5.1/dba-core.xml	2008-04-11 18:38:18 UTC (rev 10459)
+++ trunk/refman-5.1/dba-core.xml	2008-04-12 01:50:00 UTC (rev 10460)
Changed blocks: 1, Lines Added: 56, Lines Deleted: 0; 2225 bytes

@@ -10726,6 +10726,62 @@
         <listitem>
           <para>
             <indexterm>
+              <primary>PAD_CHAR_TO_FULL_LENGTH SQL mode</primary>
+            </indexterm>
+
+            <literal>PAD_CHAR_TO_FULL_LENGTH</literal>
+          </para>
+
+          <para>
+            By default, trailing spaces are trimmed from
+            <literal>CHAR</literal> column values on retrieval. If
+            <literal>PAD_CHAR_TO_FULL_LENGTH</literal> is enabled,
+            trimming does not occur and retrieved
+            <literal>CHAR</literal> values are padded to their full
+            length. This mode does not apply to
+            <literal>VARCHAR</literal> columns, for which trailing
+            spaces are retained on retrieval. This mode was added in
+            MySQL 5.1.20.
+          </para>
+
+<programlisting>
+<!--
+mysql> DROP TABLE IF EXISTS t1;
+Query OK, 0 rows affected (0.00 sec)
+-->
+mysql&gt; <userinput>CREATE TABLE t1 (c1 CHAR(10));</userinput>
+Query OK, 0 rows affected (0.37 sec)
+
+mysql&gt; <userinput>INSERT INTO t1 (c1) VALUES('xy');</userinput>
+Query OK, 1 row affected (0.01 sec)
+
+mysql&gt; <userinput>SET sql_mode = '';</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>SELECT c1, CHAR_LENGTH(c1) FROM t1;</userinput>
++------+-----------------+
+| c1   | CHAR_LENGTH(c1) |
++------+-----------------+
+| xy   |               2 | 
++------+-----------------+
+1 row in set (0.00 sec)
+
+mysql&gt; <userinput>SET sql_mode = 'PAD_CHAR_TO_FULL_LENGTH';</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>SELECT c1, CHAR_LENGTH(c1) FROM t1;</userinput>
++------------+-----------------+
+| c1         | CHAR_LENGTH(c1) |
++------------+-----------------+
+| xy         |              10 | 
++------------+-----------------+
+1 row in set (0.00 sec)
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            <indexterm>
               <primary>PIPES_AS_CONCAT SQL mode</primary>
             </indexterm>
 


Modified: trunk/refman-6.0/data-types.xml
===================================================================
--- trunk/refman-6.0/data-types.xml	2008-04-11 18:38:18 UTC (rev 10459)
+++ trunk/refman-6.0/data-types.xml	2008-04-12 01:50:00 UTC (rev 10460)
Changed blocks: 2, Lines Added: 5, Lines Deleted: 2; 1021 bytes

@@ -1357,7 +1357,9 @@
           <note>
             <para>
               Trailing spaces are removed when <literal>CHAR</literal>
-              values are retrieved.
+              values are retrieved unless the
+              <literal>PAD_CHAR_TO_FULL_LENGTH</literal> SQL mode is
+              enabled.
             </para>
           </note>
 

@@ -3925,7 +3927,8 @@
         can be any value from 0 to 255. When <literal>CHAR</literal>
         values are stored, they are right-padded with spaces to the
         specified length. When <literal>CHAR</literal> values are
-        retrieved, trailing spaces are removed.
+        retrieved, trailing spaces are removed unless the
+        <literal>PAD_CHAR_TO_FULL_LENGTH</literal> SQL mode is enabled.
       </para>
 
       <para>


Modified: trunk/refman-6.0/dba-core.xml
===================================================================
--- trunk/refman-6.0/dba-core.xml	2008-04-11 18:38:18 UTC (rev 10459)
+++ trunk/refman-6.0/dba-core.xml	2008-04-12 01:50:00 UTC (rev 10460)
Changed blocks: 1, Lines Added: 55, Lines Deleted: 0; 2176 bytes

@@ -10602,6 +10602,61 @@
         <listitem>
           <para>
             <indexterm>
+              <primary>PAD_CHAR_TO_FULL_LENGTH SQL mode</primary>
+            </indexterm>
+
+            <literal>PAD_CHAR_TO_FULL_LENGTH</literal>
+          </para>
+
+          <para>
+            By default, trailing spaces are trimmed from
+            <literal>CHAR</literal> column values on retrieval. If
+            <literal>PAD_CHAR_TO_FULL_LENGTH</literal> is enabled,
+            trimming does not occur and retrieved
+            <literal>CHAR</literal> values are padded to their full
+            length. This mode does not apply to
+            <literal>VARCHAR</literal> columns, for which trailing
+            spaces are retained on retrieval.
+          </para>
+
+<programlisting>
+<!--
+mysql> DROP TABLE IF EXISTS t1;
+Query OK, 0 rows affected (0.00 sec)
+-->
+mysql&gt; <userinput>CREATE TABLE t1 (c1 CHAR(10));</userinput>
+Query OK, 0 rows affected (0.37 sec)
+
+mysql&gt; <userinput>INSERT INTO t1 (c1) VALUES('xy');</userinput>
+Query OK, 1 row affected (0.01 sec)
+
+mysql&gt; <userinput>SET sql_mode = '';</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>SELECT c1, CHAR_LENGTH(c1) FROM t1;</userinput>
++------+-----------------+
+| c1   | CHAR_LENGTH(c1) |
++------+-----------------+
+| xy   |               2 | 
++------+-----------------+
+1 row in set (0.00 sec)
+
+mysql&gt; <userinput>SET sql_mode = 'PAD_CHAR_TO_FULL_LENGTH';</userinput>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql&gt; <userinput>SELECT c1, CHAR_LENGTH(c1) FROM t1;</userinput>
++------------+-----------------+
+| c1         | CHAR_LENGTH(c1) |
++------------+-----------------+
+| xy         |              10 | 
++------------+-----------------+
+1 row in set (0.00 sec)
+</programlisting>
+        </listitem>
+
+        <listitem>
+          <para>
+            <indexterm>
               <primary>PIPES_AS_CONCAT SQL mode</primary>
             </indexterm>
 


Thread
svn commit - mysqldoc@docsrva: r10460 - in trunk: . dynamic-docs/changelog it/refman-5.1 pt/refman-5.1 refman-5.1 refman-6.0paul12 Apr