diff --git a/CMakeLists.txt b/CMakeLists.txt index 544c48f79f6..6c7e89974c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -331,23 +331,33 @@ ELSE() SET(CPACK_GENERATOR "TGZ") ENDIF() ADD_SUBDIRECTORY(packaging/WiX) + +# Create a single package with "make package" +# (see http://public.kitware.com/Bug/view.php?id=11452) +SET(CPACK_MONOLITHIC_INSTALL 1 CACHE INTERNAL "") + INCLUDE(CPack) IF(UNIX) - INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL) + INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL COMPONENT Info) ENDIF() # # RPM installs documentation directly from the source tree # IF(NOT INSTALL_LAYOUT MATCHES "RPM") - INSTALL(FILES COPYING EXCEPTIONS-CLIENT LICENSE.mysql DESTINATION ${INSTALL_DOCREADMEDIR} OPTIONAL) - INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR}) + INSTALL(FILES COPYING EXCEPTIONS-CLIENT LICENSE.mysql + DESTINATION ${INSTALL_DOCREADMEDIR} + COMPONENT Readme + OPTIONAL + ) + INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme) IF(UNIX) - INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR}) + INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme) ENDIF() # MYSQL_DOCS_LOCATON is used in "make dist", points to the documentation directory SET(MYSQL_DOCS_LOCATION "" CACHE PATH "Location from where documentation is copied") MARK_AS_ADVANCED(MYSQL_DOCS_LOCATION) INSTALL(DIRECTORY Docs/ DESTINATION ${INSTALL_DOCDIR} + COMPONENT Documentation PATTERN "INSTALL-BINARY" EXCLUDE PATTERN "Makefile.*" EXCLUDE PATTERN "glibc*" EXCLUDE diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake index bc8d9945690..e244e4262e0 100644 --- a/cmake/install_macros.cmake +++ b/cmake/install_macros.cmake @@ -78,7 +78,9 @@ FUNCTION(INSTALL_MANPAGE file) ELSE() SET(SECTION man8) ENDIF() - INSTALL(FILES "${MANPAGE}" DESTINATION "${INSTALL_MANDIR}/${SECTION}") + MESSAGE("huj!") + INSTALL(FILES "${MANPAGE}" DESTINATION "${INSTALL_MANDIR}/${SECTION}" + COMPONENT ManPages) ENDIF() ENDFUNCTION() @@ -137,12 +139,7 @@ IF(UNIX) STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" output ${output}) ENDIF() - IF(component) - SET(COMP COMPONENT ${component}) - ELSE() - SET(COMP) - ENDIF() - INSTALL(FILES ${output} DESTINATION ${destination} ${COMP}) + INSTALL(FILES ${output} DESTINATION ${destination} COMPONENT ${component}) ENDIF() ENDMACRO() @@ -224,8 +221,6 @@ FUNCTION(MYSQL_INSTALL_TARGETS) IF(SIGNCODE AND SIGNCODE_ENABLED) SIGN_TARGET(${target}) ENDIF() - # For Windows, add version info to executables - ADD_VERSION_INFO(${target}) # Install man pages on Unix IF(UNIX) GET_TARGET_PROPERTY(target_location ${target} LOCATION) diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake index 0cc8895f43e..89eb5a74d80 100644 --- a/cmake/libutils.cmake +++ b/cmake/libutils.cmake @@ -250,6 +250,9 @@ MACRO(MERGE_LIBRARIES) ENDFOREACH() ENDIF() CREATE_EXPORT_FILE(SRC ${TARGET} "${ARG_EXPORTS}") + IF(NOT ARG_NOINSTALL) + ADD_VERSION_INFO(${TARGET} SHARED SRC) + ENDIF() ADD_LIBRARY(${TARGET} ${LIBTYPE} ${SRC}) TARGET_LINK_LIBRARIES(${TARGET} ${LIBS}) IF(ARG_OUTPUT_NAME) diff --git a/cmake/mysql_add_executable.cmake b/cmake/mysql_add_executable.cmake index b49a737716c..ac812fbcdfd 100644 --- a/cmake/mysql_add_executable.cmake +++ b/cmake/mysql_add_executable.cmake @@ -37,7 +37,7 @@ FUNCTION (MYSQL_ADD_EXECUTABLE) LIST(REMOVE_AT ARG_DEFAULT_ARGS 0) SET(sources ${ARG_DEFAULT_ARGS}) - + ADD_VERSION_INFO(${target} EXECUTABLE sources) ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources}) # tell CPack where to install IF(NOT ARG_EXCLUDE_FROM_ALL) diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake index 886d7b9e8a9..9f0f7729c22 100644 --- a/cmake/mysql_version.cmake +++ b/cmake/mysql_version.cmake @@ -133,9 +133,8 @@ ENDIF() # Refer to http://msdn.microsoft.com/en-us/library/aa381058(VS.85).aspx # for more info. IF(MSVC) - GET_TARGET_PROPERTY(location gen_versioninfo LOCATION) - IF(NOT location) GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) + SET(FILETYPE VFT_APP) CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in ${CMAKE_BINARY_DIR}/versioninfo_exe.rc) @@ -143,31 +142,14 @@ IF(MSVC) SET(FILETYPE VFT_DLL) CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in ${CMAKE_BINARY_DIR}/versioninfo_dll.rc) - - ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_BINARY_DIR}/versioninfo_exe.res - ${CMAKE_BINARY_DIR}/versioninfo_dll.res - COMMAND ${CMAKE_RC_COMPILER} versioninfo_exe.rc - COMMAND ${CMAKE_RC_COMPILER} versioninfo_dll.rc - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - ) - ADD_CUSTOM_TARGET(gen_versioninfo - DEPENDS - ${CMAKE_BINARY_DIR}/versioninfo_exe.res - ${CMAKE_BINARY_DIR}/versioninfo_dll.res - ) - ENDIF() - - FUNCTION(ADD_VERSION_INFO target) - GET_TARGET_PROPERTY(target_type ${target} TYPE) - ADD_DEPENDENCIES(${target} gen_versioninfo) - IF(target_type MATCHES "SHARED" OR target_type MATCHES "MODULE") - SET_PROPERTY(TARGET ${target} APPEND PROPERTY LINK_FLAGS - "\"${CMAKE_BINARY_DIR}/versioninfo_dll.res\"") - ELSEIF(target_type MATCHES "EXE") - SET_PROPERTY(TARGET ${target} APPEND PROPERTY LINK_FLAGS - "${target_link_flags} \"${CMAKE_BINARY_DIR}/versioninfo_exe.res\"") + + FUNCTION(ADD_VERSION_INFO target target_type sources_var) + IF("${target_type}" MATCHES "SHARED" OR "${target_type}" MATCHES "MODULE") + SET(rcfile ${CMAKE_BINARY_DIR}/versioninfo_dll.rc) + ELSEIF("${target_type}" MATCHES "EXE") + SET(rcfile ${CMAKE_BINARY_DIR}/versioninfo_exe.rc) ENDIF() + SET(${sources_var} ${${sources_var}} ${rcfile} PARENT_SCOPE) ENDFUNCTION() ELSE() FUNCTION(ADD_VERSION_INFO) diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake index 94fdc8bf1e9..bf34407db25 100644 --- a/cmake/plugin.cmake +++ b/cmake/plugin.cmake @@ -151,6 +151,7 @@ MACRO(MYSQL_ADD_PLUGIN) ENDIF() ENDIF() + ADD_VERSION_INFO(${target} MODULE SOURCES) ADD_LIBRARY(${target} MODULE ${SOURCES}) DTRACE_INSTRUMENT(${target}) SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX "" diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt index 7441423743e..d7426c465d8 100644 --- a/libmysql/CMakeLists.txt +++ b/libmysql/CMakeLists.txt @@ -172,7 +172,7 @@ IF(UNIX) SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION}) ENDIF() ENDMACRO() - INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} COMPONENT SharedLibraries) + INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} Development) ENDIF() IF(NOT DISABLE_SHARED) @@ -210,7 +210,7 @@ IF(NOT DISABLE_SHARED) "${CMAKE_SHARED_LIBRARY_SUFFIX}" "" linkname) - INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} COMPONENT SharedLibraries) + INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries) SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}") LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS) FOREACH(ver ${OS_SHARED_LIB_SYMLINKS}) @@ -219,7 +219,7 @@ IF(NOT DISABLE_SHARED) "${CMAKE_SHARED_LIBRARY_SUFFIX}" "${ver}" linkname) - INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} COMPONENT SharedLibraries) + INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries) ENDFOREACH() ENDIF() ENDIF() diff --git a/libservices/CMakeLists.txt b/libservices/CMakeLists.txt index 396430fba12..300e0ce32a3 100644 --- a/libservices/CMakeLists.txt +++ b/libservices/CMakeLists.txt @@ -22,4 +22,4 @@ SET(MYSQLSERVICES_SOURCES my_thread_scheduler_service.c) ADD_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES}) -INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR}) +INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development) diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt index 7c96deada08..135d66634e4 100644 --- a/man/CMakeLists.txt +++ b/man/CMakeLists.txt @@ -21,8 +21,10 @@ IF(MAN1_FILES) IF(MAN1_EXCLUDE) LIST(REMOVE_ITEM MAN1_FILES ${MAN1_EXCLUDE}) ENDIF() - INSTALL(FILES ${MAN1_FILES} DESTINATION ${INSTALL_MANDIR}/man1) + INSTALL(FILES ${MAN1_FILES} DESTINATION ${INSTALL_MANDIR}/man1 + COMPONENT ManPages) ENDIF() IF(MAN8_FILES) - INSTALL(FILES ${MAN8_FILES} DESTINATION ${INSTALL_MANDIR}/man8) + INSTALL(FILES ${MAN8_FILES} DESTINATION ${INSTALL_MANDIR}/man8 + COMPONENT ManPages) ENDIF() diff --git a/mysql-test/CMakeLists.txt b/mysql-test/CMakeLists.txt index 3c38e5772d0..f18b2ae341c 100644 --- a/mysql-test/CMakeLists.txt +++ b/mysql-test/CMakeLists.txt @@ -53,7 +53,8 @@ IF(UNIX) IF(INSTALL_MYSQLTESTDIR) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mtr ${CMAKE_CURRENT_BINARY_DIR}/mysql-test-run - DESTINATION ${INSTALL_MYSQLTESTDIR}) + DESTINATION ${INSTALL_MYSQLTESTDIR} + COMPONENT Test) ENDIF() ENDIF() diff --git a/mysql-test/collections/default.weekly b/mysql-test/collections/default.weekly index d874c2f4519..33d13d8edfd 100644 --- a/mysql-test/collections/default.weekly +++ b/mysql-test/collections/default.weekly @@ -1,2 +1,2 @@ perl mysql-test-run.pl --timer --force --comment=1st --experimental=collections/default.experimental 1st -perl mysql-test-run.pl --timer --force --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_1_2_ndb parts.partition_alter1_1_ndb parts.partition_alter1_2_innodb parts.partition_alter1_2_ndb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb main.variables-big rpl_ndb.rpl_truncate_7ndb_2 +perl mysql-test-run.pl --timer --force --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 large_tests.alter_table main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_1_2_ndb parts.partition_alter1_1_ndb parts.partition_alter1_2_innodb parts.partition_alter1_2_ndb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb rpl_ndb.rpl_truncate_7ndb_2 diff --git a/mysql-test/r/information_schema-big.result b/mysql-test/r/information_schema-big.result index 248b8d606dc..92408c439a5 100644 --- a/mysql-test/r/information_schema-big.result +++ b/mysql-test/r/information_schema-big.result @@ -30,6 +30,7 @@ FILES TABLE_SCHEMA GLOBAL_STATUS VARIABLE_NAME GLOBAL_VARIABLES VARIABLE_NAME KEY_COLUMN_USAGE CONSTRAINT_SCHEMA +PARAMETERS SPECIFIC_SCHEMA PARTITIONS TABLE_SCHEMA PLUGINS PLUGIN_NAME PROCESSLIST ID @@ -42,6 +43,7 @@ SESSION_STATUS VARIABLE_NAME SESSION_VARIABLES VARIABLE_NAME STATISTICS TABLE_SCHEMA TABLES TABLE_SCHEMA +TABLESPACES TABLESPACE_NAME TABLE_CONSTRAINTS CONSTRAINT_SCHEMA TABLE_PRIVILEGES TABLE_SCHEMA TRIGGERS TRIGGER_SCHEMA @@ -74,6 +76,7 @@ FILES TABLE_SCHEMA GLOBAL_STATUS VARIABLE_NAME GLOBAL_VARIABLES VARIABLE_NAME KEY_COLUMN_USAGE CONSTRAINT_SCHEMA +PARAMETERS SPECIFIC_SCHEMA PARTITIONS TABLE_SCHEMA PLUGINS PLUGIN_NAME PROCESSLIST ID @@ -86,6 +89,7 @@ SESSION_STATUS VARIABLE_NAME SESSION_VARIABLES VARIABLE_NAME STATISTICS TABLE_SCHEMA TABLES TABLE_SCHEMA +TABLESPACES TABLESPACE_NAME TABLE_CONSTRAINTS CONSTRAINT_SCHEMA TABLE_PRIVILEGES TABLE_SCHEMA TRIGGERS TRIGGER_SCHEMA diff --git a/mysql-test/r/not_embedded_server.result b/mysql-test/r/not_embedded_server.result index fac38624695..ce229bf3e2e 100644 --- a/mysql-test/r/not_embedded_server.result +++ b/mysql-test/r/not_embedded_server.result @@ -14,3 +14,32 @@ flush privileges; ERROR HY000: Table 'host' was not locked with LOCK TABLES unlock tables; drop table t1; +# +# Bug#54812: assert in Diagnostics_area::set_ok_status during EXPLAIN +# +CREATE USER nopriv_user@localhost; +connection: default +DROP TABLE IF EXISTS t1,t2,t3; +DROP FUNCTION IF EXISTS f; +CREATE TABLE t1 (key1 INT PRIMARY KEY); +CREATE TABLE t2 (key2 INT); +INSERT INTO t1 VALUES (1),(2); +CREATE FUNCTION f() RETURNS INT RETURN 1; +GRANT FILE ON *.* TO 'nopriv_user'@'localhost'; +FLUSH PRIVILEGES; +connection: con1 +SELECT MAX(key1) FROM t1 WHERE f() < 1 INTO OUTFILE 'mytest'; +ERROR 42000: execute command denied to user 'nopriv_user'@'localhost' for routine 'test.f' +INSERT INTO t2 SELECT MAX(key1) FROM t1 WHERE f() < 1; +ERROR 42000: execute command denied to user 'nopriv_user'@'localhost' for routine 'test.f' +SELECT MAX(key1) INTO @dummy FROM t1 WHERE f() < 1; +ERROR 42000: execute command denied to user 'nopriv_user'@'localhost' for routine 'test.f' +CREATE TABLE t3 (i INT) AS SELECT MAX(key1) FROM t1 WHERE f() < 1; +ERROR 42000: execute command denied to user 'nopriv_user'@'localhost' for routine 'test.f' +connection: default +DROP TABLE t1,t2; +DROP FUNCTION f; +DROP USER nopriv_user@localhost; +# +# End Bug#54812 +# diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 80676c0d324..a639f9e6b3b 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1,5 +1,38 @@ drop table if exists t1, t2; # +# Bug#57778: failed primary key add to partitioned innodb table +# inconsistent and crashes +# +CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL) +PARTITION BY KEY (a) PARTITIONS 2; +INSERT INTO t1 VALUES (0,1), (0,2); +ALTER TABLE t1 ADD PRIMARY KEY (a); +ERROR 23000: Duplicate entry '0' for key 'PRIMARY' +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` int(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY KEY (a) +PARTITIONS 2 */ +SELECT * FROM t1; +a b +0 1 +0 2 +UPDATE t1 SET a = 1, b = 1 WHERE a = 0 AND b = 2; +ALTER TABLE t1 ADD PRIMARY KEY (a); +SELECT * FROM t1; +a b +1 1 +0 1 +ALTER TABLE t1 DROP PRIMARY KEY; +SELECT * FROM t1; +a b +1 1 +0 1 +DROP TABLE t1; +# # Bug#57113: ha_partition::extra(ha_extra_function): # Assertion `m_extra_cache' failed CREATE TABLE t1 diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 33282823931..17f639cdca3 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -3202,6 +3202,510 @@ test1 DROP PROCEDURE p1; DROP PROCEDURE p2; +TINYINT + +CREATE PROCEDURE p1(OUT v TINYINT) +SET v = 127; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 127; +@a @a = 127 +127 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +SMALLINT + +CREATE PROCEDURE p1(OUT v SMALLINT) +SET v = 32767; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 32767; +@a @a = 32767 +32767 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +MEDIUMINT + +CREATE PROCEDURE p1(OUT v MEDIUMINT) +SET v = 8388607; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 8388607; +@a @a = 8388607 +8388607 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +INT + +CREATE PROCEDURE p1(OUT v INT) +SET v = 2147483647; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 2147483647; +@a @a = 2147483647 +2147483647 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +BIGINT + +CREATE PROCEDURE p1(OUT v BIGINT) +SET v = 9223372036854775807; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 9223372036854775807; +@a @a = 9223372036854775807 +9223372036854775807 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +BIT(11) + +CREATE PROCEDURE p1(OUT v BIT(11)) +SET v = b'10100100101'; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = b'10100100101'; +@a @a = b'10100100101' +1317 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +TIMESTAMP + +CREATE PROCEDURE p1(OUT v TIMESTAMP) +SET v = '2007-11-18 15:01:02'; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = '2007-11-18 15:01:02'; +@a @a = '2007-11-18 15:01:02' +2007-11-18 15:01:02 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +DATETIME + +CREATE PROCEDURE p1(OUT v DATETIME) +SET v = '1234-11-12 12:34:59'; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = '1234-11-12 12:34:59'; +@a @a = '1234-11-12 12:34:59' +1234-11-12 12:34:59 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +TIME + +CREATE PROCEDURE p1(OUT v TIME) +SET v = '123:45:01'; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = '123:45:01'; +@a @a = '123:45:01' +123:45:01 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +DATE + +CREATE PROCEDURE p1(OUT v DATE) +SET v = '1234-11-12'; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = '1234-11-12'; +@a @a = '1234-11-12' +1234-11-12 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +YEAR + +CREATE PROCEDURE p1(OUT v YEAR) +SET v = 2010; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 2010; +@a @a = 2010 +2010 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +FLOAT(7, 4) + +CREATE PROCEDURE p1(OUT v FLOAT(7, 4)) +SET v = 123.4567; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` double DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a - 123.4567 < 0.00001; +@a @a - 123.4567 < 0.00001 +123.45670318603516 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +DOUBLE(8, 5) + +CREATE PROCEDURE p1(OUT v DOUBLE(8, 5)) +SET v = 123.45678; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` double DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a - 123.45678 < 0.000001; +@a @a - 123.45678 < 0.000001 +123.45678 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +DECIMAL(9, 6) + +CREATE PROCEDURE p1(OUT v DECIMAL(9, 6)) +SET v = 123.456789; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` decimal(65,30) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 123.456789; +@a @a = 123.456789 +123.456789 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +CHAR(32) + +CREATE PROCEDURE p1(OUT v CHAR(32)) +SET v = REPEAT('a', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('a', 16); +@a @a = REPEAT('a', 16) +aaaaaaaaaaaaaaaa 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +VARCHAR(32) + +CREATE PROCEDURE p1(OUT v VARCHAR(32)) +SET v = REPEAT('b', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('b', 16); +@a @a = REPEAT('b', 16) +bbbbbbbbbbbbbbbb 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +TINYTEXT + +CREATE PROCEDURE p1(OUT v TINYTEXT) +SET v = REPEAT('c', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('c', 16); +@a @a = REPEAT('c', 16) +cccccccccccccccc 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +TEXT + +CREATE PROCEDURE p1(OUT v TEXT) +SET v = REPEAT('d', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('d', 16); +@a @a = REPEAT('d', 16) +dddddddddddddddd 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +MEDIUMTEXT + +CREATE PROCEDURE p1(OUT v MEDIUMTEXT) +SET v = REPEAT('e', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('e', 16); +@a @a = REPEAT('e', 16) +eeeeeeeeeeeeeeee 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +LONGTEXT + +CREATE PROCEDURE p1(OUT v LONGTEXT) +SET v = REPEAT('f', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('f', 16); +@a @a = REPEAT('f', 16) +ffffffffffffffff 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +BINARY(32) + +CREATE PROCEDURE p1(OUT v BINARY(32)) +SET v = REPEAT('g', 32); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('g', 32); +@a @a = REPEAT('g', 32) +gggggggggggggggggggggggggggggggg 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +VARBINARY(32) + +CREATE PROCEDURE p1(OUT v VARBINARY(32)) +SET v = REPEAT('h', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('h', 16); +@a @a = REPEAT('h', 16) +hhhhhhhhhhhhhhhh 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +TINYBLOB + +CREATE PROCEDURE p1(OUT v TINYBLOB) +SET v = REPEAT('i', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('i', 16); +@a @a = REPEAT('i', 16) +iiiiiiiiiiiiiiii 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +BLOB + +CREATE PROCEDURE p1(OUT v BLOB) +SET v = REPEAT('j', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('j', 16); +@a @a = REPEAT('j', 16) +jjjjjjjjjjjjjjjj 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +MEDIUMBLOB + +CREATE PROCEDURE p1(OUT v MEDIUMBLOB) +SET v = REPEAT('k', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('k', 16); +@a @a = REPEAT('k', 16) +kkkkkkkkkkkkkkkk 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +LONGBLOB + +CREATE PROCEDURE p1(OUT v LONGBLOB) +SET v = REPEAT('l', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('l', 16); +@a @a = REPEAT('l', 16) +llllllllllllllll 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +SET('aaa', 'bbb') + +CREATE PROCEDURE p1(OUT v SET('aaa', 'bbb')) +SET v = 'aaa'; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 'aaa'; +@a @a = 'aaa' +aaa 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +ENUM('aaa', 'bbb') + +CREATE PROCEDURE p1(OUT v ENUM('aaa', 'bbb')) +SET v = 'aaa'; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 'aaa'; +@a @a = 'aaa' +aaa 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + # End of WL#4435. # # WL#4284: Transactional DDL locking diff --git a/mysql-test/r/variables-big.result b/mysql-test/r/variables-big.result index 960fc6d22f4..71b32393d82 100644 --- a/mysql-test/r/variables-big.result +++ b/mysql-test/r/variables-big.result @@ -1,20 +1,20 @@ SET SESSION transaction_prealloc_size=1024*1024*1024*1; SHOW PROCESSLIST; Id User Host db Command Time State Info - root localhost test Query