summaryrefslogtreecommitdiff
path: root/mysql-test/r/stat_tables.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/stat_tables.result')
-rw-r--r--mysql-test/r/stat_tables.result52
1 files changed, 34 insertions, 18 deletions
diff --git a/mysql-test/r/stat_tables.result b/mysql-test/r/stat_tables.result
index 0ee0d698bcc..279c09ff44f 100644
--- a/mysql-test/r/stat_tables.result
+++ b/mysql-test/r/stat_tables.result
@@ -518,6 +518,34 @@ drop database db2;
drop table t1;
set use_stat_tables=@save_use_stat_tables;
#
+# MDEV-16757: manual addition of min/max statistics for BLOB
+#
+SET use_stat_tables= PREFERABLY;
+CREATE TABLE t1 (pk INT PRIMARY KEY, t TEXT);
+INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 't'
+test.t1 analyze status OK
+SELECT * FROM mysql.column_stats;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+test t1 pk 1 2 0.0000 4.0000 1.0000 0 NULL NULL
+DELETE FROM mysql.column_stats
+WHERE db_name='test' AND table_name='t1' AND column_name='t';
+INSERT INTO mysql.column_stats VALUES
+('test','t1','t','bar','foo', 0.0, 3.0, 1.0, 0, NULL, NULL);
+SELECT * FROM mysql.column_stats;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+test t1 pk 1 2 0.0000 4.0000 1.0000 0 NULL NULL
+test t1 t bar foo 0.0000 3.0000 1.0000 0 NULL NULL
+SELECT pk FROM t1;
+pk
+1
+2
+DROP TABLE t1;
+set use_stat_tables=@save_use_stat_tables;
+#
# MDEV-16760: CREATE OR REPLACE TABLE after ANALYZE TABLE
#
SET use_stat_tables= PREFERABLY;
@@ -543,30 +571,18 @@ db_name table_name column_name min_value max_value nulls_ratio avg_length avg_fr
DROP TABLE t1;
set use_stat_tables=@save_use_stat_tables;
#
-# MDEV-16757: manual addition of min/max statistics for BLOB
+# MDEV-16711:CREATE OR REPLACE TABLE introducing BLOB column
#
SET use_stat_tables= PREFERABLY;
-CREATE TABLE t1 (pk INT PRIMARY KEY, t TEXT);
+CREATE TABLE t1 (pk INT PRIMARY KEY, t CHAR(60));
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
-test.t1 analyze Warning Engine-independent statistics are not collected for column 't'
test.t1 analyze status OK
-SELECT * FROM mysql.column_stats;
-db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
-test t1 pk 1 2 0.0000 4.0000 1.0000 0 NULL NULL
-DELETE FROM mysql.column_stats
-WHERE db_name='test' AND table_name='t1' AND column_name='t';
-INSERT INTO mysql.column_stats VALUES
-('test','t1','t','bar','foo', 0.0, 3.0, 1.0, 0, NULL, NULL);
-SELECT * FROM mysql.column_stats;
-db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
-test t1 pk 1 2 0.0000 4.0000 1.0000 0 NULL NULL
-test t1 t bar foo 0.0000 3.0000 1.0000 0 NULL NULL
-SELECT pk FROM t1;
-pk
-1
-2
+CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY, t TEXT);
+SELECT MAX(pk) FROM t1;
+MAX(pk)
+NULL
DROP TABLE t1;
set use_stat_tables=@save_use_stat_tables;