From b9eaaf17b93e77fb90a344a5fa58f21d25d9a03e Mon Sep 17 00:00:00 2001 From: "tim@donna.mysql.com" <> Date: Sat, 13 Jan 2001 16:12:45 +0200 Subject: [PATCH] Add bdb_version variable, and a new test. --- BitKeeper/etc/logging_ok | 1 + mysql-test/r/bdb.result | 7 +++++++ mysql-test/t/bdb.test | 10 ++++++++++ sql/mysqld.cc | 1 + 4 files changed, 19 insertions(+) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index a71ddbcf4a2..b32a9b8dd90 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -1,2 +1,3 @@ jani@hynda.mysql.fi monty@donna.mysql.com +tim@donna.mysql.com diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index b008413dd7e..34f1c4a1b11 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -406,3 +406,10 @@ a 1 2 3 +b +this is a blob +b i +this is a blob 1 +b i +this is a blob 1 +b i diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test index 370e10e7afa..48fd2736284 100644 --- a/mysql-test/t/bdb.test +++ b/mysql-test/t/bdb.test @@ -334,3 +334,13 @@ CREATE TABLE t1 (a int not null, primary key (a)) type=bdb; insert into t1 values(1),(2),(3); select t1.a from t1 natural join t1 as t2 order by t1.a; drop table t1; + +# +# Test key on blob with null values +# +create table t1 (b blob, i int, key (b(100)), key (i), key (i, b(20))); +insert into t1 values ('this is a blob', 1), (null, -1), (null, null); +select b from t1 where b = 'this is a blob'; +select * from t1 where b like 't%'; +select b, i from t1 where b is not null; +select * from t1 where b is null and i > 0; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 4d9b7982f48..6be0fdabe27 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2634,6 +2634,7 @@ struct show_var_st init_vars[]= { {"bdb_logdir", (char*) &berkeley_logdir, SHOW_CHAR_PTR}, {"bdb_shared_data", (char*) &berkeley_shared_data, SHOW_BOOL}, {"bdb_tmpdir", (char*) &berkeley_tmpdir, SHOW_CHAR_PTR}, + {"bdb_version", (char*) DB_VERSION_STRING, SHOW_CHAR}, #endif {"binlog_cache_size", (char*) &binlog_cache_size, SHOW_LONG}, {"character_set", default_charset, SHOW_CHAR},