From aecef7614e1c6d131417f2b21d2cddc9199c3ab2 Mon Sep 17 00:00:00 2001 From: "monty@hundin.mysql.fi" <> Date: Tue, 17 Jul 2001 21:04:01 +0300 Subject: Removed wrong warning from thr_lock Fixed problem with UPDATE and BDB tables Fixed problem with GRANT FILE privilege on database level mysqld --warnings works now Fixed problem with SHOW OPEN TABLES when not using BDB Added some tests for ALTER TABLE to the test scripts --- sql/ha_berkeley.cc | 4 +++- sql/sql_acl.cc | 7 +++---- sql/sql_parse.cc | 2 +- sql/sql_show.cc | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) (limited to 'sql') diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index 32af39e4a0d..d2b3ef62865 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -453,9 +453,11 @@ int ha_berkeley::open(const char *name, int mode, uint test_if_locked) if ((primary_key=table->primary_key) >= MAX_KEY) { // No primary key primary_key=table->keys; + key_used_on_scan=MAX_KEY; ref_length=hidden_primary_key=BDB_HIDDEN_PRIMARY_KEY_LENGTH; } - key_used_on_scan=primary_key; + else + key_used_on_scan=primary_key; /* Need some extra memory in case of packed keys */ uint max_key_length= table->max_key_length + MAX_REF_PARTS*3; diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 0f3ee483400..0cca3df0b16 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1824,10 +1824,9 @@ int mysql_grant (THD *thd, const char *db, List &list, uint rights, *Str, (!db ? rights : 0), what))) result= -1; - if (db) - if (( replace_db_table(tables[1].table, db, *Str, rights, - what))) - result= -1; + if (db && replace_db_table(tables[1].table, db, *Str, rights & DB_ACLS, + what)) + result= -1; } VOID(pthread_mutex_unlock(&acl_cache->lock)); pthread_mutex_unlock(&LOCK_grant); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index ef2919c2e6c..87fbed47ef1 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -554,7 +554,7 @@ pthread_handler_decl(handle_one_connection,arg) free_root(&thd->mem_root,MYF(0)); if (net->error && net->vio != 0) { - if (!thd->killed && ! opt_warnings) + if (!thd->killed && opt_warnings) sql_print_error(ER(ER_NEW_ABORTING_CONNECTION), thd->thread_id,(thd->db ? thd->db : "unconnected"), thd->user ? thd->user : "unauthenticated", diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 84dc5931139..637ab4fe7e9 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -599,7 +599,7 @@ mysqld_show_logs(THD *thd) DBUG_RETURN(1); #ifdef HAVE_BERKELEY_DB - if (berkeley_show_logs(thd)) + if (!berkeley_skip && berkeley_show_logs(thd)) DBUG_RETURN(-1); #endif -- cgit v1.2.1