Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main

into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
parents 76835dba b30fbfd3
......@@ -21,22 +21,6 @@ INCLUDE(win/configure.data)
# Hardcode support for CSV storage engine
SET(WITH_CSV_STORAGE_ENGINE TRUE)
# CMAKE will not allow custom VS7+ configurations. mysqld and libmysqld
# cannot be built at the same time as they require different configurations
IF(EMBEDDED_ONLY)
ADD_DEFINITIONS(-DEMBEDDED_LIBRARY)
# By default, CMake will create Release, Debug, RelWithDebInfo and MinSizeRel
# configurations. The EMBEDDED_ONLY build parameter is necessary because CMake
# doesn't support custom build configurations for VS2005. Since the Debug
# configuration does not work properly with USE_TLS defined
# (see mysys/CMakeLists.txt) the easiest way to debug the Embedded Server is to
# use the RelWithDebInfo configuration without optimizations.
#
# Debug default CXX_FLAGS "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1"
# RelWithDebInfo default CXX_FLAGS "/MD /Zi /O2 /Ob1 /D NDEBUG"
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /Zi /Od /Ob0 /D NDEBUG" CACHE STRING "No Optimization" FORCE)
ENDIF(EMBEDDED_ONLY)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
${CMAKE_SOURCE_DIR}/include/mysql_version.h @ONLY)
......@@ -154,7 +138,9 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
CMAKE_GENERATOR MATCHES "Visual Studio 8")
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE")
IF(WIN32)
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE")
ENDIF(WIN32)
IF(EMBED_MANIFESTS)
# Search for the tools (mt, makecat, signtool) necessary for embedding
......@@ -229,7 +215,7 @@ ADD_SUBDIRECTORY(extra)
ADD_SUBDIRECTORY(storage/heap)
ADD_SUBDIRECTORY(storage/myisam)
ADD_SUBDIRECTORY(storage/myisammrg)
ADD_SUBDIRECTORY(client)
IF(WITH_ARCHIVE_STORAGE_ENGINE)
ADD_SUBDIRECTORY(storage/archive)
ENDIF(WITH_ARCHIVE_STORAGE_ENGINE)
......@@ -248,13 +234,11 @@ ENDIF(WITH_FEDERATED_STORAGE_ENGINE)
IF(WITH_INNOBASE_STORAGE_ENGINE)
ADD_SUBDIRECTORY(storage/innobase)
ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
ADD_SUBDIRECTORY(sql)
ADD_SUBDIRECTORY(server-tools/instance-manager)
ADD_SUBDIRECTORY(libmysql)
IF(EMBEDDED_ONLY)
ADD_SUBDIRECTORY(tests)
IF(WITH_EMBEDDED_SERVER)
ADD_SUBDIRECTORY(libmysqld)
ADD_SUBDIRECTORY(libmysqld/examples)
ELSE(EMBEDDED_ONLY)
ADD_SUBDIRECTORY(client)
ADD_SUBDIRECTORY(sql)
ADD_SUBDIRECTORY(server-tools/instance-manager)
ADD_SUBDIRECTORY(tests)
ENDIF(EMBEDDED_ONLY)
ENDIF(WITH_EMBEDDED_SERVER)
......@@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
#
# When changing major version number please also check switch statement
# in mysqlbinlog::check_master_version().
AM_INIT_AUTOMAKE(mysql, 5.1.22-beta)
AM_INIT_AUTOMAKE(mysql, 5.1.23-beta)
AM_CONFIG_HEADER([include/config.h:config.h.in])
PROTOCOL_VERSION=10
......
......@@ -38,6 +38,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
# Include and add the directory path
SET(SOURCE_SUBLIBS TRUE)
SET(LIB_SOURCES "")
INCLUDE(${CMAKE_SOURCE_DIR}/zlib/CMakeLists.txt)
FOREACH(rpath ${ZLIB_SOURCES})
......@@ -118,16 +119,16 @@ ADD_LIBRARY(mysqlclient_notls STATIC ${CLIENT_SOURCES})
ADD_DEPENDENCIES(mysqlclient_notls GenError)
TARGET_LINK_LIBRARIES(mysqlclient_notls)
IF(NOT EMBEDDED_ONLY)
ADD_LIBRARY(libmysql SHARED ${CLIENT_SOURCES} dll.c libmysql.def)
ADD_LIBRARY(libmysql SHARED ${CLIENT_SOURCES} dll.c libmysql.def)
IF(WIN32)
SET_TARGET_PROPERTIES(libmysql mysqlclient PROPERTIES COMPILE_FLAGS "-DUSE_TLS")
ADD_DEPENDENCIES(libmysql GenError)
TARGET_LINK_LIBRARIES(libmysql wsock32)
ADD_EXECUTABLE(myTest mytest.c)
TARGET_LINK_LIBRARIES(myTest libmysql)
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("myTest" "asInvoker")
ENDIF(EMBED_MANIFESTS)
ENDIF(NOT EMBEDDED_ONLY)
ENDIF(WIN32)
ADD_DEPENDENCIES(libmysql GenError)
TARGET_LINK_LIBRARIES(libmysql wsock32)
ADD_EXECUTABLE(myTest mytest.c)
TARGET_LINK_LIBRARIES(myTest libmysql)
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("myTest" "asInvoker")
ENDIF(EMBED_MANIFESTS)
......@@ -18,7 +18,11 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
# Need to set USE_TLS, since __declspec(thread) approach to thread local
# storage does not work properly in DLLs.
ADD_DEFINITIONS(-DUSE_TLS -DMYSQL_SERVER)
IF(WIN32)
ADD_DEFINITIONS(-DUSE_TLS)
ENDIF(WIN32)
ADD_DEFINITIONS(-DMYSQL_SERVER -DEMBEDDED_LIBRARY)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/libmysqld
......@@ -26,18 +30,124 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include
${CMAKE_SOURCE_DIR}/zlib
)
SET_SOURCE_FILES_PROPERTIES(sql_yacc.cc
sql_yacc.h
message.h
message.rc
${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc
lex_hash.h
PROPERTIES GENERATED 1)
${CMAKE_SOURCE_DIR}/zlib)
SET(GEN_SOURCES ${CMAKE_SOURCE_DIR}/sql/sql_yacc.cc
${CMAKE_SOURCE_DIR}/sql/sql_yacc.h
${CMAKE_SOURCE_DIR}/sql/message.h
${CMAKE_SOURCE_DIR}/sql/message.rc
${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc
${CMAKE_SOURCE_DIR}/sql/lex_hash.h)
SET_SOURCE_FILES_PROPERTIES(${GEN_SOURCES} PROPERTIES GENERATED 1)
# Include and add the directory path
SET(SOURCE_SUBLIBS TRUE)
SET(LIB_SOURCES "")
INCLUDE(${CMAKE_SOURCE_DIR}/zlib/CMakeLists.txt)
FOREACH(rpath ${ZLIB_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../zlib/${rpath})
ENDFOREACH(rpath)
# FIXME only needed if build type is "Debug", but CMAKE_BUILD_TYPE is
# not set during configure time.
INCLUDE(${CMAKE_SOURCE_DIR}/dbug/CMakeLists.txt)
FOREACH(rpath ${DBUG_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../dbug/${rpath})
ENDFOREACH(rpath)
INCLUDE(${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/CMakeLists.txt)
FOREACH(rpath ${TAOCRYPT_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../extra/yassl/taocrypt/${rpath})
ENDFOREACH(rpath)
INCLUDE(${CMAKE_SOURCE_DIR}/extra/yassl/CMakeLists.txt)
FOREACH(rpath ${YASSL_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../extra/yassl/${rpath})
ENDFOREACH(rpath)
INCLUDE(${CMAKE_SOURCE_DIR}/strings/CMakeLists.txt)
FOREACH(rpath ${STRINGS_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../strings/${rpath})
ENDFOREACH(rpath)
INCLUDE(${CMAKE_SOURCE_DIR}/regex/CMakeLists.txt)
FOREACH(rpath ${REGEX_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../regex/${rpath})
ENDFOREACH(rpath)
INCLUDE(${CMAKE_SOURCE_DIR}/mysys/CMakeLists.txt)
FOREACH(rpath ${MYSYS_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../mysys/${rpath})
ENDFOREACH(rpath)
INCLUDE(${CMAKE_SOURCE_DIR}/vio/CMakeLists.txt)
FOREACH(rpath ${VIO_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../vio/${rpath})
ENDFOREACH(rpath)
# Engines
INCLUDE(${CMAKE_SOURCE_DIR}/storage/heap/CMakeLists.txt)
FOREACH(rpath ${HEAP_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/heap/${rpath})
ENDFOREACH(rpath)
INCLUDE(${CMAKE_SOURCE_DIR}/storage/myisam/CMakeLists.txt)
FOREACH(rpath ${MYISAM_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/myisam/${rpath})
ENDFOREACH(rpath)
INCLUDE(${CMAKE_SOURCE_DIR}/storage/myisammrg/CMakeLists.txt)
FOREACH(rpath ${MYISAMMRG_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/myisammrg/${rpath})
ENDFOREACH(rpath)
IF(WITH_ARCHIVE_STORAGE_ENGINE)
INCLUDE(${CMAKE_SOURCE_DIR}/storage/archive/CMakeLists.txt)
FOREACH(rpath ${ARCHIVE_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/archive/${rpath})
ENDFOREACH(rpath)
ENDIF(WITH_ARCHIVE_STORAGE_ENGINE)
IF(WITH_BLACKHOLE_STORAGE_ENGINE)
INCLUDE(${CMAKE_SOURCE_DIR}/storage/blackhole/CMakeLists.txt)
FOREACH(rpath ${BLACKHOLE_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/blackhole/${rpath})
ENDFOREACH(rpath)
ENDIF(WITH_BLACKHOLE_STORAGE_ENGINE)
IF(WITH_EXAMPLE_STORAGE_ENGINE)
INCLUDE(${CMAKE_SOURCE_DIR}/storage/example/CMakeLists.txt)
FOREACH(rpath ${EXAMPLE_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/example/${rpath})
ENDFOREACH(rpath)
ENDIF(WITH_EXAMPLE_STORAGE_ENGINE)
IF(WITH_FEDERATED_STORAGE_ENGINE)
INCLUDE(${CMAKE_SOURCE_DIR}/storage/federated/CMakeLists.txt)
FOREACH(rpath ${FEDERATED_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/federated/${rpath})
ENDFOREACH(rpath)
ENDIF(WITH_FEDERATED_STORAGE_ENGINE)
IF(WITH_INNOBASE_STORAGE_ENGINE)
INCLUDE(${CMAKE_SOURCE_DIR}/storage/innobase/CMakeLists.txt)
FOREACH(rpath ${INNOBASE_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/innobase/${rpath})
ENDFOREACH(rpath)
ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
IF(WITH_CSV_STORAGE_ENGINE)
INCLUDE(${CMAKE_SOURCE_DIR}/storage/csv/CMakeLists.txt)
FOREACH(rpath ${CSV_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../storage/csv/${rpath})
ENDFOREACH(rpath)
ENDIF(WITH_CSV_STORAGE_ENGINE)
SET(SOURCE_SUBLIBS FALSE)
ADD_LIBRARY(mysqldemb emb_qcache.cc libmysqld.c lib_sql.cc
SET(LIBMYSQLD_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../libmysql/libmysql.c ../libmysql/errmsg.c ../client/get_password.c
../sql-common/client.c ../sql-common/my_time.c
../sql-common/my_user.c ../sql-common/pack.c
......@@ -69,101 +179,30 @@ ADD_LIBRARY(mysqldemb emb_qcache.cc libmysqld.c lib_sql.cc
../sql/sql_binlog.cc ../sql/sql_manager.cc ../sql/sql_map.cc
../sql/sql_parse.cc ../sql/sql_partition.cc ../sql/sql_plugin.cc
../sql/sql_prepare.cc ../sql/sql_rename.cc ../sql/sql_repl.cc
../sql/sql_select.cc ../sql/sql_servers.cc ../sql/sql_builtin.cc
../sql/sql_select.cc ../sql/sql_servers.cc
../sql/sql_show.cc ../sql/sql_state.c ../sql/sql_string.cc
../sql/sql_tablespace.cc ../sql/sql_table.cc ../sql/sql_test.cc
../sql/sql_trigger.cc ../sql/sql_udf.cc ../sql/sql_union.cc
../sql/sql_update.cc ../sql/sql_view.cc
../sql/strfunc.cc ../sql/table.cc ../sql/thr_malloc.cc
../sql/time.cc ../sql/tztime.cc ../sql/uniques.cc ../sql/unireg.cc
../sql/partition_info.cc ../sql/sql_locale.cc ../sql/sql_connect.cc
../sql/partition_info.cc ../sql/sql_connect.cc
../sql/scheduler.cc
../vio/vio.c ../vio/viosocket.c ../vio/viossl.c
../vio/viosslfactories.c
sql_yacc.cc
sql_yacc.h
message.h
message.rc
lex_hash.h)
ADD_DEPENDENCIES(mysqldemb GenError)
# Sql Parser custom command
ADD_CUSTOM_COMMAND(
SOURCE ${PROJECT_SOURCE_DIR}/sql/sql_yacc.yy
OUTPUT sql_yacc.cc
COMMAND bison.exe
ARGS -y -p MYSQL --defines=sql_yacc.h
--output=sql_yacc.cc ${PROJECT_SOURCE_DIR}/sql/sql_yacc.yy
DEPENDS ${PROJECT_SOURCE_DIR}/sql/sql_yacc.yy
)
ADD_CUSTOM_COMMAND(
OUTPUT sql_yacc.h
COMMAND echo
DEPENDS ${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc
)
# Windows message file
ADD_CUSTOM_COMMAND(
SOURCE ${CMAKE_SOURCE_DIR}/sql/message.mc
OUTPUT message.rc message.h
COMMAND mc
ARGS ${CMAKE_SOURCE_DIR}/sql/message.mc
DEPENDS ${CMAKE_SOURCE_DIR}/sql/message.mc
)
# Gen_lex_hash
ADD_EXECUTABLE(gen_lex_hash ../sql/gen_lex_hash.cc)
TARGET_LINK_LIBRARIES(gen_lex_hash dbug mysqlclient wsock32)
GET_TARGET_PROPERTY(GEN_LEX_HASH_EXE gen_lex_hash LOCATION)
ADD_CUSTOM_COMMAND(
OUTPUT lex_hash.h
COMMAND ${GEN_LEX_HASH_EXE} ARGS > lex_hash.h
DEPENDS ${GEN_LEX_HASH_EXE}
)
# Remove the auto-generated files as part of 'Clean Solution'
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
"lex_hash.h;message.rc;message.h;sql_yacc.h;sql_yacc.cc")
ADD_DEPENDENCIES(mysqldemb gen_lex_hash)
${GEN_SOURCES}
${LIB_SOURCES})
# Seems we cannot make a library without at least one source file. So use a
# dummy empty file
FILE(WRITE cmake_dummy.c " ")
ADD_LIBRARY(mysqlserver cmake_dummy.c)
TARGET_LINK_LIBRARIES(mysqlserver wsock32)
ADD_DEPENDENCIES(mysqlserver mysqldemb heap myisam myisammrg dbug mysys zlib strings mysqldemb regex
yassl taocrypt vio)
IF(WITH_ARCHIVE_STORAGE_ENGINE)
ADD_DEPENDENCIES(mysqlserver archive)
ENDIF(WITH_ARCHIVE_STORAGE_ENGINE)
IF(WITH_EXAMPLE_STORAGE_ENGINE)
ADD_DEPENDENCIES(mysqlserver example)
ENDIF(WITH_EXAMPLE_STORAGE_ENGINE)
IF(WITH_BLACKHOLE_STORAGE_ENGINE)
TARGET_LINK_LIBRARIES(mysqlserver blackhole)
ENDIF(WITH_BLACKHOLE_STORAGE_ENGINE)
IF(WITH_CSV_STORAGE_ENGINE)
TARGET_LINK_LIBRARIES(mysqlserver csv)
ENDIF(WITH_CSV_STORAGE_ENGINE)
IF(WITH_FEDERATED_STORAGE_ENGINE)
ADD_DEPENDENCIES(mysqlserver federated)
ENDIF(WITH_FEDERATED_STORAGE_ENGINE)
IF(WITH_INNOBASE_STORAGE_ENGINE)
ADD_DEPENDENCIES(mysqlserver innobase)
ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
# Tried use the correct ${GEN_SOURCES} as dependency, worked on Unix
# but not on Windows and Visual Studio generators. Likely because they
# are no real targets from the Visual Studio project files view. Added
# custom targets to "sql/CMakeLists.txt" and reference them here.
ADD_LIBRARY(mysqlserver STATIC ${LIBMYSQLD_SOURCES})
ADD_DEPENDENCIES(mysqlserver GenServerSource GenError)
TARGET_LINK_LIBRARIES(mysqlserver)
ADD_LIBRARY(libmysqld MODULE cmake_dummy.c libmysqld.def)
TARGET_LINK_LIBRARIES(libmysqld wsock32)
ADD_DEPENDENCIES(libmysqld mysqlserver)
IF(WITH_ARCHIVE_STORAGE_ENGINE)
ADD_DEPENDENCIES(libmysqld archive)
ENDIF(WITH_ARCHIVE_STORAGE_ENGINE)
IF(WITH_BLACKHOLE_STORAGE_ENGINE)
TARGET_LINK_LIBRARIES(libmysqld blackhole)
ENDIF(WITH_BLACKHOLE_STORAGE_ENGINE)
IF(WITH_CSV_STORAGE_ENGINE)
TARGET_LINK_LIBRARIES(libmysqld csv)
ENDIF(WITH_CSV_STORAGE_ENGINE)
TARGET_LINK_LIBRARIES(libmysqld mysqlserver wsock32)
......@@ -15,24 +15,24 @@
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/libmysqld/include
${CMAKE_SOURCE_DIR}/libmysqld/release
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/extra/yassl/include)
# Currently does not work with DBUG, there are missing symbols reported.
ADD_DEFINITIONS(-DDBUG_OFF)
ADD_DEFINITIONS(-DUSE_TLS)
IF(WIN32)
ADD_DEFINITIONS(-DUSE_TLS)
ENDIF(WIN32)
ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc
../../client/mysql.cc ../../client/readline.cc
../../client/sql_string.cc)
TARGET_LINK_LIBRARIES(mysql_embedded mysys yassl taocrypt zlib dbug regex strings wsock32)
TARGET_LINK_LIBRARIES(mysql_embedded mysys yassl taocrypt zlib debug dbug regex strings wsock32)
ADD_DEPENDENCIES(mysql_embedded libmysqld)
ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.c)
TARGET_LINK_LIBRARIES(mysqltest_embedded mysys yassl taocrypt zlib dbug regex strings wsock32)
TARGET_LINK_LIBRARIES(mysqltest_embedded mysys yassl taocrypt zlib debug dbug regex strings wsock32)
ADD_DEPENDENCIES(mysqltest_embedded libmysqld)
ADD_EXECUTABLE(mysql_client_test_embedded ../../tests/mysql_client_test.c)
TARGET_LINK_LIBRARIES(mysql_client_test_embedded dbug mysys yassl taocrypt zlib strings wsock32)
TARGET_LINK_LIBRARIES(mysql_client_test_embedded debug dbug mysys yassl taocrypt zlib strings wsock32)
ADD_DEPENDENCIES(mysql_client_test_embedded libmysqld)
......@@ -3,5 +3,5 @@
#
--require r/have_bug25714.require
disable_query_log;
eval select LENGTH("MYSQL_BUG25714") > 0 as "have_bug25714_exe";
eval select LENGTH("$MYSQL_BUG25714") > 0 as "have_bug25714_exe";
enable_query_log;
......@@ -1487,4 +1487,26 @@ where a.table_name='t1' and a.table_schema='test' and b.table_name=a.table_name;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE a ALL NULL TABLE_SCHEMA,TABLE_NAME NULL NULL NULL Using where; Skip_open_table; Scanned 0 databases
1 SIMPLE b ALL NULL NULL NULL NULL NULL Using where; Open_frm_only; Scanned all databases; Using join buffer
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME = 'mysqltest';
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME = '';
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME = 'test';
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
NULL test latin1 latin1_swedish_ci NULL
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysql' AND TABLE_NAME='nonexisting';
count(*)
0
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysql' AND TABLE_NAME='';
count(*)
0
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='';
count(*)
0
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='nonexisting';
count(*)
0
End of 5.1 tests.
############## suite/funcs_1/datadict/datadict_priv.inc ################
# #
# DDL and DML operations on information_schema tables #
# #
# Creation: #
# 2007-08 hhunger Implement this test as part of #
# WL#3982 Test information_schema.processlist #
# #
# Last update: #
# 2007-08-14 mleich Some cleanup #
# #
########################################################################
# These variables have to be set before sourcing this file.
#
# information_schema table to be tested
# let $table= processlist;
#
# columns of the information_schema table e.g. to use in a select.
# let $columns= ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO;
#
# Where clause for an update.
# let $update_where= WHERE id=1 ;
#
# Column to be used in the SET of an update.
# let $set_column= user='any_user' ;
#
# Where clause of a delete.
# let $delete_where= WHERE id=1 ;
#
# Column to be dropped.
# let $drop_column= user;
#
# Column to be indexed
# let $index_col= user;
# data access
eval CREATE TEMPORARY TABLE test.t_$table AS SELECT * FROM $table;
eval UPDATE test.t_$table SET user='horst' $update_where ;
--error ER_DBACCESS_DENIED_ERROR
eval INSERT INTO $table SELECT * FROM test.t_$table;
# bug#30208: CREATE TABLE ...LIKE does not accept dbname.tablename:unknown database
eval DROP TABLE test.t_$table;
--error ER_VIEW_NONUPD_CHECK
eval CREATE VIEW test.v_$table ($columns) AS SELECT * FROM $table WITH CHECK OPTION;
eval CREATE VIEW test.v_$table ($columns) AS SELECT * FROM $table;
--error ER_DBACCESS_DENIED_ERROR
eval UPDATE test.v_$TABLE SET TIME=NOW() WHERE id = 1;
eval DROP VIEW test.v_$table;
--error ER_DBACCESS_DENIED_ERROR
eval UPDATE $table SET $set_column $update_where;
--error ER_DBACCESS_DENIED_ERROR
eval DELETE FROM $table $delete_where;
# change privileges
--error ER_DBACCESS_DENIED_ERROR
eval REVOKE ALL ON $table FROM current_user;
--error ER_DBACCESS_DENIED_ERROR
eval GRANT INSERT,UPDATE ON $table TO current_user;
SHOW GRANTS;
#----------------------------------------------------------------------
# table access
--error ER_DBACCESS_DENIED_ERROR
eval CREATE INDEX i_$table ON $table ($index_col);
--error ER_DBACCESS_DENIED_ERROR
eval DROP TABLE $table;
--error ER_DBACCESS_DENIED_ERROR
eval ALTER TABLE $table DROP COLUMN $drop_column;
--error ER_DBACCESS_DENIED_ERROR
eval ALTER TABLE $table ADD COLUMN (my_column INT);
--error ER_UNKNOWN_TABLE
eval RENAME TABLE $table TO new_$table;
--error ER_DBACCESS_DENIED_ERROR
eval RENAME TABLE $table TO files;
--error ER_UNKNOWN_TABLE
eval CREATE TABLE new_$table AS SELECT * FROM $table;
#----------------------------------------------------------------------
# database access
--error ER_DBACCESS_DENIED_ERROR
DROP DATABASE information_schema;
--error ER_DBACCESS_DENIED_ERROR
RENAME DATABASE information_schema TO info_schema;
This diff is collapsed.
This diff is collapsed.
......@@ -55,7 +55,7 @@ f106 year(3) not null default 2000,
f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set"
) engine = innodb;
) engine = ndb;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb2.txt' into table tb2 ;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -90,7 +90,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
END if;
END//
SHOW CREATE PROCEDURE sp1;
Procedure sql_mode Create Procedure
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
sp1 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
BEGIN
declare a tinyint;
......@@ -104,7 +104,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
ELSE
INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
END if;
END
END latin1 latin1_swedish_ci latin1_swedish_ci
set @@sql_mode='';
SHOW VARIABLES LIKE 'sql_mode';
Variable_name Value
......@@ -143,12 +143,12 @@ SET @@sql_mode='MAXDB';
SHOW VARIABLES LIKE 'sql_mode';
END//
SHOW CREATE PROCEDURE sp2;
Procedure sql_mode Create Procedure
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
sp2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`()
BEGIN
SET @@sql_mode='MAXDB';
SHOW VARIABLES LIKE 'sql_mode';
END
END latin1 latin1_swedish_ci latin1_swedish_ci
... show value prior calling procedure
SHOW VARIABLES LIKE 'sql_mode';
Variable_name Value
......
......@@ -122,6 +122,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME fn_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -146,6 +149,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT created with INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_1
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -168,6 +174,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -190,6 +199,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT created with INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1;
Function fn_1
sql_mode
......@@ -199,6 +211,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE FUNCTION fn_2;
Function fn_2
sql_mode
......@@ -210,6 +225,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_1;
Procedure sp_1
sql_mode
......@@ -217,6 +235,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_2;
Procedure sp_2
sql_mode
......@@ -226,6 +247,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW FUNCTION STATUS LIKE 'fn_%';
Db db_storedproc
Name fn_1
......@@ -235,6 +259,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name fn_2
Type FUNCTION
......@@ -243,6 +270,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment created with INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW PROCEDURE STATUS LIKE 'sp_%';
Db db_storedproc
Name sp_1
......@@ -252,6 +282,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name sp_2
Type PROCEDURE
......@@ -260,6 +293,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment created with INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
... now change some stuff:
--------------------------
......@@ -304,6 +340,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, FN changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME fn_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -328,6 +367,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT FN changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_1
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -350,6 +392,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, SP changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -372,6 +417,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT SP changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1;
Function fn_1
sql_mode
......@@ -384,6 +432,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE FUNCTION fn_2;
Function fn_2
sql_mode
......@@ -395,6 +446,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_1;
Procedure sp_1
sql_mode
......@@ -404,6 +458,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_2;
Procedure sp_2
sql_mode
......@@ -413,6 +470,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW FUNCTION STATUS LIKE 'fn_%';
Db db_storedproc
Name fn_1
......@@ -422,6 +482,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, FN changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name fn_2
Type FUNCTION
......@@ -430,6 +493,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment FN changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW PROCEDURE STATUS LIKE 'sp_%';
Db db_storedproc
Name sp_1
......@@ -439,6 +505,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, SP changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name sp_2
Type PROCEDURE
......@@ -447,6 +516,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment SP changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
... change back to default and check result:
--------------------------------------------
......@@ -479,6 +551,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, FN changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME fn_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -503,6 +578,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT FN changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_1
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -525,6 +603,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, SP changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -547,6 +628,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT SP changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1;
Function fn_1
sql_mode
......@@ -559,6 +643,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE FUNCTION fn_2;
Function fn_2
sql_mode
......@@ -569,6 +656,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_1;
Procedure sp_1
sql_mode
......@@ -578,6 +668,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_2;
Procedure sp_2
sql_mode
......@@ -587,6 +680,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW FUNCTION STATUS LIKE 'fn_%';
Db db_storedproc
Name fn_1
......@@ -596,6 +692,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, FN changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name fn_2
Type FUNCTION
......@@ -604,6 +703,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment FN changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW PROCEDURE STATUS LIKE 'sp_%';
Db db_storedproc
Name sp_1
......@@ -613,6 +715,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, SP changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name sp_2
Type PROCEDURE
......@@ -621,6 +726,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment SP changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
... cleanup
-----------
......
......@@ -263,7 +263,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant select, insert, update on priv_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
......@@ -296,7 +296,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
show tables;
Tables_in_priv_db
t1
......@@ -317,7 +317,7 @@ select current_user;
current_user
test_yesprivs@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-yes';
select current_user;
......@@ -453,9 +453,9 @@ ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for tabl
create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-yes';
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
select current_user;
current_user
test_noprivs@localhost
......@@ -570,11 +570,11 @@ current_user
test_yesprivs@localhost
use priv_db;
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
select * from information_schema.triggers;
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
drop trigger trg1_1;
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
select current_user;
......@@ -863,7 +863,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
......@@ -878,7 +878,7 @@ select current_user;
current_user
test_yesprivs@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-yes';
create trigger trg2_1 before INSERT on t2 for each row
......@@ -990,7 +990,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant select, insert, update ,trigger
on priv_db.t1 to test_yesprivs@localhost
with grant option;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -90,7 +90,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
END if;
END//
SHOW CREATE PROCEDURE sp1;
Procedure sql_mode Create Procedure
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
sp1 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
BEGIN
declare a tinyint;
......@@ -104,7 +104,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
ELSE
INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
END if;
END
END latin1 latin1_swedish_ci latin1_swedish_ci
set @@sql_mode='';
SHOW VARIABLES LIKE 'sql_mode';
Variable_name Value
......@@ -143,12 +143,12 @@ SET @@sql_mode='MAXDB';
SHOW VARIABLES LIKE 'sql_mode';
END//
SHOW CREATE PROCEDURE sp2;
Procedure sql_mode Create Procedure
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
sp2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`()
BEGIN
SET @@sql_mode='MAXDB';
SHOW VARIABLES LIKE 'sql_mode';
END
END latin1 latin1_swedish_ci latin1_swedish_ci
... show value prior calling procedure
SHOW VARIABLES LIKE 'sql_mode';
Variable_name Value
......
......@@ -122,6 +122,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME fn_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -146,6 +149,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT created with INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_1
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -168,6 +174,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -190,6 +199,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT created with INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1;
Function fn_1
sql_mode
......@@ -199,6 +211,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE FUNCTION fn_2;
Function fn_2
sql_mode
......@@ -210,6 +225,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_1;
Procedure sp_1
sql_mode
......@@ -217,6 +235,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_2;
Procedure sp_2
sql_mode
......@@ -226,6 +247,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW FUNCTION STATUS LIKE 'fn_%';
Db db_storedproc
Name fn_1
......@@ -235,6 +259,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name fn_2
Type FUNCTION
......@@ -243,6 +270,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment created with INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW PROCEDURE STATUS LIKE 'sp_%';
Db db_storedproc
Name sp_1
......@@ -252,6 +282,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name sp_2
Type PROCEDURE
......@@ -260,6 +293,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment created with INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
... now change some stuff:
--------------------------
......@@ -304,6 +340,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, FN changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME fn_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -328,6 +367,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT FN changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_1
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -350,6 +392,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, SP changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -372,6 +417,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT SP changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1;
Function fn_1
sql_mode
......@@ -384,6 +432,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE FUNCTION fn_2;
Function fn_2
sql_mode
......@@ -395,6 +446,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_1;
Procedure sp_1
sql_mode
......@@ -404,6 +458,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_2;
Procedure sp_2
sql_mode
......@@ -413,6 +470,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW FUNCTION STATUS LIKE 'fn_%';
Db db_storedproc
Name fn_1
......@@ -422,6 +482,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, FN changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name fn_2
Type FUNCTION
......@@ -430,6 +493,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment FN changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW PROCEDURE STATUS LIKE 'sp_%';
Db db_storedproc
Name sp_1
......@@ -439,6 +505,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, SP changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name sp_2
Type PROCEDURE
......@@ -447,6 +516,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment SP changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
... change back to default and check result:
--------------------------------------------
......@@ -479,6 +551,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, FN changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME fn_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -503,6 +578,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT FN changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_1
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -525,6 +603,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, SP changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -547,6 +628,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT SP changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1;
Function fn_1
sql_mode
......@@ -559,6 +643,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE FUNCTION fn_2;
Function fn_2
sql_mode
......@@ -569,6 +656,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_1;
Procedure sp_1
sql_mode
......@@ -578,6 +668,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_2;
Procedure sp_2
sql_mode
......@@ -587,6 +680,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW FUNCTION STATUS LIKE 'fn_%';
Db db_storedproc
Name fn_1
......@@ -596,6 +692,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, FN changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name fn_2
Type FUNCTION
......@@ -604,6 +703,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment FN changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW PROCEDURE STATUS LIKE 'sp_%';
Db db_storedproc
Name sp_1
......@@ -613,6 +715,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, SP changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name sp_2
Type PROCEDURE
......@@ -621,6 +726,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment SP changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
... cleanup
-----------
......
......@@ -263,7 +263,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant select, insert, update on priv_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
......@@ -296,7 +296,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
show tables;
Tables_in_priv_db
t1
......@@ -317,7 +317,7 @@ select current_user;
current_user
test_yesprivs@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-yes';
select current_user;
......@@ -453,9 +453,9 @@ ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for tabl
create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-yes';
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
select current_user;
current_user
test_noprivs@localhost
......@@ -570,11 +570,11 @@ current_user
test_yesprivs@localhost
use priv_db;
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
select * from information_schema.triggers;
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
drop trigger trg1_1;
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
select current_user;
......@@ -863,7 +863,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
......@@ -878,7 +878,7 @@ select current_user;
current_user
test_yesprivs@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-yes';
create trigger trg2_1 before INSERT on t2 for each row
......@@ -990,7 +990,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant select, insert, update ,trigger
on priv_db.t1 to test_yesprivs@localhost
with grant option;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -90,7 +90,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
END if;
END//
SHOW CREATE PROCEDURE sp1;
Procedure sql_mode Create Procedure
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
sp1 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
BEGIN
declare a tinyint;
......@@ -104,7 +104,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
ELSE
INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
END if;
END
END latin1 latin1_swedish_ci latin1_swedish_ci
set @@sql_mode='';
SHOW VARIABLES LIKE 'sql_mode';
Variable_name Value
......@@ -143,12 +143,12 @@ SET @@sql_mode='MAXDB';
SHOW VARIABLES LIKE 'sql_mode';
END//
SHOW CREATE PROCEDURE sp2;
Procedure sql_mode Create Procedure
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
sp2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`()
BEGIN
SET @@sql_mode='MAXDB';
SHOW VARIABLES LIKE 'sql_mode';
END
END latin1 latin1_swedish_ci latin1_swedish_ci
... show value prior calling procedure
SHOW VARIABLES LIKE 'sql_mode';
Variable_name Value
......
......@@ -122,6 +122,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME fn_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -146,6 +149,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT created with INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_1
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -168,6 +174,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -190,6 +199,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT created with INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1;
Function fn_1
sql_mode
......@@ -199,6 +211,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE FUNCTION fn_2;
Function fn_2
sql_mode
......@@ -210,6 +225,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_1;
Procedure sp_1
sql_mode
......@@ -217,6 +235,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_2;
Procedure sp_2
sql_mode
......@@ -226,6 +247,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW FUNCTION STATUS LIKE 'fn_%';
Db db_storedproc
Name fn_1
......@@ -235,6 +259,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name fn_2
Type FUNCTION
......@@ -243,6 +270,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment created with INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW PROCEDURE STATUS LIKE 'sp_%';
Db db_storedproc
Name sp_1
......@@ -252,6 +282,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name sp_2
Type PROCEDURE
......@@ -260,6 +293,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment created with INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
... now change some stuff:
--------------------------
......@@ -304,6 +340,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, FN changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME fn_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -328,6 +367,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT FN changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_1
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -350,6 +392,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, SP changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -372,6 +417,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT SP changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1;
Function fn_1
sql_mode
......@@ -384,6 +432,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE FUNCTION fn_2;
Function fn_2
sql_mode
......@@ -395,6 +446,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_1;
Procedure sp_1
sql_mode
......@@ -404,6 +458,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_2;
Procedure sp_2
sql_mode
......@@ -413,6 +470,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW FUNCTION STATUS LIKE 'fn_%';
Db db_storedproc
Name fn_1
......@@ -422,6 +482,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, FN changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name fn_2
Type FUNCTION
......@@ -430,6 +493,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment FN changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW PROCEDURE STATUS LIKE 'sp_%';
Db db_storedproc
Name sp_1
......@@ -439,6 +505,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, SP changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name sp_2
Type PROCEDURE
......@@ -447,6 +516,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment SP changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
... change back to default and check result:
--------------------------------------------
......@@ -479,6 +551,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, FN changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME fn_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -503,6 +578,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT FN changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_1
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -525,6 +603,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, SP changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -547,6 +628,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT SP changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1;
Function fn_1
sql_mode
......@@ -559,6 +643,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE FUNCTION fn_2;
Function fn_2
sql_mode
......@@ -569,6 +656,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_1;
Procedure sp_1
sql_mode
......@@ -578,6 +668,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_2;
Procedure sp_2
sql_mode
......@@ -587,6 +680,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW FUNCTION STATUS LIKE 'fn_%';
Db db_storedproc
Name fn_1
......@@ -596,6 +692,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, FN changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name fn_2
Type FUNCTION
......@@ -604,6 +703,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment FN changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW PROCEDURE STATUS LIKE 'sp_%';
Db db_storedproc
Name sp_1
......@@ -613,6 +715,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, SP changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name sp_2
Type PROCEDURE
......@@ -621,6 +726,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment SP changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
... cleanup
-----------
......
......@@ -263,7 +263,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant select, insert, update on priv_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
......@@ -296,7 +296,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
show tables;
Tables_in_priv_db
t1
......@@ -317,7 +317,7 @@ select current_user;
current_user
test_yesprivs@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-yes';
select current_user;
......@@ -453,9 +453,9 @@ ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for tabl
create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-yes';
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
select current_user;
current_user
test_noprivs@localhost
......@@ -570,11 +570,11 @@ current_user
test_yesprivs@localhost
use priv_db;
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
select * from information_schema.triggers;
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
drop trigger trg1_1;
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
select current_user;
......@@ -863,7 +863,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
......@@ -878,7 +878,7 @@ select current_user;
current_user
test_yesprivs@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-yes';
create trigger trg2_1 before INSERT on t2 for each row
......@@ -990,7 +990,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant select, insert, update ,trigger
on priv_db.t1 to test_yesprivs@localhost
with grant option;
......
......@@ -75,7 +75,7 @@ Note 1265 Data truncated for column 'f45' at row 1
Note 1265 Data truncated for column 'f47' at row 1
Note 1265 Data truncated for column 'f49' at row 1
Note 1265 Data truncated for column 'f51' at row 1
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb1.txt' into table tb1 ;
NOT YET IMPLEMENTED: cursor tests
......
......@@ -90,7 +90,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
END if;
END//
SHOW CREATE PROCEDURE sp1;
Procedure sql_mode Create Procedure
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
sp1 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
BEGIN
declare a tinyint;
......@@ -104,7 +104,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
ELSE
INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
END if;
END
END latin1 latin1_swedish_ci latin1_swedish_ci
set @@sql_mode='';
SHOW VARIABLES LIKE 'sql_mode';
Variable_name Value
......@@ -143,12 +143,12 @@ SET @@sql_mode='MAXDB';
SHOW VARIABLES LIKE 'sql_mode';
END//
SHOW CREATE PROCEDURE sp2;
Procedure sql_mode Create Procedure
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
sp2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`()
BEGIN
SET @@sql_mode='MAXDB';
SHOW VARIABLES LIKE 'sql_mode';
END
END latin1 latin1_swedish_ci latin1_swedish_ci
... show value prior calling procedure
SHOW VARIABLES LIKE 'sql_mode';
Variable_name Value
......
......@@ -122,6 +122,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME fn_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -146,6 +149,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT created with INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_1
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -168,6 +174,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -190,6 +199,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT created with INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1;
Function fn_1
sql_mode
......@@ -199,6 +211,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE FUNCTION fn_2;
Function fn_2
sql_mode
......@@ -210,6 +225,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_1;
Procedure sp_1
sql_mode
......@@ -217,6 +235,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_2;
Procedure sp_2
sql_mode
......@@ -226,6 +247,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW FUNCTION STATUS LIKE 'fn_%';
Db db_storedproc
Name fn_1
......@@ -235,6 +259,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name fn_2
Type FUNCTION
......@@ -243,6 +270,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment created with INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW PROCEDURE STATUS LIKE 'sp_%';
Db db_storedproc
Name sp_1
......@@ -252,6 +282,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name sp_2
Type PROCEDURE
......@@ -260,6 +293,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment created with INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
... now change some stuff:
--------------------------
......@@ -304,6 +340,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, FN changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME fn_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -328,6 +367,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT FN changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_1
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -350,6 +392,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, SP changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -372,6 +417,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT SP changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1;
Function fn_1
sql_mode
......@@ -384,6 +432,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE FUNCTION fn_2;
Function fn_2
sql_mode
......@@ -395,6 +446,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_1;
Procedure sp_1
sql_mode
......@@ -404,6 +458,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_2;
Procedure sp_2
sql_mode
......@@ -413,6 +470,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW FUNCTION STATUS LIKE 'fn_%';
Db db_storedproc
Name fn_1
......@@ -422,6 +482,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, FN changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name fn_2
Type FUNCTION
......@@ -430,6 +493,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment FN changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW PROCEDURE STATUS LIKE 'sp_%';
Db db_storedproc
Name sp_1
......@@ -439,6 +505,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, SP changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name sp_2
Type PROCEDURE
......@@ -447,6 +516,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment SP changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
... change back to default and check result:
--------------------------------------------
......@@ -479,6 +551,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, FN changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME fn_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -503,6 +578,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT FN changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_1
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -525,6 +603,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, SP changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -547,6 +628,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT SP changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1;
Function fn_1
sql_mode
......@@ -559,6 +643,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE FUNCTION fn_2;
Function fn_2
sql_mode
......@@ -569,6 +656,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_1;
Procedure sp_1
sql_mode
......@@ -578,6 +668,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_2;
Procedure sp_2
sql_mode
......@@ -587,6 +680,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW FUNCTION STATUS LIKE 'fn_%';
Db db_storedproc
Name fn_1
......@@ -596,6 +692,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, FN changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name fn_2
Type FUNCTION
......@@ -604,6 +703,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment FN changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW PROCEDURE STATUS LIKE 'sp_%';
Db db_storedproc
Name sp_1
......@@ -613,6 +715,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, SP changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name sp_2
Type PROCEDURE
......@@ -621,6 +726,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment SP changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
... cleanup
-----------
......
......@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase: 3.5.1.1:
......@@ -243,7 +243,7 @@ create table t1 (f1 integer) engine = ndb;
use test;
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
for each row set @ret_trg6_2 = 5;
ERROR HY000: Trigger in wrong schema
ERROR 42S02: Table 'trig_db.tb3' doesn't exist
use trig_db;
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
for each row set @ret_trg6_3 = 18;
......
......@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase 3.5.3:
......
......@@ -263,7 +263,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant select, insert, update on priv_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
......@@ -296,7 +296,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
show tables;
Tables_in_priv_db
t1
......@@ -317,7 +317,7 @@ select current_user;
current_user
test_yesprivs@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-yes';
select current_user;
......@@ -453,9 +453,9 @@ ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for tabl
create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-yes';
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
select current_user;
current_user
test_noprivs@localhost
......@@ -570,11 +570,11 @@ current_user
test_yesprivs@localhost
use priv_db;
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
select * from information_schema.triggers;
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
drop trigger trg1_1;
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
select current_user;
......@@ -863,7 +863,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
......@@ -878,7 +878,7 @@ select current_user;
current_user
test_yesprivs@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-yes';
create trigger trg2_1 before INSERT on t2 for each row
......@@ -990,7 +990,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant select, insert, update ,trigger
on priv_db.t1 to test_yesprivs@localhost
with grant option;
......
......@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase: 3.5:
......
......@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase: 3.5:
......@@ -493,9 +493,8 @@ BEGIN
WHILE @counter1 < new.f136
SET @counter1 = @counter1 + 1;
END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE @counter1 < new.f136
SET @counter1 = @counter1 + 1;
END' at line 3
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1;
END' at line 4
delete from tb3 where f122='Test 3.5.8.5-while';
drop trigger trg7;
......
......@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase 3.5.9.1/2:
......
......@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase 3.5.10.1/2/3:
......
This diff is collapsed.
########## suite/funcs_1/t/a_processlist_priv_no_prot.test #############
# #
# Testing of privileges around #
# SELECT ... PROCESSLIST/SHOW PROCESSLIST #
# #
# The prepared statement variant of this test is #
# suite/funcs_1/t/b_processlist_priv_ps.test. #
# #
# There is important documentation within #
# suite/funcs_1/datadict/processlist_priv.inc #
# #
# Note(mleich): #
# The name "a_process..." with the unusual prefix "a_" is #
# caused by the fact that this test should run as first test, that #
# means direct after server startup. Otherwise the connection IDs #
# within the processlist would differ. #
# #
# Creation: #
# 2007-08-14 mleich Create this test as part of #
# WL#3982 Test information_schema.processlist #
# #
########################################################################
# One subtest is skipped because of
# Bug#30395 strange results after REVOKE PROCESS ON *.* FROM ...
let $fixed_bug_30395= 0;
# The file with expected results fits only to a run without
# ps-protocol/sp-protocol/cursor-protocol/view-protocol.
if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL
+ $VIEW_PROTOCOL > 0`)
{
--skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled
}
--source suite/funcs_1/datadict/processlist_priv.inc
########### suite/funcs_1/t/a_processlist_val_no_prot.test #############
# #
# Testing of values within INFORMATION_SCHEMA.PROCESSLIST #
# #
# The prepared statement variant of this test is #
# suite/funcs_1/t/b_processlist_val_ps.test. #
# #
# There is important documentation within #
# suite/funcs_1/datadict/processlist_val.inc #
# #
# Note(mleich): #
# The name "a_process..." with the unusual prefix "a_" is #
# caused by the fact that this test should run as second test, that #
# means direct after server startup and a_processlist_priv_no_prot. #
# Otherwise the connection IDs within the processlist would differ. #
# #
# Creation: #
# 2007-08-09 mleich Implement this test as part of #
# WL#3982 Test information_schema.processlist #
# #
########################################################################
# The file with expected results fits only to a run without
# ps-protocol/sp-protocol/cursor-protocol/view-protocol.
if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL
+ $VIEW_PROTOCOL > 0`)
{
--skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled
}
--source suite/funcs_1/datadict/processlist_val.inc
########### suite/funcs_1/t/b_processlist_priv_ps.test #################
# #
# Testing of privileges around #
# SELECT ... PROCESSLIST/SHOW PROCESSLIST #
# #
# The no (ps/sp/view/cursor) protocol variant of this test is #
# suite/funcs_1/t/a_processlist_priv_no_prot.test. #
# #
# There is important documentation within #
# suite/funcs_1/datadict/processlist_priv.inc #
# #
# Note(mleich): #
# The name "b_process..." with the unusual prefix "b_" is #
# caused by the fact that this test should run as first test, that #
# means direct after server startup. Otherwise the connection IDs #
# within the processlist would differ. #
# #
# Creation: #
# 2007-08-14 mleich Create this test as part of #
# WL#3982 Test information_schema.processlist #
# #
########################################################################
# One subtest is skipped because of
# Bug#30395 strange results after REVOKE PROCESS ON *.* FROM ...
let $fixed_bug_30395= 0;
# The file with expected results fits only to a run with "--ps-protocol".
if (`SELECT $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0
OR $PS_PROTOCOL = 0`)
{
--skip Test requires: ps-protocol enabled, other protocols disabled
}
--source suite/funcs_1/datadict/processlist_priv.inc
############## suite/funcs_1/t/b_processlist_val_ps.test ###############
# #
# Testing of values within INFORMATION_SCHEMA.PROCESSLIST #
# #
# The no (ps/sp/view/cursor) protocol variant of this test is #
# suite/funcs_1/t/a_processlist_val_no_prot.test. #
# #
# There is important documentation within #
# suite/funcs_1/datadict/processlist_val.inc #
# #
# Note(mleich): #
# The name "b_process..." with the unusual prefix "b_" is #
# caused by the fact that this test should run as second test, that #
# means direct after server startup and b_processlist_priv_ps. #
# Otherwise the connection IDs within the processlist would differ. #
# #
# Creation: #
# 2007-08-09 mleich Implement this test as part of #
# WL#3982 Test information_schema.processlist #
# #
########################################################################
# The file with expected results fits only to a run with "--ps-protocol".
if (`SELECT $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0
OR $PS_PROTOCOL = 0`)
{
--skip Test requires: ps-protocol enabled, other protocols disabled
}
--source suite/funcs_1/datadict/processlist_val.inc
select count(*) from information_schema.columns;
count(*)
#
DROP TABLE IF EXISTS t1;
CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
......
......@@ -222,19 +222,17 @@ ENGINE NDB;
DROP LOGFILE GROUP lg1
ENGINE NDB;
**** End = And No = ****
create table t1 (a int primary key) engine = myisam;
create logfile group lg1 add undofile 'MYSQLTEST_VARDIR/master-data/test/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb;;
create logfile group lg1 add undofile 'MYSQLTEST_VARDIR/tmp/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb;;
ERROR HY000: Failed to create UNDOFILE
create logfile group lg1
add undofile 'undofile.dat'
initial_size 1M
undo_buffer_size = 1M
engine=ndb;
create tablespace ts1 add datafile 'MYSQLTEST_VARDIR/master-data/test/t1.frm' use logfile group lg1 initial_size 1M engine ndb;;
create tablespace ts1 add datafile 'MYSQLTEST_VARDIR/tmp/t1.frm' use logfile group lg1 initial_size 1M engine ndb;;
ERROR HY000: Failed to create DATAFILE
drop tablespace ts1
engine ndb;
ERROR HY000: Failed to drop TABLESPACE
drop logfile group lg1
engine ndb;
drop table t1;
......@@ -200,6 +200,240 @@ COUNT(*)
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE test.t (
a smallint NOT NULL,
b int NOT NULL,
c bigint NOT NULL,
d char(10),
e TEXT,
f VARCHAR(255),
PRIMARY KEY(a)
) TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
ALTER TABLE test.t ADD INDEX (d), ADD INDEX (f);
SHOW CREATE TABLE test.t;
Table Create Table
t CREATE TABLE `t` (
`a` smallint(6) NOT NULL,
`b` int(11) NOT NULL,
`c` bigint(20) NOT NULL,
`d` char(10) DEFAULT NULL,
`e` text,
`f` varchar(255) DEFAULT NULL,
PRIMARY KEY (`a`),
KEY `d` (`d`),
KEY `f` (`f`)
) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
SELECT * FROM test.t order by a;
a b c d e f
1 2 3 aaa1 bbb1 ccccc1
2 3 4 aaa2 bbb2 ccccc2
3 4 5 aaa3 bbb3 ccccc3
4 5 6 aaa4 bbb4 ccccc4
5 6 7 aaa5 bbb5 ccccc5
6 7 8 aaa6 bbb6 ccccc6
7 8 9 aaa7 bbb7 ccccc7
8 9 10 aaa8 bbb8 ccccc8
9 10 11 aaa9 bbb9 ccccc9
10 11 12 aaa10 bbb10 ccccc10
11 12 13 aaa11 bbb11 ccccc11
12 13 14 aaa12 bbb12 ccccc12
13 14 15 aaa13 bbb13 ccccc13
14 15 16 aaa14 bbb14 ccccc14
15 16 17 aaa15 bbb15 ccccc15
16 17 18 aaa16 bbb16 ccccc16
17 18 19 aaa17 bbb17 ccccc17
18 19 20 aaa18 bbb18 ccccc18
19 20 21 aaa19 bbb19 ccccc19
20 21 22 aaa20 bbb20 ccccc20
21 22 23 aaa21 bbb21 ccccc21
22 23 24 aaa22 bbb22 ccccc22
23 24 25 aaa23 bbb23 ccccc23
24 25 26 aaa24 bbb24 ccccc24
25 26 27 aaa25 bbb25 ccccc25
26 27 28 aaa26 bbb26 ccccc26
27 28 29 aaa27 bbb27 ccccc27
28 29 30 aaa28 bbb28 ccccc28
29 30 31 aaa29 bbb29 ccccc29
30 31 32 aaa30 bbb30 ccccc30
31 32 33 aaa31 bbb31 ccccc31
32 33 34 aaa32 bbb32 ccccc32
33 34 35 aaa33 bbb33 ccccc33
34 35 36 aaa34 bbb34 ccccc34
35 36 37 aaa35 bbb35 ccccc35
36 37 38 aaa36 bbb36 ccccc36
37 38 39 aaa37 bbb37 ccccc37
38 39 40 aaa38 bbb38 ccccc38
39 40 41 aaa39 bbb39 ccccc39
40 41 42 aaa40 bbb40 ccccc40
41 42 43 aaa41 bbb41 ccccc41
42 43 44 aaa42 bbb42 ccccc42
43 44 45 aaa43 bbb43 ccccc43
44 45 46 aaa44 bbb44 ccccc44
45 46 47 aaa45 bbb45 ccccc45
46 47 48 aaa46 bbb46 ccccc46
47 48 49 aaa47 bbb47 ccccc47
48 49 50 aaa48 bbb48 ccccc48
49 50 51 aaa49 bbb49 ccccc49
50 51 52 aaa50 bbb50 ccccc50
51 52 53 aaa51 bbb51 ccccc51
52 53 54 aaa52 bbb52 ccccc52
53 54 55 aaa53 bbb53 ccccc53
54 55 56 aaa54 bbb54 ccccc54
55 56 57 aaa55 bbb55 ccccc55
56 57 58 aaa56 bbb56 ccccc56
57 58 59 aaa57 bbb57 ccccc57
58 59 60 aaa58 bbb58 ccccc58
59 60 61 aaa59 bbb59 ccccc59
60 61 62 aaa60 bbb60 ccccc60
61 62 63 aaa61 bbb61 ccccc61
62 63 64 aaa62 bbb62 ccccc62
63 64 65 aaa63 bbb63 ccccc63
64 65 66 aaa64 bbb64 ccccc64
65 66 67 aaa65 bbb65 ccccc65
66 67 68 aaa66 bbb66 ccccc66
67 68 69 aaa67 bbb67 ccccc67
68 69 70 aaa68 bbb68 ccccc68
69 70 71 aaa69 bbb69 ccccc69
70 71 72 aaa70 bbb70 ccccc70
71 72 73 aaa71 bbb71 ccccc71
72 73 74 aaa72 bbb72 ccccc72
73 74 75 aaa73 bbb73 ccccc73
74 75 76 aaa74 bbb74 ccccc74
75 76 77 aaa75 bbb75 ccccc75
76 77 78 aaa76 bbb76 ccccc76
77 78 79 aaa77 bbb77 ccccc77
78 79 80 aaa78 bbb78 ccccc78
79 80 81 aaa79 bbb79 ccccc79
80 81 82 aaa80 bbb80 ccccc80
81 82 83 aaa81 bbb81 ccccc81
82 83 84 aaa82 bbb82 ccccc82
83 84 85 aaa83 bbb83 ccccc83
84 85 86 aaa84 bbb84 ccccc84
85 86 87 aaa85 bbb85 ccccc85
86 87 88 aaa86 bbb86 ccccc86
87 88 89 aaa87 bbb87 ccccc87
88 89 90 aaa88 bbb88 ccccc88
89 90 91 aaa89 bbb89 ccccc89
90 91 92 aaa90 bbb90 ccccc90
91 92 93 aaa91 bbb91 ccccc91
92 93 94 aaa92 bbb92 ccccc92
93 94 95 aaa93 bbb93 ccccc93
94 95 96 aaa94 bbb94 ccccc94
95 96 97 aaa95 bbb95 ccccc95
96 97 98 aaa96 bbb96 ccccc96
97 98 99 aaa97 bbb97 ccccc97
98 99 100 aaa98 bbb98 ccccc98
99 100 101 aaa99 bbb99 ccccc99
100 101 102 aaa100 bbb100 ccccc100
SELECT * INTO OUTFILE 't_backup' FROM test.t;
TRUNCATE test.t;
SELECT count(*) FROM test.t;
count(*)
0
LOAD DATA INFILE 't_backup' INTO TABLE test.t;
SELECT * FROM test.t order by a;
a b c d e f
1 2 3 aaa1 bbb1 ccccc1
2 3 4 aaa2 bbb2 ccccc2
3 4 5 aaa3 bbb3 ccccc3
4 5 6 aaa4 bbb4 ccccc4
5 6 7 aaa5 bbb5 ccccc5
6 7 8 aaa6 bbb6 ccccc6
7 8 9 aaa7 bbb7 ccccc7
8 9 10 aaa8 bbb8 ccccc8
9 10 11 aaa9 bbb9 ccccc9
10 11 12 aaa10 bbb10 ccccc10
11 12 13 aaa11 bbb11 ccccc11
12 13 14 aaa12 bbb12 ccccc12
13 14 15 aaa13 bbb13 ccccc13
14 15 16 aaa14 bbb14 ccccc14
15 16 17 aaa15 bbb15 ccccc15
16 17 18 aaa16 bbb16 ccccc16
17 18 19 aaa17 bbb17 ccccc17
18 19 20 aaa18 bbb18 ccccc18
19 20 21 aaa19 bbb19 ccccc19
20 21 22 aaa20 bbb20 ccccc20
21 22 23 aaa21 bbb21 ccccc21
22 23 24 aaa22 bbb22 ccccc22
23 24 25 aaa23 bbb23 ccccc23
24 25 26 aaa24 bbb24 ccccc24
25 26 27 aaa25 bbb25 ccccc25
26 27 28 aaa26 bbb26 ccccc26
27 28 29 aaa27 bbb27 ccccc27
28 29 30 aaa28 bbb28 ccccc28
29 30 31 aaa29 bbb29 ccccc29
30 31 32 aaa30 bbb30 ccccc30
31 32 33 aaa31 bbb31 ccccc31
32 33 34 aaa32 bbb32 ccccc32
33 34 35 aaa33 bbb33 ccccc33
34 35 36 aaa34 bbb34 ccccc34
35 36 37 aaa35 bbb35 ccccc35
36 37 38 aaa36 bbb36 ccccc36
37 38 39 aaa37 bbb37 ccccc37
38 39 40 aaa38 bbb38 ccccc38
39 40 41 aaa39 bbb39 ccccc39
40 41 42 aaa40 bbb40 ccccc40
41 42 43 aaa41 bbb41 ccccc41
42 43 44 aaa42 bbb42 ccccc42
43 44 45 aaa43 bbb43 ccccc43
44 45 46 aaa44 bbb44 ccccc44
45 46 47 aaa45 bbb45 ccccc45
46 47 48 aaa46 bbb46 ccccc46
47 48 49 aaa47 bbb47 ccccc47
48 49 50 aaa48 bbb48 ccccc48
49 50 51 aaa49 bbb49 ccccc49
50 51 52 aaa50 bbb50 ccccc50
51 52 53 aaa51 bbb51 ccccc51
52 53 54 aaa52 bbb52 ccccc52
53 54 55 aaa53 bbb53 ccccc53
54 55 56 aaa54 bbb54 ccccc54
55 56 57 aaa55 bbb55 ccccc55
56 57 58 aaa56 bbb56 ccccc56
57 58 59 aaa57 bbb57 ccccc57
58 59 60 aaa58 bbb58 ccccc58
59 60 61 aaa59 bbb59 ccccc59
60 61 62 aaa60 bbb60 ccccc60
61 62 63 aaa61 bbb61 ccccc61
62 63 64 aaa62 bbb62 ccccc62
63 64 65 aaa63 bbb63 ccccc63
64 65 66 aaa64 bbb64 ccccc64
65 66 67 aaa65 bbb65 ccccc65
66 67 68 aaa66 bbb66 ccccc66
67 68 69 aaa67 bbb67 ccccc67
68 69 70 aaa68 bbb68 ccccc68
69 70 71 aaa69 bbb69 ccccc69
70 71 72 aaa70 bbb70 ccccc70
71 72 73 aaa71 bbb71 ccccc71
72 73 74 aaa72 bbb72 ccccc72
73 74 75 aaa73 bbb73 ccccc73
74 75 76 aaa74 bbb74 ccccc74
75 76 77 aaa75 bbb75 ccccc75
76 77 78 aaa76 bbb76 ccccc76
77 78 79 aaa77 bbb77 ccccc77
78 79 80 aaa78 bbb78 ccccc78
79 80 81 aaa79 bbb79 ccccc79
80 81 82 aaa80 bbb80 ccccc80
81 82 83 aaa81 bbb81 ccccc81
82 83 84 aaa82 bbb82 ccccc82
83 84 85 aaa83 bbb83 ccccc83
84 85 86 aaa84 bbb84 ccccc84
85 86 87 aaa85 bbb85 ccccc85
86 87 88 aaa86 bbb86 ccccc86
87 88 89 aaa87 bbb87 ccccc87
88 89 90 aaa88 bbb88 ccccc88
89 90 91 aaa89 bbb89 ccccc89
90 91 92 aaa90 bbb90 ccccc90
91 92 93 aaa91 bbb91 ccccc91
92 93 94 aaa92 bbb92 ccccc92
93 94 95 aaa93 bbb93 ccccc93
94 95 96 aaa94 bbb94 ccccc94
95 96 97 aaa95 bbb95 ccccc95
96 97 98 aaa96 bbb96 ccccc96
97 98 99 aaa97 bbb97 ccccc97
98 99 100 aaa98 bbb98 ccccc98
99 100 101 aaa99 bbb99 ccccc99
100 101 102 aaa100 bbb100 ccccc100
DROP TABLE test.t;
ALTER TABLESPACE ts1
DROP DATAFILE 'datafile_ts1_01.dat'
ENGINE = NDB;
......
......@@ -14,6 +14,12 @@
-- source include/have_ndb.inc
#
# Bug#30322 Server crashes on selecting from i_s.columns when cluster is running -regression
#
--replace_column 1 #
select count(*) from information_schema.columns;
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
......
......@@ -333,11 +333,18 @@ ENGINE NDB;
###
#
# bug#16341
create table t1 (a int primary key) engine = myisam;
#create table t1 (a int primary key) engine = myisam;
# 2007-08-22 Jeb
# Removed the use of create table and manually
# created the file to cause failure due to
# inconsistant results on other OS
# see #bug30559
--exec touch $MYSQLTEST_VARDIR/tmp/t1.frm
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error ER_CREATE_FILEGROUP_FAILED
--eval create logfile group lg1 add undofile '$MYSQLTEST_VARDIR/master-data/test/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb;
--eval create logfile group lg1 add undofile '$MYSQLTEST_VARDIR/tmp/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb;
create logfile group lg1
add undofile 'undofile.dat'
......@@ -347,7 +354,7 @@ engine=ndb;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error ER_CREATE_FILEGROUP_FAILED
--eval create tablespace ts1 add datafile '$MYSQLTEST_VARDIR/master-data/test/t1.frm' use logfile group lg1 initial_size 1M engine ndb;
--eval create tablespace ts1 add datafile '$MYSQLTEST_VARDIR/tmp/t1.frm' use logfile group lg1 initial_size 1M engine ndb;
--error ER_DROP_FILEGROUP_FAILED
drop tablespace ts1
......@@ -356,8 +363,8 @@ engine ndb;
drop logfile group lg1
engine ndb;
drop table t1;
#drop table t1;
--exec rm $MYSQLTEST_VARDIR/tmp/t1.frm
# End 5.1 test
......@@ -224,43 +224,44 @@ DROP TABLE t3;
#### BUG 18856 test case comented out
##### Use "SELECT * INTO OUTFILE" to dump data and "LOAD DATA INFILE" to load ##### data back to the data file.
#CREATE TABLE test.t (
# a smallint NOT NULL,
# b int NOT NULL,
# c bigint NOT NULL,
# d char(10),
# e TEXT,
# f VARCHAR(255),
# PRIMARY KEY(a)
#) TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
# ALTER TABLE test.t ADD INDEX (d), ADD INDEX (f);
# SHOW CREATE TABLE test.t;
CREATE TABLE test.t (
a smallint NOT NULL,
b int NOT NULL,
c bigint NOT NULL,
d char(10),
e TEXT,
f VARCHAR(255),
PRIMARY KEY(a)
) TABLESPACE ts1 STORAGE DISK ENGINE=NDB;
ALTER TABLE test.t ADD INDEX (d), ADD INDEX (f);
SHOW CREATE TABLE test.t;
# insert records into tables
# let $1=100;
# disable_query_log;
# while ($1)
# {
# eval insert into test.t values($1, $1+1, $1+2, "aaa$1", "bbb$1", "ccccc$1");
# dec $1;
# }
# enable_query_log;
let $1=100;
disable_query_log;
while ($1)
{
eval insert into test.t values($1, $1+1, $1+2, "aaa$1", "bbb$1", "ccccc$1");
dec $1;
}
enable_query_log;
# SELECT * FROM test.t order by a;
SELECT * FROM test.t order by a;
# SELECT * INTO OUTFILE 't_backup' FROM test.t;
# TRUNCATE test.t;
SELECT * INTO OUTFILE 't_backup' FROM test.t;
TRUNCATE test.t;
#'TRUNCATE test.t' failed: 1205: Lock wait timeout exceeded; try restarting #transaction. TABLESPACE ts STORAGE DISK ENGINE=NDB;
#'TRUNCATE test.t' failed: 1205: Lock wait timeout exceeded; try restarting
#transaction. TABLESPACE ts STORAGE DISK ENGINE=NDB;
# SELECT count(*) FROM test.t;
# LOAD DATA INFILE 't_backup' INTO TABLE test.t;
SELECT count(*) FROM test.t;
LOAD DATA INFILE 't_backup' INTO TABLE test.t;
# SELECT * FROM test.t order by a;
SELECT * FROM test.t order by a;
# DROP TABLE test.t;
DROP TABLE test.t;
ALTER TABLESPACE ts1
......
......@@ -1145,4 +1145,20 @@ explain select b.table_name
from information_schema.tables a, information_schema.columns b
where a.table_name='t1' and a.table_schema='test' and b.table_name=a.table_name;
#
# Bug#30310 wrong result on SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE ..
#
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME = 'mysqltest';
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME = '';
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME = 'test';
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysql' AND TABLE_NAME='nonexisting';
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysql' AND TABLE_NAME='';
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='';
select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='nonexisting';
--echo End of 5.1 tests.
......@@ -23,14 +23,9 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
# Exception is the embedded server that needs this library compiled with
# dynamic TLS, i.e. define USE_TLS
IF(EMBEDDED_ONLY)
ADD_DEFINITIONS(-DUSE_TLS)
ADD_DEFINITIONS(-DEMBEDDED_LIBRARY)
ENDIF(EMBEDDED_ONLY)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/mysys)
ADD_LIBRARY(mysys array.c charset-def.c charset.c checksum.c default.c default_modify.c
SET(MYSYS_SOURCES array.c charset-def.c charset.c checksum.c default.c default_modify.c
errors.c hash.c list.c md5.c mf_brkhant.c mf_cache.c mf_dirname.c mf_fn_ext.c
mf_format.c mf_getdate.c mf_iocache.c mf_iocache2.c mf_keycache.c
mf_keycaches.c mf_loadpath.c mf_pack.c mf_path.c mf_qsort.c mf_qsort2.c
......@@ -47,3 +42,7 @@ ADD_LIBRARY(mysys array.c charset-def.c charset.c checksum.c default.c default_m
my_windac.c my_winthread.c my_write.c ptr_cmp.c queues.c
rijndael.c safemalloc.c sha1.c string.c thr_alarm.c thr_lock.c thr_mutex.c
thr_rwlock.c tree.c typelib.c my_vle.c base64.c my_memmem.c my_getpagesize.c)
IF(NOT SOURCE_SUBLIBS)
ADD_LIBRARY(mysys ${MYSYS_SOURCES})
ENDIF(NOT SOURCE_SUBLIBS)
......@@ -19,7 +19,9 @@
#include "mysys_priv.h"
#include <m_string.h>
#if !defined(__FreeBSD__) || defined(__linux__)
#ifndef MAIN
#if defined(__FreeBSD__) || defined(__linux__)
static my_bool memcpy_and_test(uchar *to, uchar *from, uint len)
{
uint i, res=1;
......@@ -29,6 +31,7 @@ static my_bool memcpy_and_test(uchar *to, uchar *from, uint len)
res=0;
return res;
}
#endif /* FreeBSD || linux */
#ifdef __FreeBSD__
......@@ -98,7 +101,7 @@ err:
return res;
}
#else
#else /* FreeBSD elif linux */
/* just fail */
my_bool my_gethwaddr(uchar *to __attribute__((unused)))
{
......
......@@ -29,8 +29,15 @@ fi
# configure
./configure $base_configs $extra_configs
# make
make clean bin-dist
# Ensure a clean tree
make clean
# Link NetWare specific .def files into their proper locations
# in the source tree
( cd netware && make link_sources )
# Now, do the real build
make bin-dist
# mark the build
for file in *.tar.gz *.zip
......
This diff is collapsed.
#------------------------------------------------------------------------------
# ISAM Check
#------------------------------------------------------------------------------
MODULE libc.nlm
SCREENNAME "MySQL ISAM Table Check Tool"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL ISAM Table Check Tool"
VERSION 4, 0
STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment