summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-03-12 16:43:01 +0200
committerunknown <monty@mashka.mysql.fi>2003-03-12 16:43:01 +0200
commit72f44dafe6ed6580a1b5775a1d0c11ff84722445 (patch)
treee5698ae6de3cef3f86bc74d7ad31b8bd885f71eb /mysql-test
parentd69a5630ff30564d497bf1dc48e5f50b7d226cfc (diff)
downloadmariadb-git-72f44dafe6ed6580a1b5775a1d0c11ff84722445.tar.gz
NEWDATE -> DATE in anylyse() output
Changed that analyse(#) also affects strings mysql-test/r/analyse.result: Better analyse test mysql-test/t/analyse.test: Better analyse test sql/sql_analyse.cc: NEWDATE -> DATE in anylyse() output Changed that analyse(#) also affects strings Fixed that number of elements in ENUM is limited by # not by #+1
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/analyse.result12
-rw-r--r--mysql-test/t/analyse.test5
2 files changed, 15 insertions, 2 deletions
diff --git a/mysql-test/r/analyse.result b/mysql-test/r/analyse.result
index f6b8cc2fcbf..e69a7e99992 100644
--- a/mysql-test/r/analyse.result
+++ b/mysql-test/r/analyse.result
@@ -1,6 +1,18 @@
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
t1.i 1 7 1 1 0 0 4.0000 2.2361 ENUM('1','3','5','7') NOT NULL
t1.j 2 8 1 1 0 0 5.0000 2.2361 ENUM('2','4','6','8') NOT NULL
+t1.empty_string 0 0 4 0 0.0000 NULL ENUM('') NOT NULL
+t1.bool N Y 1 1 0 0 1.0000 NULL ENUM('N','Y') NOT NULL
+t1.d 2002-03-04 10 10 0 0 10.0000 NULL ENUM('2002-03-03','2002-03-04','2002-03-05') NOT NULL
+Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
+t1.i 1 7 1 1 0 0 4.0000 2.2361 TINYINT(1) UNSIGNED NOT NULL
+t1.j 2 8 1 1 0 0 5.0000 2.2361 TINYINT(1) UNSIGNED NOT NULL
+t1.empty_string 0 0 4 0 0.0000 NULL CHAR(0) NOT NULL
+t1.bool N Y 1 1 0 0 1.0000 NULL ENUM('N','Y') NOT NULL
+t1.d 2002-03-04 10 10 0 0 10.0000 NULL DATE NOT NULL
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
t1.i 1 7 1 1 0 0 4.0000 2.2361 ENUM('1','3','5','7') NOT NULL
t1.j 2 8 1 1 0 0 5.0000 2.2361 ENUM('2','4','6','8') NOT NULL
+t1.empty_string 0 0 4 0 0.0000 NULL ENUM('') NOT NULL
+t1.bool N Y 1 1 0 0 1.0000 NULL ENUM('N','Y') NOT NULL
+t1.d 2002-03-04 10 10 0 0 10.0000 NULL ENUM('2002-03-03','2002-03-04','2002-03-05') NOT NULL
diff --git a/mysql-test/t/analyse.test b/mysql-test/t/analyse.test
index 1b5022f6e4c..a937318aa6c 100644
--- a/mysql-test/t/analyse.test
+++ b/mysql-test/t/analyse.test
@@ -2,9 +2,10 @@
# Test of procedure analyse
#
-create table t1 (i int, j int);
-insert into t1 values (1,2), (3,4), (5,6), (7,8);
+create table t1 (i int, j int, empty_string char(10), bool char(1), d date);
+insert into t1 values (1,2,"","Y","2002-03-03"), (3,4,"","N","2002-03-04"), (5,6,"","Y","2002-03-04"), (7,8,"","N","2002-03-05");
select * from t1 procedure analyse();
+select * from t1 procedure analyse(2);
create table t2 select * from t1 procedure analyse();
select * from t2;
drop table t1,t2;