1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

System Versioning pre0.12

Merge remote-tracking branch 'origin/archive/2017-10-17' into 10.3
This commit is contained in:
Aleksey Midenkov
2017-11-07 00:37:49 +03:00
354 changed files with 20615 additions and 1638 deletions

10
.gitignore vendored
View File

@ -1,11 +1,17 @@
*-t *-t
*.ctest *.ctest
*.reject *.reject
*.orig
*.spec *.spec
*.bak *.bak
*.dgcov *.dgcov
*.rpm *.rpm
.*.swp .*.swp
.#*
.vimrc
.editorconfig
.kateconfig
*.kdev4
*.ninja *.ninja
.ninja_* .ninja_*
.gdb_history .gdb_history
@ -494,3 +500,7 @@ UpgradeLog*.htm
# Microsoft Fakes # Microsoft Fakes
FakesAssemblies/ FakesAssemblies/
compile_commands.json
.clang-format
.kscope/

86
BUILD/capture_warnings.sh Executable file
View File

@ -0,0 +1,86 @@
#!/bin/bash
warn_path=$1
warn_mode=$2 # 'late', 'early' or 'both'
shift 2
warn_file="$warn_path/compile.warnings"
suppress_file="$warn_path/suppress.warnings"
# suppress_warnings:
#
# 1. treat STDIN as sequence of warnings (w) delimited by ^~~~... lines
#
# 2. sanitize each w to matchable m:
# a. ignore 'In file included from' lines;
# b. protect BRE chars;
# c. ignore text coords (NNN:NNN);
# d. convert multiline to X-delimited single line.
#
# 3. match sanitized m against X-delimited suppress.warnings:
# if match not found print w to STDOUT.
suppress_warnings()
{
[ -f "$suppress_file" ] || {
cat
return
}
[ -z "$suppress_file" ] && {
cat > /dev/null
return
}
local m w from
IFS=""
while read -r l
do
w="$w$l"$'\n'
[[ $l =~ ^"In file included from " ]] && {
from=1
continue
}
[[ $from && $l =~ ^[[:space:]]+"from " ]] &&
continue
unset from
if [[ $l =~ ^[[:space:]]*~*\^~*$ ]]
then
cat "$suppress_file" | tr '\n' 'X' | /bin/grep -Gq "$m" ||
echo "$w"
unset m w
else
# Protect BRE metacharacters \.[*^$
l=${l//\\/\\\\}
l=${l//./\\.}
l=${l//[/\\[}
l=${l//-/\\-}
l=${l//\*/\\*}
l=${l//^/\\^}
l=${l//\$/\\\$}
# replace text coords line:char with BRE wildcard
[[ $l =~ ^(.*:)[[:digit:]]+:[[:digit:]]+(.*)$ ]] &&
l=${BASH_REMATCH[1]}[[:digit:]]\\+:[[:digit:]]\\+${BASH_REMATCH[2]}
m="$m$l"$'X'
fi
done
}
exec 3>&1
"$@" 2>&1 1>&3 | suppress_warnings | (
cmderr=`cat`
if [[ -n "$cmderr" ]]; then
if [[ "$cmderr" =~ error: ]]; then
echo "$cmderr" >&2
exit
fi
[[ "$warn_mode" != "late" ]] &&
echo "$cmderr" >&2
[[ "$warn_mode" != "early" && "$cmderr" =~ (warning|note): ]] &&
echo "$cmderr" >> "$warn_file"
fi
)
exit ${PIPESTATUS}

View File

@ -503,3 +503,5 @@ IF(NON_DISTRIBUTABLE_WARNING)
MESSAGE(WARNING " MESSAGE(WARNING "
You have linked MariaDB with GPLv3 libraries! You may not distribute the resulting binary. If you do, you will put yourself into a legal problem with Free Software Foundation.") You have linked MariaDB with GPLv3 libraries! You may not distribute the resulting binary. If you do, you will put yourself into a legal problem with Free Software Foundation.")
ENDIF() ENDIF()
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/print_warnings.cmake)

View File

@ -67,4 +67,4 @@ https://github.com/MariaDB/server
Code status: Code status:
------------ ------------
* [![tests status](https://secure.travis-ci.org/MariaDB/server.png?branch=10.2)](https://travis-ci.org/MariaDB/server) travis-ci.org (10.2 branch) * [![tests status](https://travis-ci.org/tempesta-tech/mariadb.svg?branch=natsys%2Ftrunk)](https://travis-ci.org/tempesta-tech/mariadb) travis-ci.org (natsys/trunk)

View File

@ -0,0 +1,37 @@
IF(NOT DEFINED WARN_MODE)
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
SET(WARN_MODE "late")
ELSE()
SET(WARN_MODE "early")
ENDIF()
ENDIF()
IF(NOT WARN_MODE STREQUAL "early" AND
NOT WARN_MODE STREQUAL "late" AND
NOT WARN_MODE STREQUAL "both")
MESSAGE(FATAL_ERROR "Unknown WARN_MODE: expected 'early', 'late' or 'both'")
ENDIF()
SET_DIRECTORY_PROPERTIES(PROPERTIES RULE_LAUNCH_COMPILE
"bash ${CMAKE_SOURCE_DIR}/BUILD/capture_warnings.sh ${CMAKE_BINARY_DIR} ${WARN_MODE}")
SET_DIRECTORY_PROPERTIES(PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
"${CMAKE_BINARY_DIR}/compile.warnings")
ADD_CUSTOM_TARGET(rm_compile.warnings ALL
COMMAND rm -f compile.warnings
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
ADD_CUSTOM_TARGET(print_warnings ALL
COMMAND bash -c '[ -f compile.warnings ] && { echo "Warnings found:" \; cat compile.warnings \; echo "" \; } \; true'
DEPENDS mysqld rm_compile.warnings
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
IF(TARGET explain_filename-t)
ADD_DEPENDENCIES(print_warnings explain_filename-t)
ENDIF()
IF(TARGET mysql_client_test)
ADD_DEPENDENCIES(print_warnings mysql_client_test)
ENDIF()
IF(TARGET udf_example)
ADD_DEPENDENCIES(print_warnings udf_example)
ENDIF()

View File

@ -211,6 +211,7 @@ extern ulonglong strtoull(const char *str, char **ptr, int base);
#define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1)) #define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1))
#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1)) #define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1))
#define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1)) #define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1))
#define LEX_STRING_WITH_LEN(X) (X).str, (X).length
typedef struct st_mysql_const_lex_string LEX_CSTRING; typedef struct st_mysql_const_lex_string LEX_CSTRING;

View File

@ -408,6 +408,10 @@ enum ha_base_keytype {
when only HA_STATUS_VARIABLE but it won't be used. when only HA_STATUS_VARIABLE but it won't be used.
*/ */
#define HA_STATUS_VARIABLE_EXTRA 128U #define HA_STATUS_VARIABLE_EXTRA 128U
/*
Treat empty table as empty (ignore HA_STATUS_TIME hack).
*/
#define HA_STATUS_OPEN 256U
/* /*
Errorcodes given by handler functions Errorcodes given by handler functions

View File

@ -715,6 +715,7 @@ extern int my_sync(File fd, myf my_flags);
extern int my_sync_dir(const char *dir_name, myf my_flags); extern int my_sync_dir(const char *dir_name, myf my_flags);
extern int my_sync_dir_by_file(const char *file_name, myf my_flags); extern int my_sync_dir_by_file(const char *file_name, myf my_flags);
extern const char *my_get_err_msg(uint nr); extern const char *my_get_err_msg(uint nr);
extern void my_error_as(uint nr1, uint nr2, myf MyFlags, ...);
extern int my_error_register(const char** (*get_errmsgs) (int nr), extern int my_error_register(const char** (*get_errmsgs) (int nr),
uint first, uint last); uint first, uint last);
extern my_bool my_error_unregister(uint first, uint last); extern my_bool my_error_unregister(uint first, uint last);

View File

@ -192,6 +192,17 @@ enum enum_indicator_type
#define FIELD_FLAGS_COLUMN_FORMAT_MASK (3U << FIELD_FLAGS_COLUMN_FORMAT) #define FIELD_FLAGS_COLUMN_FORMAT_MASK (3U << FIELD_FLAGS_COLUMN_FORMAT)
#define FIELD_IS_DROPPED (1U << 26) /* Intern: Field is being dropped */ #define FIELD_IS_DROPPED (1U << 26) /* Intern: Field is being dropped */
#define VERS_SYS_START_FLAG (1 << 27) /* autogenerated column declared with
`generated always as row start`
(see II.a SQL Standard) */
#define VERS_SYS_END_FLAG (1 << 28) /* autogenerated column declared with
`generated always as row end`
(see II.a SQL Standard).*/
#define VERS_OPTIMIZED_UPDATE_FLAG (1 << 29) /* column that doesn't support
system versioning when table
itself supports it*/
#define HIDDEN_FLAG (1 << 31) /* hide from SELECT * */
#define REFRESH_GRANT (1ULL << 0) /* Refresh grant tables */ #define REFRESH_GRANT (1ULL << 0) /* Refresh grant tables */
#define REFRESH_LOG (1ULL << 1) /* Start on new log file */ #define REFRESH_LOG (1ULL << 1) /* Start on new log file */
#define REFRESH_TABLES (1ULL << 2) /* close all tables */ #define REFRESH_TABLES (1ULL << 2) /* close all tables */

View File

@ -118,6 +118,8 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/temporary_tables.cc ../sql/temporary_tables.cc
../sql/session_tracker.cc ../sql/session_tracker.cc
../sql/proxy_protocol.cc ../sql/proxy_protocol.cc
../sql/item_vers.cc
../sql/vtmd.cc
${GEN_SOURCES} ${GEN_SOURCES}
${MYSYS_LIBWRAP_SOURCE} ${MYSYS_LIBWRAP_SOURCE}
) )

View File

@ -21,3 +21,5 @@ innodb-wl5522-debug-zip : broken upstream
innodb_bug12902967 : broken upstream innodb_bug12902967 : broken upstream
file_contents : MDEV-6526 these files are not installed anymore file_contents : MDEV-6526 these files are not installed anymore
max_statement_time : cannot possibly work, depends on timing max_statement_time : cannot possibly work, depends on timing
ssl_ca : natsys: fails in mariadb-10.2.2
innodb_load_xa : natsys: requires external innodb plugin

View File

@ -17,13 +17,13 @@ drop table if exists t1,t2;
--enable_warnings --enable_warnings
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
) ENGINE=blackhole; ) ENGINE=blackhole;
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
select * from t1; select * from t1;
select t1.* from t1; select t1.* from t1;

View File

@ -14,13 +14,13 @@ drop table if exists t1,t2,t3,t4;
--enable_warnings --enable_warnings
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
); );
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
select * from t1; select * from t1;
select t1.* from t1; select t1.* from t1;
@ -1349,7 +1349,7 @@ select fld1,fld3 from t2 where fld1 like "25050_";
select distinct companynr from t2; select distinct companynr from t2;
select distinct companynr from t2 order by companynr; select distinct companynr from t2 order by companynr;
select distinct companynr from t2 order by companynr desc; select distinct companynr from t2 order by companynr desc;
select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%"; select distinct t2.fld3,period_ from t2,t1 where companynr=37 and fld3 like "O%";
select distinct fld3 from t2 where companynr = 34 order by fld3; select distinct fld3 from t2 where companynr = 34 order by fld3;
select distinct fld3 from t2 limit 10; select distinct fld3 from t2 limit 10;
@ -1362,26 +1362,26 @@ select distinct substring(fld3,1,3) as a from t2 having a like "A%" limit 10;
# make a big table. # make a big table.
create table t3 ( create table t3 (
period int not null, period_ int not null,
name char(32) not null, name char(32) not null,
companynr int not null, companynr int not null,
price double(11,0), price double(11,0),
price2 double(11,0), price2 double(11,0),
key (period), key (period_),
key (name) key (name)
); );
--disable_query_log --disable_query_log
INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1001,"Iranizes",37,5987435,234724); INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1001,"Iranizes",37,5987435,234724);
INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1002,"violinist",37,28357832,8723648); INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1002,"violinist",37,28357832,8723648);
INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1003,"extramarital",37,39654943,235872); INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1003,"extramarital",37,39654943,235872);
INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1004,"spates",78,726498,72987523); INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1004,"spates",78,726498,72987523);
INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1005,"cloakroom",78,98439034,823742); INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1005,"cloakroom",78,98439034,823742);
INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1006,"gazer",101,834598,27348324); INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1006,"gazer",101,834598,27348324);
INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1007,"hand",154,983543950,29837423); INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1007,"hand",154,983543950,29837423);
INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1008,"tucked",311,234298,3275892); INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1008,"tucked",311,234298,3275892);
INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1009,"gems",447,2374834,9872392); INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1009,"gems",447,2374834,9872392);
INSERT INTO t3 (period,name,companynr,price,price2) VALUES (1010,"clinker",512,786542,76234234); INSERT INTO t3 (period_,name,companynr,price,price2) VALUES (1010,"clinker",512,786542,76234234);
--enable_query_log --enable_query_log
create temporary table tmp engine = myisam select * from t3; create temporary table tmp engine = myisam select * from t3;
@ -1450,39 +1450,39 @@ explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2
# Some test with ORDER BY and limit # Some test with ORDER BY and limit
# #
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_;
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_ limit 10;
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t1.period_ limit 10;
# #
# Search with a constant table. # Search with a constant table.
# #
select period from t1; select period_ from t1;
select period from t1 where period=1900; select period_ from t1 where period_=1900;
select fld3,period from t1,t2 where fld1 = 011401 order by period; select fld3,period_ from t1,t2 where fld1 = 011401 order by period_;
# #
# Search with a constant table and several keyparts. (Rows are read only once # Search with a constant table and several keyparts. (Rows are read only once
# in the beginning of the search) # in the beginning of the search)
# #
select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001; select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period_=1001;
explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period; explain select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period_;
# #
# Search with a constant table and several rows from another table # Search with a constant table and several rows from another table
# #
select fld3,period from t2,t1 where companynr*10 = 37*10; select fld3,period_ from t2,t1 where companynr*10 = 37*10;
# #
# Search with a table reference and without a key. # Search with a table reference and without a key.
# t3 will be the main table. # t3 will be the main table.
# #
select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price; select fld3,period_,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period_ >= 1001 and period_ <= 1002 and t2.companynr = 37 order by fld3,period_, price;
# #
# Search with an interval on a table with full key on reference table. # Search with an interval on a table with full key on reference table.
@ -1490,7 +1490,7 @@ select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1
# t2nr will be checked. # t2nr will be checked.
# #
select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37; select t2.fld1,fld3,period_,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period_ = 1001 and t2.companynr = 37;
# #
# We need another table for join stuff.. # We need another table for join stuff..
@ -1588,18 +1588,18 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=
# each record # each record
# #
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period_ = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period_ = 1008;
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
# #
# Test of many parenthesis levels # Test of many parenthesis levels
# #
select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); select period_ from t1 where (((period_ > 0) or period_ < 10000 or (period_ = 1900)) and (period_=1900 and period_ <= 1901) or (period_=1903 and (period_=1903)) and period_>=1902) or ((period_=1904 or period_=1905) or (period_=1906 or period_>1907)) or (period_=1908 and period_ = 1909);
select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6))); select period_ from t1 where ((period_ > 0 and period_ < 1) or (((period_ > 0 and period_ < 100) and (period_ > 10)) or (period_ > 10)) or (period_ > 0 and (period_ > 5 or period_ > 6)));
select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1; select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
@ -1657,7 +1657,7 @@ select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 grou
# Calculation with group functions # Calculation with group functions
# #
select sum(Period)/count(*) from t1; select sum(Period_)/count(*) from t1;
select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr; select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr;
select companynr,sum(price)/count(price) as avg from t3 group by companynr having avg > 70000000 order by avg; select companynr,sum(price)/count(price) as avg from t3 group by companynr having avg > 70000000 order by avg;
@ -1747,13 +1747,13 @@ select max(t2nr) from t3 where price=983543950;
# Test of alias # Test of alias
# #
select t1.period from t3 = t1 limit 1; select t1.period_ from t3 = t1 limit 1;
select t1.period from t1 as t1 limit 1; select t1.period_ from t1 as t1 limit 1;
select t1.period as "Nuvarande period" from t1 as t1 limit 1; select t1.period_ as "Nuvarande period_" from t1 as t1 limit 1;
select period as ok_period from t1 limit 1; select period_ as ok_period from t1 limit 1;
select period as ok_period from t1 group by ok_period limit 1; select period_ as ok_period from t1 group by ok_period limit 1;
select 1+1 as summa from t1 group by summa limit 1; select 1+1 as summa from t1 group by summa limit 1;
select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1; select period_ as "Nuvarande period_" from t1 group by "Nuvarande period_" limit 1;
# #
# Some simple show commands # Some simple show commands

View File

