diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2019-11-21 16:27:50 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2019-11-21 16:27:50 +0100 |
commit | 3ad054170cafc9dc90b18f4e857f3a10545fc06d (patch) | |
tree | 067bf277718686c4468a6187633f881443dcfca6 /storage/connect | |
parent | 9c0e462ff28b93127406eeb2db4b763423fabbe3 (diff) | |
parent | 6718d3bc3241f72e07504133371cf3813d2e6fe9 (diff) | |
download | mariadb-git-3ad054170cafc9dc90b18f4e857f3a10545fc06d.tar.gz |
These changed were made after pulling 10.2.30 from origin
---------------------------------------------------------
- Temporarily fix MDEV-13782 by commenting out LIKE_FUNC i, CondFilter
modified: storage/connect/ha_connect.cc
- Make Rest available for MariaDB binary distributed versions.
modified: storage/connect/CMakeLists.txt
- Remove unused declaration
modified: storage/connect/filter.h
Diffstat (limited to 'storage/connect')
21 files changed, 578 insertions, 587 deletions
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt index 66b658b036b..92e2e53a61b 100644 --- a/storage/connect/CMakeLists.txt +++ b/storage/connect/CMakeLists.txt @@ -40,6 +40,10 @@ user_connect.h valblk.h value.h xindex.h xobject.h xtable.h) add_definitions( -DMARIADB -DFORCE_INIT_OF_VARS -Dconnect_EXPORTS) add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT ) +macro(DISABLE_WARNING W) + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-error=${W}") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-${W}" DEBUG) +endmacro() # # OS specific C flags, definitions and source files. @@ -47,14 +51,15 @@ add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT ) IF(UNIX) MY_CHECK_AND_SET_COMPILER_FLAG("-Wall -Wmissing-declarations") if(NOT WITH_WARNINGS) - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-function") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-variable") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-value") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-parentheses") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-strict-aliasing") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-misleading-indentation") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-format-truncation") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-implicit-fallthrough") + DISABLE_WARNING("unused-function") + DISABLE_WARNING("unused-variable") + DISABLE_WARNING("unused-value") + DISABLE_WARNING("parentheses") + DISABLE_WARNING("strict-aliasing") + DISABLE_WARNING("misleading-indentation") + DISABLE_WARNING("format-truncation") + DISABLE_WARNING("implicit-fallthrough") + DISABLE_WARNING("type-limits") endif(NOT WITH_WARNINGS) add_definitions( -DUNIX -DLINUX -DUBUNTU ) @@ -167,7 +172,8 @@ IF(CONNECT_WITH_ODBC) # the library 'libiodbc' gets compiled with 'sql'h. # This will also need changes in the sources (e.g. #include <isql.h>). - find_path(ODBC_INCLUDE_DIR sql.h + find_file(ODBC_INCLUDES sql.h + PATHS /usr/include /usr/include/odbc /usr/local/include @@ -177,7 +183,7 @@ IF(CONNECT_WITH_ODBC) #"C:/Program Files/Microsoft SDKs/Windows/v7.0A/include" #"C:/Program Files/Microsoft SDKs/Windows/v6.0a/include" #"C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/include" - DOC "Specify the directory containing sql.h." + DOC "Specify the path to sql.h." ) find_library(ODBC_LIBRARY @@ -196,9 +202,10 @@ IF(CONNECT_WITH_ODBC) DOC "Specify the ODBC driver manager library here." ) - mark_as_advanced(ODBC_LIBRARY ODBC_INCLUDE_DIR) + mark_as_advanced(ODBC_LIBRARY ODBC_INCLUDES) - IF(ODBC_INCLUDE_DIR AND ODBC_LIBRARY) + IF(ODBC_INCLUDES AND ODBC_LIBRARY) + get_filename_component(ODBC_INCLUDE_DIR "${ODBC_INCLUDES}" PATH) set(CMAKE_REQUIRED_LIBRARIES ${ODBC_LIBRARY}) set(CMAKE_REQUIRED_INCLUDES ${ODBC_INCLUDE_DIR}) CHECK_CXX_SOURCE_COMPILES( @@ -314,9 +321,8 @@ IF(CONNECT_WITH_REST) MESSAGE(STATUS "=====> REST support is ON") SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabrest.cpp tabrest.h) add_definitions(-DREST_SUPPORT) - FIND_PACKAGE(cpprestsdk) + FIND_PACKAGE(cpprestsdk QUIET) IF (cpprestsdk_FOUND) - MESSAGE(STATUS "=====> cpprestsdk found") IF(UNIX) # INCLUDE_DIRECTORIES(${CPPRESTSDK_INCLUDE_DIR}) # If needed edit next line to set the path to libcpprest.so @@ -328,10 +334,12 @@ IF(CONNECT_WITH_REST) # Comment it out if not needed depending on your cpprestsdk installation. SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") ENDIF(UNIX) +# IF(REST_LIBRARY) why this? how about Windows SET(CONNECT_SOURCES ${CONNECT_SOURCES} restget.cpp) add_definitions(-DREST_SOURCE) +# ENDIF() ELSE(NOT cpprestsdk_FOUND) - MESSAGE(STATUS "=====> cpprestsdk package not found") +# MESSAGE(STATUS "=====> cpprestsdk package not found") ENDIF (cpprestsdk_FOUND) ENDIF(CONNECT_WITH_REST) diff --git a/storage/connect/array.cpp b/storage/connect/array.cpp index 3478342a788..84a686cc145 100644 --- a/storage/connect/array.cpp +++ b/storage/connect/array.cpp @@ -438,7 +438,7 @@ char *ARRAY::GetStringValue(int n) /***********************************************************************/ bool ARRAY::Find(PVAL valp) { - register int n; + int n; PVAL vp; if (Type != valp->GetType()) { @@ -1042,7 +1042,7 @@ MULAR::MULAR(PGLOBAL g, int n) : CSORT(false) /***********************************************************************/ int MULAR::Qcompare(int *i1, int *i2) { - register int i, n = 0; + int i, n = 0; for (i = 0; i < Narray; i++) if ((n = Pars[i]->Qcompare(i1, i2))) diff --git a/storage/connect/csort.cpp b/storage/connect/csort.cpp index 670131b8fd2..1e4ba674e23 100644 --- a/storage/connect/csort.cpp +++ b/storage/connect/csort.cpp @@ -178,9 +178,9 @@ void CSORT::DebugSort(int ph, int n, int *base, int *mid, int *tmp) /***********************************************************************/ int CSORT::Qsortx(void) { - register int c; - register int lo, hi, min; - register int i, j, rc = 0; + int c; + int lo, hi, min; + int i, j, rc = 0; // To do: rc should be checked for being used uninitialized int *top; #ifdef DEBTRACE @@ -344,7 +344,7 @@ int CSORT::Qsortx(void) /***********************************************************************/ void CSORT::Qstx(int *base, int *max) { - register int *i, *j, *jj, *mid, *him, c; + int *i, *j, *jj, *mid, *him, c; int *tmp; int lo, hi, rc; size_t zlo, zhi, cnm; @@ -543,9 +543,9 @@ void CSORT::Qstx(int *base, int *max) /***********************************************************************/ int CSORT::Qsortc(void) { - register int c; - register int lo, hi, min; - register int i, j, k, m, rc = 0; + int c; + int lo, hi, min; + int i, j, k, m, rc = 0; // To do: rc should be checked for being used uninitialized int *max; #ifdef DEBTRACE @@ -720,7 +720,7 @@ int CSORT::Qsortc(void) /***********************************************************************/ void CSORT::Qstc(int *base, int *max) { - register int *i, *j, *jj, *lt, *eq, *gt, *mid; + int *i, *j, *jj, *lt, *eq, *gt, *mid; int c = 0, lo, hi, rc; size_t zlo, zhi, cnm; @@ -907,9 +907,9 @@ void CSORT::Qstc(int *base, int *max) /***********************************************************************/ void CSORT::Istc(int *base, int *hi, int *max) { - register int c = 0; - register int *lo; - register int *i, *j; + int c = 0; + int *lo; + int *i, *j; /*********************************************************************/ /* First put smallest element, which must be in the first THRESH, */ diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index beb7c5c7e74..2bc9537f81b 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -1341,7 +1341,7 @@ char *ha_connect::GetRealString(PCSZ s) { char *sv; - if (IsPartitioned() && s && partname && *partname) { + if (IsPartitioned() && s && *partname) { sv= (char*)PlugSubAlloc(xp->g, NULL, 0); sprintf(sv, s, partname); PlugSubAlloc(xp->g, NULL, strlen(sv) + 1); @@ -2964,10 +2964,12 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) case Item_func::LE_FUNC: vop= OP_LE; break; case Item_func::GE_FUNC: vop= OP_GE; break; case Item_func::GT_FUNC: vop= OP_GT; break; +#if 0 case Item_func::LIKE_FUNC: vop= OP_LIKE; - neg= ((Item_func_opt_neg *)condf)->negated; + neg= ((Item_func_like*)condf)->negated; break; +#endif // 0 case Item_func::ISNOTNULL_FUNC: neg= true; // fall through @@ -3095,7 +3097,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) strncat(s, res->ptr(), res->length()); if (res->length() < 19) - strcat(s, "1970-01-01 00:00:00" + res->length()); + strcat(s, &"1970-01-01 00:00:00"[res->length()]); strcat(s, "'}"); break; @@ -3125,7 +3127,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) strncat(s, res->ptr(), res->length()); if (res->length() < 19) - strcat(s, "1970-01-01 00:00:00" + res->length()); + strcat(s, &"1970-01-01 00:00:00"[res->length()]); strcat(s, "'}"); break; @@ -4503,34 +4505,13 @@ bool ha_connect::check_privileges(THD *thd, PTOS options, char *dbn, bool quick) case TAB_DIR: case TAB_ZIP: case TAB_OEM: -#ifdef NO_EMBEDDED_ACCESS_CHECKS - return false; - #endif - - /* - Check FILE_ACL - If table or table->mdl_ticket is NULL - it's a DLL, e.g. CREATE TABLE. - if the table has an MDL_EXCLUSIVE lock - it's a DDL too, e.g. the - insert step of CREATE ... SELECT. - - Otherwise it's a DML, the table was normally opened, locked, - privilege were already checked, and table->grant.privilege is set. - With SQL SECURITY DEFINER, table->grant.privilege has definer's privileges. - - Unless we're in prelocking mode, in this case table->grant.privilege - is only checked in start_stmt(), not in external_lock(). - */ - if (!table || !table->mdl_ticket || table->mdl_ticket->get_type() == MDL_EXCLUSIVE) - return check_access(thd, FILE_ACL, db, NULL, NULL, 0, 0); - - if ((!quick && thd->lex->requires_prelocking()) || table->grant.privilege & FILE_ACL) - return false; - - status_var_increment(thd->status_var.access_denied_errors); - my_error(access_denied_error_code(thd->password), MYF(0), - thd->security_ctx->priv_user, thd->security_ctx->priv_host, - (thd->password ? ER(ER_YES) : ER(ER_NO))); - return true; + if (table && table->pos_in_table_list) // if SELECT + { + Switch_to_definer_security_ctx backup_ctx(thd, table->pos_in_table_list); + return check_global_access(thd, FILE_ACL); + } + else + return check_global_access(thd, FILE_ACL); case TAB_ODBC: case TAB_JDBC: case TAB_MONGO: diff --git a/storage/connect/myconn.cpp b/storage/connect/myconn.cpp index e7500ff2c31..4303a9e191b 100644 --- a/storage/connect/myconn.cpp +++ b/storage/connect/myconn.cpp @@ -879,7 +879,7 @@ MYSQL_FIELD *MYSQLC::GetNextField(void) PQRYRES MYSQLC::GetResult(PGLOBAL g, bool pdb) { PCSZ fmt; - char *name, v; + char *name, v= 0; int n; bool uns; PCOLRES *pcrp, crp; diff --git a/storage/connect/mysql-test/connect/disabled.def b/storage/connect/mysql-test/connect/disabled.def index 827ed58b835..1de4deb0a60 100644 --- a/storage/connect/mysql-test/connect/disabled.def +++ b/storage/connect/mysql-test/connect/disabled.def @@ -9,15 +9,15 @@ # Do not use any TAB characters for whitespace. # ############################################################################## -infoschema-9739 : Crashes with MariaDB 10.0 -jdbc : Variable settings depend on machine configuration -jdbc_new : Variable settings depend on machine configuration -jdbc_oracle : Variable settings depend on machine configuration -jdbc_postgresql : Variable settings depend on machine configuration -json_mongo_c : Need MongoDB running and its C Driver installed -json_java_2 : Need MongoDB running and its Java Driver installed -json_java_3 : Need MongoDB running and its Java Driver installed -mongo_c : Need MongoDB running and its C Driver installed -mongo_java_2 : Need MongoDB running and its Java Driver installed -mongo_java_3 : Need MongoDB running and its Java Driver installed -tbl_thread : Bug MDEV-9844,10179,14214 03/01/2018 OB Option THREAD removed +jdbc : Variable settings depend on machine configuration +jdbc_new : Variable settings depend on machine configuration +jdbc_oracle : Variable settings depend on machine configuration +jdbc_postgresql : Variable settings depend on machine configuration +json_mongo_c : Need MongoDB running and its C Driver installed +json_java_2 : Need MongoDB running and its Java Driver installed +json_java_3 : Need MongoDB running and its Java Driver installed +mongo_c : Need MongoDB running and its C Driver installed +mongo_java_2 : Need MongoDB running and its Java Driver installed +mongo_java_3 : Need MongoDB running and its Java Driver installed +tbl_thread : Bug MDEV-9844,10179,14214 03/01/2018 OB Option THREAD removed +#vcol : Different error code on different versions diff --git a/storage/connect/mysql-test/connect/r/grant.result b/storage/connect/mysql-test/connect/r/grant.result index 118d75408be..eeecfde9df4 100644 --- a/storage/connect/mysql-test/connect/r/grant.result +++ b/storage/connect/mysql-test/connect/r/grant.result @@ -15,7 +15,7 @@ fname VARCHAR(256) NOT NULL, ftype CHAR(4) NOT NULL, size DOUBLE(12,0) NOT NULL flag=5 ) ENGINE=CONNECT TABLE_TYPE=DIR FILE_NAME='*.*'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -28,25 +28,26 @@ size DOUBLE(12,0) NOT NULL flag=5 ) ENGINE=CONNECT TABLE_TYPE=DIR FILE_NAME='*.*'; SELECT fname, ftype, size FROM t1 WHERE size>0; fname ftype size +db .opt 65 t1 .frm 1081 connection user; SELECT user(); user() user@localhost SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO t1 VALUES (); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1 WHERE path='xxx'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET path='yyy' WHERE path='xxx'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE connection default; SELECT user(); @@ -58,13 +59,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (1,1,1,1); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET path=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation disconnect user; connection default; SELECT user(); @@ -111,7 +112,7 @@ a DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=BIN FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -123,23 +124,23 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES (10); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 FILE_NAME='t2.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE connection default; SELECT user(); @@ -151,13 +152,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -173,7 +174,7 @@ SELECT user(); user() user@localhost ALTER TABLE t1 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; disconnect user; @@ -216,7 +217,7 @@ a DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=CSV FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -228,23 +229,23 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES (10); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 FILE_NAME='t2.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE connection default; SELECT user(); @@ -256,13 +257,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -278,7 +279,7 @@ SELECT user(); user() user@localhost ALTER TABLE t1 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; disconnect user; @@ -321,7 +322,7 @@ a DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -333,23 +334,23 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES (10); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 FILE_NAME='t2.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE connection default; SELECT user(); @@ -361,13 +362,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -383,7 +384,7 @@ SELECT user(); user() user@localhost ALTER TABLE t1 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; disconnect user; @@ -426,7 +427,7 @@ a DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=FIX FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -438,23 +439,23 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES (10); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 FILE_NAME='t2.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE connection default; SELECT user(); @@ -466,13 +467,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -488,7 +489,7 @@ SELECT user(); user() user@localhost ALTER TABLE t1 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; disconnect user; @@ -531,7 +532,7 @@ a DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=VEC MAX_ROWS=100 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -543,23 +544,23 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES (10); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 FILE_NAME='t2.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE connection default; SELECT user(); @@ -571,13 +572,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -593,7 +594,7 @@ SELECT user(); user() user@localhost ALTER TABLE t1 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; disconnect user; diff --git a/storage/connect/mysql-test/connect/r/grant2.result b/storage/connect/mysql-test/connect/r/grant2.result index 73e41f49256..2e20dc39596 100644 --- a/storage/connect/mysql-test/connect/r/grant2.result +++ b/storage/connect/mysql-test/connect/r/grant2.result @@ -21,12 +21,12 @@ SELECT * FROM v1_definer; a 10 SELECT * FROM v1_baddefiner; -ERROR 28000: Access denied for user 'root'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connect user,localhost,user,,; SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM v1_invoker; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM v1_definer; a 10 @@ -44,9 +44,9 @@ UPDATE v1_invoker SET a=12; UPDATE v1_definer SET a=13; connection user; UPDATE t1 SET a=21; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1_invoker SET a=22; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1_definer SET a=23; connection default; DROP VIEW v1_invoker, v1_definer; @@ -62,9 +62,9 @@ INSERT INTO v1_invoker VALUES (12); INSERT INTO v1_definer VALUES (13); connection user; INSERT INTO t1 VALUES (21); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1_invoker VALUES (22); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1_definer VALUES (23); connection default; DROP VIEW v1_invoker, v1_definer; @@ -83,9 +83,9 @@ REPLACE INTO v1_definer VALUES (13); ERROR 42000: CONNECT Unsupported command connection user; REPLACE INTO t1 VALUES (21); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation REPLACE INTO v1_invoker VALUES (22); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation REPLACE INTO v1_definer VALUES (23); ERROR 42000: CONNECT Unsupported command connection default; @@ -102,9 +102,9 @@ DELETE FROM v1_invoker WHERE a=12; DELETE FROM v1_definer WHERE a=13; connection user; DELETE FROM t1 WHERE a=21; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1_invoker WHERE a=22; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1_definer WHERE a=23; connection default; DROP VIEW v1_invoker, v1_definer; @@ -120,9 +120,9 @@ LOAD DATA LOCAL INFILE 'MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_invoker; LOAD DATA LOCAL INFILE 'MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_definer; connection user; LOAD DATA LOCAL INFILE 'MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation LOAD DATA LOCAL INFILE 'MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_invoker; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation LOAD DATA LOCAL INFILE 'MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_definer; connection default; DROP VIEW v1_invoker, v1_definer; @@ -135,7 +135,7 @@ TRUNCATE TABLE t1; INSERT INTO t1 VALUES (11); connection user; TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; # Testing SQLCOM_DROP_TABLE @@ -144,7 +144,7 @@ CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; INSERT INTO t1 VALUES (10); connection user; DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; # Testing SQLCOM_DROP_VIEW @@ -165,7 +165,7 @@ DROP TABLE t1; # Testing SQLCOM_CREATE_TABLE connection user; CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; # Testing SQLCOM_LOCK_TABLES connection default; @@ -187,13 +187,13 @@ LOCK TABLE v1_definer WRITE; UNLOCK TABLES; connection user; LOCK TABLE t1 READ; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation LOCK TABLE t1 WRITE; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation LOCK TABLE v1_invoker READ; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation LOCK TABLE v1_invoker WRITE; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation LOCK TABLE v1_definer READ; UNLOCK TABLES; LOCK TABLE v1_definer WRITE; @@ -264,93 +264,93 @@ UPDATE v2_definer a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v2_definer a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; connection user; UPDATE t1 a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t2 a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t2 a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t2 a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t2 a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t2 a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t2 a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t2 a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t3 a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t3 a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t3 a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE t3 a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t3 a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE t3 a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t3 a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v1_invoker a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1_invoker a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1_invoker a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1_invoker a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1_invoker a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1_invoker a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1_invoker a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1_definer a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1_definer a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1_definer a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v1_definer a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1_definer a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v1_definer a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1_definer a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v2_invoker a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v2_invoker a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v2_invoker a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v2_invoker a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v2_invoker a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v2_invoker a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v2_invoker a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v2_definer a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v2_definer a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v2_definer a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v2_definer a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v2_definer a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v2_definer a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v2_definer a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; connection default; DROP VIEW v1_invoker, v1_definer, v2_invoker, v2_definer; @@ -418,93 +418,93 @@ DELETE a1 FROM v2_definer a1,v2_invoker a2 WHERE a1.a=a2.a; DELETE a1 FROM v2_definer a1,v2_definer a2 WHERE a1.a=a2.a; connection user; DELETE a1 FROM t1 a1,t1 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t1 a1,t2 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t1 a1,t3 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t1 a1,v1_invoker a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t1 a1,v1_definer a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t1 a1,v2_invoker a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t1 a1,v2_definer a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t2 a1,t1 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t2 a1,t2 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t2 a1,t3 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t2 a1,v1_invoker a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t2 a1,v1_definer a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t2 a1,v2_invoker a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t2 a1,v2_definer a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t3 a1,t1 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t3 a1,t2 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t3 a1,t3 a2 WHERE a1.a=a2.a; DELETE a1 FROM t3 a1,v1_invoker a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t3 a1,v1_definer a2 WHERE a1.a=a2.a; DELETE a1 FROM t3 a1,v2_invoker a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM t3 a1,v2_definer a2 WHERE a1.a=a2.a; DELETE a1 FROM v1_invoker a1,t1 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v1_invoker a1,t2 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v1_invoker a1,t3 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v1_invoker a1,v1_invoker a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v1_invoker a1,v1_definer a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v1_invoker a1,v2_invoker a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v1_invoker a1,v2_definer a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v1_definer a1,t1 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v1_definer a1,t2 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v1_definer a1,t3 a2 WHERE a1.a=a2.a; DELETE a1 FROM v1_definer a1,v1_invoker a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v1_definer a1,v1_definer a2 WHERE a1.a=a2.a; DELETE a1 FROM v1_definer a1,v2_invoker a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v1_definer a1,v2_definer a2 WHERE a1.a=a2.a; DELETE a1 FROM v2_invoker a1,t1 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v2_invoker a1,t2 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v2_invoker a1,t3 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v2_invoker a1,v1_invoker a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v2_invoker a1,v1_definer a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v2_invoker a1,v2_invoker a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v2_invoker a1,v2_definer a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v2_definer a1,t1 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v2_definer a1,t2 a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v2_definer a1,t3 a2 WHERE a1.a=a2.a; DELETE a1 FROM v2_definer a1,v1_invoker a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v2_definer a1,v1_definer a2 WHERE a1.a=a2.a; DELETE a1 FROM v2_definer a1,v2_invoker a2 WHERE a1.a=a2.a; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE a1 FROM v2_definer a1,v2_definer a2 WHERE a1.a=a2.a; connection default; DROP VIEW v1_invoker, v1_definer, v2_invoker, v2_definer; @@ -521,9 +521,9 @@ CREATE VIEW v2 AS SELECT * FROM v1_definer; DROP VIEW v2; connection user; CREATE VIEW v2 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v2 AS SELECT * FROM v1_invoker; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v2 AS SELECT * FROM v1_definer; DROP VIEW v2; connection default; @@ -546,21 +546,21 @@ INSERT INTO v1_definer SELECT * FROM v1_invoker WHERE a=20; INSERT INTO v1_definer SELECT * FROM v1_definer WHERE a=20; connection user; INSERT INTO t1 SELECT * FROM t1 WHERE a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO t1 SELECT * FROM v1_invoker WHERE a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO t1 SELECT * FROM v1_definer WHERE a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1_invoker SELECT * FROM t1 WHERE a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1_invoker SELECT * FROM v1_invoker WHERE a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1_invoker SELECT * FROM v1_definer WHERE a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1_definer SELECT * FROM t1 WHERE a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1_definer SELECT * FROM v1_invoker WHERE a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1_definer SELECT * FROM v1_definer WHERE a=20; connection default; DROP VIEW v1_invoker, v1_definer; @@ -591,17 +591,17 @@ REPLACE INTO v1_definer SELECT * FROM v1_definer WHERE a=20; ERROR 42000: CONNECT Unsupported command connection user; REPLACE INTO t1 SELECT * FROM t1 WHERE a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation REPLACE INTO t1 SELECT * FROM v1_invoker WHERE a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation REPLACE INTO t1 SELECT * FROM v1_definer WHERE a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation REPLACE INTO v1_invoker SELECT * FROM t1 WHERE a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation REPLACE INTO v1_invoker SELECT * FROM v1_invoker WHERE a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation REPLACE INTO v1_invoker SELECT * FROM v1_definer WHERE a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation REPLACE INTO v1_definer SELECT * FROM t1 WHERE a=20; ERROR 42000: CONNECT Unsupported command REPLACE INTO v1_definer SELECT * FROM v1_invoker WHERE a=20; @@ -624,7 +624,7 @@ t2 CREATE TABLE `t2` ( RENAME TABLE t2 TO t1; connection user; RENAME TABLE t1 TO t2; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; # Testing SQLCOM_ALTER_TABLE (for ALTER..RENAME) @@ -640,7 +640,7 @@ t2 CREATE TABLE `t2` ( ALTER TABLE t2 RENAME TO t1; connection user; ALTER TABLE t1 RENAME TO t2; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; # Testing SQLCOM_ALTER_TABLE (changing ENGINE to non-CONNECT) @@ -653,7 +653,7 @@ CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; INSERT INTO t1 VALUES (10); connection user; ALTER TABLE t1 ENGINE=MyISAM; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; # Testing SQLCOM_ALTER_TABLE (changing ENGINE to CONNECT) @@ -669,7 +669,7 @@ CREATE TABLE t1 (a INT) ENGINE=MyISAM; INSERT INTO t1 VALUES (10); connection user; ALTER TABLE t1 ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; # Testing SQLCOM_OPTIMIZE @@ -682,7 +682,7 @@ test.t1 optimize status OK connection user; OPTIMIZE TABLE t1; Table Op Msg_type Msg_text -test.t1 optimize Error Access denied for user 'user'@'localhost' (using password: NO) +test.t1 optimize Error Access denied; you need (at least one of) the FILE privilege(s) for this operation test.t1 optimize Error Got error 122 'This operation requires the FILE privilege' from CONNECT test.t1 optimize error Corrupt connection default; @@ -696,7 +696,7 @@ Warnings: Warning 1105 This is an outward table, table data were not modified. connection user; ALTER TABLE t1 ADD c INT; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; # Testing SQLCOM_ALTER_TABLE (removing columns) @@ -708,7 +708,7 @@ Warnings: Warning 1105 This is an outward table, table data were not modified. connection user; ALTER TABLE t1 DROP c; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; # Testing SQLCOM_ALTER_TABLE (adding keys) @@ -718,7 +718,7 @@ INSERT INTO t1 VALUES (10,10); ALTER TABLE t1 ADD KEY(a); connection user; ALTER TABLE t1 ADD KEY(b); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; # Testing SQLCOM_ALTER_TABLE (removing keys) @@ -728,7 +728,7 @@ INSERT INTO t1 VALUES (10,10); ALTER TABLE t1 DROP KEY a; connection user; ALTER TABLE t1 DROP KEY b; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; # Testing SQLCOM_CREATE_INDEX and SQLCOM_DROP_INDEX @@ -740,9 +740,9 @@ DROP INDEX a ON t1; CREATE INDEX a ON t1 (a); connection user; CREATE INDEX b ON t1 (b); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP INDEX a ON t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; # Testing stored procedures @@ -757,10 +757,10 @@ DROP TABLE t1; CALL p_invoker(); DROP TABLE t1; CALL p_baddefiner(); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection user; CALL p_invoker(); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CALL p_definer(); connection default; DROP TABLE t1; diff --git a/storage/connect/mysql-test/connect/r/ini_grant.result b/storage/connect/mysql-test/connect/r/ini_grant.result index 8cbf88123fb..96d5e192c7d 100644 --- a/storage/connect/mysql-test/connect/r/ini_grant.result +++ b/storage/connect/mysql-test/connect/r/ini_grant.result @@ -34,7 +34,7 @@ sec val DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=INI FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -46,21 +46,21 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES ('sec2','val2'); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET val='val11'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE connection default; SELECT user(); @@ -72,13 +72,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES ('sec3','val3'); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET val='val11'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation disconnect user; connection default; DROP VIEW v1; diff --git a/storage/connect/mysql-test/connect/r/mysql_grant.result b/storage/connect/mysql-test/connect/r/mysql_grant.result index 11a3dbba36c..83a906afed5 100644 --- a/storage/connect/mysql-test/connect/r/mysql_grant.result +++ b/storage/connect/mysql-test/connect/r/mysql_grant.result @@ -11,7 +11,7 @@ SELECT user(); user() user@localhost CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=MySQL OPTION_LIST='host=localhost,user=root1,port=PORT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -29,19 +29,19 @@ SELECT user(); user() user@localhost SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO t1 VALUES ('xxx'); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1 WHERE a='xxx'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a='yyy' WHERE a='xxx'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE connection default; SELECT user(); @@ -53,13 +53,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation disconnect user; connection default; SELECT user(); diff --git a/storage/connect/mysql-test/connect/r/xml.result b/storage/connect/mysql-test/connect/r/xml.result index c4635ba053e..6a0c9db27b3 100644 --- a/storage/connect/mysql-test/connect/r/xml.result +++ b/storage/connect/mysql-test/connect/r/xml.result @@ -158,47 +158,47 @@ TRANSLATOR NULL PUBLISHER Eyrolles Paris DATEPUB 1998 SELECT LOAD_FILE('MYSQLD_DATADIR/test/xsample2.xml') AS xml; -xml <?xml version="1.0" encoding="UTF-8"?> -<BIBLIO SUBJECT="XML"> - <BOOK ISBN="9782212090819" LANG="fr" SUBJECT="applications"> - <AUTHOR> - <FIRSTNAME>Jean-Christophe</FIRSTNAME> - <LASTNAME>Bernadac</LASTNAME> - </AUTHOR> - <AUTHOR> - <FIRSTNAME>François</FIRSTNAME> - <LASTNAME>Knab</LASTNAME> - </AUTHOR> - <TITLE>Construire une application XML</TITLE> - <PUBLISHER> - <NAME>Eyrolles</NAME> - <PLACE>Paris</PLACE> - </PUBLISHER> - <DATEPUB>1999</DATEPUB> - </BOOK> - <BOOK ISBN="9782840825685" LANG="fr" SUBJECT="applications"> - <AUTHOR> - <FIRSTNAME>William J.</FIRSTNAME> - <LASTNAME>Pardi</LASTNAME> - </AUTHOR> - <TRANSLATOR PREFIX="adapté de l'anglais par"> - <FIRSTNAME>James</FIRSTNAME> - <LASTNAME>Guerin</LASTNAME> - </TRANSLATOR> - <TITLE>XML en Action</TITLE> - <PUBLISHER> - <NAME>Microsoft Press</NAME> - <PLACE>Paris</PLACE> - </PUBLISHER> - <DATEPUB>1999</DATEPUB> - </BOOK> - <BOOK ISBN="9782212090529" LANG="fr" SUBJECT="général"> - <AUTHOR>Alain Michard</AUTHOR> - <TITLE>XML, Langage et Applications</TITLE> - <PUBLISHER>Eyrolles Paris</PUBLISHER> - <DATEPUB>1998</DATEPUB> - </BOOK> -</BIBLIO> +xml <?xml version="1.0" encoding="UTF-8"?>
+<BIBLIO SUBJECT="XML">
+ <BOOK ISBN="9782212090819" LANG="fr" SUBJECT="applications">
+ <AUTHOR>
+ <FIRSTNAME>Jean-Christophe</FIRSTNAME>
+ <LASTNAME>Bernadac</LASTNAME>
+ </AUTHOR>
+ <AUTHOR>
+ <FIRSTNAME>François</FIRSTNAME>
+ <LASTNAME>Knab</LASTNAME>
+ </AUTHOR>
+ <TITLE>Construire une application XML</TITLE>
+ <PUBLISHER>
+ <NAME>Eyrolles</NAME>
+ <PLACE>Paris</PLACE>
+ </PUBLISHER>
+ <DATEPUB>1999</DATEPUB>
+ </BOOK>
+ <BOOK ISBN="9782840825685" LANG="fr" SUBJECT="applications">
+ <AUTHOR>
+ <FIRSTNAME>William J.</FIRSTNAME>
+ <LASTNAME>Pardi</LASTNAME>
+ </AUTHOR>
+ <TRANSLATOR PREFIX="adapté de l'anglais par">
+ <FIRSTNAME>James</FIRSTNAME>
+ <LASTNAME>Guerin</LASTNAME>
+ </TRANSLATOR>
+ <TITLE>XML en Action</TITLE>
+ <PUBLISHER>
+ <NAME>Microsoft Press</NAME>
+ <PLACE>Paris</PLACE>
+ </PUBLISHER>
+ <DATEPUB>1999</DATEPUB>
+ </BOOK>
+ <BOOK ISBN="9782212090529" LANG="fr" SUBJECT="général">
+ <AUTHOR>Alain Michard</AUTHOR>
+ <TITLE>XML, Langage et Applications</TITLE>
+ <PUBLISHER>Eyrolles Paris</PUBLISHER>
+ <DATEPUB>1998</DATEPUB>
+ </BOOK>
+</BIBLIO>
DROP TABLE t1; # @@ -374,7 +374,7 @@ INSERT INTO t1 VALUES (_cp1251 0xC0C1C2C3); Warnings: Level Warning Code 1105 -Message Com error: Unable to save character to 'iso-8859-1' encoding. +Message Com error: Unable to save character to 'iso-8859-1' encoding.
INSERT INTO t1 VALUES ('&<>"\''); SELECT node, hex(node) FROM t1; @@ -383,11 +383,11 @@ hex(node) 263C3E2227 DROP TABLE t1; SET @a=LOAD_FILE('MYSQLD_DATADIR/test/t1.xml'); SELECT CAST(@a AS CHAR CHARACTER SET latin1); -CAST(@a AS CHAR CHARACTER SET latin1) <?xml version="1.0" encoding="iso-8859-1"?> -<!-- Created by the MariaDB CONNECT Storage Engine--> -<t1> - <line> - <node>&<>"'</node> - </line> -</t1> +CAST(@a AS CHAR CHARACTER SET latin1) <?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Created by the MariaDB CONNECT Storage Engine-->
+<t1>
+ <line>
+ <node>&<>"'</node>
+ </line>
+</t1>
diff --git a/storage/connect/mysql-test/connect/r/xml2_grant.result b/storage/connect/mysql-test/connect/r/xml2_grant.result index 817d3f5bf57..a6e6c150b59 100644 --- a/storage/connect/mysql-test/connect/r/xml2_grant.result +++ b/storage/connect/mysql-test/connect/r/xml2_grant.result @@ -35,7 +35,7 @@ a DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML OPTION_LIST='xmlsup=libxml2,rownode=row' FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -47,23 +47,23 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES (10); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 FILE_NAME='t2.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE connection default; SELECT user(); @@ -75,13 +75,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -97,7 +97,7 @@ SELECT user(); user() user@localhost ALTER TABLE t1 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; disconnect user; diff --git a/storage/connect/mysql-test/connect/r/xml_grant.result b/storage/connect/mysql-test/connect/r/xml_grant.result index 950ae4a3b35..f1a6ad101cb 100644 --- a/storage/connect/mysql-test/connect/r/xml_grant.result +++ b/storage/connect/mysql-test/connect/r/xml_grant.result @@ -33,7 +33,7 @@ a DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML OPTION_LIST='xmlsup=domdoc,rownode=row' FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -45,23 +45,23 @@ SELECT user(); user() user@localhost INSERT INTO t1 VALUES (10); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE t1 SET a=20; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation TRUNCATE TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 READONLY=1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation ALTER TABLE t1 FILE_NAME='t2.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DROP TABLE t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation # Testing a VIEW created with FILE privileges but accessed with no FILE connection default; SELECT user(); @@ -73,13 +73,13 @@ SELECT user(); user() user@localhost SELECT * FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation INSERT INTO v1 VALUES (2); -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation UPDATE v1 SET a=123; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation DELETE FROM v1; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; SELECT user(); user() @@ -95,7 +95,7 @@ SELECT user(); user() user@localhost ALTER TABLE t1 FILE_NAME='t1.EXT'; -ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO) +ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation connection default; DROP TABLE t1; disconnect user; diff --git a/storage/connect/mysql-test/connect/t/grant.inc b/storage/connect/mysql-test/connect/t/grant.inc index 6580c845b56..ef6e0cec297 100644 --- a/storage/connect/mysql-test/connect/t/grant.inc +++ b/storage/connect/mysql-test/connect/t/grant.inc @@ -25,7 +25,7 @@ DROP TABLE t1; # Making sure DROP erased the data file --error 1 --remove_file $MYSQLD_DATADIR/test/t1.$FILE_EXT ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR --eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT $TABLE_OPTIONS FILE_NAME='t1.EXT' --connection default SELECT user(); @@ -33,23 +33,23 @@ SELECT user(); INSERT INTO t1 VALUES (10); --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 VALUES (10); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 SET a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR TRUNCATE TABLE t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 READONLY=1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 FILE_NAME='t2.EXT'; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DROP TABLE t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE VIEW v1 AS SELECT * FROM t1; --echo # Testing a VIEW created with FILE privileges but accessed with no FILE --connection default @@ -57,13 +57,13 @@ SELECT user(); CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1; --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM v1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1 VALUES (2); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1 SET a=123; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM v1; --connection default SELECT user(); @@ -74,7 +74,7 @@ DROP TABLE t1; INSERT INTO t1 VALUES (10); --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 FILE_NAME='t1.EXT'; --connection default DROP TABLE t1; diff --git a/storage/connect/mysql-test/connect/t/grant.test b/storage/connect/mysql-test/connect/t/grant.test index 738f156d8a4..5e07b7af369 100644 --- a/storage/connect/mysql-test/connect/t/grant.test +++ b/storage/connect/mysql-test/connect/t/grant.test @@ -11,7 +11,7 @@ REVOKE FILE ON *.* FROM user@localhost; --connect(user,localhost,user,,) --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE TABLE t1 ( path VARCHAR(256) NOT NULL flag=1, fname VARCHAR(256) NOT NULL, @@ -28,23 +28,24 @@ CREATE TABLE t1 ( ) ENGINE=CONNECT TABLE_TYPE=DIR FILE_NAME='*.*'; # "size>0" to skip directory names on Windows --replace_result $MYSQLD_DATADIR DATADIR/ +--sorted_result SELECT fname, ftype, size FROM t1 WHERE size>0; --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 VALUES (); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM t1 WHERE path='xxx'; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 SET path='yyy' WHERE path='xxx'; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR TRUNCATE TABLE t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 READONLY=1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE VIEW v1 AS SELECT * FROM t1; --echo # Testing a VIEW created with FILE privileges but accessed with no FILE @@ -53,13 +54,13 @@ SELECT user(); CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1; --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM v1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1 VALUES (1,1,1,1); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1 SET path=123; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM v1; --disconnect user diff --git a/storage/connect/mysql-test/connect/t/grant2.test b/storage/connect/mysql-test/connect/t/grant2.test index 8e7d9453e70..351eb97f11a 100644 --- a/storage/connect/mysql-test/connect/t/grant2.test +++ b/storage/connect/mysql-test/connect/t/grant2.test @@ -23,13 +23,13 @@ CREATE DEFINER=user@localhost SQL SECURITY DEFINER VIEW v1_baddefiner AS SELECT SELECT * FROM t1; SELECT * FROM v1_invoker; SELECT * FROM v1_definer; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM v1_baddefiner; --connect(user,localhost,user,,) ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM v1_invoker; SELECT * FROM v1_definer; --connection default @@ -47,9 +47,9 @@ UPDATE t1 SET a=11; UPDATE v1_invoker SET a=12; UPDATE v1_definer SET a=13; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 SET a=21; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker SET a=22; UPDATE v1_definer SET a=23; --connection default @@ -67,9 +67,9 @@ INSERT INTO t1 VALUES (11); INSERT INTO v1_invoker VALUES (12); INSERT INTO v1_definer VALUES (13); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 VALUES (21); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1_invoker VALUES (22); INSERT INTO v1_definer VALUES (23); --connection default @@ -79,7 +79,7 @@ DROP TABLE t1; --echo # Testing SQLCOM_REPLACE # REPLACE is not supported by ConnectSE, so we're testing the difference -# between ER_ACCESS_DENIED_ERROR vs ER_NOT_ALLOWED_COMMAND +# between ER_SPECIFIC_ACCESS_DENIED_ERROR vs ER_NOT_ALLOWED_COMMAND --connection default CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; INSERT INTO t1 VALUES (10); @@ -92,9 +92,9 @@ REPLACE INTO v1_invoker VALUES (12); --error ER_NOT_ALLOWED_COMMAND REPLACE INTO v1_definer VALUES (13); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO t1 VALUES (21); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO v1_invoker VALUES (22); --error ER_NOT_ALLOWED_COMMAND REPLACE INTO v1_definer VALUES (23); @@ -113,9 +113,9 @@ DELETE FROM t1 WHERE a=11; DELETE FROM v1_invoker WHERE a=12; DELETE FROM v1_definer WHERE a=13; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM t1 WHERE a=21; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM v1_invoker WHERE a=22; DELETE FROM v1_definer WHERE a=23; --connection default @@ -137,10 +137,10 @@ CREATE SQL SECURITY DEFINER VIEW v1_definer AS SELECT * FROM t1; --eval LOAD DATA LOCAL INFILE '$MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_definer --connection user --replace_result $MTR_SUITE_DIR MTR_SUITE_DIR ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR --eval LOAD DATA LOCAL INFILE '$MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE t1 --replace_result $MTR_SUITE_DIR MTR_SUITE_DIR ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR --eval LOAD DATA LOCAL INFILE '$MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_invoker --replace_result $MTR_SUITE_DIR MTR_SUITE_DIR --eval LOAD DATA LOCAL INFILE '$MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_definer @@ -156,7 +156,7 @@ INSERT INTO t1 VALUES (10); TRUNCATE TABLE t1; INSERT INTO t1 VALUES (11); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR TRUNCATE TABLE t1; --connection default DROP TABLE t1; @@ -168,7 +168,7 @@ DROP TABLE t1; CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; INSERT INTO t1 VALUES (10); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DROP TABLE t1; --connection default DROP TABLE t1; @@ -193,7 +193,7 @@ DROP TABLE t1; --echo # Testing SQLCOM_CREATE_TABLE --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; --connection default @@ -216,13 +216,13 @@ UNLOCK TABLES; LOCK TABLE v1_definer WRITE; UNLOCK TABLES; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR LOCK TABLE t1 READ; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR LOCK TABLE t1 WRITE; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR LOCK TABLE v1_invoker READ; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR LOCK TABLE v1_invoker WRITE; LOCK TABLE v1_definer READ; UNLOCK TABLES; @@ -299,108 +299,108 @@ UPDATE v2_definer a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; --connection user # All queries with t1 should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; # All queries with t2 should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t2 a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t2 a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t2 a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t2 a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t2 a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t2 a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t2 a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; # t3 does not need FILE_ALC ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t3 a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t3 a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; # This is OK: UPDATE t3 a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t3 a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; # This is OK: UPDATE t3 a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t3 a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; # This is OK: UPDATE t3 a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; # All queries with v1_invoker should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_invoker a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; # v1_definer does not need FILE_ACL from the invoker ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_definer a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_definer a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v1_definer a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_definer a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v1_definer a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1_definer a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v1_definer a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; # All queries with v2_invoker should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_invoker a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_invoker a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_invoker a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_invoker a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_invoker a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_invoker a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_invoker a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; # v2_definer does not need FILE_ACL from the invoker ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_definer a1,t1 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_definer a1,t2 a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v2_definer a1,t3 a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_definer a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v2_definer a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v2_definer a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a; UPDATE v2_definer a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a; @@ -476,108 +476,108 @@ DELETE a1 FROM v2_definer a1,v2_definer a2 WHERE a1.a=a2.a; --connection user # All queries with t1 should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t1 a1,t1 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t1 a1,t2 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t1 a1,t3 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t1 a1,v1_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t1 a1,v1_definer a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t1 a1,v2_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t1 a1,v2_definer a2 WHERE a1.a=a2.a; # All queries with t2 should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t2 a1,t1 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t2 a1,t2 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t2 a1,t3 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t2 a1,v1_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t2 a1,v1_definer a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t2 a1,v2_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t2 a1,v2_definer a2 WHERE a1.a=a2.a; # t3 does not need FILE_ALC ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t3 a1,t1 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t3 a1,t2 a2 WHERE a1.a=a2.a; # This is OK: DELETE a1 FROM t3 a1,t3 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t3 a1,v1_invoker a2 WHERE a1.a=a2.a; # This is OK: DELETE a1 FROM t3 a1,v1_definer a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM t3 a1,v2_invoker a2 WHERE a1.a=a2.a; # This is OK: DELETE a1 FROM t3 a1,v2_definer a2 WHERE a1.a=a2.a; # All queries with v1_invoker should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_invoker a1,t1 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_invoker a1,t2 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_invoker a1,t3 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_invoker a1,v1_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_invoker a1,v1_definer a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_invoker a1,v2_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_invoker a1,v2_definer a2 WHERE a1.a=a2.a; # v1_definer does not need FILE_ACL from the invoker ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_definer a1,t1 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_definer a1,t2 a2 WHERE a1.a=a2.a; DELETE a1 FROM v1_definer a1,t3 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_definer a1,v1_invoker a2 WHERE a1.a=a2.a; DELETE a1 FROM v1_definer a1,v1_definer a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v1_definer a1,v2_invoker a2 WHERE a1.a=a2.a; DELETE a1 FROM v1_definer a1,v2_definer a2 WHERE a1.a=a2.a; # All queries with v2_invoker should fail ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_invoker a1,t1 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_invoker a1,t2 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_invoker a1,t3 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_invoker a1,v1_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_invoker a1,v1_definer a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_invoker a1,v2_invoker a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_invoker a1,v2_definer a2 WHERE a1.a=a2.a; # v2_definer does not need FILE_ACL from the invoker ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_definer a1,t1 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_definer a1,t2 a2 WHERE a1.a=a2.a; DELETE a1 FROM v2_definer a1,t3 a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_definer a1,v1_invoker a2 WHERE a1.a=a2.a; DELETE a1 FROM v2_definer a1,v1_definer a2 WHERE a1.a=a2.a; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE a1 FROM v2_definer a1,v2_invoker a2 WHERE a1.a=a2.a; DELETE a1 FROM v2_definer a1,v2_definer a2 WHERE a1.a=a2.a; @@ -598,9 +598,9 @@ DROP VIEW v2; CREATE VIEW v2 AS SELECT * FROM v1_definer; DROP VIEW v2; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE VIEW v2 AS SELECT * FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE VIEW v2 AS SELECT * FROM v1_invoker; CREATE VIEW v2 AS SELECT * FROM v1_definer; DROP VIEW v2; @@ -625,21 +625,21 @@ INSERT INTO v1_definer SELECT * FROM t1 WHERE a=20; INSERT INTO v1_definer SELECT * FROM v1_invoker WHERE a=20; INSERT INTO v1_definer SELECT * FROM v1_definer WHERE a=20; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 SELECT * FROM t1 WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 SELECT * FROM v1_invoker WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 SELECT * FROM v1_definer WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1_invoker SELECT * FROM t1 WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1_invoker SELECT * FROM v1_invoker WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1_invoker SELECT * FROM v1_definer WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1_definer SELECT * FROM t1 WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1_definer SELECT * FROM v1_invoker WHERE a=20; # This is OK: INSERT INTO v1_definer SELECT * FROM v1_definer WHERE a=20; @@ -650,7 +650,7 @@ DROP TABLE t1; --echo # Testing SQLCOM_REPLACE_SELECT # REPLACE is not supported by CONNECT -# so we're testing ER_NOT_ALLOWED_COMMAND vs ER_ACCESS_DENIED_ERROR here +# so we're testing ER_NOT_ALLOWED_COMMAND vs ER_SPECIFIC_ACCESS_DENIED_ERROR here --connection default CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; INSERT INTO t1 VALUES (10); @@ -676,17 +676,17 @@ REPLACE INTO v1_definer SELECT * FROM v1_invoker WHERE a=20; REPLACE INTO v1_definer SELECT * FROM v1_definer WHERE a=20; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO t1 SELECT * FROM t1 WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO t1 SELECT * FROM v1_invoker WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO t1 SELECT * FROM v1_definer WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO v1_invoker SELECT * FROM t1 WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO v1_invoker SELECT * FROM v1_invoker WHERE a=20; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR REPLACE INTO v1_invoker SELECT * FROM v1_definer WHERE a=20; --error ER_NOT_ALLOWED_COMMAND REPLACE INTO v1_definer SELECT * FROM t1 WHERE a=20; @@ -708,7 +708,7 @@ SHOW CREATE TABLE t2; RENAME TABLE t2 TO t1; --connection user # TODO: Perhaps FILE_ACL is needed for RENAME. Discuss with Oliver. ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR RENAME TABLE t1 TO t2; --connection default DROP TABLE t1; @@ -723,7 +723,7 @@ SHOW CREATE TABLE t2; ALTER TABLE t2 RENAME TO t1; --connection user # TODO: Perhaps FILE_ACL is not needed for ALTER..RENAME. Discuss with Olivier. ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 RENAME TO t2; --connection default DROP TABLE t1; @@ -739,7 +739,7 @@ DROP TABLE t1; CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; INSERT INTO t1 VALUES (10); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 ENGINE=MyISAM; --connection default DROP TABLE t1; @@ -756,7 +756,7 @@ DROP TABLE t1; CREATE TABLE t1 (a INT) ENGINE=MyISAM; INSERT INTO t1 VALUES (10); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; --connection default DROP TABLE t1; @@ -779,7 +779,7 @@ CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix'; INSERT INTO t1 VALUES (10); ALTER TABLE t1 ADD b INT; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 ADD c INT; --connection default DROP TABLE t1; @@ -791,7 +791,7 @@ CREATE TABLE t1 (a INT,b INT,c INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1. INSERT INTO t1 VALUES (10,10,10); ALTER TABLE t1 DROP b; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 DROP c; --connection default DROP TABLE t1; @@ -803,7 +803,7 @@ CREATE TABLE t1 (a INT NOT NULL,b INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=fix FI INSERT INTO t1 VALUES (10,10); ALTER TABLE t1 ADD KEY(a); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 ADD KEY(b); --connection default DROP TABLE t1; @@ -816,7 +816,7 @@ CREATE TABLE t1 (a INT NOT NULL,b INT NOT NULL, KEY a(a), KEY b(b)) ENGINE=CONNE INSERT INTO t1 VALUES (10,10); ALTER TABLE t1 DROP KEY a; --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 DROP KEY b; --connection default DROP TABLE t1; @@ -831,9 +831,9 @@ CREATE INDEX a ON t1 (a); DROP INDEX a ON t1; CREATE INDEX a ON t1 (a); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE INDEX b ON t1 (b); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DROP INDEX a ON t1; --connection default DROP TABLE t1; @@ -852,11 +852,11 @@ CALL p_definer(); DROP TABLE t1; CALL p_invoker(); DROP TABLE t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CALL p_baddefiner(); --connection user ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CALL p_invoker(); CALL p_definer(); diff --git a/storage/connect/mysql-test/connect/t/ini_grant.test b/storage/connect/mysql-test/connect/t/ini_grant.test index b0ddcb57979..bbf85e5f794 100644 --- a/storage/connect/mysql-test/connect/t/ini_grant.test +++ b/storage/connect/mysql-test/connect/t/ini_grant.test @@ -29,7 +29,7 @@ DROP TABLE t1; # Making sure DROP erased the data file --error 1 --remove_file $MYSQLD_DATADIR/test/t1.ini ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=INI FILE_NAME='t1.EXT'; --connection default SELECT user(); @@ -37,21 +37,21 @@ CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CON INSERT INTO t1 VALUES ('sec1','val1'); --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 VALUES ('sec2','val2'); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 SET val='val11'; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR TRUNCATE TABLE t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 READONLY=1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DROP TABLE t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE VIEW v1 AS SELECT * FROM t1; --echo # Testing a VIEW created with FILE privileges but accessed with no FILE --connection default @@ -59,13 +59,13 @@ SELECT user(); CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1; --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM v1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1 VALUES ('sec3','val3'); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1 SET val='val11'; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM v1; --disconnect user --connection default diff --git a/storage/connect/mysql-test/connect/t/mysql_grant.test b/storage/connect/mysql-test/connect/t/mysql_grant.test index 7d3d05cb8fd..30737258a1f 100644 --- a/storage/connect/mysql-test/connect/t/mysql_grant.test +++ b/storage/connect/mysql-test/connect/t/mysql_grant.test @@ -27,7 +27,7 @@ set sql_mode=default; --connection user SELECT user(); --replace_result $PORT PORT ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR --eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=MySQL OPTION_LIST='host=localhost,user=root1,port=$PORT' --connection default SELECT user(); @@ -38,19 +38,19 @@ INSERT INTO t1remote VALUES (10),(20),(30); SELECT * FROM t1; --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO t1 VALUES ('xxx'); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM t1 WHERE a='xxx'; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE t1 SET a='yyy' WHERE a='xxx'; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR TRUNCATE TABLE t1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER TABLE t1 READONLY=1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR CREATE VIEW v1 AS SELECT * FROM t1; --echo # Testing a VIEW created with FILE privileges but accessed with no FILE @@ -59,13 +59,13 @@ SELECT user(); CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1; --connection user SELECT user(); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR SELECT * FROM v1; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR INSERT INTO v1 VALUES (2); ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR UPDATE v1 SET a=123; ---error ER_ACCESS_DENIED_ERROR +--error ER_SPECIFIC_ACCESS_DENIED_ERROR DELETE FROM v1; --disconnect user diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp index 6687513fa6c..d08c6d1b7a5 100644 --- a/storage/connect/odbconn.cpp +++ b/storage/connect/odbconn.cpp @@ -2279,7 +2279,7 @@ int ODBConn::GetCatInfo(CATPARM *cap) int i, irc; bool b; PCSZ fnc = "Unknown"; - UWORD n; + UWORD n = 0; SWORD ncol, len, tp; SQLULEN crow = 0; PQRYRES qrp = cap->Qrp; diff --git a/storage/connect/valblk.cpp b/storage/connect/valblk.cpp index d6c4218265b..b7c8c704e65 100644 --- a/storage/connect/valblk.cpp +++ b/storage/connect/valblk.cpp @@ -513,7 +513,7 @@ void TYPBLK<TYPE>::SetValues(PVBLK pv, int k, int n) CheckType(pv) TYPE *lp = ((TYPBLK*)pv)->Typp; - for (register int i = k; i < n; i++) // TODO + for (int i = k; i < n; i++) // TODO Typp[i] = lp[i]; } // end of SetValues @@ -807,7 +807,7 @@ void CHRBLK::SetValue(const char *sp, uint len, int n) if (Blanks) { // Suppress eventual ending zero and right fill with blanks - for (register int i = len; i < Long; i++) + for (int i = len; i < Long; i++) p[i] = ' '; } else if ((signed)len < Long) diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp index db43f800a91..95f038d494c 100644 --- a/storage/connect/xindex.cpp +++ b/storage/connect/xindex.cpp @@ -272,8 +272,8 @@ void XINDEX::Close(void) /***********************************************************************/ int XINDEX::Qcompare(int *i1, int *i2) { - register int k; - register PXCOL kcp; + int k; + PXCOL kcp; for (kcp = To_KeyCol, k = 0; kcp; kcp = kcp->Next) if ((k = kcp->Compare(*i1, *i2))) @@ -745,7 +745,7 @@ int XINDEX::ColMaxSame(PXCOL kp) /***********************************************************************/ bool XINDEX::Reorder(PGLOBAL g __attribute__((unused))) { - register int i, j, k, n; + int i, j, k, n; bool sorted = true; PXCOL kcp; #if 0 @@ -1874,8 +1874,8 @@ int XINDEX::Fetch(PGLOBAL g) /***********************************************************************/ int XINDEX::FastFind(void) { - register int curk, sup, inf, i= 0, k, n = 2; - register PXCOL kp, kcp; + int curk, sup, inf, i= 0, k, n = 2; + PXCOL kp, kcp; //assert((int)nv == Nval); @@ -2213,8 +2213,8 @@ int XINDXS::Fetch(PGLOBAL g) /***********************************************************************/ int XINDXS::FastFind(void) { - register int sup, inf, i= 0, n = 2; - register PXCOL kcp = To_KeyCol; + int sup, inf, i= 0, n = 2; + PXCOL kcp = To_KeyCol; if (Nblk && Op == OP_EQ) { // Look in block values to find in which block to search @@ -3239,7 +3239,7 @@ void KXYCOL::FillValue(PVAL valp) int KXYCOL::Compare(int i1, int i2) { // Do the actual comparison between values. - register int k = Kblp->CompVal(i1, i2); + int k = Kblp->CompVal(i1, i2); if (trace(4)) htrc("Compare done result=%d\n", k); @@ -3254,7 +3254,7 @@ int KXYCOL::CompVal(int i) { // Do the actual comparison between numerical values. if (trace(4)) { - register int k = (int)Kblp->CompVal(Valp, (int)i); + int k = (int)Kblp->CompVal(Valp, (int)i); htrc("Compare done result=%d\n", k); return k; |