Below is the list of changes that have just been committed into a local
5.1 repository of svoj. When svoj 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, 2007-11-30 16:19:09+04:00, svoj@stripped +3 -0
BUG#32817 - though CSV is marked as supported create table is rejected
with error 1005.
CSV doesn't support nullable fields. Report a warning if create table
with nullable field is requested.
mysql-test/r/csv.result@stripped, 2007-11-30 16:19:05+04:00, svoj@stripped +6 -0
A test case for BUG#32817.
mysql-test/t/csv.test@stripped, 2007-11-30 16:19:05+04:00, svoj@stripped +7 -0
A test case for BUG#32817.
storage/csv/ha_tina.cc@stripped, 2007-11-30 16:19:05+04:00, svoj@stripped +5 -0
CSV doesn't support nullable fields. Report a warning if create table
with nullable field is requested.
diff -Nrup a/mysql-test/r/csv.result b/mysql-test/r/csv.result
--- a/mysql-test/r/csv.result 2007-10-26 05:25:14 +05:00
+++ b/mysql-test/r/csv.result 2007-11-30 16:19:05 +04:00
@@ -5373,4 +5373,10 @@ select * from t1;
a
foo
drop table t1;
+CREATE TABLE t1(a INT) ENGINE=CSV;
+ERROR HY000: Can't create table 'test.t1' (errno: -1)
+SHOW WARNINGS;
+Level Code Message
+Error 1105 All columns in a CSV table must be NOT NULL
+Error 1005 Can't create table 'test.t1' (errno: -1)
End of 5.1 tests
diff -Nrup a/mysql-test/t/csv.test b/mysql-test/t/csv.test
--- a/mysql-test/t/csv.test 2007-10-26 05:25:33 +05:00
+++ b/mysql-test/t/csv.test 2007-11-30 16:19:05 +04:00
@@ -1765,5 +1765,12 @@ insert into t1 values();
select * from t1;
drop table t1;
+#
+# BUG#32817 - though CSV is marked as supported create table is rejected
+# with error 1005.
+#
+--error 1005
+CREATE TABLE t1(a INT) ENGINE=CSV;
+SHOW WARNINGS;
--echo End of 5.1 tests
diff -Nrup a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
--- a/storage/csv/ha_tina.cc 2007-11-27 14:01:02 +04:00
+++ b/storage/csv/ha_tina.cc 2007-11-30 16:19:05 +04:00
@@ -1486,7 +1486,12 @@ int ha_tina::create(const char *name, TA
for (Field **field= table_arg->s->field; *field; field++)
{
if ((*field)->real_maybe_null())
+ {
+ push_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ ER_UNKNOWN_ERROR,
+ "All columns in a CSV table must be NOT NULL");
DBUG_RETURN(-1);
+ }
}
| Thread |
|---|
| • bk commit into 5.1 tree (svoj:1.2673) BUG#32817 | Sergey Vojtovich | 30 Nov |