@ -197,6 +197,7 @@ my @DEFAULT_SUITES= qw(
sql_sequence- sql_sequence-
unit- unit-
vcol- vcol-
versioning-
wsrep- wsrep-
galera- galera-
); );
@ -220,6 +221,7 @@ our @opt_extra_mysqld_opt;
our @opt_mysqld_envs; our @opt_mysqld_envs;
my $opt_stress; my $opt_stress;
my $opt_tail_lines= 20;
my $opt_dry_run; my $opt_dry_run;
@ -1204,6 +1206,7 @@ sub command_line_setup {
'report-times' => \$opt_report_times, 'report-times' => \$opt_report_times,
'result-file' => \$opt_resfile, 'result-file' => \$opt_resfile,
'stress=s' => \$opt_stress, 'stress=s' => \$opt_stress,
'tail-lines=i' => \$opt_tail_lines,
'dry-run' => \$opt_dry_run, 'dry-run' => \$opt_dry_run,
'help|h' => \$opt_usage, 'help|h' => \$opt_usage,
@ -4870,7 +4873,7 @@ sub report_failure_and_restart ($) {
$tinfo->{comment}.= $tinfo->{comment}.=
"The result from queries just before the failure was:". "The result from queries just before the failure was:".
"\n< snip >\n". "\n< snip >\n".
mtr_lastlinesfromfile($log_file_name, 20)."\n"; mtr_lastlinesfromfile($log_file_name, $opt_tail_lines)."\n";
} }
} }
} }
@ -5543,7 +5546,7 @@ sub start_mysqltest ($) {
mtr_add_arg($args, "--test-file=%s", $tinfo->{'path'}); mtr_add_arg($args, "--test-file=%s", $tinfo->{'path'});
# Number of lines of resut to include in failure report # Number of lines of resut to include in failure report
mtr_add_arg($args, "--tail-lines=20"); mtr_add_arg($args, "--tail-lines=%d", $opt_tail_lines);
if ( defined $tinfo->{'result_file'} ) { if ( defined $tinfo->{'result_file'} ) {
mtr_add_arg($args, "--result-file=%s", $tinfo->{'result_file'}); mtr_add_arg($args, "--result-file=%s", $tinfo->{'result_file'});
@ -6191,6 +6194,8 @@ Misc options
phases of test execution. phases of test execution.
stress=ARGS Run stress test, providing options to stress=ARGS Run stress test, providing options to
mysql-stress-test.pl. Options are separated by comma. mysql-stress-test.pl. Options are separated by comma.
tail-lines=N Number of lines of the result to include in a failure
report.
Some options that control enabling a feature for normal test runs, Some options that control enabling a feature for normal test runs,
can be turned off by prepending 'no' to the option, e.g. --notimer. can be turned off by prepending 'no' to the option, e.g. --notimer.

View File

@ -37,3 +37,4 @@ time_zone_name
time_zone_transition time_zone_transition
time_zone_transition_type time_zone_transition_type
user user
vtmd_template

View File

@ -1,25 +1,25 @@
select * from mysql.user where user = 'root' and host = 'localhost'; select * from mysql.user where user = 'root' and host = 'localhost';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
localhost root Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0 N N 0.000000 localhost root Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0 N N 0.000000
# Test syntax # Test syntax
# #
# These 2 selects should have no changes from the first one. # These 2 selects should have no changes from the first one.
alter user CURRENT_USER; alter user CURRENT_USER;
select * from mysql.user where user = 'root' and host = 'localhost'; select * from mysql.user where user = 'root' and host = 'localhost';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
localhost root Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0 N N 0.000000 localhost root Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0 N N 0.000000
alter user CURRENT_USER(); alter user CURRENT_USER();
select * from mysql.user where user = 'root' and host = 'localhost'; select * from mysql.user where user = 'root' and host = 'localhost';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
localhost root Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0 N N 0.000000 localhost root Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0 N N 0.000000
create user foo; create user foo;
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000 % foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000
alter user foo; alter user foo;
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000 % foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000
# Test super privilege works correctly with a read only database. # Test super privilege works correctly with a read only database.
SET @start_read_only = @@global.read_only; SET @start_read_only = @@global.read_only;
SET GLOBAL read_only=1; SET GLOBAL read_only=1;
@ -50,44 +50,44 @@ Note 1396 Operation ALTER USER failed for 'boo'
# Test password related altering. # Test password related altering.
alter user foo identified by 'something'; alter user foo identified by 'something';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N 0 0 0 0 N N 0.000000 % foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 N N 0.000000
alter user foo identified by 'something2'; alter user foo identified by 'something2';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo *9CD58369E930E28C8996A89DB18B63294E6DC10C N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N 0 0 0 0 N N 0.000000 % foo *9CD58369E930E28C8996A89DB18B63294E6DC10C N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 N N 0.000000
alter user foo identified by password '*88C89BE093D4ECF72D039F62EBB7477EA1FD4D63'; alter user foo identified by password '*88C89BE093D4ECF72D039F62EBB7477EA1FD4D63';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N 0 0 0 0 N N 0.000000 % foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 N N 0.000000
alter user foo identified with 'somecoolplugin'; alter user foo identified with 'somecoolplugin';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N 0 0 0 0 somecoolplugin N N 0.000000 % foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 somecoolplugin N N 0.000000
alter user foo identified with 'somecoolplugin' using 'somecoolpassphrase'; alter user foo identified with 'somecoolplugin' using 'somecoolpassphrase';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N 0 0 0 0 somecoolplugin somecoolpassphrase N N 0.000000 % foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 somecoolplugin somecoolpassphrase N N 0.000000
# Test ssl related altering. # Test ssl related altering.
alter user foo identified by 'something' require SSL; alter user foo identified by 'something' require SSL;
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N ANY 0 0 0 0 N N 0.000000 % foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N ANY 0 0 0 0 N N 0.000000
alter user foo identified by 'something' require X509; alter user foo identified by 'something' require X509;
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N X509 0 0 0 0 N N 0.000000 % foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N X509 0 0 0 0 N N 0.000000
alter user foo identified by 'something' alter user foo identified by 'something'
require cipher 'text' issuer 'foo_issuer' subject 'foo_subject'; require cipher 'text' issuer 'foo_issuer' subject 'foo_subject';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N SPECIFIED text foo_issuer foo_subject 0 0 0 0 N N 0.000000 % foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 0 0 0 0 N N 0.000000
# Test resource limits altering. # Test resource limits altering.
alter user foo with MAX_QUERIES_PER_HOUR 10 alter user foo with MAX_QUERIES_PER_HOUR 10
MAX_UPDATES_PER_HOUR 20 MAX_UPDATES_PER_HOUR 20
MAX_CONNECTIONS_PER_HOUR 30 MAX_CONNECTIONS_PER_HOUR 30
MAX_USER_CONNECTIONS 40; MAX_USER_CONNECTIONS 40;
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N SPECIFIED text foo_issuer foo_subject 10 20 30 40 N N 0.000000 % foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 10 20 30 40 N N 0.000000
drop user foo; drop user foo;

View File

@ -7,18 +7,18 @@ VARIABLE_NAME VARIABLE_VALUE
COMPRESSION ON COMPRESSION ON
drop table if exists t1,t2,t3,t4; drop table if exists t1,t2,t3,t4;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
); );
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
period period_
9410 9410
select * from t1; select * from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
select t1.* from t1; select t1.* from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
CREATE TABLE t2 ( CREATE TABLE t2 (
auto int not null auto_increment, auto int not null auto_increment,
@ -282,8 +282,8 @@ companynr
34 34
29 29
00 00
select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%"; select distinct t2.fld3,period_ from t2,t1 where companynr=37 and fld3 like "O%";
fld3 period fld3 period_
obliterates 9410 obliterates 9410
offload 9410 offload 9410
opaquely 9410 opaquely 9410
@ -487,12 +487,12 @@ acu
Ade Ade
adj adj
create table t3 ( create table t3 (
period int not null, period_ int not null,
name char(32) not null, name char(32) not null,
companynr int not null, companynr int not null,
price double(11,0), price double(11,0),
price2 double(11,0), price2 double(11,0),
key (period), key (period_),
key (name) key (name)
); );
create temporary table tmp engine = myisam select * from t3; create temporary table tmp engine = myisam select * from t3;
@ -606,35 +606,35 @@ explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort 1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using filesort 1 SIMPLE t1 ALL period_ NULL NULL NULL 41810 Using filesort
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 index period period 4 NULL 1 1 SIMPLE t3 index period_ period_ 4 NULL 1
1 SIMPLE t1 ref period period 4 test.t3.period 4181 1 SIMPLE t1 ref period_ period_ 4 test.t3.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t1.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index period period 4 NULL 1 1 SIMPLE t1 index period_ period_ 4 NULL 1
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
select period from t1; select period_ from t1;
period period_
9410 9410
select period from t1 where period=1900; select period_ from t1 where period_=1900;
period period_
select fld3,period from t1,t2 where fld1 = 011401 order by period; select fld3,period_ from t1,t2 where fld1 = 011401 order by period_;
fld3 period fld3 period_
breaking 9410 breaking 9410
select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001; select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period_=1001;
fld3 period fld3 period_
breaking 1001 breaking 1001
explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period; explain select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const fld1 fld1 4 const 1 1 SIMPLE t2 const fld1 fld1 4 const 1
1 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1 1 SIMPLE t3 const PRIMARY,period_ PRIMARY 4 const 1
select fld3,period from t2,t1 where companynr*10 = 37*10; select fld3,period_ from t2,t1 where companynr*10 = 37*10;
fld3 period fld3 period_
breaking 9410 breaking 9410
Romans 9410 Romans 9410
intercepted 9410 intercepted 9410
@ -1223,8 +1223,8 @@ dusted 9410
encompasses 9410 encompasses 9410
presentation 9410 presentation 9410
Kantian 9410 Kantian 9410
select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price; select fld3,period_,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period_ >= 1001 and period_ <= 1002 and t2.companynr = 37 order by fld3,period_, price;
fld3 period price price2 fld3 period_ price price2
admonishing 1002 28357832 8723648 admonishing 1002 28357832 8723648
analyzable 1002 28357832 8723648 analyzable 1002 28357832 8723648
annihilates 1001 5987435 234724 annihilates 1001 5987435 234724
@ -1284,8 +1284,8 @@ ventilate 1001 5987435 234724
wallet 1001 5987435 234724 wallet 1001 5987435 234724
Weissmuller 1002 28357832 8723648 Weissmuller 1002 28357832 8723648
Wotan 1002 28357832 8723648 Wotan 1002 28357832 8723648
select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37; select t2.fld1,fld3,period_,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period_ = 1001 and t2.companynr = 37;
fld1 fld3 period price price2 fld1 fld3 period_ price price2
018201 relaxing 1001 5987435 234724 018201 relaxing 1001 5987435 234724
018601 vacuuming 1001 5987435 234724 018601 vacuuming 1001 5987435 234724
018801 inch 1001 5987435 234724 018801 inch 1001 5987435 234724
@ -1325,7 +1325,7 @@ companynr companyname
65 company 9 65 company 9
68 company 10 68 company 10
select * from t1,t1 t12; select * from t1,t1 t12;
Period Varor_period Period Varor_period Period_ Varor_period Period_ Varor_period
9410 9412 9410 9412 9410 9412 9410 9412
select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505; select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505;
fld1 fld1 fld1 fld1
@ -1440,23 +1440,23 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary 1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join) 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join)
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period_ = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period_ = 1008;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); select period_ from t1 where (((period_ > 0) or period_ < 10000 or (period_ = 1900)) and (period_=1900 and period_ <= 1901) or (period_=1903 and (period_=1903)) and period_>=1902) or ((period_=1904 or period_=1905) or (period_=1906 or period_>1907)) or (period_=1908 and period_ = 1909);
period period_
9410 9410
select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6))); select period_ from t1 where ((period_ > 0 and period_ < 1) or (((period_ > 0 and period_ < 100) and (period_ > 10)) or (period_ > 10)) or (period_ > 0 and (period_ > 5 or period_ > 6)));
period period_
9410 9410
select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1; select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
fld1 fld1
@ -1713,8 +1713,8 @@ companynr companyname count(*)
select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name; select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
fld1 count(*) fld1 count(*)
158402 4181 158402 4181
select sum(Period)/count(*) from t1; select sum(Period_)/count(*) from t1;
sum(Period)/count(*) sum(Period_)/count(*)
9410.0000 9410.0000
select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr; select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr;
companynr count sum diff func companynr count sum diff func
@ -2044,26 +2044,26 @@ t2nr count(*)
select max(t2nr) from t3 where price=983543950; select max(t2nr) from t3 where price=983543950;
max(t2nr) max(t2nr)
41807 41807
select t1.period from t3 = t1 limit 1; select t1.period_ from t3 = t1 limit 1;
period period_
1001 1001
select t1.period from t1 as t1 limit 1; select t1.period_ from t1 as t1 limit 1;
period period_
9410 9410
select t1.period as "Nuvarande period" from t1 as t1 limit 1; select t1.period_ as "Nuvarande period_" from t1 as t1 limit 1;
Nuvarande period Nuvarande period_
9410 9410
select period as ok_period from t1 limit 1; select period_ as ok_period from t1 limit 1;
ok_period ok_period
9410 9410
select period as ok_period from t1 group by ok_period limit 1; select period_ as ok_period from t1 group by ok_period limit 1;
ok_period ok_period
9410 9410
select 1+1 as summa from t1 group by summa limit 1; select 1+1 as summa from t1 group by summa limit 1;
summa summa
2 2
select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1; select period_ as "Nuvarande period_" from t1 group by "Nuvarande period_" limit 1;
Nuvarande period Nuvarande period_
9410 9410
show tables; show tables;
Tables_in_test Tables_in_test

View File

@ -33,6 +33,7 @@ time_zone_name
time_zone_transition time_zone_transition
time_zone_transition_type time_zone_transition_type
user user
vtmd_template
connect con2,localhost,root,,test; connect con2,localhost,root,,test;
show tables; show tables;
Tables_in_test Tables_in_test
@ -80,6 +81,7 @@ time_zone_name
time_zone_transition time_zone_transition
time_zone_transition_type time_zone_transition_type
user user
vtmd_template
connect con4,localhost,test,gambling,test; connect con4,localhost,test,gambling,test;
show tables; show tables;
Tables_in_test Tables_in_test
@ -139,6 +141,7 @@ time_zone_name
time_zone_transition time_zone_transition
time_zone_transition_type time_zone_transition_type
user user
vtmd_template
connect con6,localhost,test,gambling3,test; connect con6,localhost,test,gambling3,test;
show tables; show tables;
Tables_in_test Tables_in_test

View File

@ -132,7 +132,7 @@ drop table t2;
create table t2 select now() as a , curtime() as b, curdate() as c , 1+1 as d , 1.0 + 1 as e , 33333333333333333 + 3 as f; create table t2 select now() as a , curtime() as b, curdate() as c , 1+1 as d , 1.0 + 1 as e , 33333333333333333 + 3 as f;
describe t2; describe t2;
Field Type Null Key Default Extra Field Type Null Key Default Extra
a datetime NO NULL a datetime YES NULL
b time NO NULL b time NO NULL
c date NO NULL c date NO NULL
d int(3) NO NULL d int(3) NO NULL

View File

@ -1,57 +1,57 @@
create user foo; create user foo;
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000 % foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000
drop user foo; drop user foo;
create user foo identified by 'password'; create user foo identified by 'password';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000
drop user foo; drop user foo;
create user foo identified by 'password' require SSL; create user foo identified by 'password' require SSL;
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N ANY 0 0 0 0 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N ANY 0 0 0 0 N N 0.000000
drop user foo; drop user foo;
create user foo identified by 'password' require X509; create user foo identified by 'password' require X509;
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N X509 0 0 0 0 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N X509 0 0 0 0 N N 0.000000
drop user foo; drop user foo;
create user foo identified by 'password' require CIPHER 'cipher'; create user foo identified by 'password' require CIPHER 'cipher';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher 0 0 0 0 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher 0 0 0 0 N N 0.000000
drop user foo; drop user foo;
create user foo identified by 'password' require ISSUER 'issuer'; create user foo identified by 'password' require ISSUER 'issuer';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED issuer 0 0 0 0 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED issuer 0 0 0 0 N N 0.000000
drop user foo; drop user foo;
create user foo identified by 'password' require SUBJECT 'subject'; create user foo identified by 'password' require SUBJECT 'subject';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED subject 0 0 0 0 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED subject 0 0 0 0 N N 0.000000
drop user foo; drop user foo;
create user foo identified by 'password' require CIPHER 'cipher' create user foo identified by 'password' require CIPHER 'cipher'
SUBJECT 'subject'; SUBJECT 'subject';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher subject 0 0 0 0 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher subject 0 0 0 0 N N 0.000000
drop user foo; drop user foo;
create user foo identified by 'password' require CIPHER 'cipher' create user foo identified by 'password' require CIPHER 'cipher'
AND SUBJECT 'subject' AND SUBJECT 'subject'
AND ISSUER 'issuer'; AND ISSUER 'issuer';
select * from mysql.user where user = 'foo'; select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 N N 0.000000 % foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 N N 0.000000
drop user foo; drop user foo;
create user foo, foo2 identified by 'password' require CIPHER 'cipher' create user foo, foo2 identified by 'password' require CIPHER 'cipher'
AND SUBJECT 'subject' AND SUBJECT 'subject'
AND ISSUER 'issuer'; AND ISSUER 'issuer';
select * from mysql.user where user like 'foo'; select * from mysql.user where user like 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 N N 0.000000 % foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 N N 0.000000
#--warning ER_USER_CREATE_EXISTS #--warning ER_USER_CREATE_EXISTS
create user if not exists foo, foo2 identified by 'password2' create user if not exists foo, foo2 identified by 'password2'
require CIPHER 'cipher2' AND SUBJECT 'subject2' AND ISSUER 'issuer2'; require CIPHER 'cipher2' AND SUBJECT 'subject2' AND ISSUER 'issuer2';
@ -59,14 +59,14 @@ Warnings:
Note 1973 Can't create user 'foo'@'%'; it already exists Note 1973 Can't create user 'foo'@'%'; it already exists
Note 1973 Can't create user 'foo2'@'%'; it already exists Note 1973 Can't create user 'foo2'@'%'; it already exists
select * from mysql.user where user like 'foo'; select * from mysql.user where user like 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 N N 0.000000 % foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 N N 0.000000
drop user foo, foo2; drop user foo, foo2;
create user foo with MAX_QUERIES_PER_HOUR 10 create user foo with MAX_QUERIES_PER_HOUR 10
MAX_UPDATES_PER_HOUR 20 MAX_UPDATES_PER_HOUR 20
MAX_CONNECTIONS_PER_HOUR 30 MAX_CONNECTIONS_PER_HOUR 30
MAX_USER_CONNECTIONS 40; MAX_USER_CONNECTIONS 40;
select * from mysql.user where user like 'foo'; select * from mysql.user where user like 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_versioning_rows_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 20 30 40 N N 0.000000 % foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 20 30 40 N N 0.000000
drop user foo; drop user foo;

View File

@ -258,6 +258,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
@ -316,6 +317,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'

View File

@ -2310,6 +2310,8 @@ Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
DROP TABLE t1; DROP TABLE t1;
SET SESSION optimizer_switch= @save_optimizer_switch; SET SESSION optimizer_switch= @save_optimizer_switch;
# #

View File

@ -23,7 +23,7 @@ SHOW GRANTS;
Grants for ev_test@localhost Grants for ev_test@localhost
GRANT USAGE ON *.* TO 'ev_test'@'localhost' GRANT USAGE ON *.* TO 'ev_test'@'localhost'
GRANT ALL PRIVILEGES ON `events_test`.* TO 'ev_test'@'localhost' GRANT ALL PRIVILEGES ON `events_test`.* TO 'ev_test'@'localhost'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, TRIGGER ON `events_test2`.* TO 'ev_test'@'localhost' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, TRIGGER, DELETE VERSIONING ROWS ON `events_test2`.* TO 'ev_test'@'localhost'
"Here comes an error:"; "Here comes an error:";
SHOW EVENTS; SHOW EVENTS;
ERROR 42000: Access denied for user 'ev_test'@'localhost' to database 'events_test2' ERROR 42000: Access denied for user 'ev_test'@'localhost' to database 'events_test2'

View File

@ -49,7 +49,7 @@ a b
Full-text indexes are called collections Full-text indexes are called collections
Only MyISAM tables support collections Only MyISAM tables support collections
select * from t1 where MATCH(a,b) AGAINST ("indexes" IN BOOLEAN MODE WITH QUERY EXPANSION); select * from t1 where MATCH(a,b) AGAINST ("indexes" IN BOOLEAN MODE WITH QUERY EXPANSION);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'QUERY EXPANSION)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WITH QUERY EXPANSION)' at line 1
explain select * from t1 where MATCH(a,b) AGAINST ("collections"); explain select * from t1 where MATCH(a,b) AGAINST ("collections");
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 fulltext a a 0 1 Using where 1 SIMPLE t1 fulltext a a 0 1 Using where

View File

