MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:bar Date:September 29 2006 11:29am
Subject:bk commit into 5.0 tree (bar:1.2284) BUG#21263
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of bar. When bar 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://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-09-29 16:29:39+05:00, bar@stripped +2 -0
  Bug#21263 mysql client XML output does not distinguish between NULL and string 'NULL'
    
    Fix: "mysql --xml" now print NULL values the same way that "mysqldump --xml" does:
    
      <field name="name" xsi:nil="true" />
    
    to distinguish from empty strings:
    
      <field name="name"></field>
    
    and from string "NULL":
    
      <field name="name">NULL</field>

  client/mysql.cc@stripped, 2006-09-29 16:29:33+05:00, bar@stripped +8 -3
    Fixing to print NULLs differently from empty strings

  mysql-test/r/client_xml.result@stripped, 2006-09-29 16:29:34+05:00, bar@stripped +1 -1
    Fixing test result accordingly

# 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:	bar
# Host:	bar.intranet.mysql.r18.ru
# Root:	/usr/home/bar/mysql-5.0.b19960rpl

--- 1.218/client/mysql.cc	2006-09-29 16:29:47 +05:00
+++ 1.219/client/mysql.cc	2006-09-29 16:29:47 +05:00
@@ -2509,9 +2509,14 @@
     {
       tee_fprintf(PAGER, "\t<field name=\"");
       xmlencode_print(fields[i].name, (uint) strlen(fields[i].name));
-      tee_fprintf(PAGER, "\">");
-      xmlencode_print(cur[i], lengths[i]);
-      tee_fprintf(PAGER, "</field>\n");
+      if (cur[i])
+      {
+        tee_fprintf(PAGER, "\">");
+        xmlencode_print(cur[i], lengths[i]);
+        tee_fprintf(PAGER, "</field>\n");
+      }
+      else
+        tee_fprintf(PAGER, "\" xsi:nil=\"true\" />\n");
     }
     (void) tee_fputs("  </row>\n", PAGER);
   }

--- 1.3/mysql-test/r/client_xml.result	2006-09-29 16:29:47 +05:00
+++ 1.4/mysql-test/r/client_xml.result	2006-09-29 16:29:47 +05:00
@@ -68,7 +68,7 @@
 <resultset statement="select null from dual
 ">
   <row>
-	<field name="NULL">NULL</field>
+	<field name="NULL" xsi:nil="true" />
   </row>
 </resultset>
 drop table t1;
Thread
bk commit into 5.0 tree (bar:1.2284) BUG#21263bar29 Sep