#At file:///home/msvensson/mysql/7.0.10/ based on revid:magnus.blaudd@stripped89olhiuu33qo1
3202 Magnus Blåudd 2009-11-08
ndbinfo
- add missing filehave_ndbinfo.inc
- fix the SQL for ndbinfo.log_space view
added:
mysql-test/suite/ndb/t/have_ndbinfo.inc
modified:
mysql-test/suite/ndb/r/ndbinfo.result
storage/ndb/tools/ndbinfo_sql.cpp
=== modified file 'mysql-test/suite/ndb/r/ndbinfo.result'
--- a/mysql-test/suite/ndb/r/ndbinfo.result 2009-11-08 12:52:27 +0000
+++ b/mysql-test/suite/ndb/r/ndbinfo.result 2009-11-08 14:17:04 +0000
@@ -34,9 +34,10 @@ table_id table_name comment
6 pools
7 test
8 trp_status
+9 log_space
SELECT COUNT(*) FROM ndb$tables;
COUNT(*)
-9
+10
SELECT * FROM ndb$tables WHERE table_id = 2;
table_id table_name comment
2 memusage
@@ -45,12 +46,13 @@ table_id table_name comment
6 pools
7 test
8 trp_status
+9 log_space
SELECT * FROM ndb$tables WHERE table_name = 'LOGDESTINATION';
table_id table_name comment
3 logdestination
SELECT COUNT(*) FROM ndb$tables t1, ndb$tables t2 WHERE t1.table_id = t1.table_id;
COUNT(*)
-81
+100
SELECT table_id, table_name, comment from ndb$tables
WHERE table_id > 2 AND table_id <= 5 ORDER BY table_id;
@@ -67,6 +69,7 @@ table_id table_name
4 backup_records
1 columns
3 logdestination
+9 log_space
2 memusage
6 pools
0 tables
@@ -113,6 +116,7 @@ table_id
6
7
8
+9
TRUNCATE ndb$tables;
ERROR HY000: Table 'ndb$tables' is read only
=== added file 'mysql-test/suite/ndb/t/have_ndbinfo.inc'
--- a/mysql-test/suite/ndb/t/have_ndbinfo.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/t/have_ndbinfo.inc 2009-11-08 14:17:04 +0000
@@ -0,0 +1,39 @@
+--perl
+use strict;
+
+use File::Basename;
+use IO::File;
+use lib "lib/";
+use My::Find;
+
+#
+# Look for ndbinfo.sql, if not found: skip test.
+#
+
+#
+# Set up paths
+#
+my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR";
+my $mysql_test_dir = $ENV{MYSQL_TEST_DIR} or die "Need MYSQL_TEST_DIR";
+my $basedir = dirname($mysql_test_dir);
+
+#
+# Check if the needed tests are available
+#
+my $sql_file = my_find_file($basedir,
+ ["storage/ndb/tools", "share/mysql/"],
+ "ndbinfo.sql", NOT_REQUIRED);
+
+my $F = IO::File->new("$vardir/tmp/have_ndbinfo_result.inc", "w") or die;
+if ($sql_file) {
+ print $F "--let \$NDBINFO_SQL= $sql_file\n";
+}
+else
+{
+ print $F "skip Could not find ndbinfo.sq;\n";
+}
+$F->close();
+
+EOF
+
+--source $MYSQLTEST_VARDIR/tmp/have_ndbinfo_result.inc
=== modified file 'storage/ndb/tools/ndbinfo_sql.cpp'
--- a/storage/ndb/tools/ndbinfo_sql.cpp 2009-11-08 12:52:27 +0000
+++ b/storage/ndb/tools/ndbinfo_sql.cpp 2009-11-08 14:17:04 +0000
@@ -61,9 +61,10 @@ struct view {
" WHEN 0 THEN \"REDO\""
" WHEN 1 THEN \"DD-UNDO\""
" ELSE NULL "
- " END AS log_id "
- " log_part, node_id, total, used"
- }
+ " END AS log_type, "
+ " log_part, node_id, total, used "
+ "FROM <NDBINFO_DB>.<TABLE_PREFIX>log_space"
+ }
};
size_t num_views = sizeof(views)/sizeof(views[0]);
Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20091108141704-b59z3u8dgi22hlvy.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3202) | Magnus Blåudd | 8 Nov 2009 |