@ -787,7 +787,7 @@ drop table t2;
create table t2 select f2 from (select now() f2 from t1) a; create table t2 select f2 from (select now() f2 from t1) a;
show columns from t2; show columns from t2;
Field Type Null Key Default Extra Field Type Null Key Default Extra
f2 datetime NO NULL f2 datetime YES NULL
drop table t2, t1; drop table t2, t1;
CREATE TABLE t1( CREATE TABLE t1(
id int PRIMARY KEY, id int PRIMARY KEY,

View File

@ -39,14 +39,14 @@ t1 CREATE TABLE `t1` (
`sec_to_time(12345)` time DEFAULT NULL, `sec_to_time(12345)` time DEFAULT NULL,
`sec_to_time(12345.6789)` time(4) DEFAULT NULL, `sec_to_time(12345.6789)` time(4) DEFAULT NULL,
`sec_to_time(1234567e-2)` time(6) DEFAULT NULL, `sec_to_time(1234567e-2)` time(6) DEFAULT NULL,
`now()` datetime NOT NULL, `now()` datetime DEFAULT NULL,
`curtime(0)` time NOT NULL, `curtime(0)` time NOT NULL,
`utc_timestamp(1)` datetime(1) NOT NULL, `utc_timestamp(1)` datetime(1) DEFAULT NULL,
`utc_time(2)` time(2) NOT NULL, `utc_time(2)` time(2) NOT NULL,
`current_time(3)` time(3) NOT NULL, `current_time(3)` time(3) NOT NULL,
`current_timestamp(4)` datetime(4) NOT NULL, `current_timestamp(4)` datetime(4) DEFAULT NULL,
`localtime(5)` datetime(5) NOT NULL, `localtime(5)` datetime(5) DEFAULT NULL,
`localtimestamp(6)` datetime(6) NOT NULL, `localtimestamp(6)` datetime(6) DEFAULT NULL,
`time_to_sec(123456)` bigint(17) DEFAULT NULL, `time_to_sec(123456)` bigint(17) DEFAULT NULL,
`time_to_sec('12:34:56.789')` decimal(19,3) DEFAULT NULL `time_to_sec('12:34:56.789')` decimal(19,3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1

View File

@ -49,6 +49,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type SPECIFIED ssl_type SPECIFIED
ssl_cipher EDH-RSA-DES-CBC3-SHA ssl_cipher EDH-RSA-DES-CBC3-SHA
x509_issuer x509_issuer
@ -124,6 +125,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -175,6 +177,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -223,7 +226,7 @@ revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost;
show grants for mysqltest_1@localhost; show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE VERSIONING ROWS ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION
revoke all privileges on mysqltest.* from mysqltest_1@localhost; revoke all privileges on mysqltest.* from mysqltest_1@localhost;
delete from mysql.user where user='mysqltest_1'; delete from mysql.user where user='mysqltest_1';
flush privileges; flush privileges;
@ -609,6 +612,7 @@ Create temporary tables Databases To use CREATE TEMPORARY TABLE
Create view Tables To create new views Create view Tables To create new views
Create user Server Admin To create new users Create user Server Admin To create new users
Delete Tables To delete existing rows Delete Tables To delete existing rows
Delete versioning rows Tables To delete versioning table historical rows
Drop Databases,Tables To drop databases, tables, and views Drop Databases,Tables To drop databases, tables, and views
Event Server Admin To create, alter, drop and execute events Event Server Admin To create, alter, drop and execute events
Execute Functions,Procedures To execute stored routines Execute Functions,Procedures To execute stored routines
@ -664,8 +668,8 @@ SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
= '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; = '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME;
TABLE_SCHEMA TABLE_NAME PRIVILEGES TABLE_SCHEMA TABLE_NAME PRIVILEGES
mysqltest dummytable ALTER, CREATE, CREATE VIEW, DELETE, DROP, INDEX, INSERT, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE mysqltest dummytable ALTER, CREATE, CREATE VIEW, DELETE, DELETE VERSIONING ROWS, DROP, INDEX, INSERT, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE
mysqltest dummyview ALTER, CREATE, CREATE VIEW, DELETE, DROP, INDEX, INSERT, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE mysqltest dummyview ALTER, CREATE, CREATE VIEW, DELETE, DELETE VERSIONING ROWS, DROP, INDEX, INSERT, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
SHOW GRANTS FOR dummy@localhost; SHOW GRANTS FOR dummy@localhost;
Grants for dummy@localhost Grants for dummy@localhost
@ -676,8 +680,8 @@ SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
= '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; = '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME;
TABLE_SCHEMA TABLE_NAME PRIVILEGES TABLE_SCHEMA TABLE_NAME PRIVILEGES
mysqltest dummytable ALTER, CREATE, CREATE VIEW, DELETE, DROP, INDEX, INSERT, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE mysqltest dummytable ALTER, CREATE, CREATE VIEW, DELETE, DELETE VERSIONING ROWS, DROP, INDEX, INSERT, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE
mysqltest dummyview ALTER, CREATE, CREATE VIEW, DELETE, DROP, INDEX, INSERT, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE mysqltest dummyview ALTER, CREATE, CREATE VIEW, DELETE, DELETE VERSIONING ROWS, DROP, INDEX, INSERT, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE
SHOW FIELDS FROM mysql.tables_priv; SHOW FIELDS FROM mysql.tables_priv;
Field Type Null Key Default Extra Field Type Null Key Default Extra
Host char(60) NO PRI Host char(60) NO PRI
@ -686,7 +690,7 @@ User char(80) NO PRI
Table_name char(64) NO PRI Table_name char(64) NO PRI
Grantor char(141) NO MUL Grantor char(141) NO MUL
Timestamp timestamp NO current_timestamp() on update current_timestamp() Timestamp timestamp NO current_timestamp() on update current_timestamp()
Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') NO Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') NO
Column_priv set('Select','Insert','Update','References') NO Column_priv set('Select','Insert','Update','References') NO
use test; use test;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM dummy@localhost; REVOKE ALL PRIVILEGES, GRANT OPTION FROM dummy@localhost;
@ -769,7 +773,7 @@ flush privileges;
use test; use test;
set @user123="non-existent"; set @user123="non-existent";
select * from mysql.db where user=@user123; select * from mysql.db where user=@user123;
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_versioning_rows_priv
set names koi8r; set names koi8r;
create database <20><>; create database <20><>;
grant select on <20><>.* to root@localhost; grant select on <20><>.* to root@localhost;

View File

@ -123,6 +123,7 @@ time_zone_transition
time_zone_transition_type time_zone_transition_type
user user
v1 v1
vtmd_template
select c,table_name from v1 select c,table_name from v1
inner join information_schema.TABLES v2 on (v1.c=v2.table_name) inner join information_schema.TABLES v2 on (v1.c=v2.table_name)
where v1.c like "t%"; where v1.c like "t%";
@ -487,6 +488,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
'mysqltest_1'@'localhost' def test ALTER ROUTINE YES 'mysqltest_1'@'localhost' def test ALTER ROUTINE YES
'mysqltest_1'@'localhost' def test EVENT YES 'mysqltest_1'@'localhost' def test EVENT YES
'mysqltest_1'@'localhost' def test TRIGGER YES 'mysqltest_1'@'localhost' def test TRIGGER YES
'mysqltest_1'@'localhost' def test DELETE VERSIONING ROWS YES
select * from information_schema.TABLE_PRIVILEGES where grantee like '%mysqltest_1%'; select * from information_schema.TABLE_PRIVILEGES where grantee like '%mysqltest_1%';
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
'mysqltest_1'@'localhost' def test t1 SELECT NO 'mysqltest_1'@'localhost' def test t1 SELECT NO
@ -743,6 +745,7 @@ Lock_tables_priv select,insert,update,references
Show_view_priv select,insert,update,references Show_view_priv select,insert,update,references
Create_routine_priv select,insert,update,references Create_routine_priv select,insert,update,references
Alter_routine_priv select,insert,update,references Alter_routine_priv select,insert,update,references
Delete_versioning_rows_priv select,insert,update,references
max_questions select,insert,update,references max_questions select,insert,update,references
max_connections select,insert,update,references max_connections select,insert,update,references
max_user_connections select,insert,update,references max_user_connections select,insert,update,references
@ -1334,12 +1337,12 @@ DROP PROCEDURE p1;
DROP USER mysql_bug20230@localhost; DROP USER mysql_bug20230@localhost;
SELECT MAX(table_name) FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test') and table_name not like 'xtradb%'; SELECT MAX(table_name) FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test') and table_name not like 'xtradb%';
MAX(table_name) MAX(table_name)
VIEWS vtmd_template
SELECT table_name from information_schema.tables SELECT table_name from information_schema.tables
WHERE table_name=(SELECT MAX(table_name) WHERE table_name=(SELECT MAX(table_name)
FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test') and table_name not like 'xtradb%'); FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test') and table_name not like 'xtradb%');
table_name table_name
VIEWS vtmd_template
DROP TABLE IF EXISTS bug23037; DROP TABLE IF EXISTS bug23037;
DROP FUNCTION IF EXISTS get_value; DROP FUNCTION IF EXISTS get_value;
SELECT COLUMN_NAME, MD5(COLUMN_DEFAULT), LENGTH(COLUMN_DEFAULT) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='bug23037'; SELECT COLUMN_NAME, MD5(COLUMN_DEFAULT), LENGTH(COLUMN_DEFAULT) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='bug23037';

View File

@ -454,4 +454,4 @@ Wildcard: inf_rmation_schema
SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') GROUP BY TABLE_SCHEMA; SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') GROUP BY TABLE_SCHEMA;
table_schema count(*) table_schema count(*)
information_schema 64 information_schema 64
mysql 30 mysql 31

View File

@ -762,6 +762,7 @@ user User def mysql 0 mysql PRIMARY 2 A NULL NULL BTREE def mysql '' NO char 8
Warnings: Warnings:
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
drop table t1; drop table t1;
drop table t2; drop table t2;
drop table t3; drop table t3;

View File

@ -43,6 +43,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'

View File

@ -7,8 +7,8 @@ Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
select * from db where user = 'mysqltest_1'; select * from db where user = 'mysqltest_1';
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_versioning_rows_priv
localhost mysqltest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y localhost mysqltest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y
update db set db = 'MYSQLtest' where db = 'mysqltest' and user = 'mysqltest_1' and host = 'localhost'; update db set db = 'MYSQLtest' where db = 'mysqltest' and user = 'mysqltest_1' and host = 'localhost';
flush privileges; flush privileges;
show grants for mysqltest_1@localhost; show grants for mysqltest_1@localhost;
@ -16,8 +16,8 @@ Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
select * from db where user = 'mysqltest_1'; select * from db where user = 'mysqltest_1';
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_versioning_rows_priv
localhost MYSQLtest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y localhost MYSQLtest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y
delete from db where db = 'MYSQLtest' and user = 'mysqltest_1' and host = 'localhost'; delete from db where db = 'MYSQLtest' and user = 'mysqltest_1' and host = 'localhost';
flush privileges; flush privileges;
drop user mysqltest_1@localhost; drop user mysqltest_1@localhost;

View File

@ -34,6 +34,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template
Error : Unknown storage engine 'InnoDB'
error : Corrupt
Repairing tables Repairing tables
mysql.innodb_index_stats mysql.innodb_index_stats
@ -42,6 +45,9 @@ error : Corrupt
mysql.innodb_table_stats mysql.innodb_table_stats
Error : Unknown storage engine 'InnoDB' Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
mysql.vtmd_template
Error : Unknown storage engine 'InnoDB'
error : Corrupt
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'

View File

@ -31,6 +31,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
@ -79,6 +80,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
@ -127,6 +129,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
@ -180,6 +183,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
@ -234,6 +238,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
@ -291,6 +296,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
@ -343,6 +349,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views... Skipped Phase 3/7: Fixing views... Skipped
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
@ -387,6 +394,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
@ -452,6 +460,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
@ -534,6 +543,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
@ -552,7 +562,7 @@ OK
# Should return 2 # Should return 2
SELECT count(*) FROM information_schema.tables where ENGINE="InnoDB"; SELECT count(*) FROM information_schema.tables where ENGINE="InnoDB";
count(*) count(*)
2 3
SHOW CREATE TABLE test.t1; SHOW CREATE TABLE test.t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (

View File

@ -34,6 +34,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template
Error : Unknown storage engine 'InnoDB'
error : Corrupt
Repairing tables Repairing tables
mysql.innodb_index_stats mysql.innodb_index_stats
@ -42,6 +45,9 @@ error : Corrupt
mysql.innodb_table_stats mysql.innodb_table_stats
Error : Unknown storage engine 'InnoDB' Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
mysql.vtmd_template
Error : Unknown storage engine 'InnoDB'
error : Corrupt
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views... Skipped Phase 3/7: Fixing views... Skipped
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'

View File

@ -81,6 +81,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
@ -167,6 +168,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'
@ -253,6 +255,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Upgrading from a version before MariaDB-10.1 Upgrading from a version before MariaDB-10.1
Phase 2/7: Installing used storage engines Phase 2/7: Installing used storage engines
Checking for tables with unknown storage engine Checking for tables with unknown storage engine

View File

@ -32,6 +32,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables' Phase 4/7: Running 'mysql_fix_privilege_tables'

View File

@ -98,6 +98,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template
Error : Unknown storage engine 'InnoDB'
error : Corrupt
Repairing tables Repairing tables
mysql.innodb_index_stats mysql.innodb_index_stats
@ -106,6 +109,9 @@ error : Corrupt
mysql.innodb_table_stats mysql.innodb_table_stats
Error : Unknown storage engine 'InnoDB' Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
mysql.vtmd_template
Error : Unknown storage engine 'InnoDB'
error : Corrupt
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views Phase 3/7: Fixing views
test.v1 OK test.v1 OK
@ -242,6 +248,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template
Error : Unknown storage engine 'InnoDB'
error : Corrupt
Repairing tables Repairing tables
mysql.innodb_index_stats mysql.innodb_index_stats
@ -250,6 +259,9 @@ error : Corrupt
mysql.innodb_table_stats mysql.innodb_table_stats
Error : Unknown storage engine 'InnoDB' Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
mysql.vtmd_template
Error : Unknown storage engine 'InnoDB'
error : Corrupt
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views from mysql Phase 3/7: Fixing views from mysql
test.v1 OK test.v1 OK
@ -361,6 +373,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template
Error : Unknown storage engine 'InnoDB'
error : Corrupt
Repairing tables Repairing tables
mysql.innodb_index_stats mysql.innodb_index_stats
@ -369,6 +384,9 @@ error : Corrupt
mysql.innodb_table_stats mysql.innodb_table_stats
Error : Unknown storage engine 'InnoDB' Error : Unknown storage engine 'InnoDB'
error : Corrupt error : Corrupt
mysql.vtmd_template
Error : Unknown storage engine 'InnoDB'
error : Corrupt
Phase 2/7: Installing used storage engines... Skipped Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views from mysql Phase 3/7: Fixing views from mysql
test.v1 OK test.v1 OK

View File

@ -61,7 +61,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "") #Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "")
#<date> server id 1 end_log_pos 899 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 899 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 899 # at 899
#<date> server id 1 end_log_pos 967 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 967 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -89,7 +89,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL) #Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL)
#<date> server id 1 end_log_pos 1214 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 1214 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1214 # at 1214
#<date> server id 1 end_log_pos 1281 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1281 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=11 /* INT meta=0 nullable=0 is_null=0 */ ### @1=11 /* INT meta=0 nullable=0 is_null=0 */
@ -117,7 +117,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A") #Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1530 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 1530 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1530 # at 1530
#<date> server id 1 end_log_pos 1596 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1596 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=12 /* INT meta=0 nullable=0 is_null=0 */ ### @1=12 /* INT meta=0 nullable=0 is_null=0 */
@ -145,7 +145,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A") #Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1842 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 1842 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1842 # at 1842
#<date> server id 1 end_log_pos 1909 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1909 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=13 /* INT meta=0 nullable=0 is_null=0 */ ### @1=13 /* INT meta=0 nullable=0 is_null=0 */
@ -173,7 +173,7 @@ BEGIN
#Q> INSERT INTO t2 SELECT * FROM t1 #Q> INSERT INTO t2 SELECT * FROM t1
#<date> server id 1 end_log_pos 2134 CRC32 XXX Table_map: `test`.`t2` mapped to number num #<date> server id 1 end_log_pos 2134 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2134 # at 2134
#<date> server id 1 end_log_pos 2225 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F #<date> server id 1 end_log_pos 2225 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
### INSERT INTO `test`.`t2` ### INSERT INTO `test`.`t2`
### SET ### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -234,7 +234,7 @@ BEGIN
#Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL #Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL
#<date> server id 1 end_log_pos 2462 CRC32 XXX Table_map: `test`.`t2` mapped to number num #<date> server id 1 end_log_pos 2462 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2462 # at 2462
#<date> server id 1 end_log_pos 2561 CRC32 XXX Update_compressed_rows: table id 31 flags: STMT_END_F #<date> server id 1 end_log_pos 2561 CRC32 XXX Update_compressed_rows: table id 32 flags: STMT_END_F
### UPDATE `test`.`t2` ### UPDATE `test`.`t2`
### WHERE ### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -314,7 +314,7 @@ BEGIN
#Q> DELETE FROM t1 #Q> DELETE FROM t1
#<date> server id 1 end_log_pos 2769 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 2769 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2769 # at 2769
#<date> server id 1 end_log_pos 2861 CRC32 XXX Delete_compressed_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 2861 CRC32 XXX Delete_compressed_rows: table id 31 flags: STMT_END_F
### DELETE FROM `test`.`t1` ### DELETE FROM `test`.`t1`
### WHERE ### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -375,7 +375,7 @@ BEGIN
#Q> DELETE FROM t2 #Q> DELETE FROM t2
#<date> server id 1 end_log_pos 3069 CRC32 XXX Table_map: `test`.`t2` mapped to number num #<date> server id 1 end_log_pos 3069 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 3069 # at 3069
#<date> server id 1 end_log_pos 3154 CRC32 XXX Delete_compressed_rows: table id 31 flags: STMT_END_F #<date> server id 1 end_log_pos 3154 CRC32 XXX Delete_compressed_rows: table id 32 flags: STMT_END_F
### DELETE FROM `test`.`t2` ### DELETE FROM `test`.`t2`
### WHERE ### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */

View File

@ -59,7 +59,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "") #Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "")
#<date> server id 1 end_log_pos 946 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 946 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 946 # at 946
#<date> server id 1 end_log_pos 1015 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1015 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -87,7 +87,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL) #Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL)
#<date> server id 1 end_log_pos 1262 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 1262 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1262 # at 1262
#<date> server id 1 end_log_pos 1330 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1330 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=11 /* INT meta=0 nullable=0 is_null=0 */ ### @1=11 /* INT meta=0 nullable=0 is_null=0 */
@ -115,7 +115,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A") #Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1579 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 1579 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1579 # at 1579
#<date> server id 1 end_log_pos 1646 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1646 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=12 /* INT meta=0 nullable=0 is_null=0 */ ### @1=12 /* INT meta=0 nullable=0 is_null=0 */
@ -143,7 +143,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A") #Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1892 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 1892 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1892 # at 1892
#<date> server id 1 end_log_pos 1962 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 1962 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t1` ### INSERT INTO `test`.`t1`
### SET ### SET
### @1=13 /* INT meta=0 nullable=0 is_null=0 */ ### @1=13 /* INT meta=0 nullable=0 is_null=0 */
@ -171,7 +171,7 @@ BEGIN
#Q> INSERT INTO t2 SELECT * FROM t1 #Q> INSERT INTO t2 SELECT * FROM t1
#<date> server id 1 end_log_pos 2187 CRC32 XXX Table_map: `test`.`t2` mapped to number num #<date> server id 1 end_log_pos 2187 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2187 # at 2187
#<date> server id 1 end_log_pos 2354 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F #<date> server id 1 end_log_pos 2354 CRC32 XXX Write_rows: table id 32 flags: STMT_END_F
### INSERT INTO `test`.`t2` ### INSERT INTO `test`.`t2`
### SET ### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -232,7 +232,7 @@ BEGIN
#Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL #Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL
#<date> server id 1 end_log_pos 2591 CRC32 XXX Table_map: `test`.`t2` mapped to number num #<date> server id 1 end_log_pos 2591 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2591 # at 2591
#<date> server id 1 end_log_pos 2665 CRC32 XXX Update_rows: table id 31 flags: STMT_END_F #<date> server id 1 end_log_pos 2665 CRC32 XXX Update_rows: table id 32 flags: STMT_END_F
### UPDATE `test`.`t2` ### UPDATE `test`.`t2`
### WHERE ### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -267,7 +267,7 @@ BEGIN
#Q> DELETE FROM t1 #Q> DELETE FROM t1
#<date> server id 1 end_log_pos 2873 CRC32 XXX Table_map: `test`.`t1` mapped to number num #<date> server id 1 end_log_pos 2873 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2873 # at 2873
#<date> server id 1 end_log_pos 2927 CRC32 XXX Delete_rows: table id 30 flags: STMT_END_F #<date> server id 1 end_log_pos 2927 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F
### DELETE FROM `test`.`t1` ### DELETE FROM `test`.`t1`
### WHERE ### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -296,7 +296,7 @@ BEGIN
#Q> DELETE FROM t2 #Q> DELETE FROM t2
#<date> server id 1 end_log_pos 3135 CRC32 XXX Table_map: `test`.`t2` mapped to number num #<date> server id 1 end_log_pos 3135 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 3135 # at 3135
#<date> server id 1 end_log_pos 3189 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F #<date> server id 1 end_log_pos 3189 CRC32 XXX Delete_rows: table id 32 flags: STMT_END_F
### DELETE FROM `test`.`t2` ### DELETE FROM `test`.`t2`
### WHERE ### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */ ### @1=10 /* INT meta=0 nullable=0 is_null=0 */

View File

@ -32,6 +32,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
mtr.global_suppressions Table is already up to date mtr.global_suppressions Table is already up to date
mtr.test_suppressions Table is already up to date mtr.test_suppressions Table is already up to date
mysql.column_stats OK mysql.column_stats OK
@ -66,6 +67,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template
note : Table does not support optimize, doing recreate + analyze instead
status : OK
mysql.column_stats OK mysql.column_stats OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
@ -94,6 +98,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK
mysql.column_stats Table is already up to date mysql.column_stats Table is already up to date
mysql.columns_priv Table is already up to date mysql.columns_priv Table is already up to date
mysql.db Table is already up to date mysql.db Table is already up to date
@ -126,6 +131,9 @@ mysql.time_zone_name Table is already up to date
mysql.time_zone_transition Table is already up to date mysql.time_zone_transition Table is already up to date
mysql.time_zone_transition_type Table is already up to date mysql.time_zone_transition_type Table is already up to date
mysql.user Table is already up to date mysql.user Table is already up to date
mysql.vtmd_template
note : Table does not support optimize, doing recreate + analyze instead
status : OK
create table t1 (a int) engine=myisam; create table t1 (a int) engine=myisam;
create view v1 as select * from t1; create view v1 as select * from t1;
test.t1 OK test.t1 OK
@ -448,6 +456,7 @@ mysql.time_zone_name Table is already up to date
mysql.time_zone_transition Table is already up to date mysql.time_zone_transition Table is already up to date
mysql.time_zone_transition_type Table is already up to date mysql.time_zone_transition_type Table is already up to date
mysql.user Table is already up to date mysql.user Table is already up to date
mysql.vtmd_template OK
mysqltest1.t1 mysqltest1.t1
warning : Table is marked as crashed warning : Table is marked as crashed
warning : Size of datafile is: 4 Should be: 0 warning : Size of datafile is: 4 Should be: 0

View File

@ -1,18 +1,18 @@
connect pipe_con,localhost,root,,,,,PIPE; connect pipe_con,localhost,root,,,,,PIPE;
drop table if exists t1,t2,t3,t4; drop table if exists t1,t2,t3,t4;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
); );
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
period period_
9410 9410
select * from t1; select * from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
select t1.* from t1; select t1.* from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
CREATE TABLE t2 ( CREATE TABLE t2 (
auto int not null auto_increment, auto int not null auto_increment,
@ -276,8 +276,8 @@ companynr
34 34
29 29
00 00
select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%"; select distinct t2.fld3,period_ from t2,t1 where companynr=37 and fld3 like "O%";
fld3 period fld3 period_
obliterates 9410 obliterates 9410
offload 9410 offload 9410
opaquely 9410 opaquely 9410
@ -481,12 +481,12 @@ acu
Ade Ade
adj adj
create table t3 ( create table t3 (
period int not null, period_ int not null,
name char(32) not null, name char(32) not null,
companynr int not null, companynr int not null,
price double(11,0), price double(11,0),
price2 double(11,0), price2 double(11,0),
key (period), key (period_),
key (name) key (name)
); );
create temporary table tmp engine = myisam select * from t3; create temporary table tmp engine = myisam select * from t3;
@ -600,35 +600,35 @@ explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort 1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using filesort 1 SIMPLE t1 ALL period_ NULL NULL NULL 41810 Using temporary; Using filesort
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 index period period 4 NULL 1 1 SIMPLE t3 index period_ period_ 4 NULL 1
1 SIMPLE t1 ref period period 4 test.t3.period 4181 1 SIMPLE t1 ref period_ period_ 4 test.t3.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t1.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index period period 4 NULL 1 1 SIMPLE t1 index period_ period_ 4 NULL 1
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
select period from t1; select period_ from t1;
period period_
9410 9410
select period from t1 where period=1900; select period_ from t1 where period_=1900;
period period_
select fld3,period from t1,t2 where fld1 = 011401 order by period; select fld3,period_ from t1,t2 where fld1 = 011401 order by period_;
fld3 period fld3 period_
breaking 9410 breaking 9410
select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001; select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period_=1001;
fld3 period fld3 period_
breaking 1001 breaking 1001
explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period; explain select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const fld1 fld1 4 const 1 1 SIMPLE t2 const fld1 fld1 4 const 1
1 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1 1 SIMPLE t3 const PRIMARY,period_ PRIMARY 4 const 1
select fld3,period from t2,t1 where companynr*10 = 37*10; select fld3,period_ from t2,t1 where companynr*10 = 37*10;
fld3 period fld3 period_
breaking 9410 breaking 9410
Romans 9410 Romans 9410
intercepted 9410 intercepted 9410
@ -1217,8 +1217,8 @@ dusted 9410
encompasses 9410 encompasses 9410
presentation 9410 presentation 9410
Kantian 9410 Kantian 9410
select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price; select fld3,period_,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period_ >= 1001 and period_ <= 1002 and t2.companynr = 37 order by fld3,period_, price;
fld3 period price price2 fld3 period_ price price2
admonishing 1002 28357832 8723648 admonishing 1002 28357832 8723648
analyzable 1002 28357832 8723648 analyzable 1002 28357832 8723648
annihilates 1001 5987435 234724 annihilates 1001 5987435 234724
@ -1278,8 +1278,8 @@ ventilate 1001 5987435 234724
wallet 1001 5987435 234724 wallet 1001 5987435 234724
Weissmuller 1002 28357832 8723648 Weissmuller 1002 28357832 8723648
Wotan 1002 28357832 8723648 Wotan 1002 28357832 8723648
select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37; select t2.fld1,fld3,period_,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period_ = 1001 and t2.companynr = 37;
fld1 fld3 period price price2 fld1 fld3 period_ price price2
018201 relaxing 1001 5987435 234724 018201 relaxing 1001 5987435 234724
018601 vacuuming 1001 5987435 234724 018601 vacuuming 1001 5987435 234724
018801 inch 1001 5987435 234724 018801 inch 1001 5987435 234724
@ -1319,7 +1319,7 @@ companynr companyname
65 company 9 65 company 9
68 company 10 68 company 10
select * from t1,t1 t12; select * from t1,t1 t12;
Period Varor_period Period Varor_period Period_ Varor_period Period_ Varor_period
9410 9412 9410 9412 9410 9412 9410 9412
select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505; select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505;
fld1 fld1 fld1 fld1
@ -1434,23 +1434,23 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary 1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join) 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join)
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period_ = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period_ = 1008;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); select period_ from t1 where (((period_ > 0) or period_ < 10000 or (period_ = 1900)) and (period_=1900 and period_ <= 1901) or (period_=1903 and (period_=1903)) and period_>=1902) or ((period_=1904 or period_=1905) or (period_=1906 or period_>1907)) or (period_=1908 and period_ = 1909);
period period_
9410 9410
select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6))); select period_ from t1 where ((period_ > 0 and period_ < 1) or (((period_ > 0 and period_ < 100) and (period_ > 10)) or (period_ > 10)) or (period_ > 0 and (period_ > 5 or period_ > 6)));
period period_
9410 9410
select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1; select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
fld1 fld1
@ -1707,8 +1707,8 @@ companynr companyname count(*)
select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name; select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
fld1 count(*) fld1 count(*)
158402 4181 158402 4181
select sum(Period)/count(*) from t1; select sum(Period_)/count(*) from t1;
sum(Period)/count(*) sum(Period_)/count(*)
9410.0000 9410.0000
select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr; select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr;
companynr count sum diff func companynr count sum diff func
@ -2038,26 +2038,26 @@ t2nr count(*)
select max(t2nr) from t3 where price=983543950; select max(t2nr) from t3 where price=983543950;
max(t2nr) max(t2nr)
41807 41807
select t1.period from t3 = t1 limit 1; select t1.period_ from t3 = t1 limit 1;
period period_
1001 1001
select t1.period from t1 as t1 limit 1; select t1.period_ from t1 as t1 limit 1;
period period_
9410 9410
select t1.period as "Nuvarande period" from t1 as t1 limit 1; select t1.period_ as "Nuvarande period_" from t1 as t1 limit 1;
Nuvarande period Nuvarande period_
9410 9410
select period as ok_period from t1 limit 1; select period_ as ok_period from t1 limit 1;
ok_period ok_period
9410 9410
select period as ok_period from t1 group by ok_period limit 1; select period_ as ok_period from t1 group by ok_period limit 1;
ok_period ok_period
9410 9410
select 1+1 as summa from t1 group by summa limit 1; select 1+1 as summa from t1 group by summa limit 1;
summa summa
2 2
select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1; select period_ as "Nuvarande period_" from t1 group by "Nuvarande period_" limit 1;
Nuvarande period Nuvarande period_
9410 9410
show tables; show tables;
Tables_in_test Tables_in_test

