From 465e4025f7f2e1ed1bd1854333b972dc5378bd10 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Mon, 12 Jul 2010 10:38:38 -0300 Subject: [PATCH] Revert and fix confusion between tests analyse and analyze. Following the naming scheme for tests related to functions, rename analyse.test to func_analyse.test (test for the ANALYSE() procedure). Avoids confusion with the ANALYZE statement (tested in analyze.test). --- .../r/{analyse.result => analyze.result} | 0 mysql-test/r/func_analyse.result | 66 -------------- mysql-test/t/{analyse.test => analyze.test} | 0 mysql-test/t/func_analyse.test | 87 ------------------- 4 files changed, 153 deletions(-) rename mysql-test/r/{analyse.result => analyze.result} (100%) delete mode 100644 mysql-test/r/func_analyse.result rename mysql-test/t/{analyse.test => analyze.test} (100%) delete mode 100644 mysql-test/t/func_analyse.test diff --git a/mysql-test/r/analyse.result b/mysql-test/r/analyze.result similarity index 100% rename from mysql-test/r/analyse.result rename to mysql-test/r/analyze.result diff --git a/mysql-test/r/func_analyse.result b/mysql-test/r/func_analyse.result deleted file mode 100644 index df8a6c42924..00000000000 --- a/mysql-test/r/func_analyse.result +++ /dev/null @@ -1,66 +0,0 @@ -create table t1 (a bigint); -lock tables t1 write; -insert into t1 values(0); -analyze table t1; -Table Op Msg_type Msg_text -test.t1 analyze status OK -unlock tables; -check table t1; -Table Op Msg_type Msg_text -test.t1 check status OK -drop table t1; -create table t1 (a bigint); -insert into t1 values(0); -lock tables t1 write; -delete from t1; -analyze table t1; -Table Op Msg_type Msg_text -test.t1 analyze status OK -unlock tables; -check table t1; -Table Op Msg_type Msg_text -test.t1 check status OK -drop table t1; -create table t1 (a bigint); -insert into t1 values(0); -analyze table t1; -Table Op Msg_type Msg_text -test.t1 analyze status OK -check table t1; -Table Op Msg_type Msg_text -test.t1 check status OK -drop table t1; -create table t1 (a mediumtext, fulltext key key1(a)) charset utf8 collate utf8_general_ci engine myisam; -insert into t1 values ('hello'); -analyze table t1; -Table Op Msg_type Msg_text -test.t1 analyze status OK -analyze table t1; -Table Op Msg_type Msg_text -test.t1 analyze status Table is already up to date -drop table t1; -CREATE TABLE t1 (a int); -prepare stmt1 from "SELECT * FROM t1 PROCEDURE ANALYSE()"; -execute stmt1; -Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype -execute stmt1; -Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype -deallocate prepare stmt1; -drop table t1; -create temporary table t1(a int, index(a)); -insert into t1 values('1'),('2'),('3'),('4'),('5'); -analyze table t1; -Table Op Msg_type Msg_text -test.t1 analyze status OK -show index from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t1 1 a 1 a A 5 NULL NULL YES BTREE -drop table t1; -End of 4.1 tests -create table t1(a int); -analyze table t1 extended; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'extended' at line 1 -optimize table t1 extended; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'extended' at line 1 -drop table t1; -End of 5.0 tests diff --git a/mysql-test/t/analyse.test b/mysql-test/t/analyze.test similarity index 100% rename from mysql-test/t/analyse.test rename to mysql-test/t/analyze.test diff --git a/mysql-test/t/func_analyse.test b/mysql-test/t/func_analyse.test deleted file mode 100644 index 0903db1eca4..00000000000 --- a/mysql-test/t/func_analyse.test +++ /dev/null @@ -1,87 +0,0 @@ -# -# Bug #10901 Analyze Table on new table destroys table -# This is minimal test case to get error -# The problem was that analyze table wrote the shared state to the -# file and this didn't include the inserts while locked. A check was -# needed to ensure that state information was not updated when -# executing analyze table for a locked table. The analyze table had -# to be within locks and check table had to be after unlocking since -# then it brings the wrong state from disk rather than from the -# currently correct internal state. The insert is needed since it -# changes the file state, number of records. The fix is to -# synchronise the state of the shared state and the current state -# before calling mi_state_info_write -# - -create table t1 (a bigint); -lock tables t1 write; -insert into t1 values(0); -analyze table t1; -unlock tables; -check table t1; - -drop table t1; - -create table t1 (a bigint); -insert into t1 values(0); -lock tables t1 write; -delete from t1; -analyze table t1; -unlock tables; -check table t1; - -drop table t1; - -create table t1 (a bigint); -insert into t1 values(0); -analyze table t1; -check table t1; - -drop table t1; - -# Bug #14902 ANALYZE TABLE fails to recognize up-to-date tables -# minimal test case to get an error. -# The problem is happening when analysing table with FT index that -# contains stopwords only. The first execution of analyze table should -# mark index statistics as up to date so that next execution of this -# statement will end up with Table is up to date status. -create table t1 (a mediumtext, fulltext key key1(a)) charset utf8 collate utf8_general_ci engine myisam; -insert into t1 values ('hello'); - -analyze table t1; -analyze table t1; - -drop table t1; - -# -# procedure in PS BUG#13673 -# -CREATE TABLE t1 (a int); -prepare stmt1 from "SELECT * FROM t1 PROCEDURE ANALYSE()"; -execute stmt1; -execute stmt1; -deallocate prepare stmt1; -drop table t1; - -# -# bug#15225 (ANALYZE temporary has no effect) -# -create temporary table t1(a int, index(a)); -insert into t1 values('1'),('2'),('3'),('4'),('5'); -analyze table t1; -show index from t1; -drop table t1; - ---echo End of 4.1 tests - -# -# Bug #30495: optimize table t1,t2,t3 extended errors -# -create table t1(a int); ---error 1064 -analyze table t1 extended; ---error 1064 -optimize table t1 extended; -drop table t1; - ---echo End of 5.0 tests