List:Internals« Previous MessageNext Message »
From:antony Date:August 15 2005 4:15pm
Subject:bk commit into 5.0 tree (acurtis:1.1996) BUG#12518
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of antony. When antony 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
  1.1996 05/08/15 17:14:55 acurtis@stripped +3 -0
  Bug#12518
    "COLUMN_DEFAULT has wrong value if NOT NULL is set"
    Show NULL instead of empty string when no default value is set

  sql/sql_show.cc
    1.265 05/08/15 17:14:30 acurtis@stripped +1 -0
    report NULL for information schema result when there is no default value

  mysql-test/t/information_schema.test
    1.50 05/08/15 17:14:29 acurtis@stripped +10 -0
    test for bug 12518

  mysql-test/r/information_schema.result
    1.71 05/08/15 17:14:29 acurtis@stripped +9 -0
    test for bug 12518

# 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:	acurtis
# Host:	ltantony.xiphis.org
# Root:	/usr/home/antony/work2/p2-bug12518.2

--- 1.264/sql/sql_show.cc	2005-08-12 17:27:51 +01:00
+++ 1.265/sql/sql_show.cc	2005-08-15 17:14:30 +01:00
@@ -2462,6 +2462,7 @@
         table->field[5]->set_notnull();
       }
       else if (field->unireg_check == Field::NEXT_NUMBER ||
+               lex->orig_sql_command != SQLCOM_SHOW_FIELDS ||
                field->maybe_null())
         table->field[5]->set_null();                // Null as default
       else

--- 1.70/mysql-test/r/information_schema.result	2005-08-09 08:37:41 +01:00
+++ 1.71/mysql-test/r/information_schema.result	2005-08-15 17:14:29 +01:00
@@ -958,3 +958,12 @@
 test	tr1
 use test;
 drop table t1;
+create table t1 (a int not null, b int);
+use information_schema;
+select column_name, column_default from columns
+where table_schema='test' and table_name='t1';
+column_name	column_default
+a	NULL
+b	NULL
+use test;
+drop table t1;

--- 1.49/mysql-test/t/information_schema.test	2005-08-09 08:37:42 +01:00
+++ 1.50/mysql-test/t/information_schema.test	2005-08-15 17:14:29 +01:00
@@ -639,3 +639,13 @@
 trigger_name='tr1';
 use test;
 drop table t1;
+
+#
+# Bug#12518 COLUMN_DEFAULT has wrong value if NOT NULL is set
+#
+create table t1 (a int not null, b int);
+use information_schema;
+select column_name, column_default from columns
+  where table_schema='test' and table_name='t1';
+use test;
+drop table t1;
Thread
bk commit into 5.0 tree (acurtis:1.1996) BUG#12518antony15 Aug