View File

@ -42,6 +42,7 @@ Create_user_priv enum('N','Y') NO N
Event_priv enum('N','Y') NO N Event_priv enum('N','Y') NO N
Trigger_priv enum('N','Y') NO N Trigger_priv enum('N','Y') NO N
Create_tablespace_priv enum('N','Y') NO N Create_tablespace_priv enum('N','Y') NO N
Delete_versioning_rows_priv enum('N','Y') NO N
ssl_type enum('','ANY','X509','SPECIFIED') NO ssl_type enum('','ANY','X509','SPECIFIED') NO
ssl_cipher blob NO NULL ssl_cipher blob NO NULL
x509_issuer blob NO NULL x509_issuer blob NO NULL

View File

@ -64,10 +64,8 @@ create table MIN(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'MIN(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'MIN(a int)' at line 1
create table MIN (a int); create table MIN (a int);
drop table MIN; drop table MIN;
create table NOW(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NOW(a int)' at line 1
create table NOW (a int); create table NOW (a int);
drop table NOW; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NOW (a int)' at line 1
create table POSITION(a int); create table POSITION(a int);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'POSITION(a int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'POSITION(a int)' at line 1
create table POSITION (a int); create table POSITION (a int);

View File

@ -1459,7 +1459,7 @@ ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setti
create table t1 (a int) create table t1 (a int)
partition by hash (a) partition by hash (a)
(partition p0 (subpartition sp0)); (partition p0 (subpartition sp0));
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning
create table t1 (a int) create table t1 (a int)
partition by range (a) partition by range (a)
(partition p0 values less than (1)); (partition p0 values less than (1));

View File

@ -1023,7 +1023,7 @@ c int not null,
primary key (a,b)) primary key (a,b))
partition by key (a) partition by key (a)
subpartition by key (b); subpartition by key (b);
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning
select load_file('$MYSQLD_DATADIR/test/t1.par'); select load_file('$MYSQLD_DATADIR/test/t1.par');
load_file('$MYSQLD_DATADIR/test/t1.par') load_file('$MYSQLD_DATADIR/test/t1.par')
NULL NULL
@ -1034,7 +1034,7 @@ c int not null,
primary key (a,b)) primary key (a,b))
partition by key (a) partition by key (a)
subpartition by key (a, b); subpartition by key (a, b);
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning
select load_file('$MYSQLD_DATADIR/test/t1.par'); select load_file('$MYSQLD_DATADIR/test/t1.par');
load_file('$MYSQLD_DATADIR/test/t1.par') load_file('$MYSQLD_DATADIR/test/t1.par')
NULL NULL
@ -1045,7 +1045,7 @@ c int not null,
primary key (a,b)) primary key (a,b))
partition by key (a) partition by key (a)
subpartition by hash (a+b); subpartition by hash (a+b);
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning
select load_file('$MYSQLD_DATADIR/test/t1.par'); select load_file('$MYSQLD_DATADIR/test/t1.par');
load_file('$MYSQLD_DATADIR/test/t1.par') load_file('$MYSQLD_DATADIR/test/t1.par')
NULL NULL
@ -1056,7 +1056,7 @@ c int not null,
primary key (a,b)) primary key (a,b))
partition by key (a) partition by key (a)
subpartition by key (b); subpartition by key (b);
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning
select load_file('$MYSQLD_DATADIR/test/t1.par'); select load_file('$MYSQLD_DATADIR/test/t1.par');
load_file('$MYSQLD_DATADIR/test/t1.par') load_file('$MYSQLD_DATADIR/test/t1.par')
NULL NULL
@ -1067,7 +1067,7 @@ c int not null,
primary key (a,b)) primary key (a,b))
partition by key (a) partition by key (a)
subpartition by key (a, b); subpartition by key (a, b);
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning
select load_file('$MYSQLD_DATADIR/test/t1.par'); select load_file('$MYSQLD_DATADIR/test/t1.par');
load_file('$MYSQLD_DATADIR/test/t1.par') load_file('$MYSQLD_DATADIR/test/t1.par')
NULL NULL
@ -1078,7 +1078,7 @@ c int not null,
primary key (a,b)) primary key (a,b))
partition by key (a) partition by key (a)
subpartition by hash (a+b); subpartition by hash (a+b);
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning
select load_file('$MYSQLD_DATADIR/test/t1.par'); select load_file('$MYSQLD_DATADIR/test/t1.par');
load_file('$MYSQLD_DATADIR/test/t1.par') load_file('$MYSQLD_DATADIR/test/t1.par')
NULL NULL
@ -1135,7 +1135,7 @@ c int not null,
primary key (a,b)) primary key (a,b))
partition by key (a) partition by key (a)
subpartition by hash (3+4); subpartition by hash (3+4);
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning
CREATE TABLE t1 ( CREATE TABLE t1 (
a int not null, a int not null,
b int not null, b int not null,

View File

@ -2,18 +2,18 @@ SET @save_optimizer_switch=@@optimizer_switch;
SET optimizer_switch='outer_join_with_cache=off'; SET optimizer_switch='outer_join_with_cache=off';
drop table if exists t1,t2,t3,t4; drop table if exists t1,t2,t3,t4;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
); );
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
period period_
9410 9410
select * from t1; select * from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
select t1.* from t1; select t1.* from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
CREATE TABLE t2 ( CREATE TABLE t2 (
auto int not null auto_increment, auto int not null auto_increment,
@ -277,8 +277,8 @@ companynr
34 34
29 29
00 00
select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%"; select distinct t2.fld3,period_ from t2,t1 where companynr=37 and fld3 like "O%";
fld3 period fld3 period_
obliterates 9410 obliterates 9410
offload 9410 offload 9410
opaquely 9410 opaquely 9410
@ -482,12 +482,12 @@ acu
Ade Ade
adj adj
create table t3 ( create table t3 (
period int not null, period_ int not null,
name char(32) not null, name char(32) not null,
companynr int not null, companynr int not null,
price double(11,0), price double(11,0),
price2 double(11,0), price2 double(11,0),
key (period), key (period_),
key (name) key (name)
); );
create temporary table tmp engine = myisam select * from t3; create temporary table tmp engine = myisam select * from t3;
@ -601,35 +601,35 @@ explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort 1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using filesort 1 SIMPLE t1 ALL period_ NULL NULL NULL 41810 Using filesort
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 index period period 4 NULL 1 1 SIMPLE t3 index period_ period_ 4 NULL 1
1 SIMPLE t1 ref period period 4 test.t3.period 4181 1 SIMPLE t1 ref period_ period_ 4 test.t3.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t1.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index period period 4 NULL 1 1 SIMPLE t1 index period_ period_ 4 NULL 1
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
select period from t1; select period_ from t1;
period period_
9410 9410
select period from t1 where period=1900; select period_ from t1 where period_=1900;
period period_
select fld3,period from t1,t2 where fld1 = 011401 order by period; select fld3,period_ from t1,t2 where fld1 = 011401 order by period_;
fld3 period fld3 period_
breaking 9410 breaking 9410
select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001; select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period_=1001;
fld3 period fld3 period_
breaking 1001 breaking 1001
explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period; explain select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const fld1 fld1 4 const 1 1 SIMPLE t2 const fld1 fld1 4 const 1
1 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1 1 SIMPLE t3 const PRIMARY,period_ PRIMARY 4 const 1
select fld3,period from t2,t1 where companynr*10 = 37*10; select fld3,period_ from t2,t1 where companynr*10 = 37*10;
fld3 period fld3 period_
breaking 9410 breaking 9410
Romans 9410 Romans 9410
intercepted 9410 intercepted 9410
@ -1218,8 +1218,8 @@ dusted 9410
encompasses 9410 encompasses 9410
presentation 9410 presentation 9410
Kantian 9410 Kantian 9410
select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price; select fld3,period_,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period_ >= 1001 and period_ <= 1002 and t2.companynr = 37 order by fld3,period_, price;
fld3 period price price2 fld3 period_ price price2
admonishing 1002 28357832 8723648 admonishing 1002 28357832 8723648
analyzable 1002 28357832 8723648 analyzable 1002 28357832 8723648
annihilates 1001 5987435 234724 annihilates 1001 5987435 234724
@ -1279,8 +1279,8 @@ ventilate 1001 5987435 234724
wallet 1001 5987435 234724 wallet 1001 5987435 234724
Weissmuller 1002 28357832 8723648 Weissmuller 1002 28357832 8723648
Wotan 1002 28357832 8723648 Wotan 1002 28357832 8723648
select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37; select t2.fld1,fld3,period_,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period_ = 1001 and t2.companynr = 37;
fld1 fld3 period price price2 fld1 fld3 period_ price price2
018201 relaxing 1001 5987435 234724 018201 relaxing 1001 5987435 234724
018601 vacuuming 1001 5987435 234724 018601 vacuuming 1001 5987435 234724
018801 inch 1001 5987435 234724 018801 inch 1001 5987435 234724
@ -1320,7 +1320,7 @@ companynr companyname
65 company 9 65 company 9
68 company 10 68 company 10
select * from t1,t1 t12; select * from t1,t1 t12;
Period Varor_period Period Varor_period Period_ Varor_period Period_ Varor_period
9410 9412 9410 9412 9410 9412 9410 9412
select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505; select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505;
fld1 fld1 fld1 fld1
@ -1435,23 +1435,23 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary 1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join) 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join)
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period_ = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period_ = 1008;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); select period_ from t1 where (((period_ > 0) or period_ < 10000 or (period_ = 1900)) and (period_=1900 and period_ <= 1901) or (period_=1903 and (period_=1903)) and period_>=1902) or ((period_=1904 or period_=1905) or (period_=1906 or period_>1907)) or (period_=1908 and period_ = 1909);
period period_
9410 9410
select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6))); select period_ from t1 where ((period_ > 0 and period_ < 1) or (((period_ > 0 and period_ < 100) and (period_ > 10)) or (period_ > 10)) or (period_ > 0 and (period_ > 5 or period_ > 6)));
period period_
9410 9410
select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1; select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
fld1 fld1
@ -1708,8 +1708,8 @@ companynr companyname count(*)
select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name; select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
fld1 count(*) fld1 count(*)
158402 4181 158402 4181
select sum(Period)/count(*) from t1; select sum(Period_)/count(*) from t1;
sum(Period)/count(*) sum(Period_)/count(*)
9410.0000 9410.0000
select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr; select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr;
companynr count sum diff func companynr count sum diff func
@ -2039,26 +2039,26 @@ t2nr count(*)
select max(t2nr) from t3 where price=983543950; select max(t2nr) from t3 where price=983543950;
max(t2nr) max(t2nr)
41807 41807
select t1.period from t3 = t1 limit 1; select t1.period_ from t3 = t1 limit 1;
period period_
1001 1001
select t1.period from t1 as t1 limit 1; select t1.period_ from t1 as t1 limit 1;
period period_
9410 9410
select t1.period as "Nuvarande period" from t1 as t1 limit 1; select t1.period_ as "Nuvarande period_" from t1 as t1 limit 1;
Nuvarande period Nuvarande period_
9410 9410
select period as ok_period from t1 limit 1; select period_ as ok_period from t1 limit 1;
ok_period ok_period
9410 9410
select period as ok_period from t1 group by ok_period limit 1; select period_ as ok_period from t1 group by ok_period limit 1;
ok_period ok_period
9410 9410
select 1+1 as summa from t1 group by summa limit 1; select 1+1 as summa from t1 group by summa limit 1;
summa summa
2 2
select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1; select period_ as "Nuvarande period_" from t1 group by "Nuvarande period_" limit 1;
Nuvarande period Nuvarande period_
9410 9410
show tables; show tables;
Tables_in_test Tables_in_test

View File

@ -1207,22 +1207,25 @@ SET @aux= "SELECT COUNT(*)
prepare my_stmt from @aux; prepare my_stmt from @aux;
execute my_stmt; execute my_stmt;
COUNT(*) COUNT(*)
46 47
Warnings: Warnings:
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
execute my_stmt; execute my_stmt;
COUNT(*) COUNT(*)
46 47
Warnings: Warnings:
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
execute my_stmt; execute my_stmt;
COUNT(*) COUNT(*)
46 47
Warnings: Warnings:
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
deallocate prepare my_stmt; deallocate prepare my_stmt;
drop procedure if exists p1| drop procedure if exists p1|
drop table if exists t1| drop table if exists t1|

View File

@ -5,18 +5,18 @@ SET @save_optimizer_switch=@@optimizer_switch;
SET optimizer_switch=ifnull(@optimizer_switch_for_select_test,'outer_join_with_cache=off'); SET optimizer_switch=ifnull(@optimizer_switch_for_select_test,'outer_join_with_cache=off');
set join_cache_level=1; set join_cache_level=1;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
); );
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
period period_
9410 9410
select * from t1; select * from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
select t1.* from t1; select t1.* from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
CREATE TABLE t2 ( CREATE TABLE t2 (
auto int not null auto_increment, auto int not null auto_increment,
@ -280,8 +280,8 @@ companynr
34 34
29 29
00 00
select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%"; select distinct t2.fld3,period_ from t2,t1 where companynr=37 and fld3 like "O%";
fld3 period fld3 period_
obliterates 9410 obliterates 9410
offload 9410 offload 9410
opaquely 9410 opaquely 9410
@ -485,12 +485,12 @@ acu
Ade Ade
adj adj
create table t3 ( create table t3 (
period int not null, period_ int not null,
name char(32) not null, name char(32) not null,
companynr int not null, companynr int not null,
price double(11,0), price double(11,0),
price2 double(11,0), price2 double(11,0),
key (period), key (period_),
key (name) key (name)
); );
create temporary table tmp engine = myisam select * from t3; create temporary table tmp engine = myisam select * from t3;
@ -604,35 +604,35 @@ explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort 1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using filesort 1 SIMPLE t1 ALL period_ NULL NULL NULL 41810 Using filesort
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 index period period 4 NULL 1 1 SIMPLE t3 index period_ period_ 4 NULL 1
1 SIMPLE t1 ref period period 4 test.t3.period 4181 1 SIMPLE t1 ref period_ period_ 4 test.t3.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t1.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index period period 4 NULL 1 1 SIMPLE t1 index period_ period_ 4 NULL 1
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
select period from t1; select period_ from t1;
period period_
9410 9410
select period from t1 where period=1900; select period_ from t1 where period_=1900;
period period_
select fld3,period from t1,t2 where fld1 = 011401 order by period; select fld3,period_ from t1,t2 where fld1 = 011401 order by period_;
fld3 period fld3 period_
breaking 9410 breaking 9410
select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001; select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period_=1001;
fld3 period fld3 period_
breaking 1001 breaking 1001
explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period; explain select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const fld1 fld1 4 const 1 1 SIMPLE t2 const fld1 fld1 4 const 1
1 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1 1 SIMPLE t3 const PRIMARY,period_ PRIMARY 4 const 1
select fld3,period from t2,t1 where companynr*10 = 37*10; select fld3,period_ from t2,t1 where companynr*10 = 37*10;
fld3 period fld3 period_
breaking 9410 breaking 9410
Romans 9410 Romans 9410
intercepted 9410 intercepted 9410
@ -1221,8 +1221,8 @@ dusted 9410
encompasses 9410 encompasses 9410
presentation 9410 presentation 9410
Kantian 9410 Kantian 9410
select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price; select fld3,period_,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period_ >= 1001 and period_ <= 1002 and t2.companynr = 37 order by fld3,period_, price;
fld3 period price price2 fld3 period_ price price2
admonishing 1002 28357832 8723648 admonishing 1002 28357832 8723648
analyzable 1002 28357832 8723648 analyzable 1002 28357832 8723648
annihilates 1001 5987435 234724 annihilates 1001 5987435 234724
@ -1282,8 +1282,8 @@ ventilate 1001 5987435 234724
wallet 1001 5987435 234724 wallet 1001 5987435 234724
Weissmuller 1002 28357832 8723648 Weissmuller 1002 28357832 8723648
Wotan 1002 28357832 8723648 Wotan 1002 28357832 8723648
select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37; select t2.fld1,fld3,period_,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period_ = 1001 and t2.companynr = 37;
fld1 fld3 period price price2 fld1 fld3 period_ price price2
018201 relaxing 1001 5987435 234724 018201 relaxing 1001 5987435 234724
018601 vacuuming 1001 5987435 234724 018601 vacuuming 1001 5987435 234724
018801 inch 1001 5987435 234724 018801 inch 1001 5987435 234724
@ -1323,7 +1323,7 @@ companynr companyname
65 company 9 65 company 9
68 company 10 68 company 10
select * from t1,t1 t12; select * from t1,t1 t12;
Period Varor_period Period Varor_period Period_ Varor_period Period_ Varor_period
9410 9412 9410 9412 9410 9412 9410 9412
select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505; select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505;
fld1 fld1 fld1 fld1
@ -1435,23 +1435,23 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary 1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join) 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join)
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period_ = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period_ = 1008;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); select period_ from t1 where (((period_ > 0) or period_ < 10000 or (period_ = 1900)) and (period_=1900 and period_ <= 1901) or (period_=1903 and (period_=1903)) and period_>=1902) or ((period_=1904 or period_=1905) or (period_=1906 or period_>1907)) or (period_=1908 and period_ = 1909);
period period_
9410 9410
select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6))); select period_ from t1 where ((period_ > 0 and period_ < 1) or (((period_ > 0 and period_ < 100) and (period_ > 10)) or (period_ > 10)) or (period_ > 0 and (period_ > 5 or period_ > 6)));
period period_
9410 9410
select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1; select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
fld1 fld1
@ -1708,8 +1708,8 @@ companynr companyname count(*)
select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name; select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
fld1 count(*) fld1 count(*)
158402 4181 158402 4181
select sum(Period)/count(*) from t1; select sum(Period_)/count(*) from t1;
sum(Period)/count(*) sum(Period_)/count(*)
9410.0000 9410.0000
select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr; select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr;
companynr count sum diff func companynr count sum diff func
@ -2039,26 +2039,26 @@ t2nr count(*)
select max(t2nr) from t3 where price=983543950; select max(t2nr) from t3 where price=983543950;
max(t2nr) max(t2nr)
41807 41807
select t1.period from t3 = t1 limit 1; select t1.period_ from t3 = t1 limit 1;
period period_
1001 1001
select t1.period from t1 as t1 limit 1; select t1.period_ from t1 as t1 limit 1;
period period_
9410 9410
select t1.period as "Nuvarande period" from t1 as t1 limit 1; select t1.period_ as "Nuvarande period_" from t1 as t1 limit 1;
Nuvarande period Nuvarande period_
9410 9410
select period as ok_period from t1 limit 1; select period_ as ok_period from t1 limit 1;
ok_period ok_period
9410 9410
select period as ok_period from t1 group by ok_period limit 1; select period_ as ok_period from t1 group by ok_period limit 1;
ok_period ok_period
9410 9410
select 1+1 as summa from t1 group by summa limit 1; select 1+1 as summa from t1 group by summa limit 1;
summa summa
2 2
select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1; select period_ as "Nuvarande period_" from t1 group by "Nuvarande period_" limit 1;
Nuvarande period Nuvarande period_
9410 9410
show tables; show tables;
Tables_in_test Tables_in_test

