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.1980 05/08/12 09:05:48 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.264 05/08/12 09:05:23 acurtis@stripped +2 -0
Show NULL when there is no default value set
mysql-test/t/information_schema.test
1.50 05/08/12 09:05:23 acurtis@stripped +10 -0
test for bug 12518
mysql-test/r/information_schema.result
1.71 05/08/12 09:05:23 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
--- 1.263/sql/sql_show.cc 2005-08-09 08:37:44 +01:00
+++ 1.264/sql/sql_show.cc 2005-08-12 09:05:23 +01:00
@@ -2457,6 +2457,8 @@
table->field[5]->set_notnull();
}
else if (field->unireg_check == Field::NEXT_NUMBER ||
+ ((lex->orig_sql_command != SQLCOM_SHOW_FIELDS) &&
+ (field->flags & NO_DEFAULT_VALUE_FLAG)) ||
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-12 09:05:23 +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-12 09:05:23 +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.1980) BUG#12518 | antony | 12 Aug |