From 92f58a4b766109d02bfb85722c9bb35b7094f929 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Sep 2004 14:46:39 +0200 Subject: [PATCH] Remove usage of row count (as it trashes _all_ explain & table status) Use order by mysql-test/r/ndb_index_ordered.result: Use order by mysql-test/t/ndb_index_ordered.test: Use order by sql/ha_ndbcluster.cc: Remove usage of row count (as it trashes _all_ explain & table status) --- mysql-test/r/ndb_index_ordered.result | 4 ++-- mysql-test/t/ndb_index_ordered.test | 2 +- sql/ha_ndbcluster.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/ndb_index_ordered.result b/mysql-test/r/ndb_index_ordered.result index 2f1ad251e40..2a3050e5dea 100644 --- a/mysql-test/r/ndb_index_ordered.result +++ b/mysql-test/r/ndb_index_ordered.result @@ -219,10 +219,10 @@ c int unsigned, KEY bc(b,c) ) engine = ndb; insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL; +select * from t1 use index (bc) where b IS NULL order by a; a b c -3 NULL NULL 2 NULL 2 +3 NULL NULL select * from t1 use index (bc)order by a; a b c 1 1 1 diff --git a/mysql-test/t/ndb_index_ordered.test b/mysql-test/t/ndb_index_ordered.test index 00807bfcb98..2a94475df13 100644 --- a/mysql-test/t/ndb_index_ordered.test +++ b/mysql-test/t/ndb_index_ordered.test @@ -130,7 +130,7 @@ CREATE TABLE t1 ( ) engine = ndb; insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL; +select * from t1 use index (bc) where b IS NULL order by a; select * from t1 use index (bc)order by a; select * from t1 use index (bc) order by a; diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index a0c92e8fb53..7059b600038 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -557,7 +557,7 @@ int ha_ndbcluster::get_metadata(const char *path) // All checks OK, lets use the table m_table= (void*)tab; Uint64 rows; - if(ndb_get_table_statistics(m_ndb, m_tabname, &rows, 0) == 0){ + if(false && ndb_get_table_statistics(m_ndb, m_tabname, &rows, 0) == 0){ records= rows; }