View File

@ -16,18 +16,18 @@ SET @save_optimizer_switch=@@optimizer_switch;
SET optimizer_switch=ifnull(@optimizer_switch_for_select_test,'outer_join_with_cache=off'); SET optimizer_switch=ifnull(@optimizer_switch_for_select_test,'outer_join_with_cache=off');
set join_cache_level=@join_cache_level_for_select_test; set join_cache_level=@join_cache_level_for_select_test;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
); );
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
period period_
9410 9410
select * from t1; select * from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
select t1.* from t1; select t1.* from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
CREATE TABLE t2 ( CREATE TABLE t2 (
auto int not null auto_increment, auto int not null auto_increment,
@ -291,8 +291,8 @@ companynr
34 34
29 29
00 00
select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%"; select distinct t2.fld3,period_ from t2,t1 where companynr=37 and fld3 like "O%";
fld3 period fld3 period_
obliterates 9410 obliterates 9410
offload 9410 offload 9410
opaquely 9410 opaquely 9410
@ -496,12 +496,12 @@ acu
Ade Ade
adj adj
create table t3 ( create table t3 (
period int not null, period_ int not null,
name char(32) not null, name char(32) not null,
companynr int not null, companynr int not null,
price double(11,0), price double(11,0),
price2 double(11,0), price2 double(11,0),
key (period), key (period_),
key (name) key (name)
); );
create temporary table tmp engine = myisam select * from t3; create temporary table tmp engine = myisam select * from t3;
@ -615,35 +615,35 @@ explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort 1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort 1 SIMPLE t1 ALL period_ NULL NULL NULL 41810 Using temporary; Using filesort
1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 ALL period NULL NULL NULL 41810 Using temporary; Using filesort 1 SIMPLE t3 ALL period_ NULL NULL NULL 41810 Using temporary; Using filesort
1 SIMPLE t1 ref period period 4 test.t3.period 4181 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan 1 SIMPLE t1 ref period_ period_ 4 test.t3.period_ 4181 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t1.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort 1 SIMPLE t1 ALL period_ NULL NULL NULL 41810 Using temporary; Using filesort
1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
select period from t1; select period_ from t1;
period period_
9410 9410
select period from t1 where period=1900; select period_ from t1 where period_=1900;
period period_
select fld3,period from t1,t2 where fld1 = 011401 order by period; select fld3,period_ from t1,t2 where fld1 = 011401 order by period_;
fld3 period fld3 period_
breaking 9410 breaking 9410
select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001; select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period_=1001;
fld3 period fld3 period_
breaking 1001 breaking 1001
explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period; explain select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const fld1 fld1 4 const 1 1 SIMPLE t2 const fld1 fld1 4 const 1
1 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1 1 SIMPLE t3 const PRIMARY,period_ PRIMARY 4 const 1
select fld3,period from t2,t1 where companynr*10 = 37*10; select fld3,period_ from t2,t1 where companynr*10 = 37*10;
fld3 period fld3 period_
breaking 9410 breaking 9410
Romans 9410 Romans 9410
intercepted 9410 intercepted 9410
@ -1232,8 +1232,8 @@ dusted 9410
encompasses 9410 encompasses 9410
presentation 9410 presentation 9410
Kantian 9410 Kantian 9410
select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price; select fld3,period_,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period_ >= 1001 and period_ <= 1002 and t2.companynr = 37 order by fld3,period_, price;
fld3 period price price2 fld3 period_ price price2
admonishing 1002 28357832 8723648 admonishing 1002 28357832 8723648
analyzable 1002 28357832 8723648 analyzable 1002 28357832 8723648
annihilates 1001 5987435 234724 annihilates 1001 5987435 234724
@ -1293,8 +1293,8 @@ ventilate 1001 5987435 234724
wallet 1001 5987435 234724 wallet 1001 5987435 234724
Weissmuller 1002 28357832 8723648 Weissmuller 1002 28357832 8723648
Wotan 1002 28357832 8723648 Wotan 1002 28357832 8723648
select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37; select t2.fld1,fld3,period_,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period_ = 1001 and t2.companynr = 37;
fld1 fld3 period price price2 fld1 fld3 period_ price price2
018201 relaxing 1001 5987435 234724 018201 relaxing 1001 5987435 234724
018601 vacuuming 1001 5987435 234724 018601 vacuuming 1001 5987435 234724
018801 inch 1001 5987435 234724 018801 inch 1001 5987435 234724
@ -1334,7 +1334,7 @@ companynr companyname
65 company 9 65 company 9
68 company 10 68 company 10
select * from t1,t1 t12; select * from t1,t1 t12;
Period Varor_period Period Varor_period Period_ Varor_period Period_ Varor_period
9410 9412 9410 9412 9410 9412 9410 9412
select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505; select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505;
fld1 fld1 fld1 fld1
@ -1446,23 +1446,23 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary 1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 func 1199 Using where; Using join buffer (flat, BNLH join) 1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 func 1199 Using where; Using join buffer (flat, BNLH join)
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period_ = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period_ = 1008;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); select period_ from t1 where (((period_ > 0) or period_ < 10000 or (period_ = 1900)) and (period_=1900 and period_ <= 1901) or (period_=1903 and (period_=1903)) and period_>=1902) or ((period_=1904 or period_=1905) or (period_=1906 or period_>1907)) or (period_=1908 and period_ = 1909);
period period_
9410 9410
select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6))); select period_ from t1 where ((period_ > 0 and period_ < 1) or (((period_ > 0 and period_ < 100) and (period_ > 10)) or (period_ > 10)) or (period_ > 0 and (period_ > 5 or period_ > 6)));
period period_
9410 9410
select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1; select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
fld1 fld1
@ -1719,8 +1719,8 @@ companynr companyname count(*)
select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name; select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
fld1 count(*) fld1 count(*)
158402 4181 158402 4181
select sum(Period)/count(*) from t1; select sum(Period_)/count(*) from t1;
sum(Period)/count(*) sum(Period_)/count(*)
9410.0000 9410.0000
select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr; select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr;
companynr count sum diff func companynr count sum diff func
@ -2050,26 +2050,26 @@ t2nr count(*)
select max(t2nr) from t3 where price=983543950; select max(t2nr) from t3 where price=983543950;
max(t2nr) max(t2nr)
41807 41807
select t1.period from t3 = t1 limit 1; select t1.period_ from t3 = t1 limit 1;
period period_
1001 1001
select t1.period from t1 as t1 limit 1; select t1.period_ from t1 as t1 limit 1;
period period_
9410 9410
select t1.period as "Nuvarande period" from t1 as t1 limit 1; select t1.period_ as "Nuvarande period_" from t1 as t1 limit 1;
Nuvarande period Nuvarande period_
9410 9410
select period as ok_period from t1 limit 1; select period_ as ok_period from t1 limit 1;
ok_period ok_period
9410 9410
select period as ok_period from t1 group by ok_period limit 1; select period_ as ok_period from t1 group by ok_period limit 1;
ok_period ok_period
9410 9410
select 1+1 as summa from t1 group by summa limit 1; select 1+1 as summa from t1 group by summa limit 1;
summa summa
2 2
select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1; select period_ as "Nuvarande period_" from t1 group by "Nuvarande period_" limit 1;
Nuvarande period Nuvarande period_
9410 9410
show tables; show tables;
Tables_in_test Tables_in_test

View File

@ -5,18 +5,18 @@ SET @save_optimizer_switch=@@optimizer_switch;
SET optimizer_switch=ifnull(@optimizer_switch_for_select_test,'outer_join_with_cache=off'); SET optimizer_switch=ifnull(@optimizer_switch_for_select_test,'outer_join_with_cache=off');
set join_cache_level=1; set join_cache_level=1;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
); );
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
period period_
9410 9410
select * from t1; select * from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
select t1.* from t1; select t1.* from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
CREATE TABLE t2 ( CREATE TABLE t2 (
auto int not null auto_increment, auto int not null auto_increment,
@ -280,8 +280,8 @@ companynr
34 34
29 29
00 00
select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%"; select distinct t2.fld3,period_ from t2,t1 where companynr=37 and fld3 like "O%";
fld3 period fld3 period_
obliterates 9410 obliterates 9410
offload 9410 offload 9410
opaquely 9410 opaquely 9410
@ -485,12 +485,12 @@ acu
Ade Ade
adj adj
create table t3 ( create table t3 (
period int not null, period_ int not null,
name char(32) not null, name char(32) not null,
companynr int not null, companynr int not null,
price double(11,0), price double(11,0),
price2 double(11,0), price2 double(11,0),
key (period), key (period_),
key (name) key (name)
); );
create temporary table tmp engine = myisam select * from t3; create temporary table tmp engine = myisam select * from t3;
@ -604,35 +604,35 @@ explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort 1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using filesort 1 SIMPLE t1 ALL period_ NULL NULL NULL 41810 Using filesort
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 index period period 4 NULL 1 1 SIMPLE t3 index period_ period_ 4 NULL 1
1 SIMPLE t1 ref period period 4 test.t3.period 4181 1 SIMPLE t1 ref period_ period_ 4 test.t3.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t1.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index period period 4 NULL 1 1 SIMPLE t1 index period_ period_ 4 NULL 1
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
select period from t1; select period_ from t1;
period period_
9410 9410
select period from t1 where period=1900; select period_ from t1 where period_=1900;
period period_
select fld3,period from t1,t2 where fld1 = 011401 order by period; select fld3,period_ from t1,t2 where fld1 = 011401 order by period_;
fld3 period fld3 period_
breaking 9410 breaking 9410
select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001; select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period_=1001;
fld3 period fld3 period_
breaking 1001 breaking 1001
explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period; explain select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const fld1 fld1 4 const 1 1 SIMPLE t2 const fld1 fld1 4 const 1
1 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1 1 SIMPLE t3 const PRIMARY,period_ PRIMARY 4 const 1
select fld3,period from t2,t1 where companynr*10 = 37*10; select fld3,period_ from t2,t1 where companynr*10 = 37*10;
fld3 period fld3 period_
breaking 9410 breaking 9410
Romans 9410 Romans 9410
intercepted 9410 intercepted 9410
@ -1221,8 +1221,8 @@ dusted 9410
encompasses 9410 encompasses 9410
presentation 9410 presentation 9410
Kantian 9410 Kantian 9410
select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price; select fld3,period_,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period_ >= 1001 and period_ <= 1002 and t2.companynr = 37 order by fld3,period_, price;
fld3 period price price2 fld3 period_ price price2
admonishing 1002 28357832 8723648 admonishing 1002 28357832 8723648
analyzable 1002 28357832 8723648 analyzable 1002 28357832 8723648
annihilates 1001 5987435 234724 annihilates 1001 5987435 234724
@ -1282,8 +1282,8 @@ ventilate 1001 5987435 234724
wallet 1001 5987435 234724 wallet 1001 5987435 234724
Weissmuller 1002 28357832 8723648 Weissmuller 1002 28357832 8723648
Wotan 1002 28357832 8723648 Wotan 1002 28357832 8723648
select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37; select t2.fld1,fld3,period_,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period_ = 1001 and t2.companynr = 37;
fld1 fld3 period price price2 fld1 fld3 period_ price price2
018201 relaxing 1001 5987435 234724 018201 relaxing 1001 5987435 234724
018601 vacuuming 1001 5987435 234724 018601 vacuuming 1001 5987435 234724
018801 inch 1001 5987435 234724 018801 inch 1001 5987435 234724
@ -1323,7 +1323,7 @@ companynr companyname
65 company 9 65 company 9
68 company 10 68 company 10
select * from t1,t1 t12; select * from t1,t1 t12;
Period Varor_period Period Varor_period Period_ Varor_period Period_ Varor_period
9410 9412 9410 9412 9410 9412 9410 9412
select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505; select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505;
fld1 fld1 fld1 fld1
@ -1435,23 +1435,23 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary 1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join) 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join)
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period_ = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period_ = 1008;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); select period_ from t1 where (((period_ > 0) or period_ < 10000 or (period_ = 1900)) and (period_=1900 and period_ <= 1901) or (period_=1903 and (period_=1903)) and period_>=1902) or ((period_=1904 or period_=1905) or (period_=1906 or period_>1907)) or (period_=1908 and period_ = 1909);
period period_
9410 9410
select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6))); select period_ from t1 where ((period_ > 0 and period_ < 1) or (((period_ > 0 and period_ < 100) and (period_ > 10)) or (period_ > 10)) or (period_ > 0 and (period_ > 5 or period_ > 6)));
period period_
9410 9410
select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1; select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
fld1 fld1
@ -1708,8 +1708,8 @@ companynr companyname count(*)
select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name; select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
fld1 count(*) fld1 count(*)
158402 4181 158402 4181
select sum(Period)/count(*) from t1; select sum(Period_)/count(*) from t1;
sum(Period)/count(*) sum(Period_)/count(*)
9410.0000 9410.0000
select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr; select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr;
companynr count sum diff func companynr count sum diff func
@ -2039,26 +2039,26 @@ t2nr count(*)
select max(t2nr) from t3 where price=983543950; select max(t2nr) from t3 where price=983543950;
max(t2nr) max(t2nr)
41807 41807
select t1.period from t3 = t1 limit 1; select t1.period_ from t3 = t1 limit 1;
period period_
1001 1001
select t1.period from t1 as t1 limit 1; select t1.period_ from t1 as t1 limit 1;
period period_
9410 9410
select t1.period as "Nuvarande period" from t1 as t1 limit 1; select t1.period_ as "Nuvarande period_" from t1 as t1 limit 1;
Nuvarande period Nuvarande period_
9410 9410
select period as ok_period from t1 limit 1; select period_ as ok_period from t1 limit 1;
ok_period ok_period
9410 9410
select period as ok_period from t1 group by ok_period limit 1; select period_ as ok_period from t1 group by ok_period limit 1;
ok_period ok_period
9410 9410
select 1+1 as summa from t1 group by summa limit 1; select 1+1 as summa from t1 group by summa limit 1;
summa summa
2 2
select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1; select period_ as "Nuvarande period_" from t1 group by "Nuvarande period_" limit 1;
Nuvarande period Nuvarande period_
9410 9410
show tables; show tables;
Tables_in_test Tables_in_test

View File

@ -1,18 +1,18 @@
connect shm_con,localhost,root,,,,$shm_name,SHM; connect shm_con,localhost,root,,,,$shm_name,SHM;
drop table if exists t1,t2,t3,t4; drop table if exists t1,t2,t3,t4;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
); );
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
period period_
9410 9410
select * from t1; select * from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
select t1.* from t1; select t1.* from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
CREATE TABLE t2 ( CREATE TABLE t2 (
auto int not null auto_increment, auto int not null auto_increment,
@ -276,8 +276,8 @@ companynr
34 34
29 29
00 00
select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%"; select distinct t2.fld3,period_ from t2,t1 where companynr=37 and fld3 like "O%";
fld3 period fld3 period_
obliterates 9410 obliterates 9410
offload 9410 offload 9410
opaquely 9410 opaquely 9410
@ -481,12 +481,12 @@ acu
Ade Ade
adj adj
create table t3 ( create table t3 (
period int not null, period_ int not null,
name char(32) not null, name char(32) not null,
companynr int not null, companynr int not null,
price double(11,0), price double(11,0),
price2 double(11,0), price2 double(11,0),
key (period), key (period_),
key (name) key (name)
); );
create temporary table tmp engine = myisam select * from t3; create temporary table tmp engine = myisam select * from t3;
@ -600,35 +600,35 @@ explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort 1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using filesort 1 SIMPLE t1 ALL period_ NULL NULL NULL 41810 Using temporary; Using filesort
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 index period period 4 NULL 1 1 SIMPLE t3 index period_ period_ 4 NULL 1
1 SIMPLE t1 ref period period 4 test.t3.period 4181 1 SIMPLE t1 ref period_ period_ 4 test.t3.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t1.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index period period 4 NULL 1 1 SIMPLE t1 index period_ period_ 4 NULL 1
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
select period from t1; select period_ from t1;
period period_
9410 9410
select period from t1 where period=1900; select period_ from t1 where period_=1900;
period period_
select fld3,period from t1,t2 where fld1 = 011401 order by period; select fld3,period_ from t1,t2 where fld1 = 011401 order by period_;
fld3 period fld3 period_
breaking 9410 breaking 9410
select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001; select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period_=1001;
fld3 period fld3 period_
breaking 1001 breaking 1001
explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period; explain select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const fld1 fld1 4 const 1 1 SIMPLE t2 const fld1 fld1 4 const 1
1 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1 1 SIMPLE t3 const PRIMARY,period_ PRIMARY 4 const 1
select fld3,period from t2,t1 where companynr*10 = 37*10; select fld3,period_ from t2,t1 where companynr*10 = 37*10;
fld3 period fld3 period_
breaking 9410 breaking 9410
Romans 9410 Romans 9410
intercepted 9410 intercepted 9410
@ -1217,8 +1217,8 @@ dusted 9410
encompasses 9410 encompasses 9410
presentation 9410 presentation 9410
Kantian 9410 Kantian 9410
select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price; select fld3,period_,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period_ >= 1001 and period_ <= 1002 and t2.companynr = 37 order by fld3,period_, price;
fld3 period price price2 fld3 period_ price price2
admonishing 1002 28357832 8723648 admonishing 1002 28357832 8723648
analyzable 1002 28357832 8723648 analyzable 1002 28357832 8723648
annihilates 1001 5987435 234724 annihilates 1001 5987435 234724
@ -1278,8 +1278,8 @@ ventilate 1001 5987435 234724
wallet 1001 5987435 234724 wallet 1001 5987435 234724
Weissmuller 1002 28357832 8723648 Weissmuller 1002 28357832 8723648
Wotan 1002 28357832 8723648 Wotan 1002 28357832 8723648
select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37; select t2.fld1,fld3,period_,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period_ = 1001 and t2.companynr = 37;
fld1 fld3 period price price2 fld1 fld3 period_ price price2
018201 relaxing 1001 5987435 234724 018201 relaxing 1001 5987435 234724
018601 vacuuming 1001 5987435 234724 018601 vacuuming 1001 5987435 234724
018801 inch 1001 5987435 234724 018801 inch 1001 5987435 234724
@ -1319,7 +1319,7 @@ companynr companyname
65 company 9 65 company 9
68 company 10 68 company 10
select * from t1,t1 t12; select * from t1,t1 t12;
Period Varor_period Period Varor_period Period_ Varor_period Period_ Varor_period
9410 9412 9410 9412 9410 9412 9410 9412
select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505; select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505;
fld1 fld1 fld1 fld1
@ -1434,23 +1434,23 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary 1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join) 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join)
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period_ = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period_ = 1008;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); select period_ from t1 where (((period_ > 0) or period_ < 10000 or (period_ = 1900)) and (period_=1900 and period_ <= 1901) or (period_=1903 and (period_=1903)) and period_>=1902) or ((period_=1904 or period_=1905) or (period_=1906 or period_>1907)) or (period_=1908 and period_ = 1909);
period period_
9410 9410
select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6))); select period_ from t1 where ((period_ > 0 and period_ < 1) or (((period_ > 0 and period_ < 100) and (period_ > 10)) or (period_ > 10)) or (period_ > 0 and (period_ > 5 or period_ > 6)));
period period_
9410 9410
select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1; select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
fld1 fld1
@ -1707,8 +1707,8 @@ companynr companyname count(*)
select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name; select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
fld1 count(*) fld1 count(*)
158402 4181 158402 4181
select sum(Period)/count(*) from t1; select sum(Period_)/count(*) from t1;
sum(Period)/count(*) sum(Period_)/count(*)
9410.0000 9410.0000
select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr; select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr;
companynr count sum diff func companynr count sum diff func
@ -2038,26 +2038,26 @@ t2nr count(*)
select max(t2nr) from t3 where price=983543950; select max(t2nr) from t3 where price=983543950;
max(t2nr) max(t2nr)
41807 41807
select t1.period from t3 = t1 limit 1; select t1.period_ from t3 = t1 limit 1;
period period_
1001 1001
select t1.period from t1 as t1 limit 1; select t1.period_ from t1 as t1 limit 1;
period period_
9410 9410
select t1.period as "Nuvarande period" from t1 as t1 limit 1; select t1.period_ as "Nuvarande period_" from t1 as t1 limit 1;
Nuvarande period Nuvarande period_
9410 9410
select period as ok_period from t1 limit 1; select period_ as ok_period from t1 limit 1;
ok_period ok_period
9410 9410
select period as ok_period from t1 group by ok_period limit 1; select period_ as ok_period from t1 group by ok_period limit 1;
ok_period ok_period
9410 9410
select 1+1 as summa from t1 group by summa limit 1; select 1+1 as summa from t1 group by summa limit 1;
summa summa
2 2
select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1; select period_ as "Nuvarande period_" from t1 group by "Nuvarande period_" limit 1;
Nuvarande period Nuvarande period_
9410 9410
show tables; show tables;
Tables_in_test Tables_in_test

View File

@ -531,7 +531,7 @@ SET SESSION SQL_MODE = @OLD_SQL_MODE;
DROP USER 'user_no_PCTFL'@'localhost'; DROP USER 'user_no_PCTFL'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
SELECT * FROM mysql.db WHERE Host = 'localhost' AND User LIKE 'user_%PCTFL'; SELECT * FROM mysql.db WHERE Host = 'localhost' AND User LIKE 'user_%PCTFL';
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_versioning_rows_priv
SELECT * FROM mysql.tables_priv WHERE Host = 'localhost' AND User LIKE 'user_%PCTFL'; SELECT * FROM mysql.tables_priv WHERE Host = 'localhost' AND User LIKE 'user_%PCTFL';
Host Db User Table_name Grantor Timestamp Table_priv Column_priv Host Db User Table_name Grantor Timestamp Table_priv Column_priv
SELECT * FROM mysql.columns_priv WHERE Host = 'localhost' AND User LIKE 'user_%PCTFL'; SELECT * FROM mysql.columns_priv WHERE Host = 'localhost' AND User LIKE 'user_%PCTFL';

View File

@ -10,18 +10,18 @@ Variable_name Value
Ssl_server_not_after Apr 20 20:52:21 2037 GMT Ssl_server_not_after Apr 20 20:52:21 2037 GMT
drop table if exists t1,t2,t3,t4; drop table if exists t1,t2,t3,t4;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
); );
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
period period_
9410 9410
select * from t1; select * from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
select t1.* from t1; select t1.* from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
CREATE TABLE t2 ( CREATE TABLE t2 (
auto int not null auto_increment, auto int not null auto_increment,
@ -285,8 +285,8 @@ companynr
34 34
29 29
00 00
select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%"; select distinct t2.fld3,period_ from t2,t1 where companynr=37 and fld3 like "O%";
fld3 period fld3 period_
obliterates 9410 obliterates 9410
offload 9410 offload 9410
opaquely 9410 opaquely 9410
@ -490,12 +490,12 @@ acu
Ade Ade
adj adj
create table t3 ( create table t3 (
period int not null, period_ int not null,
name char(32) not null, name char(32) not null,
companynr int not null, companynr int not null,
price double(11,0), price double(11,0),
price2 double(11,0), price2 double(11,0),
key (period), key (period_),
key (name) key (name)
); );
create temporary table tmp engine = myisam select * from t3; create temporary table tmp engine = myisam select * from t3;
@ -609,35 +609,35 @@ explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort 1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using filesort 1 SIMPLE t1 ALL period_ NULL NULL NULL 41810 Using filesort
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 index period period 4 NULL 1 1 SIMPLE t3 index period_ period_ 4 NULL 1
1 SIMPLE t1 ref period period 4 test.t3.period 4181 1 SIMPLE t1 ref period_ period_ 4 test.t3.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t1.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index period period 4 NULL 1 1 SIMPLE t1 index period_ period_ 4 NULL 1
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
select period from t1; select period_ from t1;
period period_
9410 9410
select period from t1 where period=1900; select period_ from t1 where period_=1900;
period period_
select fld3,period from t1,t2 where fld1 = 011401 order by period; select fld3,period_ from t1,t2 where fld1 = 011401 order by period_;
fld3 period fld3 period_
breaking 9410 breaking 9410
select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001; select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period_=1001;
fld3 period fld3 period_
breaking 1001 breaking 1001
explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period; explain select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const fld1 fld1 4 const 1 1 SIMPLE t2 const fld1 fld1 4 const 1
1 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1 1 SIMPLE t3 const PRIMARY,period_ PRIMARY 4 const 1
select fld3,period from t2,t1 where companynr*10 = 37*10; select fld3,period_ from t2,t1 where companynr*10 = 37*10;
fld3 period fld3 period_
breaking 9410 breaking 9410
Romans 9410 Romans 9410
intercepted 9410 intercepted 9410
@ -1226,8 +1226,8 @@ dusted 9410
encompasses 9410 encompasses 9410
presentation 9410 presentation 9410
Kantian 9410 Kantian 9410
select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price; select fld3,period_,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period_ >= 1001 and period_ <= 1002 and t2.companynr = 37 order by fld3,period_, price;
fld3 period price price2 fld3 period_ price price2
admonishing 1002 28357832 8723648 admonishing 1002 28357832 8723648
analyzable 1002 28357832 8723648 analyzable 1002 28357832 8723648
annihilates 1001 5987435 234724 annihilates 1001 5987435 234724
@ -1287,8 +1287,8 @@ ventilate 1001 5987435 234724
wallet 1001 5987435 234724 wallet 1001 5987435 234724
Weissmuller 1002 28357832 8723648 Weissmuller 1002 28357832 8723648
Wotan 1002 28357832 8723648 Wotan 1002 28357832 8723648
select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37; select t2.fld1,fld3,period_,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period_ = 1001 and t2.companynr = 37;
fld1 fld3 period price price2 fld1 fld3 period_ price price2
018201 relaxing 1001 5987435 234724 018201 relaxing 1001 5987435 234724
018601 vacuuming 1001 5987435 234724 018601 vacuuming 1001 5987435 234724
018801 inch 1001 5987435 234724 018801 inch 1001 5987435 234724
@ -1328,7 +1328,7 @@ companynr companyname
65 company 9 65 company 9
68 company 10 68 company 10
select * from t1,t1 t12; select * from t1,t1 t12;
Period Varor_period Period Varor_period Period_ Varor_period Period_ Varor_period
9410 9412 9410 9412 9410 9412 9410 9412
select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505; select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505;
fld1 fld1 fld1 fld1
@ -1443,23 +1443,23 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary 1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join) 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join)
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period_ = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period_ = 1008;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); select period_ from t1 where (((period_ > 0) or period_ < 10000 or (period_ = 1900)) and (period_=1900 and period_ <= 1901) or (period_=1903 and (period_=1903)) and period_>=1902) or ((period_=1904 or period_=1905) or (period_=1906 or period_>1907)) or (period_=1908 and period_ = 1909);
period period_
9410 9410
select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6))); select period_ from t1 where ((period_ > 0 and period_ < 1) or (((period_ > 0 and period_ < 100) and (period_ > 10)) or (period_ > 10)) or (period_ > 0 and (period_ > 5 or period_ > 6)));
period period_
9410 9410
select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1; select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
fld1 fld1
@ -1716,8 +1716,8 @@ companynr companyname count(*)
select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name; select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
fld1 count(*) fld1 count(*)
158402 4181 158402 4181
select sum(Period)/count(*) from t1; select sum(Period_)/count(*) from t1;
sum(Period)/count(*) sum(Period_)/count(*)
9410.0000 9410.0000
select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr; select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr;
companynr count sum diff func companynr count sum diff func
@ -2047,26 +2047,26 @@ t2nr count(*)
select max(t2nr) from t3 where price=983543950; select max(t2nr) from t3 where price=983543950;
max(t2nr) max(t2nr)
41807 41807
select t1.period from t3 = t1 limit 1; select t1.period_ from t3 = t1 limit 1;
period period_
1001 1001
select t1.period from t1 as t1 limit 1; select t1.period_ from t1 as t1 limit 1;
period period_
9410 9410
select t1.period as "Nuvarande period" from t1 as t1 limit 1; select t1.period_ as "Nuvarande period_" from t1 as t1 limit 1;
Nuvarande period Nuvarande period_
9410 9410
select period as ok_period from t1 limit 1; select period_ as ok_period from t1 limit 1;
ok_period ok_period
9410 9410
select period as ok_period from t1 group by ok_period limit 1; select period_ as ok_period from t1 group by ok_period limit 1;
ok_period ok_period
9410 9410
select 1+1 as summa from t1 group by summa limit 1; select 1+1 as summa from t1 group by summa limit 1;
summa summa
2 2
select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1; select period_ as "Nuvarande period_" from t1 group by "Nuvarande period_" limit 1;
Nuvarande period Nuvarande period_
9410 9410
show tables; show tables;
Tables_in_test Tables_in_test

View File

@ -7,18 +7,18 @@ Variable_name Value
Compression ON Compression ON
drop table if exists t1,t2,t3,t4; drop table if exists t1,t2,t3,t4;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
); );
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
period period_
9410 9410
select * from t1; select * from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
select t1.* from t1; select t1.* from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
CREATE TABLE t2 ( CREATE TABLE t2 (
auto int not null auto_increment, auto int not null auto_increment,
@ -282,8 +282,8 @@ companynr
34 34
29 29
00 00
select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%"; select distinct t2.fld3,period_ from t2,t1 where companynr=37 and fld3 like "O%";
fld3 period fld3 period_
obliterates 9410 obliterates 9410
offload 9410 offload 9410
opaquely 9410 opaquely 9410
@ -487,12 +487,12 @@ acu
Ade Ade
adj adj
create table t3 ( create table t3 (
period int not null, period_ int not null,
name char(32) not null, name char(32) not null,
companynr int not null, companynr int not null,
price double(11,0), price double(11,0),
price2 double(11,0), price2 double(11,0),
key (period), key (period_),
key (name) key (name)
); );
create temporary table tmp engine = myisam select * from t3; create temporary table tmp engine = myisam select * from t3;
@ -606,35 +606,35 @@ explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort 1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using filesort 1 SIMPLE t1 ALL period_ NULL NULL NULL 41810 Using filesort
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t3.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 index period period 4 NULL 1 1 SIMPLE t3 index period_ period_ 4 NULL 1
1 SIMPLE t1 ref period period 4 test.t3.period 4181 1 SIMPLE t1 ref period_ period_ 4 test.t3.period_ 4181
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10; explain select * from t3 as t1,t3 where t1.period_=t3.period_ order by t1.period_ limit 10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index period period 4 NULL 1 1 SIMPLE t1 index period_ period_ 4 NULL 1
1 SIMPLE t3 ref period period 4 test.t1.period 4181 1 SIMPLE t3 ref period_ period_ 4 test.t1.period_ 4181
select period from t1; select period_ from t1;
period period_
9410 9410
select period from t1 where period=1900; select period_ from t1 where period_=1900;
period period_
select fld3,period from t1,t2 where fld1 = 011401 order by period; select fld3,period_ from t1,t2 where fld1 = 011401 order by period_;
fld3 period fld3 period_
breaking 9410 breaking 9410
select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001; select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period_=1001;
fld3 period fld3 period_
breaking 1001 breaking 1001
explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period; explain select fld3,period_ from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period_;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 const fld1 fld1 4 const 1 1 SIMPLE t2 const fld1 fld1 4 const 1
1 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1 1 SIMPLE t3 const PRIMARY,period_ PRIMARY 4 const 1
select fld3,period from t2,t1 where companynr*10 = 37*10; select fld3,period_ from t2,t1 where companynr*10 = 37*10;
fld3 period fld3 period_
breaking 9410 breaking 9410
Romans 9410 Romans 9410
intercepted 9410 intercepted 9410
@ -1223,8 +1223,8 @@ dusted 9410
encompasses 9410 encompasses 9410
presentation 9410 presentation 9410
Kantian 9410 Kantian 9410
select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price; select fld3,period_,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period_ >= 1001 and period_ <= 1002 and t2.companynr = 37 order by fld3,period_, price;
fld3 period price price2 fld3 period_ price price2
admonishing 1002 28357832 8723648 admonishing 1002 28357832 8723648
analyzable 1002 28357832 8723648 analyzable 1002 28357832 8723648
annihilates 1001 5987435 234724 annihilates 1001 5987435 234724
@ -1284,8 +1284,8 @@ ventilate 1001 5987435 234724
wallet 1001 5987435 234724 wallet 1001 5987435 234724
Weissmuller 1002 28357832 8723648 Weissmuller 1002 28357832 8723648
Wotan 1002 28357832 8723648 Wotan 1002 28357832 8723648
select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37; select t2.fld1,fld3,period_,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period_ = 1001 and t2.companynr = 37;
fld1 fld3 period price price2 fld1 fld3 period_ price price2
018201 relaxing 1001 5987435 234724 018201 relaxing 1001 5987435 234724
018601 vacuuming 1001 5987435 234724 018601 vacuuming 1001 5987435 234724
018801 inch 1001 5987435 234724 018801 inch 1001 5987435 234724
@ -1325,7 +1325,7 @@ companynr companyname
65 company 9 65 company 9
68 company 10 68 company 10
select * from t1,t1 t12; select * from t1,t1 t12;
Period Varor_period Period Varor_period Period_ Varor_period Period_ Varor_period
9410 9412 9410 9412 9410 9412 9410 9412
select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505; select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505;
fld1 fld1 fld1 fld1
@ -1440,23 +1440,23 @@ explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary 1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join) 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join)
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period_ = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period_ = 1008;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; select t2.fld1,t2.companynr,fld3,period_ from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period_>=1008 and period_<=1009;
fld1 companynr fld3 period fld1 companynr fld3 period_
038008 37 reporters 1008 038008 37 reporters 1008
038208 37 Selfridge 1008 038208 37 Selfridge 1008
select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); select period_ from t1 where (((period_ > 0) or period_ < 10000 or (period_ = 1900)) and (period_=1900 and period_ <= 1901) or (period_=1903 and (period_=1903)) and period_>=1902) or ((period_=1904 or period_=1905) or (period_=1906 or period_>1907)) or (period_=1908 and period_ = 1909);
period period_
9410 9410
select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6))); select period_ from t1 where ((period_ > 0 and period_ < 1) or (((period_ > 0 and period_ < 100) and (period_ > 10)) or (period_ > 10)) or (period_ > 0 and (period_ > 5 or period_ > 6)));
period period_
9410 9410
select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1; select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
fld1 fld1
@ -1713,8 +1713,8 @@ companynr companyname count(*)
select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name; select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
fld1 count(*) fld1 count(*)
158402 4181 158402 4181
select sum(Period)/count(*) from t1; select sum(Period_)/count(*) from t1;
sum(Period)/count(*) sum(Period_)/count(*)
9410.0000 9410.0000
select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr; select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr;
companynr count sum diff func companynr count sum diff func
@ -2044,26 +2044,26 @@ t2nr count(*)
select max(t2nr) from t3 where price=983543950; select max(t2nr) from t3 where price=983543950;
max(t2nr) max(t2nr)
41807 41807
select t1.period from t3 = t1 limit 1; select t1.period_ from t3 = t1 limit 1;
period period_
1001 1001
select t1.period from t1 as t1 limit 1; select t1.period_ from t1 as t1 limit 1;
period period_
9410 9410
select t1.period as "Nuvarande period" from t1 as t1 limit 1; select t1.period_ as "Nuvarande period_" from t1 as t1 limit 1;
Nuvarande period Nuvarande period_
9410 9410
select period as ok_period from t1 limit 1; select period_ as ok_period from t1 limit 1;
ok_period ok_period
9410 9410
select period as ok_period from t1 group by ok_period limit 1; select period_ as ok_period from t1 group by ok_period limit 1;
ok_period ok_period
9410 9410
select 1+1 as summa from t1 group by summa limit 1; select 1+1 as summa from t1 group by summa limit 1;
summa summa
2 2
select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1; select period_ as "Nuvarande period_" from t1 group by "Nuvarande period_" limit 1;
Nuvarande period Nuvarande period_
9410 9410
show tables; show tables;
Tables_in_test Tables_in_test

View File

@ -30,6 +30,7 @@ time_zone_name
time_zone_transition time_zone_transition
time_zone_transition_type time_zone_transition_type
user user
vtmd_template
show create table db; show create table db;
Table Create Table Table Create Table
db CREATE TABLE `db` ( db CREATE TABLE `db` (
@ -55,6 +56,7 @@ db CREATE TABLE `db` (
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_versioning_rows_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
PRIMARY KEY (`Host`,`Db`,`User`), PRIMARY KEY (`Host`,`Db`,`User`),
KEY `User` (`User`) KEY `User` (`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'
@ -118,6 +120,7 @@ user CREATE TABLE `user` (
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_versioning_rows_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
`ssl_cipher` blob NOT NULL, `ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL, `x509_issuer` blob NOT NULL,
@ -152,7 +155,7 @@ tables_priv CREATE TABLE `tables_priv` (
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
KEY `Grantor` (`Grantor`) KEY `Grantor` (`Grantor`)

View File

@ -30,6 +30,7 @@ time_zone_name
time_zone_transition time_zone_transition
time_zone_transition_type time_zone_transition_type
user user
vtmd_template
show create table db; show create table db;
Table Create Table Table Create Table
db CREATE TABLE `db` ( db CREATE TABLE `db` (
@ -55,6 +56,7 @@ db CREATE TABLE `db` (
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_versioning_rows_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
PRIMARY KEY (`Host`,`Db`,`User`), PRIMARY KEY (`Host`,`Db`,`User`),
KEY `User` (`User`) KEY `User` (`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'
@ -117,6 +119,7 @@ user CREATE TABLE `user` (
`Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_versioning_rows_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
`ssl_cipher` blob NOT NULL, `ssl_cipher` blob NOT NULL,
@ -152,7 +155,7 @@ tables_priv CREATE TABLE `tables_priv` (
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
KEY `Grantor` (`Grantor`) KEY `Grantor` (`Grantor`)

View File

@ -30,6 +30,7 @@ time_zone_name
time_zone_transition time_zone_transition
time_zone_transition_type time_zone_transition_type
user user
vtmd_template
show create table db; show create table db;
Table Create Table Table Create Table
db CREATE TABLE `db` ( db CREATE TABLE `db` (
@ -55,6 +56,7 @@ db CREATE TABLE `db` (
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_versioning_rows_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
PRIMARY KEY (`Host`,`Db`,`User`), PRIMARY KEY (`Host`,`Db`,`User`),
KEY `User` (`User`) KEY `User` (`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'
@ -117,6 +119,7 @@ user CREATE TABLE `user` (
`Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_versioning_rows_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
`ssl_cipher` blob NOT NULL, `ssl_cipher` blob NOT NULL,
@ -152,7 +155,7 @@ tables_priv CREATE TABLE `tables_priv` (
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
KEY `Grantor` (`Grantor`) KEY `Grantor` (`Grantor`)

View File

@ -30,6 +30,7 @@ time_zone_name
time_zone_transition time_zone_transition
time_zone_transition_type time_zone_transition_type
user user
vtmd_template
show create table db; show create table db;
Table Create Table Table Create Table
db CREATE TABLE `db` ( db CREATE TABLE `db` (
@ -55,6 +56,7 @@ db CREATE TABLE `db` (
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_versioning_rows_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
PRIMARY KEY (`Host`,`Db`,`User`), PRIMARY KEY (`Host`,`Db`,`User`),
KEY `User` (`User`) KEY `User` (`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'
@ -117,6 +119,7 @@ user CREATE TABLE `user` (
`Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_versioning_rows_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
`ssl_cipher` blob NOT NULL, `ssl_cipher` blob NOT NULL,
@ -152,7 +155,7 @@ tables_priv CREATE TABLE `tables_priv` (
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '', `Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
KEY `Grantor` (`Grantor`) KEY `Grantor` (`Grantor`)

View File

@ -1577,171 +1577,6 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1; DROP TABLE t1;
End of 5.1 tests End of 5.1 tests
#
# Bug#34828: OF is taken as OFF and a value of 0 is set for variable SQL_notes.
#
# Checking sql_notes...
SET @sql_notes_saved = @@sql_notes;
SET @@sql_notes = ON;
SELECT @@sql_notes;
@@sql_notes
1
SET @@sql_notes = OF;
ERROR 42000: Variable 'sql_notes' can't be set to the value of 'OF'
SELECT @@sql_notes;
@@sql_notes
1
SET @@sql_notes = OFF;
SELECT @@sql_notes;
@@sql_notes
0
SET @@sql_notes = @sql_notes_saved;
# Checking delay_key_write...
SET @delay_key_write_saved = @@delay_key_write;
SET GLOBAL delay_key_write = ON;
SELECT @@delay_key_write;
@@delay_key_write
ON
SET GLOBAL delay_key_write = OF;
ERROR 42000: Variable 'delay_key_write' can't be set to the value of 'OF'
SELECT @@delay_key_write;
@@delay_key_write
ON
SET GLOBAL delay_key_write = AL;
ERROR 42000: Variable 'delay_key_write' can't be set to the value of 'AL'
SELECT @@delay_key_write;
@@delay_key_write
ON
SET GLOBAL delay_key_write = OFF;
SELECT @@delay_key_write;
@@delay_key_write
OFF
SET GLOBAL delay_key_write = ALL;
SELECT @@delay_key_write;
@@delay_key_write
ALL
SET GLOBAL delay_key_write = @delay_key_write_saved;
# Checking sql_safe_updates...
SET @sql_safe_updates_saved = @@sql_safe_updates;
SET @@sql_safe_updates = ON;
SELECT @@sql_safe_updates;
@@sql_safe_updates
1
SET @@sql_safe_updates = OF;
ERROR 42000: Variable 'sql_safe_updates' can't be set to the value of 'OF'
SELECT @@sql_safe_updates;
@@sql_safe_updates
1
SET @@sql_safe_updates = OFF;
SELECT @@sql_safe_updates;
@@sql_safe_updates
0
SET @@sql_safe_updates = @sql_safe_updates_saved;
# Checking foreign_key_checks...
SET @foreign_key_checks_saved = @@foreign_key_checks;
SET @@foreign_key_checks = ON;
SELECT @@foreign_key_checks;
@@foreign_key_checks
1
SET @@foreign_key_checks = OF;
ERROR 42000: Variable 'foreign_key_checks' can't be set to the value of 'OF'
SELECT @@foreign_key_checks;
@@foreign_key_checks
1
SET @@foreign_key_checks = OFF;
SELECT @@foreign_key_checks;
@@foreign_key_checks
0
SET @@foreign_key_checks = @foreign_key_checks_saved;
# Checking unique_checks...
SET @unique_checks_saved = @@unique_checks;
SET @@unique_checks = ON;
SELECT @@unique_checks;
@@unique_checks
1
SET @@unique_checks = OF;
ERROR 42000: Variable 'unique_checks' can't be set to the value of 'OF'
SELECT @@unique_checks;
@@unique_checks
1
SET @@unique_checks = OFF;
SELECT @@unique_checks;
@@unique_checks
0
SET @@unique_checks = @unique_checks_saved;
# Checking sql_buffer_result...
SET @sql_buffer_result_saved = @@sql_buffer_result;
SET @@sql_buffer_result = ON;
SELECT @@sql_buffer_result;
@@sql_buffer_result
1
SET @@sql_buffer_result = OF;
ERROR 42000: Variable 'sql_buffer_result' can't be set to the value of 'OF'
SELECT @@sql_buffer_result;
@@sql_buffer_result
1
SET @@sql_buffer_result = OFF;
SELECT @@sql_buffer_result;
@@sql_buffer_result
0
SET @@sql_buffer_result = @sql_buffer_result_saved;
# Checking sql_quote_show_create...
SET @sql_quote_show_create_saved = @@sql_quote_show_create;
SET @@sql_quote_show_create = ON;
SELECT @@sql_quote_show_create;
@@sql_quote_show_create
1
SET @@sql_quote_show_create = OF;
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'OF'
SELECT @@sql_quote_show_create;
@@sql_quote_show_create
1
SET @@sql_quote_show_create = OFF;
SELECT @@sql_quote_show_create;
@@sql_quote_show_create
0
SET @@sql_quote_show_create = @sql_quote_show_create_saved;
# End of Bug#34828.
# Make sure we can manipulate with autocommit in the # Make sure we can manipulate with autocommit in the
# along with other variables. # along with other variables.
drop table if exists t1; drop table if exists t1;

View File

@ -3,18 +3,18 @@ call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired
DROP TABLE if exists t1,t2,t3,t4,t5,t6; DROP TABLE if exists t1,t2,t3,t4,t5,t6;
SET storage_engine=ARCHIVE; SET storage_engine=ARCHIVE;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
) ENGINE=archive; ) ENGINE=archive;
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period FROM t1; select period_ FROM t1;
period period_
9410 9410
select * FROM t1; select * FROM t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
select t1.* FROM t1; select t1.* FROM t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
CREATE TABLE t2 ( CREATE TABLE t2 (
auto int, auto int,

View File

@ -15,13 +15,13 @@ SET storage_engine=ARCHIVE;
let $MYSQLD_DATADIR= `SELECT @@datadir`; let $MYSQLD_DATADIR= `SELECT @@datadir`;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
) ENGINE=archive; ) ENGINE=archive;
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period FROM t1; select period_ FROM t1;
select * FROM t1; select * FROM t1;
select t1.* FROM t1; select t1.* FROM t1;

View File

@ -0,0 +1,12 @@
##############################################################################
#
# List the test cases that are to be disabled temporarily.
#
# Separate the test case name and the comment with ':'.
#
# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
#
# Do not use any TAB characters for whitespace.
#
##############################################################################
archive-big: versioning branch

View File

@ -1,16 +1,16 @@
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
drop table if exists t1,t2; drop table if exists t1,t2;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
) ENGINE=blackhole; ) ENGINE=blackhole;
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
period period_
select * from t1; select * from t1;
Period Varor_period Period_ Varor_period
select t1.* from t1; select t1.* from t1;
Period Varor_period Period_ Varor_period
CREATE TABLE t2 ( CREATE TABLE t2 (
auto int NOT NULL auto_increment, auto int NOT NULL auto_increment,
fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL, fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL,

View File

@ -3,18 +3,18 @@ call mtr.add_suppression("Table 'test_repair_table4' is marked as crashed and sh
call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired"); call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired");
drop table if exists t1,t2,t3,t4; drop table if exists t1,t2,t3,t4;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
) ENGINE = CSV; ) ENGINE = CSV;
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
period period_
9410 9410
select * from t1; select * from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
select t1.* from t1; select t1.* from t1;
Period Varor_period Period_ Varor_period
9410 9412 9410 9412
CREATE TABLE t2 ( CREATE TABLE t2 (
auto int not null, auto int not null,
@ -4919,12 +4919,12 @@ DROP TABLE t1;
ALTER TABLE t2 RENAME t1; ALTER TABLE t2 RENAME t1;
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
) ENGINE = CSV; ) ENGINE = CSV;
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
period period_
9410 9410
drop table if exists t1,t2,t3,t4; drop table if exists t1,t2,t3,t4;
Warnings: Warnings:

View File

@ -17,13 +17,13 @@ drop table if exists t1,t2,t3,t4;
--enable_warnings --enable_warnings
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
) ENGINE = CSV; ) ENGINE = CSV;
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
select * from t1; select * from t1;
select t1.* from t1; select t1.* from t1;
@ -1308,13 +1308,13 @@ ALTER TABLE t2 RENAME t1;
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Period_ smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
) ENGINE = CSV; ) ENGINE = CSV;
INSERT INTO t1 VALUES (9410,9412); INSERT INTO t1 VALUES (9410,9412);
select period from t1; select period_ from t1;
drop table if exists t1,t2,t3,t4; drop table if exists t1,t2,t3,t4;

View File

@ -12,4 +12,3 @@
innodb_scrub : MDEV-8139 scrubbing does not work reliably innodb_scrub : MDEV-8139 scrubbing does not work reliably
innodb_scrub_background : MDEV-8139 scrubbing does not work reliably innodb_scrub_background : MDEV-8139 scrubbing does not work reliably

View File

@ -15,6 +15,7 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
NAME NAME
mysql/innodb_table_stats mysql/innodb_table_stats
mysql/innodb_index_stats mysql/innodb_index_stats
mysql/vtmd_template
test/t1 test/t1
test/t2 test/t2
innodb_system innodb_system
@ -33,12 +34,13 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
NAME NAME
mysql/innodb_table_stats mysql/innodb_table_stats
mysql/innodb_index_stats mysql/innodb_index_stats
test/t2 mysql/vtmd_template
test/t3 test/t3
innodb_system innodb_system
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0; SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
NAME NAME
test/t1 test/t1
test/t2
# t1 yes on expecting NOT FOUND # t1 yes on expecting NOT FOUND
NOT FOUND /foobarsecret/ in t1.ibd NOT FOUND /foobarsecret/ in t1.ibd
# t2 ... default expecting FOUND # t2 ... default expecting FOUND
@ -57,6 +59,7 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
NAME NAME
mysql/innodb_table_stats mysql/innodb_table_stats
mysql/innodb_index_stats mysql/innodb_index_stats
mysql/vtmd_template
test/t1 test/t1
test/t2 test/t2
innodb_system innodb_system

View File

@ -38,6 +38,7 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
NAME NAME
mysql/innodb_table_stats mysql/innodb_table_stats
mysql/innodb_index_stats mysql/innodb_index_stats
mysql/vtmd_template
test/t1 test/t1
test/t2 test/t2
innodb_system innodb_system

View File

@ -8,13 +8,13 @@ if (`select count(*) = 0 from information_schema.plugins
set global innodb_encrypt_tables=ON; set global innodb_encrypt_tables=ON;
show variables like 'innodb_encrypt%'; show variables like 'innodb_encrypt%';
let $wait_condition= select count(*) = 3 from information_schema.innodb_tablespaces_encryption where current_key_version=1; let $wait_condition= select count(*) = 4 from information_schema.innodb_tablespaces_encryption where current_key_version=1;
--source include/wait_condition.inc --source include/wait_condition.inc
select count(*) from information_schema.innodb_tablespaces_encryption where current_key_version <> 1; select count(*) from information_schema.innodb_tablespaces_encryption where current_key_version <> 1;
set global debug_key_management_version=10; set global debug_key_management_version=10;
let $wait_condition= select count(*) = 3 from information_schema.innodb_tablespaces_encryption where current_key_version=10; let $wait_condition= select count(*) = 4 from information_schema.innodb_tablespaces_encryption where current_key_version=10;
--source include/wait_condition.inc --source include/wait_condition.inc
select count(*) from information_schema.innodb_tablespaces_encryption where current_key_version <> 10; select count(*) from information_schema.innodb_tablespaces_encryption where current_key_version <> 10;

View File

@ -27,7 +27,7 @@ insert t3 values (repeat('dummysecret', 12));
--echo # Wait max 10 min for key encryption threads to encrypt all spaces --echo # Wait max 10 min for key encryption threads to encrypt all spaces
--let $wait_timeout= 600 --let $wait_timeout= 600
--let $wait_condition=SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 --let $wait_condition=SELECT COUNT(*) <= 2 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0
--source include/wait_condition.inc --source include/wait_condition.inc
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0; SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;

View File

@ -78,7 +78,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke TRIGGER on *.* from test_noprivs@localhost; revoke TRIGGER on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT on priv_db.t1 to test_yesprivs@localhost; grant SELECT on priv_db.t1 to test_yesprivs@localhost;
@ -168,7 +168,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke UPDATE on *.* from test_noprivs@localhost; revoke UPDATE on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost; grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
@ -183,7 +183,7 @@ test_noprivs@localhost
use priv_db; use priv_db;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
select f1 from t1 order by f1; select f1 from t1 order by f1;
f1 f1
insert 3.5.3.2-no insert 3.5.3.2-no
@ -248,7 +248,7 @@ connection no_privs_424b;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.* TO 'test_noprivs'@'localhost'
use priv_db; use priv_db;
create trigger trg4b_1 before UPDATE on t1 for each row create trigger trg4b_1 before UPDATE on t1 for each row
set new.f1 = 'trig 3.5.3.7-1b'; set new.f1 = 'trig 3.5.3.7-1b';
@ -329,7 +329,7 @@ connection no_privs_424c;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
use priv_db; use priv_db;
create trigger trg4c_1 before INSERT on t1 for each row create trigger trg4c_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.7-1c'; set new.f1 = 'trig 3.5.3.7-1c';
@ -441,7 +441,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke SELECT on *.* from test_noprivs@localhost; revoke SELECT on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER, SELECT on *.* to test_yesprivs@localhost; grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
@ -457,7 +457,7 @@ test_noprivs@localhost
use priv_db; use priv_db;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
create trigger trg5a_1 before INSERT on t1 for each row create trigger trg5a_1 before INSERT on t1 for each row
set @test_var = new.f1; set @test_var = new.f1;
connection default; connection default;
@ -503,7 +503,7 @@ revoke SELECT on priv_db.* from test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.* TO 'test_noprivs'@'localhost'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT on priv_db.* to test_yesprivs@localhost; grant SELECT on priv_db.* to test_yesprivs@localhost;
@ -518,7 +518,7 @@ connection no_privs_425b;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.* TO 'test_noprivs'@'localhost'
use priv_db; use priv_db;
create trigger trg5b_1 before UPDATE on t1 for each row create trigger trg5b_1 before UPDATE on t1 for each row
set @test_var= new.f1; set @test_var= new.f1;
@ -565,7 +565,7 @@ revoke SELECT on priv_db.t1 from test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT on priv_db.t1 to test_yesprivs@localhost; grant SELECT on priv_db.t1 to test_yesprivs@localhost;
@ -580,7 +580,7 @@ connection no_privs_425c;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
use priv_db; use priv_db;
create trigger trg5c_1 before INSERT on t1 for each row create trigger trg5c_1 before INSERT on t1 for each row
set @test_var= new.f1; set @test_var= new.f1;

View File

@ -603,7 +603,7 @@ trig 1_1-yes
revoke TRIGGER on *.* from test_yesprivs@localhost; revoke TRIGGER on *.* from test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
disconnect yes_privs; disconnect yes_privs;
connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
select current_user; select current_user;
@ -656,7 +656,7 @@ root@localhost
grant TRIGGER on priv_db.* to test_yesprivs@localhost; grant TRIGGER on priv_db.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost'
trigger privilege on db level for create: trigger privilege on db level for create:
@ -929,7 +929,7 @@ grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT ON `priv1_db`.* TO 'test_yesprivs'@'localhost' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, DELETE VERSIONING ROWS ON `priv1_db`.* TO 'test_yesprivs'@'localhost'
GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost'
GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost'

View File

@ -3551,11 +3551,11 @@ CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'or REPLACE AS Select * from tb2 my_table' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'or REPLACE AS Select * from tb2 my_table' at line 1
CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select * CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select *
from tb2 my_table limit 50; from tb2 my_table limit 50;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CASCADED CHECK OPTION AS Select * ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WITH CASCADED CHECK OPTION AS Select *
from tb2 my_table limit 50' at line 1 from tb2 my_table limit 50' at line 1
CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select * CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50; from tb2 my_table limit 50;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LOCAL CHECK OPTION AS Select * ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50' at line 1 from tb2 my_table limit 50' at line 1
SELECT * FROM tb2 my_table CREATE VIEW As v1; SELECT * FROM tb2 my_table CREATE VIEW As v1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CREATE VIEW As v1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CREATE VIEW As v1' at line 1
@ -3585,7 +3585,7 @@ FROM test.tb2 my_table CHECK OPTION WITH CASCADED;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK OPTION WITH CASCADED' at line 2 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK OPTION WITH CASCADED' at line 2
CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table; AS SELECT F59, F60 FROM test.tb2 my_table;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CASCADED CHECK OPTION ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table' at line 1 AS SELECT F59, F60 FROM test.tb2 my_table' at line 1
CREATE OR REPLACE AS SELECT F59, F60 CREATE OR REPLACE AS SELECT F59, F60
FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION; FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION;
@ -3614,7 +3614,7 @@ FROM test.tb2 my_table CHECK OPTION WITH LOCAL;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK OPTION WITH LOCAL' at line 2 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK OPTION WITH LOCAL' at line 2
CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table; AS SELECT F59, F60 FROM test.tb2 my_table;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CASCADED CHECK OPTION ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table' at line 1 AS SELECT F59, F60 FROM test.tb2 my_table' at line 1
CREATE OR REPLACE AS SELECT F59, F60 CREATE OR REPLACE AS SELECT F59, F60
FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION; FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION;

View File

@ -140,6 +140,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
'testuser3'@'localhost' def db_datadict CREATE TEMPORARY TABLES NO 'testuser3'@'localhost' def db_datadict CREATE TEMPORARY TABLES NO
'testuser3'@'localhost' def db_datadict CREATE VIEW NO 'testuser3'@'localhost' def db_datadict CREATE VIEW NO
'testuser3'@'localhost' def db_datadict DELETE NO 'testuser3'@'localhost' def db_datadict DELETE NO
'testuser3'@'localhost' def db_datadict DELETE VERSIONING ROWS NO
'testuser3'@'localhost' def db_datadict DROP NO 'testuser3'@'localhost' def db_datadict DROP NO
'testuser3'@'localhost' def db_datadict EVENT NO 'testuser3'@'localhost' def db_datadict EVENT NO
'testuser3'@'localhost' def db_datadict EXECUTE NO 'testuser3'@'localhost' def db_datadict EXECUTE NO

View File

@ -106,6 +106,7 @@ table_catalog table_schema table_name column_name
Warnings: Warnings:
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
############################################################################### ###############################################################################
# Testcase 3.2.6.2 + 3.2.6.3: INFORMATION_SCHEMA.COLUMNS accessible information # Testcase 3.2.6.2 + 3.2.6.3: INFORMATION_SCHEMA.COLUMNS accessible information
############################################################################### ###############################################################################

View File

@ -143,6 +143,7 @@ def mysql PRIMARY def mysql time_zone_transition_type Time_zone_id
def mysql PRIMARY def mysql time_zone_transition_type Transition_type_id def mysql PRIMARY def mysql time_zone_transition_type Transition_type_id
def mysql PRIMARY def mysql user Host def mysql PRIMARY def mysql user Host
def mysql PRIMARY def mysql user User def mysql PRIMARY def mysql user User
def mysql PRIMARY def mysql vtmd_template end
######################################################################################## ########################################################################################
# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information # Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information
######################################################################################## ########################################################################################

View File

@ -68,6 +68,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE
''@'%' def test CREATE ROUTINE ''@'%' def test CREATE ROUTINE
''@'%' def test EVENT ''@'%' def test EVENT
''@'%' def test TRIGGER ''@'%' def test TRIGGER
''@'%' def test DELETE VERSIONING ROWS
''@'%' def test\_% SELECT ''@'%' def test\_% SELECT
''@'%' def test\_% INSERT ''@'%' def test\_% INSERT
''@'%' def test\_% UPDATE ''@'%' def test\_% UPDATE
@ -84,6 +85,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE
''@'%' def test\_% CREATE ROUTINE ''@'%' def test\_% CREATE ROUTINE
''@'%' def test\_% EVENT ''@'%' def test\_% EVENT
''@'%' def test\_% TRIGGER ''@'%' def test\_% TRIGGER
''@'%' def test\_% DELETE VERSIONING ROWS
############################################################################### ###############################################################################
# Testcase 3.2.15.2-3.2.15.4 INFORMATION_SCHEMA.SCHEMA_PRIVILEGES accessibility # Testcase 3.2.15.2-3.2.15.4 INFORMATION_SCHEMA.SCHEMA_PRIVILEGES accessibility
############################################################################### ###############################################################################

View File

@ -16,6 +16,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
''@'%' def test CREATE TEMPORARY TABLES NO ''@'%' def test CREATE TEMPORARY TABLES NO
''@'%' def test CREATE VIEW NO ''@'%' def test CREATE VIEW NO
''@'%' def test DELETE NO ''@'%' def test DELETE NO
''@'%' def test DELETE VERSIONING ROWS NO
''@'%' def test DROP NO ''@'%' def test DROP NO
''@'%' def test EVENT NO ''@'%' def test EVENT NO
''@'%' def test INDEX NO ''@'%' def test INDEX NO

View File

@ -154,6 +154,7 @@ def mysql user mysql PRIMARY
Warnings: Warnings:
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB' Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
#################################################################################### ####################################################################################
# Testcase 3.2.14.2 + 3.2.14.3: INFORMATION_SCHEMA.STATISTICS accessible information # Testcase 3.2.14.2 + 3.2.14.3: INFORMATION_SCHEMA.STATISTICS accessible information
#################################################################################### ####################################################################################

View File

@ -79,6 +79,8 @@ def mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL
def mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A #CARD# NULL NULL BTREE def mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A #CARD# NULL NULL BTREE
def mysql user 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE def mysql user 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE def mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
def mysql vtmd_template 1 mysql archive_name 1 archive_name A #CARD# NULL NULL YES BTREE
def mysql vtmd_template 0 mysql PRIMARY 1 end A #CARD# NULL NULL BTREE
connect testuser1,localhost,testuser1,,db_datadict; connect testuser1,localhost,testuser1,,db_datadict;
SELECT * FROM information_schema.statistics SELECT * FROM information_schema.statistics
WHERE table_schema = 'mysql' WHERE table_schema = 'mysql'

View File

@ -88,6 +88,7 @@ def mysql PRIMARY mysql time_zone_name
def mysql PRIMARY mysql time_zone_transition def mysql PRIMARY mysql time_zone_transition
def mysql PRIMARY mysql time_zone_transition_type def mysql PRIMARY mysql time_zone_transition_type
def mysql PRIMARY mysql user def mysql PRIMARY mysql user
def mysql PRIMARY mysql vtmd_template
######################################################################################### #########################################################################################
# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.TABLE_CONSTRAINTS accessible information # Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.TABLE_CONSTRAINTS accessible information
######################################################################################### #########################################################################################

View File

@ -38,6 +38,7 @@ def mysql PRIMARY mysql time_zone_name PRIMARY KEY
def mysql PRIMARY mysql time_zone_transition PRIMARY KEY def mysql PRIMARY mysql time_zone_transition PRIMARY KEY
def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY
def mysql PRIMARY mysql user PRIMARY KEY def mysql PRIMARY mysql user PRIMARY KEY
def mysql PRIMARY mysql vtmd_template PRIMARY KEY
connect testuser1,localhost,testuser1,,db_datadict; connect testuser1,localhost,testuser1,,db_datadict;
SELECT * FROM information_schema.table_constraints SELECT * FROM information_schema.table_constraints
WHERE table_schema = 'mysql' WHERE table_schema = 'mysql'

View File

@ -96,6 +96,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser2'@'localhost' def db_datadict tb1 CREATE YES 'testuser2'@'localhost' def db_datadict tb1 CREATE YES
'testuser2'@'localhost' def db_datadict tb1 CREATE VIEW YES 'testuser2'@'localhost' def db_datadict tb1 CREATE VIEW YES
'testuser2'@'localhost' def db_datadict tb1 DELETE YES 'testuser2'@'localhost' def db_datadict tb1 DELETE YES
'testuser2'@'localhost' def db_datadict tb1 DELETE VERSIONING ROWS YES
'testuser2'@'localhost' def db_datadict tb1 DROP YES 'testuser2'@'localhost' def db_datadict tb1 DROP YES
'testuser2'@'localhost' def db_datadict tb1 INDEX YES 'testuser2'@'localhost' def db_datadict tb1 INDEX YES
'testuser2'@'localhost' def db_datadict tb1 INSERT YES 'testuser2'@'localhost' def db_datadict tb1 INSERT YES
@ -131,6 +132,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser2'@'localhost' def db_datadict tb1 CREATE YES 'testuser2'@'localhost' def db_datadict tb1 CREATE YES
'testuser2'@'localhost' def db_datadict tb1 CREATE VIEW YES 'testuser2'@'localhost' def db_datadict tb1 CREATE VIEW YES
'testuser2'@'localhost' def db_datadict tb1 DELETE YES 'testuser2'@'localhost' def db_datadict tb1 DELETE YES
'testuser2'@'localhost' def db_datadict tb1 DELETE VERSIONING ROWS YES
'testuser2'@'localhost' def db_datadict tb1 DROP YES 'testuser2'@'localhost' def db_datadict tb1 DROP YES
'testuser2'@'localhost' def db_datadict tb1 INDEX YES 'testuser2'@'localhost' def db_datadict tb1 INDEX YES
'testuser2'@'localhost' def db_datadict tb1 INSERT YES 'testuser2'@'localhost' def db_datadict tb1 INSERT YES
@ -184,6 +186,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser1'@'localhost' def test t1_table CREATE NO 'testuser1'@'localhost' def test t1_table CREATE NO
'testuser1'@'localhost' def test t1_table CREATE VIEW NO 'testuser1'@'localhost' def test t1_table CREATE VIEW NO
'testuser1'@'localhost' def test t1_table DELETE NO 'testuser1'@'localhost' def test t1_table DELETE NO
'testuser1'@'localhost' def test t1_table DELETE VERSIONING ROWS NO
'testuser1'@'localhost' def test t1_table DROP NO 'testuser1'@'localhost' def test t1_table DROP NO
'testuser1'@'localhost' def test t1_table INDEX NO 'testuser1'@'localhost' def test t1_table INDEX NO
'testuser1'@'localhost' def test t1_table INSERT NO 'testuser1'@'localhost' def test t1_table INSERT NO
@ -196,6 +199,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
'testuser1'@'localhost' def test t1_view CREATE NO 'testuser1'@'localhost' def test t1_view CREATE NO
'testuser1'@'localhost' def test t1_view CREATE VIEW NO 'testuser1'@'localhost' def test t1_view CREATE VIEW NO
'testuser1'@'localhost' def test t1_view DELETE NO 'testuser1'@'localhost' def test t1_view DELETE NO
'testuser1'@'localhost' def test t1_view DELETE VERSIONING ROWS NO
'testuser1'@'localhost' def test t1_view DROP NO 'testuser1'@'localhost' def test t1_view DROP NO
'testuser1'@'localhost' def test t1_view INDEX NO 'testuser1'@'localhost' def test t1_view INDEX NO
'testuser1'@'localhost' def test t1_view INSERT NO 'testuser1'@'localhost' def test t1_view INSERT NO

View File

@ -700,6 +700,29 @@ CREATE_OPTIONS #CO#
TABLE_COMMENT #TC# TABLE_COMMENT #TC#
user_comment Users and global privileges user_comment Users and global privileges
Separator ----------------------------------------------------- Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME vtmd_template
TABLE_TYPE BASE TABLE
ENGINE InnoDB
VERSION 10
ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_bin
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
DROP USER testuser1@localhost; DROP USER testuser1@localhost;
CREATE USER testuser1@localhost; CREATE USER testuser1@localhost;
GRANT SELECT ON test1.* TO testuser1@localhost; GRANT SELECT ON test1.* TO testuser1@localhost;

View File

@ -144,7 +144,7 @@ connect testuser2, localhost, testuser2, , db_datadict;
SHOW GRANTS FOR 'testuser2'@'localhost'; SHOW GRANTS FOR 'testuser2'@'localhost';
Grants for testuser2@localhost Grants for testuser2@localhost
GRANT USAGE ON *.* TO 'testuser2'@'localhost' GRANT USAGE ON *.* TO 'testuser2'@'localhost'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `db_datadict`.`t1` TO 'testuser2'@'localhost' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, DELETE VERSIONING ROWS ON `db_datadict`.`t1` TO 'testuser2'@'localhost'
# No TRIGGER Privilege --> no result for query # No TRIGGER Privilege --> no result for query
SELECT * FROM information_schema.triggers SELECT * FROM information_schema.triggers
WHERE trigger_name = 'trg1'; WHERE trigger_name = 'trg1';

View File

@ -119,6 +119,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -165,6 +166,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -211,6 +213,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -281,6 +284,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -327,6 +331,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -373,6 +378,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -429,6 +435,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -475,6 +482,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -521,6 +529,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -599,6 +608,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -645,6 +655,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -691,6 +702,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -761,6 +773,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -807,6 +820,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -853,6 +867,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -909,6 +924,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -955,6 +971,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1001,6 +1018,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1109,6 +1127,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1155,6 +1174,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1201,6 +1221,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1304,6 +1325,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1350,6 +1372,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1396,6 +1419,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1452,6 +1476,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1498,6 +1523,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1544,6 +1570,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1607,6 +1634,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1653,6 +1681,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1699,6 +1728,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1777,6 +1807,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1823,6 +1854,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer
@ -1869,6 +1901,7 @@ Create_user_priv N
Event_priv N Event_priv N
Trigger_priv N Trigger_priv N
Create_tablespace_priv N Create_tablespace_priv N
Delete_versioning_rows_priv N
ssl_type ssl_type
ssl_cipher ssl_cipher
x509_issuer x509_issuer

View File

@ -78,7 +78,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke TRIGGER on *.* from test_noprivs@localhost; revoke TRIGGER on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT on priv_db.t1 to test_yesprivs@localhost; grant SELECT on priv_db.t1 to test_yesprivs@localhost;
@ -168,7 +168,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke UPDATE on *.* from test_noprivs@localhost; revoke UPDATE on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost; grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
@ -183,7 +183,7 @@ test_noprivs@localhost
use priv_db; use priv_db;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
select f1 from t1 order by f1; select f1 from t1 order by f1;
f1 f1
insert 3.5.3.2-no insert 3.5.3.2-no
@ -248,7 +248,7 @@ connection no_privs_424b;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.* TO 'test_noprivs'@'localhost'
use priv_db; use priv_db;
create trigger trg4b_1 before UPDATE on t1 for each row create trigger trg4b_1 before UPDATE on t1 for each row
set new.f1 = 'trig 3.5.3.7-1b'; set new.f1 = 'trig 3.5.3.7-1b';
@ -329,7 +329,7 @@ connection no_privs_424c;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
use priv_db; use priv_db;
create trigger trg4c_1 before INSERT on t1 for each row create trigger trg4c_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.7-1c'; set new.f1 = 'trig 3.5.3.7-1c';
@ -441,7 +441,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke SELECT on *.* from test_noprivs@localhost; revoke SELECT on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER, SELECT on *.* to test_yesprivs@localhost; grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
@ -457,7 +457,7 @@ test_noprivs@localhost
use priv_db; use priv_db;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
create trigger trg5a_1 before INSERT on t1 for each row create trigger trg5a_1 before INSERT on t1 for each row
set @test_var = new.f1; set @test_var = new.f1;
connection default; connection default;
@ -503,7 +503,7 @@ revoke SELECT on priv_db.* from test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.* TO 'test_noprivs'@'localhost'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT on priv_db.* to test_yesprivs@localhost; grant SELECT on priv_db.* to test_yesprivs@localhost;
@ -518,7 +518,7 @@ connection no_privs_425b;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.* TO 'test_noprivs'@'localhost'
use priv_db; use priv_db;
create trigger trg5b_1 before UPDATE on t1 for each row create trigger trg5b_1 before UPDATE on t1 for each row
set @test_var= new.f1; set @test_var= new.f1;
@ -565,7 +565,7 @@ revoke SELECT on priv_db.t1 from test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT on priv_db.t1 to test_yesprivs@localhost; grant SELECT on priv_db.t1 to test_yesprivs@localhost;
@ -580,7 +580,7 @@ connection no_privs_425c;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
use priv_db; use priv_db;
create trigger trg5c_1 before INSERT on t1 for each row create trigger trg5c_1 before INSERT on t1 for each row
set @test_var= new.f1; set @test_var= new.f1;

View File

@ -604,7 +604,7 @@ trig 1_1-yes
revoke TRIGGER on *.* from test_yesprivs@localhost; revoke TRIGGER on *.* from test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
disconnect yes_privs; disconnect yes_privs;
connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
select current_user; select current_user;
@ -657,7 +657,7 @@ root@localhost
grant TRIGGER on priv_db.* to test_yesprivs@localhost; grant TRIGGER on priv_db.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost'
trigger privilege on db level for create: trigger privilege on db level for create:
@ -930,7 +930,7 @@ grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT ON `priv1_db`.* TO 'test_yesprivs'@'localhost' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, DELETE VERSIONING ROWS ON `priv1_db`.* TO 'test_yesprivs'@'localhost'
GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost'
GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost'

View File

@ -3552,11 +3552,11 @@ CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'or REPLACE AS Select * from tb2 my_table' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'or REPLACE AS Select * from tb2 my_table' at line 1
CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select * CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select *
from tb2 my_table limit 50; from tb2 my_table limit 50;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CASCADED CHECK OPTION AS Select * ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WITH CASCADED CHECK OPTION AS Select *
from tb2 my_table limit 50' at line 1 from tb2 my_table limit 50' at line 1
CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select * CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50; from tb2 my_table limit 50;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LOCAL CHECK OPTION AS Select * ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50' at line 1 from tb2 my_table limit 50' at line 1
SELECT * FROM tb2 my_table CREATE VIEW As v1; SELECT * FROM tb2 my_table CREATE VIEW As v1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CREATE VIEW As v1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CREATE VIEW As v1' at line 1
@ -3586,7 +3586,7 @@ FROM test.tb2 my_table CHECK OPTION WITH CASCADED;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK OPTION WITH CASCADED' at line 2 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK OPTION WITH CASCADED' at line 2
CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table; AS SELECT F59, F60 FROM test.tb2 my_table;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CASCADED CHECK OPTION ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table' at line 1 AS SELECT F59, F60 FROM test.tb2 my_table' at line 1
CREATE OR REPLACE AS SELECT F59, F60 CREATE OR REPLACE AS SELECT F59, F60
FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION; FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION;
@ -3615,7 +3615,7 @@ FROM test.tb2 my_table CHECK OPTION WITH LOCAL;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK OPTION WITH LOCAL' at line 2 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK OPTION WITH LOCAL' at line 2
CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table; AS SELECT F59, F60 FROM test.tb2 my_table;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CASCADED CHECK OPTION ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table' at line 1 AS SELECT F59, F60 FROM test.tb2 my_table' at line 1
CREATE OR REPLACE AS SELECT F59, F60 CREATE OR REPLACE AS SELECT F59, F60
FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION; FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION;

View File

@ -78,7 +78,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke TRIGGER on *.* from test_noprivs@localhost; revoke TRIGGER on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT on priv_db.t1 to test_yesprivs@localhost; grant SELECT on priv_db.t1 to test_yesprivs@localhost;
@ -168,7 +168,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke UPDATE on *.* from test_noprivs@localhost; revoke UPDATE on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost; grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
@ -183,7 +183,7 @@ test_noprivs@localhost
use priv_db; use priv_db;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
select f1 from t1 order by f1; select f1 from t1 order by f1;
f1 f1
insert 3.5.3.2-no insert 3.5.3.2-no
@ -248,7 +248,7 @@ connection no_privs_424b;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.* TO 'test_noprivs'@'localhost'
use priv_db; use priv_db;
create trigger trg4b_1 before UPDATE on t1 for each row create trigger trg4b_1 before UPDATE on t1 for each row
set new.f1 = 'trig 3.5.3.7-1b'; set new.f1 = 'trig 3.5.3.7-1b';
@ -329,7 +329,7 @@ connection no_privs_424c;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
use priv_db; use priv_db;
create trigger trg4c_1 before INSERT on t1 for each row create trigger trg4c_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.7-1c'; set new.f1 = 'trig 3.5.3.7-1c';
@ -441,7 +441,7 @@ grant ALL on *.* to test_noprivs@localhost;
revoke SELECT on *.* from test_noprivs@localhost; revoke SELECT on *.* from test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER, SELECT on *.* to test_yesprivs@localhost; grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
@ -457,7 +457,7 @@ test_noprivs@localhost
use priv_db; use priv_db;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
create trigger trg5a_1 before INSERT on t1 for each row create trigger trg5a_1 before INSERT on t1 for each row
set @test_var = new.f1; set @test_var = new.f1;
connection default; connection default;
@ -503,7 +503,7 @@ revoke SELECT on priv_db.* from test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.* TO 'test_noprivs'@'localhost'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT on priv_db.* to test_yesprivs@localhost; grant SELECT on priv_db.* to test_yesprivs@localhost;
@ -518,7 +518,7 @@ connection no_privs_425b;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.* TO 'test_noprivs'@'localhost'
use priv_db; use priv_db;
create trigger trg5b_1 before UPDATE on t1 for each row create trigger trg5b_1 before UPDATE on t1 for each row
set @test_var= new.f1; set @test_var= new.f1;
@ -565,7 +565,7 @@ revoke SELECT on priv_db.t1 from test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT on priv_db.t1 to test_yesprivs@localhost; grant SELECT on priv_db.t1 to test_yesprivs@localhost;
@ -580,7 +580,7 @@ connection no_privs_425c;
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE VERSIONING ROWS ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
use priv_db; use priv_db;
create trigger trg5c_1 before INSERT on t1 for each row create trigger trg5c_1 before INSERT on t1 for each row
set @test_var= new.f1; set @test_var= new.f1;

View File

@ -604,7 +604,7 @@ trig 1_1-yes
revoke TRIGGER on *.* from test_yesprivs@localhost; revoke TRIGGER on *.* from test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
disconnect yes_privs; disconnect yes_privs;
connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
select current_user; select current_user;
@ -657,7 +657,7 @@ root@localhost
grant TRIGGER on priv_db.* to test_yesprivs@localhost; grant TRIGGER on priv_db.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE VERSIONING ROWS ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost'
trigger privilege on db level for create: trigger privilege on db level for create:
@ -930,7 +930,7 @@ grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT ON `priv1_db`.* TO 'test_yesprivs'@'localhost' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, DELETE VERSIONING ROWS ON `priv1_db`.* TO 'test_yesprivs'@'localhost'
GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost'
GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost'

View File

@ -4054,11 +4054,11 @@ CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'or REPLACE AS Select * from tb2 my_table' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'or REPLACE AS Select * from tb2 my_table' at line 1
CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select * CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select *
from tb2 my_table limit 50; from tb2 my_table limit 50;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CASCADED CHECK OPTION AS Select * ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WITH CASCADED CHECK OPTION AS Select *
from tb2 my_table limit 50' at line 1 from tb2 my_table limit 50' at line 1
CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select * CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50; from tb2 my_table limit 50;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LOCAL CHECK OPTION AS Select * ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50' at line 1 from tb2 my_table limit 50' at line 1
SELECT * FROM tb2 my_table CREATE VIEW As v1; SELECT * FROM tb2 my_table CREATE VIEW As v1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CREATE VIEW As v1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CREATE VIEW As v1' at line 1
@ -4088,7 +4088,7 @@ FROM test.tb2 my_table CHECK OPTION WITH CASCADED;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK OPTION WITH CASCADED' at line 2 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK OPTION WITH CASCADED' at line 2
CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table; AS SELECT F59, F60 FROM test.tb2 my_table;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CASCADED CHECK OPTION ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table' at line 1 AS SELECT F59, F60 FROM test.tb2 my_table' at line 1
CREATE OR REPLACE AS SELECT F59, F60 CREATE OR REPLACE AS SELECT F59, F60
FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION; FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION;
@ -4117,7 +4117,7 @@ FROM test.tb2 my_table CHECK OPTION WITH LOCAL;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK OPTION WITH LOCAL' at line 2 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK OPTION WITH LOCAL' at line 2
CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table; AS SELECT F59, F60 FROM test.tb2 my_table;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CASCADED CHECK OPTION ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table' at line 1 AS SELECT F59, F60 FROM test.tb2 my_table' at line 1
CREATE OR REPLACE AS SELECT F59, F60 CREATE OR REPLACE AS SELECT F59, F60
FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION; FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION;

View File

@ -2807,7 +2807,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
SELECT * from t1 where f2=f1' at line 1 SELECT * from t1 where f2=f1' at line 1
CREATE PROCEDURE with() CREATE PROCEDURE with()
SELECT * from t1 where f2=f1; SELECT * from t1 where f2=f1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '() ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'with()
SELECT * from t1 where f2=f1' at line 1 SELECT * from t1 where f2=f1' at line 1
CREATE PROCEDURE write() CREATE PROCEDURE write()
SELECT * from t1 where f2=f1; SELECT * from t1 where f2=f1;
@ -9222,7 +9222,7 @@ CREATE PROCEDURE sp1()
BEGIN BEGIN
declare with char; declare with char;
END// END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'char; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'with char;
END' at line 3 END' at line 3
DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp1;
Warnings: Warnings:
@ -11574,9 +11574,8 @@ BEGIN
declare with condition for sqlstate '02000'; declare with condition for sqlstate '02000';
declare exit handler for with set @var2 = 1; declare exit handler for with set @var2 = 1;
END// END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'condition for sqlstate '02000'; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'with condition for sqlstate '02000';
declare exit handler for with set @var2 = 1; declare exit handler for with set @var2 = 1' at line 3
END' at line 3
DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp1;
Warnings: Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist Note 1305 PROCEDURE db_storedproc.sp1 does not exist
@ -13680,7 +13679,7 @@ CREATE PROCEDURE sp1( )
BEGIN BEGIN
declare with handler for sqlstate '02000' set @var2 = 1; declare with handler for sqlstate '02000' set @var2 = 1;
END// END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'handler for sqlstate '02000' set @var2 = 1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'with handler for sqlstate '02000' set @var2 = 1;
END' at line 3 END' at line 3
DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp1;
Warnings: Warnings:

View File

@ -9,3 +9,6 @@
# Do not use any TAB characters for whitespace. # Do not use any TAB characters for whitespace.
# #
############################################################################## ##############################################################################
wl6501_1: versioning branch
wl6501_crash_3: versioning branch

View File

@ -1,4 +1,5 @@
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/have_xtradb.inc
select * from information_schema.innodb_trx; select * from information_schema.innodb_trx;
select * from information_schema.innodb_locks; select * from information_schema.innodb_locks;

View File

@ -56,7 +56,7 @@ Only MyISAM tables support collections
MySQL has now support for full-text search MySQL has now support for full-text search
Full-text search in MySQL implements vector space model Full-text search in MySQL implements vector space model
select * from t1 where MATCH(a,b) AGAINST ("indexes" IN BOOLEAN MODE WITH QUERY EXPANSION); select * from t1 where MATCH(a,b) AGAINST ("indexes" IN BOOLEAN MODE WITH QUERY EXPANSION);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'QUERY EXPANSION)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WITH QUERY EXPANSION)' at line 1
explain select * from t1 where MATCH(a,b) AGAINST ("collections"); explain select * from t1 where MATCH(a,b) AGAINST ("collections");
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 fulltext a a 0 1 Using where 1 SIMPLE t1 fulltext a a 0 1 Using where

View File

@ -510,7 +510,7 @@ f_charbig VARCHAR(1000)
) )
PARTITION BY RANGE(f_int1) PARTITION BY RANGE(f_int1)
( PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11)); ( PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11));
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# 2.2 Every partition must have the same number of subpartitions. # 2.2 Every partition must have the same number of subpartitions.
# This is a limitation of MySQL 5.1, which could be removed in # This is a limitation of MySQL 5.1, which could be removed in

View File

@ -510,7 +510,7 @@ f_charbig VARCHAR(1000)
) )
PARTITION BY RANGE(f_int1) PARTITION BY RANGE(f_int1)
( PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11)); ( PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11));
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning ERROR HY000: It is only possible to mix RANGE/LIST/SYSTEM_TIME partitioning with HASH/KEY partitioning for subpartitioning
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# 2.2 Every partition must have the same number of subpartitions. # 2.2 Every partition must have the same number of subpartitions.
# This is a limitation of MySQL 5.1, which could be removed in # This is a limitation of MySQL 5.1, which could be removed in

View File

@ -5,7 +5,7 @@ alter table user drop column default_role;
alter table user drop column max_statement_time; alter table user drop column max_statement_time;
flush privileges; flush privileges;
create role test_role; create role test_role;
ERROR HY000: Column count of mysql.user is wrong. Expected 44, found 43. Created with MariaDB MYSQL_VERSION_ID, now running MYSQL_VERSION_ID. Please use mysql_upgrade to fix this error ERROR HY000: Column count of mysql.user is wrong. Expected 45, found 44. Created with MariaDB MYSQL_VERSION_ID, now running MYSQL_VERSION_ID. Please use mysql_upgrade to fix this error
drop role test_role; drop role test_role;
ERROR HY000: Operation DROP ROLE failed for 'test_role' ERROR HY000: Operation DROP ROLE failed for 'test_role'
alter table user add column is_role enum('N', 'Y') default 'N' not null alter table user add column is_role enum('N', 'Y') default 'N' not null
@ -15,7 +15,7 @@ create role test_role;
create user test_user@localhost; create user test_user@localhost;
grant test_role to test_user@localhost; grant test_role to test_user@localhost;
set default role test_role for root@localhost; set default role test_role for root@localhost;
ERROR HY000: Column count of mysql.user is wrong. Expected 45, found 44. Created with MariaDB MYSQL_VERSION_ID, now running MYSQL_VERSION_ID. Please use mysql_upgrade to fix this error ERROR HY000: Column count of mysql.user is wrong. Expected 46, found 45. Created with MariaDB MYSQL_VERSION_ID, now running MYSQL_VERSION_ID. Please use mysql_upgrade to fix this error
drop role test_role; drop role test_role;
drop user test_user@localhost; drop user test_user@localhost;
alter table user add column default_role char(80) binary default '' not null alter table user add column default_role char(80) binary default '' not null

Some files were not shown because too many files have changed in this diff Show More