mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
This commit is contained in:
@ -146,8 +146,8 @@ test-bt:
|
|||||||
cd mysql-test ; MTR_BUILD_THREAD=auto \
|
cd mysql-test ; MTR_BUILD_THREAD=auto \
|
||||||
@PERL@ ./mysql-test-run.pl --comment=NIST+ps --force --suite=nist --ps-protocol ; \
|
@PERL@ ./mysql-test-run.pl --comment=NIST+ps --force --suite=nist --ps-protocol ; \
|
||||||
fi
|
fi
|
||||||
-cd mysql-test ; MTR_BUILD_THREAD=auto \
|
-cd mysql-test ; MTR_BUILD_THREAD=auto \
|
||||||
@PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress
|
@PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress
|
||||||
|
|
||||||
# Re-enable the "jp" suite when bug#28563 is fixed
|
# Re-enable the "jp" suite when bug#28563 is fixed
|
||||||
# -cd mysql-test ; MTR_BUILD_THREAD=auto \
|
# -cd mysql-test ; MTR_BUILD_THREAD=auto \
|
||||||
|
@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
|
|||||||
#
|
#
|
||||||
# When changing major version number please also check switch statement
|
# When changing major version number please also check switch statement
|
||||||
# in mysqlbinlog::check_master_version().
|
# in mysqlbinlog::check_master_version().
|
||||||
AM_INIT_AUTOMAKE(mysql, 5.1.22-beta)
|
AM_INIT_AUTOMAKE(mysql, 5.1.22-rc)
|
||||||
AM_CONFIG_HEADER([include/config.h:config.h.in])
|
AM_CONFIG_HEADER([include/config.h:config.h.in])
|
||||||
|
|
||||||
PROTOCOL_VERSION=10
|
PROTOCOL_VERSION=10
|
||||||
|
@ -55,7 +55,7 @@ f106 year(3) not null default 2000,
|
|||||||
f107 year(4) not null default 2000,
|
f107 year(4) not null default 2000,
|
||||||
f108 enum("1enum","2enum") not null default "1enum",
|
f108 enum("1enum","2enum") not null default "1enum",
|
||||||
f109 set("1set","2set") not null default "1set"
|
f109 set("1set","2set") not null default "1set"
|
||||||
) engine = innodb;
|
) engine = ndb;
|
||||||
|
|
||||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
--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 ;
|
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb2.txt' into table tb2 ;
|
||||||
|
@ -1211,7 +1211,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 37
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -1232,7 +1232,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 424
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -1253,7 +1253,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 901
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -1274,7 +1274,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Dynamic
|
ROW_FORMAT Dynamic
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 479
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -3241,14 +3241,14 @@ NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
|
|||||||
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
|
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
|
||||||
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
|
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
|
||||||
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
|
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
|
||||||
NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 0 NULL NULL BTREE
|
NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 37 NULL NULL BTREE
|
||||||
NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
|
||||||
NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 0 NULL NULL BTREE
|
NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 424 NULL NULL BTREE
|
||||||
NULL mysql help_keyword 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_keyword 0 mysql name 1 name A 424 NULL NULL BTREE
|
||||||
NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
|
NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
|
||||||
NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 0 NULL NULL BTREE
|
NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 901 NULL NULL BTREE
|
||||||
NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 0 NULL NULL BTREE
|
NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 479 NULL NULL BTREE
|
||||||
NULL mysql help_topic 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_topic 0 mysql name 1 name A 479 NULL NULL BTREE
|
||||||
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||||
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
|
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
|
||||||
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
|
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
|
||||||
@ -3481,7 +3481,7 @@ max_recs
|
|||||||
45
|
45
|
||||||
select max(cardinality) from statistics;
|
select max(cardinality) from statistics;
|
||||||
max(cardinality)
|
max(cardinality)
|
||||||
393
|
901
|
||||||
select concat("View '",
|
select concat("View '",
|
||||||
table_name, "' is associated with the database '", table_schema, "'.")
|
table_name, "' is associated with the database '", table_schema, "'.")
|
||||||
AS "Who is Who for the Views"
|
AS "Who is Who for the Views"
|
||||||
@ -4547,7 +4547,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 37
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -4568,7 +4568,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 424
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -4589,7 +4589,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 901
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -4610,7 +4610,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Dynamic
|
ROW_FORMAT Dynamic
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 479
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -5826,7 +5826,7 @@ routine_definition
|
|||||||
select * from statistics group by index_name asc limit 0, 5;
|
select * from statistics group by index_name asc limit 0, 5;
|
||||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
|
||||||
NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE
|
NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE
|
||||||
NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
|
||||||
NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||||
NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
|
NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
|
||||||
select concat(table_schema, ', ', table_name, ', ', view_definition) view_info
|
select concat(table_schema, ', ', table_name, ', ', view_definition) view_info
|
||||||
@ -14347,10 +14347,10 @@ NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-
|
|||||||
NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Events
|
NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Events
|
||||||
NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions
|
NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions
|
||||||
NULL mysql general_log BASE TABLE CSV 10 Dynamic 1 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL General log
|
NULL mysql general_log BASE TABLE CSV 10 Dynamic 1 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL General log
|
||||||
NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories
|
NULL mysql help_category BASE TABLE MyISAM 10 Fixed 37 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories
|
||||||
NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords
|
NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 424 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords
|
||||||
NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation
|
NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 901 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation
|
||||||
NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics
|
NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 479 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics
|
||||||
NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges
|
NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges
|
||||||
NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
|
NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
|
||||||
NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL MySQL plugins
|
NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL MySQL plugins
|
||||||
@ -14601,14 +14601,14 @@ NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
|
|||||||
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
|
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
|
||||||
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
|
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
|
||||||
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
|
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
|
||||||
NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 0 NULL NULL BTREE
|
NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 37 NULL NULL BTREE
|
||||||
NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
|
||||||
NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 0 NULL NULL BTREE
|
NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 424 NULL NULL BTREE
|
||||||
NULL mysql help_keyword 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_keyword 0 mysql name 1 name A 424 NULL NULL BTREE
|
||||||
NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
|
NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
|
||||||
NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 0 NULL NULL BTREE
|
NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 901 NULL NULL BTREE
|
||||||
NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 0 NULL NULL BTREE
|
NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 479 NULL NULL BTREE
|
||||||
NULL mysql help_topic 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_topic 0 mysql name 1 name A 479 NULL NULL BTREE
|
||||||
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||||
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
|
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
|
||||||
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
|
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
|
||||||
|
@ -81,6 +81,7 @@ BEGIN
|
|||||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||||
END//
|
END//
|
||||||
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
|
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
|
||||||
|
USE db_storedproc_1;
|
||||||
|
|
||||||
root@localhost db_storedproc_1
|
root@localhost db_storedproc_1
|
||||||
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
||||||
@ -92,6 +93,7 @@ CREATE PROCEDURE sp1(v1 char(20))
|
|||||||
BEGIN
|
BEGIN
|
||||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||||
END//
|
END//
|
||||||
|
USE db_storedproc_1;
|
||||||
|
|
||||||
root@localhost db_storedproc_1
|
root@localhost db_storedproc_1
|
||||||
DROP USER 'user_1'@'localhost';
|
DROP USER 'user_1'@'localhost';
|
||||||
@ -117,6 +119,7 @@ CREATE FUNCTION fn1(v1 int) returns int
|
|||||||
BEGIN
|
BEGIN
|
||||||
return v1;
|
return v1;
|
||||||
END//
|
END//
|
||||||
|
USE db_storedproc_1;
|
||||||
|
|
||||||
root@localhost db_storedproc_1
|
root@localhost db_storedproc_1
|
||||||
drop user 'user_1'@'localhost';
|
drop user 'user_1'@'localhost';
|
||||||
|
@ -58,7 +58,6 @@ load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
|||||||
|
|
||||||
Section 3.1.10 - CALL checks:
|
Section 3.1.10 - CALL checks:
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
USE db_storedproc;
|
|
||||||
|
|
||||||
Testcase 3.1.10.2 + 3.1.10.5:
|
Testcase 3.1.10.2 + 3.1.10.5:
|
||||||
-----------------------------
|
-----------------------------
|
||||||
@ -95,6 +94,7 @@ CALL sp31102();
|
|||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||||
SELECT fn31105( 9 );
|
SELECT fn31105( 9 );
|
||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||||
|
USE db_storedproc;
|
||||||
|
|
||||||
root@localhost db_storedproc
|
root@localhost db_storedproc
|
||||||
CALL sp31102();
|
CALL sp31102();
|
||||||
@ -114,6 +114,7 @@ a` a` 1000-01-01 -5000 a` -5000
|
|||||||
SELECT fn31105( 9 );
|
SELECT fn31105( 9 );
|
||||||
fn31105( 9 )
|
fn31105( 9 )
|
||||||
81
|
81
|
||||||
|
USE db_storedproc;
|
||||||
|
|
||||||
root@localhost db_storedproc
|
root@localhost db_storedproc
|
||||||
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
|
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
|
||||||
@ -131,6 +132,7 @@ CALL sp31102();
|
|||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||||
SELECT fn31105( 9 );
|
SELECT fn31105( 9 );
|
||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||||
|
USE db_storedproc;
|
||||||
|
|
||||||
root@localhost db_storedproc
|
root@localhost db_storedproc
|
||||||
DROP PROCEDURE sp31102;
|
DROP PROCEDURE sp31102;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1209,7 +1209,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 37
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -1230,7 +1230,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 424
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -1251,7 +1251,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 901
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -1272,7 +1272,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Dynamic
|
ROW_FORMAT Dynamic
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 479
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -3224,14 +3224,14 @@ NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
|
|||||||
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
|
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
|
||||||
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
|
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
|
||||||
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
|
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
|
||||||
NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 0 NULL NULL BTREE
|
NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 37 NULL NULL BTREE
|
||||||
NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
|
||||||
NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 0 NULL NULL BTREE
|
NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 424 NULL NULL BTREE
|
||||||
NULL mysql help_keyword 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_keyword 0 mysql name 1 name A 424 NULL NULL BTREE
|
||||||
NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
|
NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
|
||||||
NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 0 NULL NULL BTREE
|
NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 901 NULL NULL BTREE
|
||||||
NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 0 NULL NULL BTREE
|
NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 479 NULL NULL BTREE
|
||||||
NULL mysql help_topic 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_topic 0 mysql name 1 name A 479 NULL NULL BTREE
|
||||||
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||||
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
|
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
|
||||||
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
|
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
|
||||||
@ -3464,7 +3464,7 @@ max_recs
|
|||||||
45
|
45
|
||||||
select max(cardinality) from statistics;
|
select max(cardinality) from statistics;
|
||||||
max(cardinality)
|
max(cardinality)
|
||||||
393
|
901
|
||||||
select concat("View '",
|
select concat("View '",
|
||||||
table_name, "' is associated with the database '", table_schema, "'.")
|
table_name, "' is associated with the database '", table_schema, "'.")
|
||||||
AS "Who is Who for the Views"
|
AS "Who is Who for the Views"
|
||||||
@ -4530,7 +4530,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 37
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -4551,7 +4551,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 424
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -4572,7 +4572,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 901
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -4593,7 +4593,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Dynamic
|
ROW_FORMAT Dynamic
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 479
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -5809,7 +5809,7 @@ routine_definition
|
|||||||
select * from statistics group by index_name asc limit 0, 5;
|
select * from statistics group by index_name asc limit 0, 5;
|
||||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
|
||||||
NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE
|
NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE
|
||||||
NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
|
||||||
NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||||
NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
|
NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
|
||||||
select concat(table_schema, ', ', table_name, ', ', view_definition) view_info
|
select concat(table_schema, ', ', table_name, ', ', view_definition) view_info
|
||||||
@ -14245,10 +14245,10 @@ NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-
|
|||||||
NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Events
|
NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Events
|
||||||
NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions
|
NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions
|
||||||
NULL mysql general_log BASE TABLE CSV 10 Dynamic 1 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL General log
|
NULL mysql general_log BASE TABLE CSV 10 Dynamic 1 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL General log
|
||||||
NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories
|
NULL mysql help_category BASE TABLE MyISAM 10 Fixed 37 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories
|
||||||
NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords
|
NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 424 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords
|
||||||
NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation
|
NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 901 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation
|
||||||
NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics
|
NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 479 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics
|
||||||
NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges
|
NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges
|
||||||
NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
|
NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
|
||||||
NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL MySQL plugins
|
NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL MySQL plugins
|
||||||
@ -14499,14 +14499,14 @@ NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
|
|||||||
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
|
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
|
||||||
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
|
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
|
||||||
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
|
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
|
||||||
NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 0 NULL NULL BTREE
|
NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 37 NULL NULL BTREE
|
||||||
NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
|
||||||
NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 0 NULL NULL BTREE
|
NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 424 NULL NULL BTREE
|
||||||
NULL mysql help_keyword 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_keyword 0 mysql name 1 name A 424 NULL NULL BTREE
|
||||||
NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
|
NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
|
||||||
NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 0 NULL NULL BTREE
|
NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 901 NULL NULL BTREE
|
||||||
NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 0 NULL NULL BTREE
|
NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 479 NULL NULL BTREE
|
||||||
NULL mysql help_topic 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_topic 0 mysql name 1 name A 479 NULL NULL BTREE
|
||||||
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||||
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
|
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
|
||||||
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
|
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
|
||||||
|
@ -81,6 +81,7 @@ BEGIN
|
|||||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||||
END//
|
END//
|
||||||
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
|
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
|
||||||
|
USE db_storedproc_1;
|
||||||
|
|
||||||
root@localhost db_storedproc_1
|
root@localhost db_storedproc_1
|
||||||
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
||||||
@ -92,6 +93,7 @@ CREATE PROCEDURE sp1(v1 char(20))
|
|||||||
BEGIN
|
BEGIN
|
||||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||||
END//
|
END//
|
||||||
|
USE db_storedproc_1;
|
||||||
|
|
||||||
root@localhost db_storedproc_1
|
root@localhost db_storedproc_1
|
||||||
DROP USER 'user_1'@'localhost';
|
DROP USER 'user_1'@'localhost';
|
||||||
@ -117,6 +119,7 @@ CREATE FUNCTION fn1(v1 int) returns int
|
|||||||
BEGIN
|
BEGIN
|
||||||
return v1;
|
return v1;
|
||||||
END//
|
END//
|
||||||
|
USE db_storedproc_1;
|
||||||
|
|
||||||
root@localhost db_storedproc_1
|
root@localhost db_storedproc_1
|
||||||
drop user 'user_1'@'localhost';
|
drop user 'user_1'@'localhost';
|
||||||
|
@ -58,7 +58,6 @@ load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
|||||||
|
|
||||||
Section 3.1.10 - CALL checks:
|
Section 3.1.10 - CALL checks:
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
USE db_storedproc;
|
|
||||||
|
|
||||||
Testcase 3.1.10.2 + 3.1.10.5:
|
Testcase 3.1.10.2 + 3.1.10.5:
|
||||||
-----------------------------
|
-----------------------------
|
||||||
@ -95,6 +94,7 @@ CALL sp31102();
|
|||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||||
SELECT fn31105( 9 );
|
SELECT fn31105( 9 );
|
||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||||
|
USE db_storedproc;
|
||||||
|
|
||||||
root@localhost db_storedproc
|
root@localhost db_storedproc
|
||||||
CALL sp31102();
|
CALL sp31102();
|
||||||
@ -114,6 +114,7 @@ a` a` 1000-01-01 -5000 a` -5000
|
|||||||
SELECT fn31105( 9 );
|
SELECT fn31105( 9 );
|
||||||
fn31105( 9 )
|
fn31105( 9 )
|
||||||
81
|
81
|
||||||
|
USE db_storedproc;
|
||||||
|
|
||||||
root@localhost db_storedproc
|
root@localhost db_storedproc
|
||||||
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
|
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
|
||||||
@ -131,6 +132,7 @@ CALL sp31102();
|
|||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||||
SELECT fn31105( 9 );
|
SELECT fn31105( 9 );
|
||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||||
|
USE db_storedproc;
|
||||||
|
|
||||||
root@localhost db_storedproc
|
root@localhost db_storedproc
|
||||||
DROP PROCEDURE sp31102;
|
DROP PROCEDURE sp31102;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1239,7 +1239,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 37
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -1260,7 +1260,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 424
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -1281,7 +1281,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 901
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -1302,7 +1302,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Dynamic
|
ROW_FORMAT Dynamic
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 479
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -3294,14 +3294,14 @@ NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
|
|||||||
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
|
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
|
||||||
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
|
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
|
||||||
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
|
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
|
||||||
NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 0 NULL NULL BTREE
|
NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 37 NULL NULL BTREE
|
||||||
NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
|
||||||
NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 0 NULL NULL BTREE
|
NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 424 NULL NULL BTREE
|
||||||
NULL mysql help_keyword 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_keyword 0 mysql name 1 name A 424 NULL NULL BTREE
|
||||||
NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
|
NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
|
||||||
NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 0 NULL NULL BTREE
|
NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 901 NULL NULL BTREE
|
||||||
NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 0 NULL NULL BTREE
|
NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 479 NULL NULL BTREE
|
||||||
NULL mysql help_topic 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_topic 0 mysql name 1 name A 479 NULL NULL BTREE
|
||||||
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||||
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
|
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
|
||||||
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
|
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
|
||||||
@ -3534,7 +3534,7 @@ max_recs
|
|||||||
45
|
45
|
||||||
select max(cardinality) from statistics;
|
select max(cardinality) from statistics;
|
||||||
max(cardinality)
|
max(cardinality)
|
||||||
393
|
901
|
||||||
select concat("View '",
|
select concat("View '",
|
||||||
table_name, "' is associated with the database '", table_schema, "'.")
|
table_name, "' is associated with the database '", table_schema, "'.")
|
||||||
AS "Who is Who for the Views"
|
AS "Who is Who for the Views"
|
||||||
@ -4600,7 +4600,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 37
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -4621,7 +4621,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 424
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -4642,7 +4642,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Fixed
|
ROW_FORMAT Fixed
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 901
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -4663,7 +4663,7 @@ TABLE_TYPE BASE TABLE
|
|||||||
ENGINE MyISAM
|
ENGINE MyISAM
|
||||||
VERSION 10
|
VERSION 10
|
||||||
ROW_FORMAT Dynamic
|
ROW_FORMAT Dynamic
|
||||||
TABLE_ROWS 0
|
TABLE_ROWS 479
|
||||||
AVG_ROW_LENGTH #ARL#
|
AVG_ROW_LENGTH #ARL#
|
||||||
DATA_LENGTH #DL#
|
DATA_LENGTH #DL#
|
||||||
MAX_DATA_LENGTH #MDL#
|
MAX_DATA_LENGTH #MDL#
|
||||||
@ -5879,7 +5879,7 @@ routine_definition
|
|||||||
select * from statistics group by index_name asc limit 0, 5;
|
select * from statistics group by index_name asc limit 0, 5;
|
||||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
|
||||||
NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE
|
NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE
|
||||||
NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
|
||||||
NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||||
NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
|
NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
|
||||||
select concat(table_schema, ', ', table_name, ', ', view_definition) view_info
|
select concat(table_schema, ', ', table_name, ', ', view_definition) view_info
|
||||||
@ -14499,10 +14499,10 @@ NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-
|
|||||||
NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Events
|
NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Events
|
||||||
NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions
|
NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions
|
||||||
NULL mysql general_log BASE TABLE CSV 10 Dynamic 1 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL General log
|
NULL mysql general_log BASE TABLE CSV 10 Dynamic 1 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL General log
|
||||||
NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories
|
NULL mysql help_category BASE TABLE MyISAM 10 Fixed 37 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories
|
||||||
NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords
|
NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 424 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords
|
||||||
NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation
|
NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 901 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation
|
||||||
NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics
|
NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 479 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics
|
||||||
NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges
|
NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges
|
||||||
NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
|
NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL
|
||||||
NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL MySQL plugins
|
NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL MySQL plugins
|
||||||
@ -14753,14 +14753,14 @@ NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE
|
|||||||
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
|
NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE
|
||||||
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
|
NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE
|
||||||
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
|
NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE
|
||||||
NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 0 NULL NULL BTREE
|
NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 37 NULL NULL BTREE
|
||||||
NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_category 0 mysql name 1 name A 37 NULL NULL BTREE
|
||||||
NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 0 NULL NULL BTREE
|
NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 424 NULL NULL BTREE
|
||||||
NULL mysql help_keyword 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_keyword 0 mysql name 1 name A 424 NULL NULL BTREE
|
||||||
NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
|
NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE
|
||||||
NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 0 NULL NULL BTREE
|
NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 901 NULL NULL BTREE
|
||||||
NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 0 NULL NULL BTREE
|
NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 479 NULL NULL BTREE
|
||||||
NULL mysql help_topic 0 mysql name 1 name A 0 NULL NULL BTREE
|
NULL mysql help_topic 0 mysql name 1 name A 479 NULL NULL BTREE
|
||||||
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE
|
||||||
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
|
NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE
|
||||||
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
|
NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A 0 NULL NULL BTREE
|
||||||
|
@ -81,6 +81,7 @@ BEGIN
|
|||||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||||
END//
|
END//
|
||||||
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
|
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
|
||||||
|
USE db_storedproc_1;
|
||||||
|
|
||||||
root@localhost db_storedproc_1
|
root@localhost db_storedproc_1
|
||||||
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
||||||
@ -92,6 +93,7 @@ CREATE PROCEDURE sp1(v1 char(20))
|
|||||||
BEGIN
|
BEGIN
|
||||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||||
END//
|
END//
|
||||||
|
USE db_storedproc_1;
|
||||||
|
|
||||||
root@localhost db_storedproc_1
|
root@localhost db_storedproc_1
|
||||||
DROP USER 'user_1'@'localhost';
|
DROP USER 'user_1'@'localhost';
|
||||||
@ -117,6 +119,7 @@ CREATE FUNCTION fn1(v1 int) returns int
|
|||||||
BEGIN
|
BEGIN
|
||||||
return v1;
|
return v1;
|
||||||
END//
|
END//
|
||||||
|
USE db_storedproc_1;
|
||||||
|
|
||||||
root@localhost db_storedproc_1
|
root@localhost db_storedproc_1
|
||||||
drop user 'user_1'@'localhost';
|
drop user 'user_1'@'localhost';
|
||||||
|
@ -58,7 +58,6 @@ load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
|||||||
|
|
||||||
Section 3.1.10 - CALL checks:
|
Section 3.1.10 - CALL checks:
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
USE db_storedproc;
|
|
||||||
|
|
||||||
Testcase 3.1.10.2 + 3.1.10.5:
|
Testcase 3.1.10.2 + 3.1.10.5:
|
||||||
-----------------------------
|
-----------------------------
|
||||||
@ -95,6 +94,7 @@ CALL sp31102();
|
|||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||||
SELECT fn31105( 9 );
|
SELECT fn31105( 9 );
|
||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||||
|
USE db_storedproc;
|
||||||
|
|
||||||
root@localhost db_storedproc
|
root@localhost db_storedproc
|
||||||
CALL sp31102();
|
CALL sp31102();
|
||||||
@ -114,6 +114,7 @@ a` a` 1000-01-01 -5000 a` -5000
|
|||||||
SELECT fn31105( 9 );
|
SELECT fn31105( 9 );
|
||||||
fn31105( 9 )
|
fn31105( 9 )
|
||||||
81
|
81
|
||||||
|
USE db_storedproc;
|
||||||
|
|
||||||
root@localhost db_storedproc
|
root@localhost db_storedproc
|
||||||
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
|
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
|
||||||
@ -131,6 +132,7 @@ CALL sp31102();
|
|||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||||
SELECT fn31105( 9 );
|
SELECT fn31105( 9 );
|
||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||||
|
USE db_storedproc;
|
||||||
|
|
||||||
root@localhost db_storedproc
|
root@localhost db_storedproc
|
||||||
DROP PROCEDURE sp31102;
|
DROP PROCEDURE sp31102;
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -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 'f47' at row 1
|
||||||
Note 1265 Data truncated for column 'f49' at row 1
|
Note 1265 Data truncated for column 'f49' at row 1
|
||||||
Note 1265 Data truncated for column 'f51' 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 ;
|
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb1.txt' into table tb1 ;
|
||||||
|
|
||||||
NOT YET IMPLEMENTED: cursor tests
|
NOT YET IMPLEMENTED: cursor tests
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -81,6 +81,7 @@ BEGIN
|
|||||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||||
END//
|
END//
|
||||||
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
|
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
|
||||||
|
USE db_storedproc_1;
|
||||||
|
|
||||||
root@localhost db_storedproc_1
|
root@localhost db_storedproc_1
|
||||||
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
||||||
@ -92,6 +93,7 @@ CREATE PROCEDURE sp1(v1 char(20))
|
|||||||
BEGIN
|
BEGIN
|
||||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||||
END//
|
END//
|
||||||
|
USE db_storedproc_1;
|
||||||
|
|
||||||
root@localhost db_storedproc_1
|
root@localhost db_storedproc_1
|
||||||
DROP USER 'user_1'@'localhost';
|
DROP USER 'user_1'@'localhost';
|
||||||
@ -117,6 +119,7 @@ CREATE FUNCTION fn1(v1 int) returns int
|
|||||||
BEGIN
|
BEGIN
|
||||||
return v1;
|
return v1;
|
||||||
END//
|
END//
|
||||||
|
USE db_storedproc_1;
|
||||||
|
|
||||||
root@localhost db_storedproc_1
|
root@localhost db_storedproc_1
|
||||||
drop user 'user_1'@'localhost';
|
drop user 'user_1'@'localhost';
|
||||||
|
@ -90,7 +90,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
|
|||||||
END if;
|
END if;
|
||||||
END//
|
END//
|
||||||
SHOW CREATE PROCEDURE sp1;
|
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`()
|
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
|
BEGIN
|
||||||
declare a tinyint;
|
declare a tinyint;
|
||||||
@ -104,7 +104,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
|
|||||||
ELSE
|
ELSE
|
||||||
INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
|
INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
|
||||||
END if;
|
END if;
|
||||||
END
|
END latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
set @@sql_mode='';
|
set @@sql_mode='';
|
||||||
SHOW VARIABLES LIKE 'sql_mode';
|
SHOW VARIABLES LIKE 'sql_mode';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -143,12 +143,12 @@ SET @@sql_mode='MAXDB';
|
|||||||
SHOW VARIABLES LIKE 'sql_mode';
|
SHOW VARIABLES LIKE 'sql_mode';
|
||||||
END//
|
END//
|
||||||
SHOW CREATE PROCEDURE sp2;
|
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`()
|
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
|
BEGIN
|
||||||
SET @@sql_mode='MAXDB';
|
SET @@sql_mode='MAXDB';
|
||||||
SHOW VARIABLES LIKE 'sql_mode';
|
SHOW VARIABLES LIKE 'sql_mode';
|
||||||
END
|
END latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
... show value prior calling procedure
|
... show value prior calling procedure
|
||||||
SHOW VARIABLES LIKE 'sql_mode';
|
SHOW VARIABLES LIKE 'sql_mode';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
|
@ -122,6 +122,9 @@ LAST_ALTERED <created>
|
|||||||
SQL_MODE
|
SQL_MODE
|
||||||
ROUTINE_COMMENT
|
ROUTINE_COMMENT
|
||||||
DEFINER root@localhost
|
DEFINER root@localhost
|
||||||
|
CHARACTER_SET_CLIENT latin1
|
||||||
|
COLLATION_CONNECTION latin1_swedish_ci
|
||||||
|
DATABASE_COLLATION latin1_swedish_ci
|
||||||
SPECIFIC_NAME fn_2
|
SPECIFIC_NAME fn_2
|
||||||
ROUTINE_CATALOG NULL
|
ROUTINE_CATALOG NULL
|
||||||
ROUTINE_SCHEMA db_storedproc
|
ROUTINE_SCHEMA db_storedproc
|
||||||
@ -146,6 +149,9 @@ LAST_ALTERED <created>
|
|||||||
SQL_MODE
|
SQL_MODE
|
||||||
ROUTINE_COMMENT created with INVOKER
|
ROUTINE_COMMENT created with INVOKER
|
||||||
DEFINER root@localhost
|
DEFINER root@localhost
|
||||||
|
CHARACTER_SET_CLIENT latin1
|
||||||
|
COLLATION_CONNECTION latin1_swedish_ci
|
||||||
|
DATABASE_COLLATION latin1_swedish_ci
|
||||||
SPECIFIC_NAME sp_1
|
SPECIFIC_NAME sp_1
|
||||||
ROUTINE_CATALOG NULL
|
ROUTINE_CATALOG NULL
|
||||||
ROUTINE_SCHEMA db_storedproc
|
ROUTINE_SCHEMA db_storedproc
|
||||||
@ -168,6 +174,9 @@ LAST_ALTERED <created>
|
|||||||
SQL_MODE
|
SQL_MODE
|
||||||
ROUTINE_COMMENT
|
ROUTINE_COMMENT
|
||||||
DEFINER root@localhost
|
DEFINER root@localhost
|
||||||
|
CHARACTER_SET_CLIENT latin1
|
||||||
|
COLLATION_CONNECTION latin1_swedish_ci
|
||||||
|
DATABASE_COLLATION latin1_swedish_ci
|
||||||
SPECIFIC_NAME sp_2
|
SPECIFIC_NAME sp_2
|
||||||
ROUTINE_CATALOG NULL
|
ROUTINE_CATALOG NULL
|
||||||
ROUTINE_SCHEMA db_storedproc
|
ROUTINE_SCHEMA db_storedproc
|
||||||
@ -190,6 +199,9 @@ LAST_ALTERED <created>
|
|||||||
SQL_MODE
|
SQL_MODE
|
||||||
ROUTINE_COMMENT created with INVOKER
|
ROUTINE_COMMENT created with INVOKER
|
||||||
DEFINER root@localhost
|
DEFINER root@localhost
|
||||||
|
CHARACTER_SET_CLIENT latin1
|
||||||
|
COLLATION_CONNECTION latin1_swedish_ci
|
||||||
|
DATABASE_COLLATION latin1_swedish_ci
|
||||||
SHOW CREATE FUNCTION fn_1;
|
SHOW CREATE FUNCTION fn_1;
|
||||||
Function fn_1
|
Function fn_1
|
||||||
sql_mode
|
sql_mode
|
||||||
@ -199,6 +211,9 @@ set @x=i1;
|
|||||||
set @y=@x;
|
set @y=@x;
|
||||||
return i4;
|
return i4;
|
||||||
END
|
END
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
SHOW CREATE FUNCTION fn_2;
|
SHOW CREATE FUNCTION fn_2;
|
||||||
Function fn_2
|
Function fn_2
|
||||||
sql_mode
|
sql_mode
|
||||||
@ -210,6 +225,9 @@ set @x=i1;
|
|||||||
set @y=@x;
|
set @y=@x;
|
||||||
return i4;
|
return i4;
|
||||||
END
|
END
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
SHOW CREATE PROCEDURE sp_1;
|
SHOW CREATE PROCEDURE sp_1;
|
||||||
Procedure sp_1
|
Procedure sp_1
|
||||||
sql_mode
|
sql_mode
|
||||||
@ -217,6 +235,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
|||||||
BEGIN
|
BEGIN
|
||||||
set @x=i1;
|
set @x=i1;
|
||||||
END
|
END
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
SHOW CREATE PROCEDURE sp_2;
|
SHOW CREATE PROCEDURE sp_2;
|
||||||
Procedure sp_2
|
Procedure sp_2
|
||||||
sql_mode
|
sql_mode
|
||||||
@ -226,6 +247,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
|||||||
BEGIN
|
BEGIN
|
||||||
set @x=i1;
|
set @x=i1;
|
||||||
END
|
END
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||||
Db db_storedproc
|
Db db_storedproc
|
||||||
Name fn_1
|
Name fn_1
|
||||||
@ -235,6 +259,9 @@ Modified <modified>
|
|||||||
Created <created>
|
Created <created>
|
||||||
Security_type DEFINER
|
Security_type DEFINER
|
||||||
Comment
|
Comment
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
Db db_storedproc
|
Db db_storedproc
|
||||||
Name fn_2
|
Name fn_2
|
||||||
Type FUNCTION
|
Type FUNCTION
|
||||||
@ -243,6 +270,9 @@ Modified <modified>
|
|||||||
Created <created>
|
Created <created>
|
||||||
Security_type INVOKER
|
Security_type INVOKER
|
||||||
Comment created with INVOKER
|
Comment created with INVOKER
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||||
Db db_storedproc
|
Db db_storedproc
|
||||||
Name sp_1
|
Name sp_1
|
||||||
@ -252,6 +282,9 @@ Modified <modified>
|
|||||||
Created <created>
|
Created <created>
|
||||||
Security_type DEFINER
|
Security_type DEFINER
|
||||||
Comment
|
Comment
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
Db db_storedproc
|
Db db_storedproc
|
||||||
Name sp_2
|
Name sp_2
|
||||||
Type PROCEDURE
|
Type PROCEDURE
|
||||||
@ -260,6 +293,9 @@ Modified <modified>
|
|||||||
Created <created>
|
Created <created>
|
||||||
Security_type INVOKER
|
Security_type INVOKER
|
||||||
Comment created with INVOKER
|
Comment created with INVOKER
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
|
|
||||||
... now change some stuff:
|
... now change some stuff:
|
||||||
--------------------------
|
--------------------------
|
||||||
@ -304,6 +340,9 @@ LAST_ALTERED <created>
|
|||||||
SQL_MODE
|
SQL_MODE
|
||||||
ROUTINE_COMMENT new comment, FN changed to INVOKER
|
ROUTINE_COMMENT new comment, FN changed to INVOKER
|
||||||
DEFINER root@localhost
|
DEFINER root@localhost
|
||||||
|
CHARACTER_SET_CLIENT latin1
|
||||||
|
COLLATION_CONNECTION latin1_swedish_ci
|
||||||
|
DATABASE_COLLATION latin1_swedish_ci
|
||||||
SPECIFIC_NAME fn_2
|
SPECIFIC_NAME fn_2
|
||||||
ROUTINE_CATALOG NULL
|
ROUTINE_CATALOG NULL
|
||||||
ROUTINE_SCHEMA db_storedproc
|
ROUTINE_SCHEMA db_storedproc
|
||||||
@ -328,6 +367,9 @@ LAST_ALTERED <created>
|
|||||||
SQL_MODE
|
SQL_MODE
|
||||||
ROUTINE_COMMENT FN changed to DEFINER
|
ROUTINE_COMMENT FN changed to DEFINER
|
||||||
DEFINER root@localhost
|
DEFINER root@localhost
|
||||||
|
CHARACTER_SET_CLIENT latin1
|
||||||
|
COLLATION_CONNECTION latin1_swedish_ci
|
||||||
|
DATABASE_COLLATION latin1_swedish_ci
|
||||||
SPECIFIC_NAME sp_1
|
SPECIFIC_NAME sp_1
|
||||||
ROUTINE_CATALOG NULL
|
ROUTINE_CATALOG NULL
|
||||||
ROUTINE_SCHEMA db_storedproc
|
ROUTINE_SCHEMA db_storedproc
|
||||||
@ -350,6 +392,9 @@ LAST_ALTERED <created>
|
|||||||
SQL_MODE
|
SQL_MODE
|
||||||
ROUTINE_COMMENT new comment, SP changed to INVOKER
|
ROUTINE_COMMENT new comment, SP changed to INVOKER
|
||||||
DEFINER root@localhost
|
DEFINER root@localhost
|
||||||
|
CHARACTER_SET_CLIENT latin1
|
||||||
|
COLLATION_CONNECTION latin1_swedish_ci
|
||||||
|
DATABASE_COLLATION latin1_swedish_ci
|
||||||
SPECIFIC_NAME sp_2
|
SPECIFIC_NAME sp_2
|
||||||
ROUTINE_CATALOG NULL
|
ROUTINE_CATALOG NULL
|
||||||
ROUTINE_SCHEMA db_storedproc
|
ROUTINE_SCHEMA db_storedproc
|
||||||
@ -372,6 +417,9 @@ LAST_ALTERED <created>
|
|||||||
SQL_MODE
|
SQL_MODE
|
||||||
ROUTINE_COMMENT SP changed to DEFINER
|
ROUTINE_COMMENT SP changed to DEFINER
|
||||||
DEFINER root@localhost
|
DEFINER root@localhost
|
||||||
|
CHARACTER_SET_CLIENT latin1
|
||||||
|
COLLATION_CONNECTION latin1_swedish_ci
|
||||||
|
DATABASE_COLLATION latin1_swedish_ci
|
||||||
SHOW CREATE FUNCTION fn_1;
|
SHOW CREATE FUNCTION fn_1;
|
||||||
Function fn_1
|
Function fn_1
|
||||||
sql_mode
|
sql_mode
|
||||||
@ -384,6 +432,9 @@ set @x=i1;
|
|||||||
set @y=@x;
|
set @y=@x;
|
||||||
return i4;
|
return i4;
|
||||||
END
|
END
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
SHOW CREATE FUNCTION fn_2;
|
SHOW CREATE FUNCTION fn_2;
|
||||||
Function fn_2
|
Function fn_2
|
||||||
sql_mode
|
sql_mode
|
||||||
@ -395,6 +446,9 @@ set @x=i1;
|
|||||||
set @y=@x;
|
set @y=@x;
|
||||||
return i4;
|
return i4;
|
||||||
END
|
END
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
SHOW CREATE PROCEDURE sp_1;
|
SHOW CREATE PROCEDURE sp_1;
|
||||||
Procedure sp_1
|
Procedure sp_1
|
||||||
sql_mode
|
sql_mode
|
||||||
@ -404,6 +458,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
|||||||
BEGIN
|
BEGIN
|
||||||
set @x=i1;
|
set @x=i1;
|
||||||
END
|
END
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
SHOW CREATE PROCEDURE sp_2;
|
SHOW CREATE PROCEDURE sp_2;
|
||||||
Procedure sp_2
|
Procedure sp_2
|
||||||
sql_mode
|
sql_mode
|
||||||
@ -413,6 +470,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
|||||||
BEGIN
|
BEGIN
|
||||||
set @x=i1;
|
set @x=i1;
|
||||||
END
|
END
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||||
Db db_storedproc
|
Db db_storedproc
|
||||||
Name fn_1
|
Name fn_1
|
||||||
@ -422,6 +482,9 @@ Modified <modified>
|
|||||||
Created <created>
|
Created <created>
|
||||||
Security_type INVOKER
|
Security_type INVOKER
|
||||||
Comment new comment, FN changed to 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
|
Db db_storedproc
|
||||||
Name fn_2
|
Name fn_2
|
||||||
Type FUNCTION
|
Type FUNCTION
|
||||||
@ -430,6 +493,9 @@ Modified <modified>
|
|||||||
Created <created>
|
Created <created>
|
||||||
Security_type DEFINER
|
Security_type DEFINER
|
||||||
Comment FN changed to 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_%';
|
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||||
Db db_storedproc
|
Db db_storedproc
|
||||||
Name sp_1
|
Name sp_1
|
||||||
@ -439,6 +505,9 @@ Modified <modified>
|
|||||||
Created <created>
|
Created <created>
|
||||||
Security_type INVOKER
|
Security_type INVOKER
|
||||||
Comment new comment, SP changed to 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
|
Db db_storedproc
|
||||||
Name sp_2
|
Name sp_2
|
||||||
Type PROCEDURE
|
Type PROCEDURE
|
||||||
@ -447,6 +516,9 @@ Modified <modified>
|
|||||||
Created <created>
|
Created <created>
|
||||||
Security_type DEFINER
|
Security_type DEFINER
|
||||||
Comment SP changed to 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:
|
... change back to default and check result:
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
@ -479,6 +551,9 @@ LAST_ALTERED <created>
|
|||||||
SQL_MODE
|
SQL_MODE
|
||||||
ROUTINE_COMMENT new comment, FN changed to INVOKER
|
ROUTINE_COMMENT new comment, FN changed to INVOKER
|
||||||
DEFINER root@localhost
|
DEFINER root@localhost
|
||||||
|
CHARACTER_SET_CLIENT latin1
|
||||||
|
COLLATION_CONNECTION latin1_swedish_ci
|
||||||
|
DATABASE_COLLATION latin1_swedish_ci
|
||||||
SPECIFIC_NAME fn_2
|
SPECIFIC_NAME fn_2
|
||||||
ROUTINE_CATALOG NULL
|
ROUTINE_CATALOG NULL
|
||||||
ROUTINE_SCHEMA db_storedproc
|
ROUTINE_SCHEMA db_storedproc
|
||||||
@ -503,6 +578,9 @@ LAST_ALTERED <created>
|
|||||||
SQL_MODE
|
SQL_MODE
|
||||||
ROUTINE_COMMENT FN changed to DEFINER
|
ROUTINE_COMMENT FN changed to DEFINER
|
||||||
DEFINER root@localhost
|
DEFINER root@localhost
|
||||||
|
CHARACTER_SET_CLIENT latin1
|
||||||
|
COLLATION_CONNECTION latin1_swedish_ci
|
||||||
|
DATABASE_COLLATION latin1_swedish_ci
|
||||||
SPECIFIC_NAME sp_1
|
SPECIFIC_NAME sp_1
|
||||||
ROUTINE_CATALOG NULL
|
ROUTINE_CATALOG NULL
|
||||||
ROUTINE_SCHEMA db_storedproc
|
ROUTINE_SCHEMA db_storedproc
|
||||||
@ -525,6 +603,9 @@ LAST_ALTERED <created>
|
|||||||
SQL_MODE
|
SQL_MODE
|
||||||
ROUTINE_COMMENT new comment, SP changed to INVOKER
|
ROUTINE_COMMENT new comment, SP changed to INVOKER
|
||||||
DEFINER root@localhost
|
DEFINER root@localhost
|
||||||
|
CHARACTER_SET_CLIENT latin1
|
||||||
|
COLLATION_CONNECTION latin1_swedish_ci
|
||||||
|
DATABASE_COLLATION latin1_swedish_ci
|
||||||
SPECIFIC_NAME sp_2
|
SPECIFIC_NAME sp_2
|
||||||
ROUTINE_CATALOG NULL
|
ROUTINE_CATALOG NULL
|
||||||
ROUTINE_SCHEMA db_storedproc
|
ROUTINE_SCHEMA db_storedproc
|
||||||
@ -547,6 +628,9 @@ LAST_ALTERED <created>
|
|||||||
SQL_MODE
|
SQL_MODE
|
||||||
ROUTINE_COMMENT SP changed to DEFINER
|
ROUTINE_COMMENT SP changed to DEFINER
|
||||||
DEFINER root@localhost
|
DEFINER root@localhost
|
||||||
|
CHARACTER_SET_CLIENT latin1
|
||||||
|
COLLATION_CONNECTION latin1_swedish_ci
|
||||||
|
DATABASE_COLLATION latin1_swedish_ci
|
||||||
SHOW CREATE FUNCTION fn_1;
|
SHOW CREATE FUNCTION fn_1;
|
||||||
Function fn_1
|
Function fn_1
|
||||||
sql_mode
|
sql_mode
|
||||||
@ -559,6 +643,9 @@ set @x=i1;
|
|||||||
set @y=@x;
|
set @y=@x;
|
||||||
return i4;
|
return i4;
|
||||||
END
|
END
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
SHOW CREATE FUNCTION fn_2;
|
SHOW CREATE FUNCTION fn_2;
|
||||||
Function fn_2
|
Function fn_2
|
||||||
sql_mode
|
sql_mode
|
||||||
@ -569,6 +656,9 @@ set @x=i1;
|
|||||||
set @y=@x;
|
set @y=@x;
|
||||||
return i4;
|
return i4;
|
||||||
END
|
END
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
SHOW CREATE PROCEDURE sp_1;
|
SHOW CREATE PROCEDURE sp_1;
|
||||||
Procedure sp_1
|
Procedure sp_1
|
||||||
sql_mode
|
sql_mode
|
||||||
@ -578,6 +668,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
|
|||||||
BEGIN
|
BEGIN
|
||||||
set @x=i1;
|
set @x=i1;
|
||||||
END
|
END
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
SHOW CREATE PROCEDURE sp_2;
|
SHOW CREATE PROCEDURE sp_2;
|
||||||
Procedure sp_2
|
Procedure sp_2
|
||||||
sql_mode
|
sql_mode
|
||||||
@ -587,6 +680,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
|
|||||||
BEGIN
|
BEGIN
|
||||||
set @x=i1;
|
set @x=i1;
|
||||||
END
|
END
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
SHOW FUNCTION STATUS LIKE 'fn_%';
|
SHOW FUNCTION STATUS LIKE 'fn_%';
|
||||||
Db db_storedproc
|
Db db_storedproc
|
||||||
Name fn_1
|
Name fn_1
|
||||||
@ -596,6 +692,9 @@ Modified <modified>
|
|||||||
Created <created>
|
Created <created>
|
||||||
Security_type INVOKER
|
Security_type INVOKER
|
||||||
Comment new comment, FN changed to 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
|
Db db_storedproc
|
||||||
Name fn_2
|
Name fn_2
|
||||||
Type FUNCTION
|
Type FUNCTION
|
||||||
@ -604,6 +703,9 @@ Modified <modified>
|
|||||||
Created <created>
|
Created <created>
|
||||||
Security_type DEFINER
|
Security_type DEFINER
|
||||||
Comment FN changed to 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_%';
|
SHOW PROCEDURE STATUS LIKE 'sp_%';
|
||||||
Db db_storedproc
|
Db db_storedproc
|
||||||
Name sp_1
|
Name sp_1
|
||||||
@ -613,6 +715,9 @@ Modified <modified>
|
|||||||
Created <created>
|
Created <created>
|
||||||
Security_type INVOKER
|
Security_type INVOKER
|
||||||
Comment new comment, SP changed to 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
|
Db db_storedproc
|
||||||
Name sp_2
|
Name sp_2
|
||||||
Type PROCEDURE
|
Type PROCEDURE
|
||||||
@ -621,6 +726,9 @@ Modified <modified>
|
|||||||
Created <created>
|
Created <created>
|
||||||
Security_type DEFINER
|
Security_type DEFINER
|
||||||
Comment SP changed to DEFINER
|
Comment SP changed to DEFINER
|
||||||
|
character_set_client latin1
|
||||||
|
collation_connection latin1_swedish_ci
|
||||||
|
Database Collation latin1_swedish_ci
|
||||||
|
|
||||||
... cleanup
|
... cleanup
|
||||||
-----------
|
-----------
|
||||||
|
@ -58,7 +58,6 @@ load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
|||||||
|
|
||||||
Section 3.1.10 - CALL checks:
|
Section 3.1.10 - CALL checks:
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
USE db_storedproc;
|
|
||||||
|
|
||||||
Testcase 3.1.10.2 + 3.1.10.5:
|
Testcase 3.1.10.2 + 3.1.10.5:
|
||||||
-----------------------------
|
-----------------------------
|
||||||
@ -95,6 +94,7 @@ CALL sp31102();
|
|||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||||
SELECT fn31105( 9 );
|
SELECT fn31105( 9 );
|
||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||||
|
USE db_storedproc;
|
||||||
|
|
||||||
root@localhost db_storedproc
|
root@localhost db_storedproc
|
||||||
CALL sp31102();
|
CALL sp31102();
|
||||||
@ -114,6 +114,7 @@ a` a` 1000-01-01 -5000 a` -5000
|
|||||||
SELECT fn31105( 9 );
|
SELECT fn31105( 9 );
|
||||||
fn31105( 9 )
|
fn31105( 9 )
|
||||||
81
|
81
|
||||||
|
USE db_storedproc;
|
||||||
|
|
||||||
root@localhost db_storedproc
|
root@localhost db_storedproc
|
||||||
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
|
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
|
||||||
@ -131,6 +132,7 @@ CALL sp31102();
|
|||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||||
SELECT fn31105( 9 );
|
SELECT fn31105( 9 );
|
||||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||||
|
USE db_storedproc;
|
||||||
|
|
||||||
root@localhost db_storedproc
|
root@localhost db_storedproc
|
||||||
DROP PROCEDURE sp31102;
|
DROP PROCEDURE sp31102;
|
||||||
|
@ -65,7 +65,7 @@ Warnings:
|
|||||||
Note 1265 Data truncated for column 'f150' at row 1
|
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 'f151' at row 1
|
||||||
Note 1265 Data truncated for column 'f152' 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 ;
|
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
|
||||||
|
|
||||||
Testcase: 3.5.1.1:
|
Testcase: 3.5.1.1:
|
||||||
@ -243,7 +243,7 @@ create table t1 (f1 integer) engine = ndb;
|
|||||||
use test;
|
use test;
|
||||||
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
|
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
|
||||||
for each row set @ret_trg6_2 = 5;
|
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;
|
use trig_db;
|
||||||
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
|
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
|
||||||
for each row set @ret_trg6_3 = 18;
|
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 'f150' at row 1
|
||||||
Note 1265 Data truncated for column 'f151' at row 1
|
Note 1265 Data truncated for column 'f151' at row 1
|
||||||
Note 1265 Data truncated for column 'f152' 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 ;
|
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
|
||||||
|
|
||||||
Testcase 3.5.3:
|
Testcase 3.5.3:
|
||||||
|
@ -263,7 +263,7 @@ select current_user;
|
|||||||
current_user
|
current_user
|
||||||
root@localhost
|
root@localhost
|
||||||
show triggers;
|
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;
|
grant select, insert, update on priv_db.t1 to test_yesprivs@localhost;
|
||||||
show grants for test_yesprivs@localhost;
|
show grants for test_yesprivs@localhost;
|
||||||
Grants for test_yesprivs@localhost
|
Grants for test_yesprivs@localhost
|
||||||
@ -296,7 +296,7 @@ select current_user;
|
|||||||
current_user
|
current_user
|
||||||
root@localhost
|
root@localhost
|
||||||
show triggers;
|
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;
|
show tables;
|
||||||
Tables_in_priv_db
|
Tables_in_priv_db
|
||||||
t1
|
t1
|
||||||
@ -317,7 +317,7 @@ select current_user;
|
|||||||
current_user
|
current_user
|
||||||
test_yesprivs@localhost
|
test_yesprivs@localhost
|
||||||
show triggers;
|
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
|
create trigger trg1_2 before INSERT on t1 for each row
|
||||||
set new.f1 = 'trig 1_2-yes';
|
set new.f1 = 'trig 1_2-yes';
|
||||||
select current_user;
|
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
|
create trigger trg1_4 before UPDATE on t1 for each row
|
||||||
set new.f1 = 'trig 1_4-yes';
|
set new.f1 = 'trig 1_4-yes';
|
||||||
show triggers;
|
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
|
||||||
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost
|
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
|
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;
|
select current_user;
|
||||||
current_user
|
current_user
|
||||||
test_noprivs@localhost
|
test_noprivs@localhost
|
||||||
@ -570,11 +570,11 @@ current_user
|
|||||||
test_yesprivs@localhost
|
test_yesprivs@localhost
|
||||||
use priv_db;
|
use priv_db;
|
||||||
show triggers;
|
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
|
||||||
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost
|
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;
|
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
|
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
|
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;
|
drop trigger trg1_1;
|
||||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||||
select current_user;
|
select current_user;
|
||||||
@ -863,7 +863,7 @@ select current_user;
|
|||||||
current_user
|
current_user
|
||||||
root@localhost
|
root@localhost
|
||||||
show triggers;
|
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;
|
grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
|
||||||
show grants for test_yesprivs@localhost;
|
show grants for test_yesprivs@localhost;
|
||||||
Grants for test_yesprivs@localhost
|
Grants for test_yesprivs@localhost
|
||||||
@ -878,7 +878,7 @@ select current_user;
|
|||||||
current_user
|
current_user
|
||||||
test_yesprivs@localhost
|
test_yesprivs@localhost
|
||||||
show triggers;
|
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
|
create trigger trg1_2 before INSERT on t1 for each row
|
||||||
set new.f1 = 'trig 1_2-yes';
|
set new.f1 = 'trig 1_2-yes';
|
||||||
create trigger trg2_1 before INSERT on t2 for each row
|
create trigger trg2_1 before INSERT on t2 for each row
|
||||||
@ -990,7 +990,7 @@ select current_user;
|
|||||||
current_user
|
current_user
|
||||||
root@localhost
|
root@localhost
|
||||||
show triggers;
|
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
|
grant select, insert, update ,trigger
|
||||||
on priv_db.t1 to test_yesprivs@localhost
|
on priv_db.t1 to test_yesprivs@localhost
|
||||||
with grant option;
|
with grant option;
|
||||||
|
@ -65,7 +65,7 @@ Warnings:
|
|||||||
Note 1265 Data truncated for column 'f150' at row 1
|
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 'f151' at row 1
|
||||||
Note 1265 Data truncated for column 'f152' 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 ;
|
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
|
||||||
|
|
||||||
Testcase: 3.5:
|
Testcase: 3.5:
|
||||||
|
@ -65,7 +65,7 @@ Warnings:
|
|||||||
Note 1265 Data truncated for column 'f150' at row 1
|
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 'f151' at row 1
|
||||||
Note 1265 Data truncated for column 'f152' 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 ;
|
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
|
||||||
|
|
||||||
Testcase: 3.5:
|
Testcase: 3.5:
|
||||||
@ -493,9 +493,8 @@ BEGIN
|
|||||||
WHILE @counter1 < new.f136
|
WHILE @counter1 < new.f136
|
||||||
SET @counter1 = @counter1 + 1;
|
SET @counter1 = @counter1 + 1;
|
||||||
END//
|
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
|
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;
|
||||||
SET @counter1 = @counter1 + 1;
|
END' at line 4
|
||||||
END' at line 3
|
|
||||||
delete from tb3 where f122='Test 3.5.8.5-while';
|
delete from tb3 where f122='Test 3.5.8.5-while';
|
||||||
drop trigger trg7;
|
drop trigger trg7;
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ Warnings:
|
|||||||
Note 1265 Data truncated for column 'f150' at row 1
|
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 'f151' at row 1
|
||||||
Note 1265 Data truncated for column 'f152' 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 ;
|
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
|
||||||
|
|
||||||
Testcase 3.5.9.1/2:
|
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 'f150' at row 1
|
||||||
Note 1265 Data truncated for column 'f151' at row 1
|
Note 1265 Data truncated for column 'f151' at row 1
|
||||||
Note 1265 Data truncated for column 'f152' 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 ;
|
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
|
||||||
|
|
||||||
Testcase 3.5.10.1/2/3:
|
Testcase 3.5.10.1/2/3:
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -18,9 +18,9 @@
|
|||||||
let $message= Section 3.1.6 - Privilege Checks:;
|
let $message= Section 3.1.6 - Privilege Checks:;
|
||||||
--source include/show_msg80.inc
|
--source include/show_msg80.inc
|
||||||
|
|
||||||
USE db_storedproc_1;
|
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
|
USE db_storedproc_1;
|
||||||
--source suite/funcs_1/include/show_connection.inc
|
--source suite/funcs_1/include/show_connection.inc
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@ -58,6 +58,7 @@ disconnect user1a;
|
|||||||
|
|
||||||
# add privilege again and check
|
# add privilege again and check
|
||||||
connection default;
|
connection default;
|
||||||
|
USE db_storedproc_1;
|
||||||
--source suite/funcs_1/include/show_connection.inc
|
--source suite/funcs_1/include/show_connection.inc
|
||||||
|
|
||||||
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
||||||
@ -77,6 +78,7 @@ disconnect user1b;
|
|||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
connection default;
|
connection default;
|
||||||
|
USE db_storedproc_1;
|
||||||
--source suite/funcs_1/include/show_connection.inc
|
--source suite/funcs_1/include/show_connection.inc
|
||||||
|
|
||||||
DROP USER 'user_1'@'localhost';
|
DROP USER 'user_1'@'localhost';
|
||||||
@ -132,6 +134,7 @@ disconnect user2;
|
|||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
connection default;
|
connection default;
|
||||||
|
USE db_storedproc_1;
|
||||||
--source suite/funcs_1/include/show_connection.inc
|
--source suite/funcs_1/include/show_connection.inc
|
||||||
|
|
||||||
drop user 'user_1'@'localhost';
|
drop user 'user_1'@'localhost';
|
||||||
|
@ -21,7 +21,6 @@ let $message= Section 3.1.10 - CALL checks:;
|
|||||||
--source include/show_msg80.inc
|
--source include/show_msg80.inc
|
||||||
|
|
||||||
|
|
||||||
USE db_storedproc;
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
let $message= Testcase 3.1.10.2 + 3.1.10.5:;
|
let $message= Testcase 3.1.10.2 + 3.1.10.5:;
|
||||||
@ -80,6 +79,7 @@ SELECT fn31105( 9 );
|
|||||||
|
|
||||||
# now 'add' EXECUTE to INVOKER
|
# now 'add' EXECUTE to INVOKER
|
||||||
connection default;
|
connection default;
|
||||||
|
USE db_storedproc;
|
||||||
--source suite/funcs_1/include/show_connection.inc
|
--source suite/funcs_1/include/show_connection.inc
|
||||||
# root can execute ...
|
# root can execute ...
|
||||||
CALL sp31102();
|
CALL sp31102();
|
||||||
@ -98,6 +98,7 @@ disconnect user2_3;
|
|||||||
|
|
||||||
# now 'remove' SELECT from INVOKER
|
# now 'remove' SELECT from INVOKER
|
||||||
connection default;
|
connection default;
|
||||||
|
USE db_storedproc;
|
||||||
--source suite/funcs_1/include/show_connection.inc
|
--source suite/funcs_1/include/show_connection.inc
|
||||||
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
|
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
@ -115,6 +116,7 @@ disconnect user2_4;
|
|||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
connection default;
|
connection default;
|
||||||
|
USE db_storedproc;
|
||||||
|
|
||||||
--source suite/funcs_1/include/show_connection.inc
|
--source suite/funcs_1/include/show_connection.inc
|
||||||
DROP PROCEDURE sp31102;
|
DROP PROCEDURE sp31102;
|
||||||
|
@ -145,33 +145,33 @@ Insert into t1 values (500,9866);
|
|||||||
--enable_warnings
|
--enable_warnings
|
||||||
CREATE VIEW v1 AS select f59,f60,f61
|
CREATE VIEW v1 AS select f59,f60,f61
|
||||||
FROM test.tb2 where f59=250;
|
FROM test.tb2 where f59=250;
|
||||||
select * FROM v1 limit 0,10;
|
select * FROM v1 order by f60,f61 limit 0,10;
|
||||||
|
|
||||||
#(02)
|
#(02)
|
||||||
Drop view if exists v1 ;
|
Drop view if exists v1 ;
|
||||||
CREATE VIEW v1 AS select f59,f60,f61
|
CREATE VIEW v1 AS select f59,f60,f61
|
||||||
FROM test.tb2 limit 100;
|
FROM test.tb2 limit 100;
|
||||||
select * FROM v1 limit 0,10;
|
select * FROM v1 order by f59,f60,f61 limit 0,10;
|
||||||
|
|
||||||
#(03)
|
#(03)
|
||||||
CREATE or REPLACE VIEW v1 AS select f59,f60,f61
|
CREATE or REPLACE VIEW v1 AS select f59,f60,f61
|
||||||
FROM test.tb2 limit 4,3;
|
FROM test.tb2 limit 4,3;
|
||||||
select * FROM v1 limit 0,10;
|
select * FROM v1 order by f59,f60,f61 limit 0,10;
|
||||||
|
|
||||||
#(04)
|
#(04)
|
||||||
CREATE or REPLACE VIEW v1 AS select distinct f59
|
CREATE or REPLACE VIEW v1 AS select distinct f59
|
||||||
FROM test.tb2 limit 4,3;
|
FROM test.tb2 limit 4,3;
|
||||||
select * FROM v1 limit 0,10;
|
select * FROM v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
#(05)
|
#(05)
|
||||||
ALTER VIEW v1 AS select f59
|
ALTER VIEW v1 AS select f59
|
||||||
FROM test.tb2 limit 6,2;
|
FROM test.tb2 limit 6,2;
|
||||||
select * FROM v1 limit 0,10;
|
select * FROM v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
#(06)
|
#(06)
|
||||||
CREATE or REPLACE VIEW v1 AS select f59
|
CREATE or REPLACE VIEW v1 AS select f59
|
||||||
from tb2 order by f59 limit 100;
|
from tb2 order by f59 limit 100;
|
||||||
select * FROM v1 limit 0,10;
|
select * FROM v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
#(07)
|
#(07)
|
||||||
CREATE or REPLACE VIEW v1 AS select f59
|
CREATE or REPLACE VIEW v1 AS select f59
|
||||||
@ -186,32 +186,32 @@ Insert into t1 values (500,9866);
|
|||||||
#(09)
|
#(09)
|
||||||
CREATE or REPLACE VIEW v1 AS select f59
|
CREATE or REPLACE VIEW v1 AS select f59
|
||||||
from tb2 group by f59 limit 100;
|
from tb2 group by f59 limit 100;
|
||||||
select * FROM v1 limit 0,10;
|
select * FROM v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
#(10)
|
#(10)
|
||||||
CREATE or REPLACE VIEW v1 AS select f59
|
CREATE or REPLACE VIEW v1 AS select f59
|
||||||
from tb2 group by f59 asc limit 100;
|
from tb2 group by f59 asc limit 100;
|
||||||
select * FROM v1 limit 0,10;
|
select * FROM v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
#(11)
|
#(11)
|
||||||
CREATE or REPLACE VIEW v1 AS select f59
|
CREATE or REPLACE VIEW v1 AS select f59
|
||||||
from tb2 group by f59 desc limit 100;
|
from tb2 group by f59 desc limit 100;
|
||||||
select * FROM v1 limit 0,10;
|
select * FROM v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
#(12)
|
#(12)
|
||||||
CREATE or REPLACE VIEW v1 AS (select f59 from tb2)
|
CREATE or REPLACE VIEW v1 AS (select f59 from tb2)
|
||||||
union (select f59 from t1) limit 100;
|
union (select f59 from t1) limit 100;
|
||||||
select * FROM v1 limit 0,10;
|
select * FROM v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
#(13)
|
#(13)
|
||||||
CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
|
CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
|
||||||
UNION DISTINCT(select f59 FROM t1) ;
|
UNION DISTINCT(select f59 FROM t1) ;
|
||||||
select * FROM v1 limit 0,10;
|
select * FROM v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
#(14)
|
#(14)
|
||||||
CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
|
CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
|
||||||
UNION ALL(select f59 FROM t1) ;
|
UNION ALL(select f59 FROM t1) ;
|
||||||
select * FROM v1 limit 0,10;
|
select * FROM v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
#(15)
|
#(15)
|
||||||
if ($have_bug_11589)
|
if ($have_bug_11589)
|
||||||
@ -220,24 +220,24 @@ if ($have_bug_11589)
|
|||||||
}
|
}
|
||||||
CREATE or REPLACE VIEW v1 AS select *
|
CREATE or REPLACE VIEW v1 AS select *
|
||||||
FROM test.tb2 WITH LOCAL CHECK OPTION ;
|
FROM test.tb2 WITH LOCAL CHECK OPTION ;
|
||||||
select * FROM v1 limit 0,50;
|
select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,50;
|
||||||
|
|
||||||
#(16)
|
#(16)
|
||||||
CREATE or REPLACE VIEW v1 AS select *
|
CREATE or REPLACE VIEW v1 AS select *
|
||||||
FROM test.tb2 WITH CASCADED CHECK OPTION ;
|
FROM test.tb2 WITH CASCADED CHECK OPTION ;
|
||||||
select * FROM v1 limit 0,10;
|
select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,10;
|
||||||
--enable_ps_protocol
|
--enable_ps_protocol
|
||||||
|
|
||||||
#(17)
|
#(17)
|
||||||
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
|
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
|
||||||
FROM test.tb2 WITH CASCADED CHECK OPTION;
|
FROM test.tb2 WITH CASCADED CHECK OPTION;
|
||||||
SELECT * FROM v1 limit 0,10;
|
SELECT * FROM v1 order by f59,f60 limit 0,10;
|
||||||
|
|
||||||
|
|
||||||
#(18)
|
#(18)
|
||||||
CREATE or REPLACE VIEW v1 AS select f59, f60
|
CREATE or REPLACE VIEW v1 AS select f59, f60
|
||||||
from test.tb2 where f59=3330 ;
|
from test.tb2 where f59=3330 ;
|
||||||
select * FROM v1 limit 0,10;
|
select * FROM v1 order by f60 limit 0,10;
|
||||||
|
|
||||||
DROP VIEW v1 ;
|
DROP VIEW v1 ;
|
||||||
DROP TABLE t1 ;
|
DROP TABLE t1 ;
|
||||||
@ -816,18 +816,18 @@ AS SELECT * FROM t1 limit 2;
|
|||||||
SHOW CREATE VIEW test.v1;
|
SHOW CREATE VIEW test.v1;
|
||||||
SELECT * FROM test.v1;
|
SELECT * FROM test.v1;
|
||||||
# Switch the base table
|
# Switch the base table
|
||||||
CREATE OR REPLACE VIEW test.v1 AS SELECT * FROM tb2 limit 2;
|
CREATE OR REPLACE VIEW test.v1 AS SELECT * FROM tb2 order by f59 limit 2;
|
||||||
SHOW CREATE VIEW test.v1;
|
SHOW CREATE VIEW test.v1;
|
||||||
if ($have_bug_11589)
|
if ($have_bug_11589)
|
||||||
{
|
{
|
||||||
--disable_ps_protocol
|
--disable_ps_protocol
|
||||||
}
|
}
|
||||||
SELECT * FROM test.v1 ;
|
SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65;
|
||||||
--enable_ps_protocol
|
--enable_ps_protocol
|
||||||
# Switch the SELECT but not the base table
|
# Switch the SELECT but not the base table
|
||||||
CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2 limit 10,100;
|
CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2 limit 10,100;
|
||||||
SHOW CREATE VIEW test.v1;
|
SHOW CREATE VIEW test.v1;
|
||||||
SELECT * FROM test.v1;
|
SELECT * FROM test.v1 order by F59;
|
||||||
Drop table test.t1 ;
|
Drop table test.t1 ;
|
||||||
Drop view test.v1 ;
|
Drop view test.v1 ;
|
||||||
|
|
||||||
@ -1020,7 +1020,7 @@ let $message= Testcase 3.3.1.21 ;
|
|||||||
DROP VIEW IF EXISTS v1;
|
DROP VIEW IF EXISTS v1;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2 LIMIT 2;
|
CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2 LIMIT 2;
|
||||||
SELECT * FROM test.v1;
|
SELECT * FROM test.v1 order by F59, F60 desc;
|
||||||
Drop view if exists test.v1 ;
|
Drop view if exists test.v1 ;
|
||||||
|
|
||||||
|
|
||||||
@ -1175,7 +1175,7 @@ Drop VIEW IF EXISTS test.v1_1 ;
|
|||||||
--enable_warnings
|
--enable_warnings
|
||||||
Create view test.v1 AS Select * from test.tb2 limit 2 ;
|
Create view test.v1 AS Select * from test.tb2 limit 2 ;
|
||||||
Create view test.v1_1 AS Select F59 from test.v1 ;
|
Create view test.v1_1 AS Select F59 from test.v1 ;
|
||||||
Select * from test.v1_1 limit 20 ;
|
Select * from test.v1_1 order by F59 limit 20 ;
|
||||||
Drop view test.v1 ;
|
Drop view test.v1 ;
|
||||||
Drop view test.v1_1 ;
|
Drop view test.v1_1 ;
|
||||||
|
|
||||||
@ -1197,7 +1197,7 @@ if ($have_bug_11589)
|
|||||||
{
|
{
|
||||||
--disable_ps_protocol
|
--disable_ps_protocol
|
||||||
}
|
}
|
||||||
Select * from v1 ;
|
Select * from v1 order by f59,f60,f61,f62,f63,f64,f65;
|
||||||
--enable_ps_protocol
|
--enable_ps_protocol
|
||||||
Select * from test2.v2 ;
|
Select * from test2.v2 ;
|
||||||
Drop view if exists test2.v1 ;
|
Drop view if exists test2.v1 ;
|
||||||
@ -1287,7 +1287,7 @@ CREATE VIEW test.v1
|
|||||||
AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
|
AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
|
||||||
FROM test.v1_firstview INNER JOIN test.v1_secondview
|
FROM test.v1_firstview INNER JOIN test.v1_secondview
|
||||||
ON test.v1_firstview.f59 = test.v1_secondview.f59 ;
|
ON test.v1_firstview.f59 = test.v1_secondview.f59 ;
|
||||||
SELECT * FROM test.v1 limit 0,10;
|
SELECT * FROM test.v1 order by f59,f60 limit 0,10;
|
||||||
Drop view if exists test.v1_firstview ;
|
Drop view if exists test.v1_firstview ;
|
||||||
Drop view if exists test.v1_secondview ;
|
Drop view if exists test.v1_secondview ;
|
||||||
Drop view if exists test.v1 ;
|
Drop view if exists test.v1 ;
|
||||||
@ -1314,7 +1314,7 @@ CREATE VIEW v1
|
|||||||
AS SELECT test.v1_firstview.F59, test.v1_firstview.F60
|
AS SELECT test.v1_firstview.F59, test.v1_firstview.F60
|
||||||
FROM test.v1_firstview INNER JOIN test.v1_secondview
|
FROM test.v1_firstview INNER JOIN test.v1_secondview
|
||||||
ON test.v1_firstview.f59 = test.v1_secondview.f59 ;
|
ON test.v1_firstview.f59 = test.v1_secondview.f59 ;
|
||||||
SELECT * FROM v1 limit 0,10;
|
SELECT * FROM v1 order by f59,f60 limit 0,10;
|
||||||
Drop view v1 ;
|
Drop view v1 ;
|
||||||
Drop view test.v1_firstview ;
|
Drop view test.v1_firstview ;
|
||||||
Drop view test.v1_secondview ;
|
Drop view test.v1_secondview ;
|
||||||
@ -1339,7 +1339,7 @@ CREATE VIEW test.v1
|
|||||||
AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
|
AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
|
||||||
FROM test.v1_firstview INNER JOIN test.tb2
|
FROM test.v1_firstview INNER JOIN test.tb2
|
||||||
ON test.v1_firstview.f59 = test.tb2.f59;
|
ON test.v1_firstview.f59 = test.tb2.f59;
|
||||||
SELECT * FROM test.v1 limit 0,10;
|
SELECT * FROM test.v1 order by f59,f60 limit 0,10;
|
||||||
Drop view test.v1 ;
|
Drop view test.v1 ;
|
||||||
Drop view test.v1_firstview;
|
Drop view test.v1_firstview;
|
||||||
|
|
||||||
@ -1360,7 +1360,7 @@ CREATE VIEW v1_firstview AS SELECT * FROM test.tb2 ;
|
|||||||
CREATE VIEW v1
|
CREATE VIEW v1
|
||||||
AS SELECT v1_firstview.f59, v1_firstview.f60
|
AS SELECT v1_firstview.f59, v1_firstview.f60
|
||||||
FROM v1_firstview INNER JOIN test.tb2 ON v1_firstview.f59 = test.tb2.f59 ;
|
FROM v1_firstview INNER JOIN test.tb2 ON v1_firstview.f59 = test.tb2.f59 ;
|
||||||
SELECT * FROM v1 limit 0,10;
|
SELECT * FROM v1 order by f59,f60 limit 0,10;
|
||||||
|
|
||||||
Drop database test2 ;
|
Drop database test2 ;
|
||||||
|
|
||||||
@ -1385,7 +1385,7 @@ Drop view if exists test.v1_1 ;
|
|||||||
Drop view if exists test.v1_main ;
|
Drop view if exists test.v1_main ;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
Create view test.v1 as Select f59, f60 FROM test.tb2;
|
Create view test.v1 as Select f59, f60 FROM test.tb2;
|
||||||
Select * from test.v1 limit 0,10;
|
Select * from test.v1 order by f59,f60 limit 0,10;
|
||||||
|
|
||||||
Create table t1(f59 int, f60 int);
|
Create table t1(f59 int, f60 int);
|
||||||
Insert into t1 values (90,507) ;
|
Insert into t1 values (90,507) ;
|
||||||
@ -1396,7 +1396,7 @@ Select * from v1_1 ;
|
|||||||
Create view v1_main
|
Create view v1_main
|
||||||
as SELECT test.tb2.f59 FROM test.tb2 JOIN test.v1
|
as SELECT test.tb2.f59 FROM test.tb2 JOIN test.v1
|
||||||
ON test.tb2.f59 = test.v1.f59;
|
ON test.tb2.f59 = test.v1.f59;
|
||||||
Select * from v1_main limit 0,10;
|
Select * from v1_main order by f59 limit 0,10;
|
||||||
|
|
||||||
Drop table t1;
|
Drop table t1;
|
||||||
Drop view test.v1 ;
|
Drop view test.v1 ;
|
||||||
@ -1505,7 +1505,7 @@ Drop view if exists test1.v1_1 ;
|
|||||||
Drop database if exists test3 ;
|
Drop database if exists test3 ;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
Create view test.v1 as Select f59, f60 FROM test.tb2 limit 20 ;
|
Create view test.v1 as Select f59, f60 FROM test.tb2 limit 20 ;
|
||||||
Select * from test.v1 ;
|
Select * from test.v1 order by f59,f60;
|
||||||
|
|
||||||
Create table test1.t1 (f59 int,f60 int) ;
|
Create table test1.t1 (f59 int,f60 int) ;
|
||||||
Insert into test1.t1 values (199,507) ;
|
Insert into test1.t1 values (199,507) ;
|
||||||
@ -1550,7 +1550,7 @@ Drop view if exists test.v1 ;
|
|||||||
CREATE VIEW test.v1
|
CREATE VIEW test.v1
|
||||||
AS Select f59 from (Select * FROM tb2 limit 20) tx ;
|
AS Select f59 from (Select * FROM tb2 limit 20) tx ;
|
||||||
--error 1146
|
--error 1146
|
||||||
SELECT * FROM test.v1 ;
|
SELECT * FROM test.v1 order by f59 ;
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
Drop view if exists test.v1 ;
|
Drop view if exists test.v1 ;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
@ -1709,7 +1709,7 @@ CREATE VIEW test.v1 AS SELECT * FROM test.tb2 where f59 = 04;
|
|||||||
--enable_info
|
--enable_info
|
||||||
UPDATE test.v1 SET f59 = 30 where F59 = 04 ;
|
UPDATE test.v1 SET f59 = 30 where F59 = 04 ;
|
||||||
--disable_info
|
--disable_info
|
||||||
SELECT * FROM test.v1 where f59 = 30 ;
|
SELECT * FROM test.v1 where f59 = 30 order by f59;
|
||||||
if ($have_bug_11589)
|
if ($have_bug_11589)
|
||||||
{
|
{
|
||||||
--disable_ps_protocol
|
--disable_ps_protocol
|
||||||
@ -1726,7 +1726,7 @@ if ($have_bug_11589)
|
|||||||
}
|
}
|
||||||
SELECT * FROM tb2 where f59 = 100 ;
|
SELECT * FROM tb2 where f59 = 100 ;
|
||||||
--enable_ps_protocol
|
--enable_ps_protocol
|
||||||
SELECT * FROM test.v1 ;
|
SELECT * FROM test.v1 order by f59 ;
|
||||||
|
|
||||||
drop view if exists test.v1 ;
|
drop view if exists test.v1 ;
|
||||||
|
|
||||||
@ -1821,7 +1821,7 @@ FROM test.tb2 where f59 = 195 WITH CHECK OPTION ;
|
|||||||
|
|
||||||
--error 1369
|
--error 1369
|
||||||
UPDATE test.v1 SET f59 = 198 where f59=195 ;
|
UPDATE test.v1 SET f59 = 198 where f59=195 ;
|
||||||
SELECT * FROM test.v1 ;
|
SELECT * FROM test.v1 order by f59 ;
|
||||||
|
|
||||||
drop view if exists test.v1 ;
|
drop view if exists test.v1 ;
|
||||||
|
|
||||||
@ -1846,7 +1846,7 @@ CREATE VIEW test.v2 as SELECT * FROM test.v1 ;
|
|||||||
# This UPDATE violates the definition of VIEW test.v1.
|
# This UPDATE violates the definition of VIEW test.v1.
|
||||||
--error 1369
|
--error 1369
|
||||||
UPDATE test.v1 SET F59 = 919 where f59 = 0987 ;
|
UPDATE test.v1 SET F59 = 919 where f59 = 0987 ;
|
||||||
SELECT * FROM test.v1 ;
|
SELECT * FROM test.v1 order by f59 ;
|
||||||
|
|
||||||
# ML: This UPDATE violates the definition of VIEW test.v1, but this
|
# ML: This UPDATE violates the definition of VIEW test.v1, but this
|
||||||
# does not count, because the UPDATE runs on test.v2, which
|
# does not count, because the UPDATE runs on test.v2, which
|
||||||
@ -2299,7 +2299,7 @@ if ($have_bug_11589)
|
|||||||
{
|
{
|
||||||
--disable_ps_protocol
|
--disable_ps_protocol
|
||||||
}
|
}
|
||||||
SELECT * FROM test.v1 ;
|
SELECT * FROM test.v1 order by f59 ;
|
||||||
--enable_ps_protocol
|
--enable_ps_protocol
|
||||||
drop view test.v1 ;
|
drop view test.v1 ;
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -2310,7 +2310,7 @@ drop view test.v1 ;
|
|||||||
# AS SELECT col1, col3 FROM <table name>.
|
# AS SELECT col1, col3 FROM <table name>.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2 limit 50 ;
|
CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2 limit 50 ;
|
||||||
SELECT * FROM test.v1 ;
|
SELECT * FROM test.v1 order by F59, F61 ;
|
||||||
drop view test.v1 ;
|
drop view test.v1 ;
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Testcase 3.3.1.52: Ensure that a view that is a subset of every column and
|
# Testcase 3.3.1.52: Ensure that a view that is a subset of every column and
|
||||||
@ -2319,12 +2319,12 @@ drop view test.v1 ;
|
|||||||
# that is semantically equivalent to CREATE VIEW <view name>
|
# that is semantically equivalent to CREATE VIEW <view name>
|
||||||
# AS SELECT * FROM <table name> WHERE ....
|
# AS SELECT * FROM <table name> WHERE ....
|
||||||
###############################################################################
|
###############################################################################
|
||||||
CREATE VIEW test.v1 AS SELECT * FROM test.tb2 limit 20 ;
|
CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61 limit 20 ;
|
||||||
if ($have_bug_11589)
|
if ($have_bug_11589)
|
||||||
{
|
{
|
||||||
--disable_ps_protocol
|
--disable_ps_protocol
|
||||||
}
|
}
|
||||||
SELECT * FROM test.v1;
|
SELECT * FROM test.v1 order by f59,f60,f61 ;
|
||||||
--enable_ps_protocol
|
--enable_ps_protocol
|
||||||
drop view test.v1 ;
|
drop view test.v1 ;
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -2335,7 +2335,7 @@ drop view test.v1 ;
|
|||||||
# <view name> AS SELECT col1, col3 FROM <table name> WHERE ..
|
# <view name> AS SELECT col1, col3 FROM <table name> WHERE ..
|
||||||
###############################################################################
|
###############################################################################
|
||||||
CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2 limit 20 ;
|
CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2 limit 20 ;
|
||||||
SELECT * FROM test.v1 limit 50;
|
SELECT * FROM test.v1 order by f59,f61 desc limit 50;
|
||||||
drop view test.v1 ;
|
drop view test.v1 ;
|
||||||
|
|
||||||
|
|
||||||
@ -2363,7 +2363,7 @@ Insert into t2 values (2,2000) ;
|
|||||||
Insert into t2 values (31,97) ;
|
Insert into t2 values (31,97) ;
|
||||||
Create view test.v1 as select t1.f59, t1.f60
|
Create view test.v1 as select t1.f59, t1.f60
|
||||||
from t1,t2 where t1.f59=t2.f59 ;
|
from t1,t2 where t1.f59=t2.f59 ;
|
||||||
Select * from test.v1 limit 50 ;
|
Select * from test.v1 order by f59 limit 50 ;
|
||||||
|
|
||||||
drop table test.t1 ;
|
drop table test.t1 ;
|
||||||
drop table test.t2 ;
|
drop table test.t2 ;
|
||||||
@ -2457,7 +2457,7 @@ create or replace view test.v1 as
|
|||||||
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
|
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
|
||||||
t1.f61 t1_f61, t2.f61 t2_f61
|
t1.f61 t1_f61, t2.f61 t2_f61
|
||||||
from t1 inner join t2 where t1.f59 = t2.f59 ;
|
from t1 inner join t2 where t1.f59 = t2.f59 ;
|
||||||
select * from test.v1;
|
select * from test.v1 order by t1_f59 ;
|
||||||
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
|
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
|
||||||
t1.f61 t1_f61, t2.f61 t2_f61
|
t1.f61 t1_f61, t2.f61 t2_f61
|
||||||
from t1 inner join t2 where t1.f59 = t2.f59;
|
from t1 inner join t2 where t1.f59 = t2.f59;
|
||||||
@ -2466,7 +2466,7 @@ from t1 inner join t2 where t1.f59 = t2.f59;
|
|||||||
Create or replace view test.v1 as
|
Create or replace view test.v1 as
|
||||||
Select t1.f59 AS t1_f59, t2.f59 AS t2_f59
|
Select t1.f59 AS t1_f59, t2.f59 AS t2_f59
|
||||||
FROM t2 cross join t1;
|
FROM t2 cross join t1;
|
||||||
Select * from v1;
|
Select * from v1 order by t1_f59,t2_f59;
|
||||||
Select t1.f59 AS t1_f59, t2.f59 AS t2_f59
|
Select t1.f59 AS t1_f59, t2.f59 AS t2_f59
|
||||||
FROM t2 cross join t1;
|
FROM t2 cross join t1;
|
||||||
|
|
||||||
@ -2474,7 +2474,7 @@ FROM t2 cross join t1;
|
|||||||
Create or replace view test.v1 as
|
Create or replace view test.v1 as
|
||||||
Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59
|
Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59
|
||||||
FROM t2,t1;
|
FROM t2,t1;
|
||||||
Select * from v1;
|
Select * from v1 order by t1_f59,t2_f59;
|
||||||
Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59
|
Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59
|
||||||
FROM t2,t1;
|
FROM t2,t1;
|
||||||
|
|
||||||
@ -2482,7 +2482,7 @@ FROM t2,t1;
|
|||||||
Create or replace view test.v1 as
|
Create or replace view test.v1 as
|
||||||
Select f59, f60, f61, a, b
|
Select f59, f60, f61, a, b
|
||||||
FROM t2 natural join t1;
|
FROM t2 natural join t1;
|
||||||
Select * from v1;
|
Select * from v1 order by f59;
|
||||||
Select f59, f60, f61, a, b
|
Select f59, f60, f61, a, b
|
||||||
FROM t2 natural join t1;
|
FROM t2 natural join t1;
|
||||||
|
|
||||||
@ -2491,7 +2491,7 @@ Create or replace view test.v1 as
|
|||||||
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
|
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
|
||||||
t1.f61 t1_f61, t2.f61 t2_f61
|
t1.f61 t1_f61, t2.f61 t2_f61
|
||||||
FROM t2 left outer join t1 on t2.f59=t1.f59;
|
FROM t2 left outer join t1 on t2.f59=t1.f59;
|
||||||
Select * from v1;
|
Select * from v1 order by t1_f59;
|
||||||
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
|
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
|
||||||
t1.f61 t1_f61, t2.f61 t2_f61
|
t1.f61 t1_f61, t2.f61 t2_f61
|
||||||
FROM t2 left outer join t1 on t2.f59=t1.f59;
|
FROM t2 left outer join t1 on t2.f59=t1.f59;
|
||||||
@ -2500,7 +2500,7 @@ FROM t2 left outer join t1 on t2.f59=t1.f59;
|
|||||||
Create or replace view test.v1 as
|
Create or replace view test.v1 as
|
||||||
Select f59, f60, f61, t1.a, t2.b
|
Select f59, f60, f61, t1.a, t2.b
|
||||||
FROM t2 natural left outer join t1;
|
FROM t2 natural left outer join t1;
|
||||||
Select * from v1;
|
Select * from v1 order by f59;
|
||||||
Select f59, f60, f61, t1.a, t2.b
|
Select f59, f60, f61, t1.a, t2.b
|
||||||
FROM t2 natural left outer join t1;
|
FROM t2 natural left outer join t1;
|
||||||
|
|
||||||
@ -2509,7 +2509,7 @@ Create or replace view test.v1 as
|
|||||||
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
|
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
|
||||||
t1.f61 t1_f61, t2.f61 t2_f61
|
t1.f61 t1_f61, t2.f61 t2_f61
|
||||||
FROM t2 right outer join t1 on t2.f59=t1.f59;
|
FROM t2 right outer join t1 on t2.f59=t1.f59;
|
||||||
Select * from v1;
|
Select * from v1 order by t1_f59;
|
||||||
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
|
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
|
||||||
t1.f61 t1_f61, t2.f61 t2_f61
|
t1.f61 t1_f61, t2.f61 t2_f61
|
||||||
FROM t2 right outer join t1 on t2.f59=t1.f59;
|
FROM t2 right outer join t1 on t2.f59=t1.f59;
|
||||||
@ -2518,7 +2518,7 @@ FROM t2 right outer join t1 on t2.f59=t1.f59;
|
|||||||
Create or replace view test.v1 as
|
Create or replace view test.v1 as
|
||||||
Select f59, f60, a, b
|
Select f59, f60, a, b
|
||||||
FROM t2 natural right outer join t1;
|
FROM t2 natural right outer join t1;
|
||||||
Select * from v1;
|
Select * from v1 order by f59 desc;
|
||||||
Select f59, f60, a, b
|
Select f59, f60, a, b
|
||||||
FROM t2 natural right outer join t1;
|
FROM t2 natural right outer join t1;
|
||||||
|
|
||||||
@ -2551,7 +2551,7 @@ Insert into t1 values (901,801,401) ;
|
|||||||
|
|
||||||
Create or replace view test.v1 as
|
Create or replace view test.v1 as
|
||||||
Select tb2.f59 FROM tb2 LEFT JOIN t1 on tb2.f59 = t1.f59 ;
|
Select tb2.f59 FROM tb2 LEFT JOIN t1 on tb2.f59 = t1.f59 ;
|
||||||
Select * from test.v1 limit 0,10;
|
Select * from test.v1 order by f59 limit 0,10;
|
||||||
Drop view if exists test.v1 ;
|
Drop view if exists test.v1 ;
|
||||||
|
|
||||||
# Testcase 3.3.1.A2 ;
|
# Testcase 3.3.1.A2 ;
|
||||||
@ -2566,7 +2566,7 @@ Insert into t1 values (201,201,201) ;
|
|||||||
|
|
||||||
Create or replace view test.v1
|
Create or replace view test.v1
|
||||||
as Select tb2.f59 FROM tb2 INNER JOIN t1 on tb2.f59 = t1.f59 ;
|
as Select tb2.f59 FROM tb2 INNER JOIN t1 on tb2.f59 = t1.f59 ;
|
||||||
Select * from test.v1 limit 0,10;
|
Select * from test.v1 order by f59 limit 0,10;
|
||||||
Drop view if exists test.v1 ;
|
Drop view if exists test.v1 ;
|
||||||
|
|
||||||
# Testcase 3.3.1.A3 ;
|
# Testcase 3.3.1.A3 ;
|
||||||
@ -2581,7 +2581,7 @@ Insert into t1 values (21,21,21) ;
|
|||||||
|
|
||||||
Create or replace view test.v1
|
Create or replace view test.v1
|
||||||
as Select tb2.f59 FROM tb2 CROSS JOIN t1 on tb2.f59 = t1.f59 ;
|
as Select tb2.f59 FROM tb2 CROSS JOIN t1 on tb2.f59 = t1.f59 ;
|
||||||
Select * from test.v1 limit 0,10;
|
Select * from test.v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
Drop view test.v1 ;
|
Drop view test.v1 ;
|
||||||
|
|
||||||
@ -2607,15 +2607,15 @@ Insert into t1 values (91,81,41) ;
|
|||||||
|
|
||||||
Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
|
Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
|
||||||
Union ALL (Select f59 from t1 where f59=17 );
|
Union ALL (Select f59 from t1 where f59=17 );
|
||||||
Select * from test.v1 limit 0,10;
|
Select * from test.v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
|
Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
|
||||||
Union (Select f59 from t1 where f59=17 );
|
Union (Select f59 from t1 where f59=17 );
|
||||||
Select * from test.v1 limit 0,10;
|
Select * from test.v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
|
Create or replace view test.v1 as (Select f59 FROM tb2 where f59=17 )
|
||||||
Union Distinct (Select f59 from t1 where f60=17 );
|
Union Distinct (Select f59 from t1 where f60=17 );
|
||||||
Select * from test.v1 limit 0,10;
|
Select * from test.v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
Drop view test.v1 ;
|
Drop view test.v1 ;
|
||||||
|
|
||||||
@ -2631,25 +2631,25 @@ insert into t1 values (901,801,401);
|
|||||||
|
|
||||||
create or replace view test.v1 as
|
create or replace view test.v1 as
|
||||||
select tb2.f59 from tb2 join t1 on tb2.f59 = t1.f59;
|
select tb2.f59 from tb2 join t1 on tb2.f59 = t1.f59;
|
||||||
select * from test.v1 limit 0,10;
|
select * from test.v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
create or replace view test.v1 as
|
create or replace view test.v1 as
|
||||||
(select f59 from tb2 where f59=107 )
|
(select f59 from tb2 where f59=107 )
|
||||||
union all
|
union all
|
||||||
(select f59 from t1 where f59=107 );
|
(select f59 from t1 where f59=107 );
|
||||||
select * from test.v1 limit 0,10;
|
select * from test.v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
create or replace view test.v1 as
|
create or replace view test.v1 as
|
||||||
(select f59 from tb2 where f59=107 )
|
(select f59 from tb2 where f59=107 )
|
||||||
union
|
union
|
||||||
(select f59 from t1 where f59=107 );
|
(select f59 from t1 where f59=107 );
|
||||||
select * from test.v1 limit 0,10;
|
select * from test.v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
create or replace view test.v1 as
|
create or replace view test.v1 as
|
||||||
(select f59 from tb2 where f59=107 )
|
(select f59 from tb2 where f59=107 )
|
||||||
union distinct
|
union distinct
|
||||||
(select f59 from t1 where f59=107 );
|
(select f59 from t1 where f59=107 );
|
||||||
select * from test.v1 limit 0,10;
|
select * from test.v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
drop view if exists test.v1 ;
|
drop view if exists test.v1 ;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
@ -2668,7 +2668,7 @@ Drop view if exists test.v1 ;
|
|||||||
CREATE VIEW test.v1 AS SELECT F59
|
CREATE VIEW test.v1 AS SELECT F59
|
||||||
FROM test.tb2 where test.tb2.F59 = 109;
|
FROM test.tb2 where test.tb2.F59 = 109;
|
||||||
|
|
||||||
SELECT * FROM test.v1 limit 0,10;
|
SELECT * FROM test.v1 order by f59 limit 0,10;
|
||||||
|
|
||||||
ALTER VIEW test.v1 AS SELECT *
|
ALTER VIEW test.v1 AS SELECT *
|
||||||
FROM test.tb2 WHERE test.tb2.f59 = 242 ;
|
FROM test.tb2 WHERE test.tb2.f59 = 242 ;
|
||||||
@ -2676,7 +2676,7 @@ if ($have_bug_11589)
|
|||||||
{
|
{
|
||||||
--disable_ps_protocol
|
--disable_ps_protocol
|
||||||
}
|
}
|
||||||
SELECT * FROM test.v1 limit 0,10;
|
SELECT * FROM test.v1 order by f59 limit 0,10;
|
||||||
--enable_ps_protocol
|
--enable_ps_protocol
|
||||||
|
|
||||||
Drop view test.v1 ;
|
Drop view test.v1 ;
|
||||||
@ -2899,10 +2899,14 @@ eval EXPLAIN SELECT * FROM test3.v$toplevel;
|
|||||||
# and OBN's box performs excessive paging.
|
# and OBN's box performs excessive paging.
|
||||||
# (RAM: OBN ~384MB RAM, ML 1 GB)
|
# (RAM: OBN ~384MB RAM, ML 1 GB)
|
||||||
#++++++++++++++++++++++++++++++++++++++++++++++
|
#++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
let $message= FIXME - Setting join_limit to 30 - hangs for higher values;
|
let $message= FIXME - Setting join_limit to 28 - hangs for higher values;
|
||||||
--source include/show_msg.inc
|
--source include/show_msg.inc
|
||||||
|
# OBN - Reduced from 30 in 5.1.21 to avoid hitting the ndbcluster limit
|
||||||
|
# of "ERROR HY000:RROR HY000: Got temporary error 4006 'Connect failure
|
||||||
|
# - out of connection objects (increase MaxNoOfConcurrentTransactions)'
|
||||||
|
# from NDBCLUSTER " to early;
|
||||||
#SET @join_limit = 61;
|
#SET @join_limit = 61;
|
||||||
SET @join_limit = 30;
|
SET @join_limit = 28; # OBN - see above
|
||||||
SET @max_level = @join_limit - 1;
|
SET @max_level = @join_limit - 1;
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
@ -3184,7 +3188,7 @@ if ($have_bug_11589)
|
|||||||
}
|
}
|
||||||
SELECT * FROM tb2 where f59 = 8 and f60 = 105;
|
SELECT * FROM tb2 where f59 = 8 and f60 = 105;
|
||||||
--enable_ps_protocol
|
--enable_ps_protocol
|
||||||
SELECT f59,f60 FROM test.v1 where f59 = 8 and f60 = 105;
|
SELECT f59,f60 FROM test.v1 where f59 = 8 and f60 = 105 ;
|
||||||
|
|
||||||
Drop view test.v1 ;
|
Drop view test.v1 ;
|
||||||
|
|
||||||
@ -3212,7 +3216,7 @@ if ($have_bug_11589)
|
|||||||
}
|
}
|
||||||
SELECT * FROM tb2 where f59 = 891 and f60 = 105;
|
SELECT * FROM tb2 where f59 = 891 and f60 = 105;
|
||||||
--enable_ps_protocol
|
--enable_ps_protocol
|
||||||
SELECT f59,f60 FROM test.v1 where f59 = 891 and f60 = 105;
|
SELECT f59,f60 FROM test.v1 where f59 = 891 and f60 = 105 ;
|
||||||
|
|
||||||
Drop view test.v1 ;
|
Drop view test.v1 ;
|
||||||
|
|
||||||
@ -3233,7 +3237,7 @@ CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 789 ;
|
|||||||
DELETE FROM test.v1 where f59 = 789 ;
|
DELETE FROM test.v1 where f59 = 789 ;
|
||||||
--disable_info
|
--disable_info
|
||||||
SELECT * FROM tb2 where f59 = 789 ;
|
SELECT * FROM tb2 where f59 = 789 ;
|
||||||
SELECT f59,f60 FROM test.v1 where f59 = 789;
|
SELECT f59,f60 FROM test.v1 where f59 = 789 order by f60 ;
|
||||||
|
|
||||||
Drop view test.v1 ;
|
Drop view test.v1 ;
|
||||||
|
|
||||||
@ -3256,7 +3260,7 @@ DELETE FROM test.v1 where f59 = 711 ;
|
|||||||
--disable_info
|
--disable_info
|
||||||
|
|
||||||
SELECT * FROM tb2 where f59 = 711 ;
|
SELECT * FROM tb2 where f59 = 711 ;
|
||||||
SELECT f59,f60 FROM test.v1 where f59 = 711;
|
SELECT f59,f60 FROM test.v1 where f59 = 711 order by f60 ;
|
||||||
|
|
||||||
Drop view test.v1 ;
|
Drop view test.v1 ;
|
||||||
|
|
||||||
|
167
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result
Normal file
167
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
stop slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
reset master;
|
||||||
|
reset slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
start slave;
|
||||||
|
use test;
|
||||||
|
CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||||
|
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||||
|
fkid MEDIUMINT, filler VARCHAR(255),
|
||||||
|
PRIMARY KEY(id)) ENGINE='innodb';
|
||||||
|
CREATE TABLE test.bykey_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||||
|
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||||
|
fkid MEDIUMINT, filler VARCHAR(255),
|
||||||
|
PRIMARY KEY(id)) ENGINE='innodb'
|
||||||
|
PARTITION BY KEY(id) partitions 5;
|
||||||
|
CREATE TABLE test.byrange_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||||
|
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||||
|
fkid MEDIUMINT, filler VARCHAR(255),
|
||||||
|
PRIMARY KEY(id)) ENGINE='innodb'
|
||||||
|
PARTITION BY RANGE(id)
|
||||||
|
SUBPARTITION BY hash(id) subpartitions 2
|
||||||
|
(PARTITION pa1 values less than (10),
|
||||||
|
PARTITION pa2 values less than (20),
|
||||||
|
PARTITION pa3 values less than (30),
|
||||||
|
PARTITION pa4 values less than (40),
|
||||||
|
PARTITION pa5 values less than (50),
|
||||||
|
PARTITION pa6 values less than (60),
|
||||||
|
PARTITION pa7 values less than (70),
|
||||||
|
PARTITION pa8 values less than (80),
|
||||||
|
PARTITION pa9 values less than (90),
|
||||||
|
PARTITION pa10 values less than (100),
|
||||||
|
PARTITION pa11 values less than MAXVALUE);
|
||||||
|
CREATE PROCEDURE test.proc_norm()
|
||||||
|
BEGIN
|
||||||
|
DECLARE ins_count INT DEFAULT 1000;
|
||||||
|
DECLARE del_count INT;
|
||||||
|
DECLARE cur_user VARCHAR(255);
|
||||||
|
DECLARE local_uuid VARCHAR(255);
|
||||||
|
DECLARE local_time TIMESTAMP;
|
||||||
|
SET local_time= NOW();
|
||||||
|
SET cur_user= CURRENT_USER();
|
||||||
|
SET local_uuid= UUID();
|
||||||
|
WHILE ins_count > 0 DO
|
||||||
|
INSERT INTO test.regular_tbl VALUES (NULL, NOW(), USER() , UUID(),
|
||||||
|
ins_count,'Going to test MBR for MySQL');
|
||||||
|
SET ins_count = ins_count - 1;
|
||||||
|
END WHILE;
|
||||||
|
SELECT MAX(id) FROM test.regular_tbl INTO del_count;
|
||||||
|
WHILE del_count > 0 DO
|
||||||
|
DELETE FROM test.regular_tbl WHERE id = del_count;
|
||||||
|
SET del_count = del_count - 2;
|
||||||
|
END WHILE;
|
||||||
|
END|
|
||||||
|
CREATE PROCEDURE test.proc_bykey()
|
||||||
|
BEGIN
|
||||||
|
DECLARE ins_count INT DEFAULT 1000;
|
||||||
|
DECLARE del_count INT;
|
||||||
|
DECLARE cur_user VARCHAR(255);
|
||||||
|
DECLARE local_uuid VARCHAR(255);
|
||||||
|
DECLARE local_time TIMESTAMP;
|
||||||
|
SET local_time= NOW();
|
||||||
|
SET cur_user= CURRENT_USER();
|
||||||
|
SET local_uuid= UUID();
|
||||||
|
WHILE ins_count > 0 DO
|
||||||
|
INSERT INTO test.bykey_tbl VALUES (NULL, NOW(), USER() , UUID(),
|
||||||
|
ins_count,'Going to test MBR for MySQL');
|
||||||
|
SET ins_count = ins_count - 1;
|
||||||
|
END WHILE;
|
||||||
|
SELECT MAX(id) FROM test.bykey_tbl INTO del_count;
|
||||||
|
WHILE del_count > 0 DO
|
||||||
|
DELETE FROM test.bykey_tbl WHERE id = del_count;
|
||||||
|
SET del_count = del_count - 2;
|
||||||
|
END WHILE;
|
||||||
|
END|
|
||||||
|
CREATE PROCEDURE test.proc_byrange()
|
||||||
|
BEGIN
|
||||||
|
DECLARE ins_count INT DEFAULT 1000;
|
||||||
|
DECLARE del_count INT;
|
||||||
|
DECLARE cur_user VARCHAR(255);
|
||||||
|
DECLARE local_uuid VARCHAR(255);
|
||||||
|
DECLARE local_time TIMESTAMP;
|
||||||
|
SET local_time= NOW();
|
||||||
|
SET cur_user = CURRENT_USER();
|
||||||
|
SET local_uuid=UUID();
|
||||||
|
WHILE ins_count > 0 DO
|
||||||
|
INSERT INTO test.byrange_tbl VALUES (NULL, NOW(), USER(), UUID(),
|
||||||
|
ins_count,'Going to test MBR for MySQL');
|
||||||
|
SET ins_count = ins_count - 1;
|
||||||
|
END WHILE;
|
||||||
|
SELECT MAX(id) FROM test.byrange_tbl INTO del_count;
|
||||||
|
WHILE del_count > 0 DO
|
||||||
|
DELETE FROM test.byrange_tbl WHERE id = del_count;
|
||||||
|
SET del_count = del_count - 2;
|
||||||
|
END WHILE;
|
||||||
|
END|
|
||||||
|
CALL test.proc_norm();
|
||||||
|
SELECT count(*) as "Master regular" FROM test.regular_tbl;
|
||||||
|
Master regular 500
|
||||||
|
CALL test.proc_bykey();
|
||||||
|
SELECT count(*) as "Master bykey" FROM test.bykey_tbl;
|
||||||
|
Master bykey 500
|
||||||
|
CALL test.proc_byrange();
|
||||||
|
SELECT count(*) as "Master byrange" FROM test.byrange_tbl;
|
||||||
|
Master byrange 500
|
||||||
|
show create table test.byrange_tbl;
|
||||||
|
Table byrange_tbl
|
||||||
|
Create Table CREATE TABLE `byrange_tbl` (
|
||||||
|
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
|
||||||
|
`dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
`user` char(255) DEFAULT NULL,
|
||||||
|
`uuidf` longblob,
|
||||||
|
`fkid` mediumint(9) DEFAULT NULL,
|
||||||
|
`filler` varchar(255) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (id) SUBPARTITION BY HASH (id) SUBPARTITIONS 2 (PARTITION pa1 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION pa2 VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION pa3 VALUES LESS THAN (30) ENGINE = InnoDB, PARTITION pa4 VALUES LESS THAN (40) ENGINE = InnoDB, PARTITION pa5 VALUES LESS THAN (50) ENGINE = InnoDB, PARTITION pa6 VALUES LESS THAN (60) ENGINE = InnoDB, PARTITION pa7 VALUES LESS THAN (70) ENGINE = InnoDB, PARTITION pa8 VALUES LESS THAN (80) ENGINE = InnoDB, PARTITION pa9 VALUES LESS THAN (90) ENGINE = InnoDB, PARTITION pa10 VALUES LESS THAN (100) ENGINE = InnoDB, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
||||||
|
show slave status;
|
||||||
|
Slave_IO_State Waiting for master to send event
|
||||||
|
Master_Host 127.0.0.1
|
||||||
|
Master_User root
|
||||||
|
Master_Port MASTER_PORT
|
||||||
|
Connect_Retry 1
|
||||||
|
Master_Log_File master-bin.000001
|
||||||
|
Read_Master_Log_Pos 945470
|
||||||
|
Relay_Log_File slave-relay-bin.000003
|
||||||
|
Relay_Log_Pos 945616
|
||||||
|
Relay_Master_Log_File master-bin.000001
|
||||||
|
Slave_IO_Running Yes
|
||||||
|
Slave_SQL_Running Yes
|
||||||
|
Replicate_Do_DB
|
||||||
|
Replicate_Ignore_DB
|
||||||
|
Replicate_Do_Table
|
||||||
|
Replicate_Ignore_Table
|
||||||
|
Replicate_Wild_Do_Table
|
||||||
|
Replicate_Wild_Ignore_Table
|
||||||
|
Last_Errno 0
|
||||||
|
Last_Error
|
||||||
|
Skip_Counter 0
|
||||||
|
Exec_Master_Log_Pos 945470
|
||||||
|
Relay_Log_Space 945771
|
||||||
|
Until_Condition None
|
||||||
|
Until_Log_File
|
||||||
|
Until_Log_Pos 0
|
||||||
|
Master_SSL_Allowed No
|
||||||
|
Master_SSL_CA_File
|
||||||
|
Master_SSL_CA_Path
|
||||||
|
Master_SSL_Cert
|
||||||
|
Master_SSL_Cipher
|
||||||
|
Master_SSL_Key
|
||||||
|
Seconds_Behind_Master #
|
||||||
|
Master_SSL_Verify_Server_Cert No
|
||||||
|
Last_IO_Errno 0
|
||||||
|
Last_IO_Error
|
||||||
|
Last_SQL_Errno 0
|
||||||
|
Last_SQL_Error
|
||||||
|
SELECT count(*) "Slave norm" FROM test.regular_tbl;
|
||||||
|
Slave norm 500
|
||||||
|
SELECT count(*) "Slave bykey" FROM test.bykey_tbl;
|
||||||
|
Slave bykey 500
|
||||||
|
SELECT count(*) "Slave byrange" FROM test.byrange_tbl;
|
||||||
|
Slave byrange 500
|
||||||
|
DROP PROCEDURE test.proc_norm;
|
||||||
|
DROP PROCEDURE test.proc_bykey;
|
||||||
|
DROP PROCEDURE test.proc_byrange;
|
||||||
|
DROP TABLE test.regular_tbl;
|
||||||
|
DROP TABLE test.bykey_tbl;
|
||||||
|
DROP TABLE test.byrange_tbl;
|
35
mysql-test/suite/rpl/r/rpl_innodb_bug30888.result
Normal file
35
mysql-test/suite/rpl/r/rpl_innodb_bug30888.result
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
stop slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
reset master;
|
||||||
|
reset slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
start slave;
|
||||||
|
use test;
|
||||||
|
CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||||
|
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||||
|
fkid MEDIUMINT, filler VARCHAR(255),
|
||||||
|
PRIMARY KEY(id)) ENGINE='innodb';
|
||||||
|
CREATE PROCEDURE test.proc_norm()
|
||||||
|
BEGIN
|
||||||
|
DECLARE ins_count INT DEFAULT 1000;
|
||||||
|
DECLARE del_count INT;
|
||||||
|
DECLARE cur_user VARCHAR(255);
|
||||||
|
DECLARE local_uuid VARCHAR(255);
|
||||||
|
DECLARE local_time TIMESTAMP;
|
||||||
|
SET local_time= NOW();
|
||||||
|
SET cur_user= CURRENT_USER();
|
||||||
|
SET local_uuid= UUID();
|
||||||
|
WHILE ins_count > 0 DO
|
||||||
|
INSERT INTO test.regular_tbl VALUES (NULL, NOW(), USER() , UUID(),
|
||||||
|
ins_count,'Going to test MBR for MySQL');
|
||||||
|
SET ins_count = ins_count - 1;
|
||||||
|
END WHILE;
|
||||||
|
SELECT MAX(id) FROM test.regular_tbl INTO del_count;
|
||||||
|
WHILE del_count > 0 DO
|
||||||
|
DELETE FROM test.regular_tbl WHERE id = del_count;
|
||||||
|
SET del_count = del_count - 2;
|
||||||
|
END WHILE;
|
||||||
|
END|
|
||||||
|
CALL test.proc_norm();
|
||||||
|
DROP PROCEDURE test.proc_norm;
|
||||||
|
DROP TABLE test.regular_tbl;
|
1043
mysql-test/suite/rpl/r/rpl_innodb_bug30919.result
Normal file
1043
mysql-test/suite/rpl/r/rpl_innodb_bug30919.result
Normal file
File diff suppressed because it is too large
Load Diff
1
mysql-test/suite/rpl/t/rpl_innodb-master.opt
Normal file
1
mysql-test/suite/rpl/t/rpl_innodb-master.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--innodb --innodb_autoinc_lock_mode=0
|
1
mysql-test/suite/rpl/t/rpl_innodb_bug28430-master.opt
Normal file
1
mysql-test/suite/rpl/t/rpl_innodb_bug28430-master.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--innodb --innodb_autoinc_lock_mode=0
|
1
mysql-test/suite/rpl/t/rpl_innodb_bug28430-slave.opt
Normal file
1
mysql-test/suite/rpl/t/rpl_innodb_bug28430-slave.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--innodb --innodb_autoinc_lock_mode=0
|
154
mysql-test/suite/rpl/t/rpl_innodb_bug28430.test
Normal file
154
mysql-test/suite/rpl/t/rpl_innodb_bug28430.test
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_binlog_format_mixed_or_row.inc
|
||||||
|
--source include/master-slave.inc
|
||||||
|
|
||||||
|
# Set the default connection to 'master'
|
||||||
|
|
||||||
|
--vertical_results
|
||||||
|
|
||||||
|
let $engine_type= 'innodb';
|
||||||
|
|
||||||
|
######## Creat Table Section #########
|
||||||
|
use test;
|
||||||
|
|
||||||
|
eval CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||||
|
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||||
|
fkid MEDIUMINT, filler VARCHAR(255),
|
||||||
|
PRIMARY KEY(id)) ENGINE=$engine_type;
|
||||||
|
|
||||||
|
eval CREATE TABLE test.bykey_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||||
|
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||||
|
fkid MEDIUMINT, filler VARCHAR(255),
|
||||||
|
PRIMARY KEY(id)) ENGINE=$engine_type
|
||||||
|
PARTITION BY KEY(id) partitions 5;
|
||||||
|
|
||||||
|
eval CREATE TABLE test.byrange_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||||
|
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||||
|
fkid MEDIUMINT, filler VARCHAR(255),
|
||||||
|
PRIMARY KEY(id)) ENGINE=$engine_type
|
||||||
|
PARTITION BY RANGE(id)
|
||||||
|
SUBPARTITION BY hash(id) subpartitions 2
|
||||||
|
(PARTITION pa1 values less than (10),
|
||||||
|
PARTITION pa2 values less than (20),
|
||||||
|
PARTITION pa3 values less than (30),
|
||||||
|
PARTITION pa4 values less than (40),
|
||||||
|
PARTITION pa5 values less than (50),
|
||||||
|
PARTITION pa6 values less than (60),
|
||||||
|
PARTITION pa7 values less than (70),
|
||||||
|
PARTITION pa8 values less than (80),
|
||||||
|
PARTITION pa9 values less than (90),
|
||||||
|
PARTITION pa10 values less than (100),
|
||||||
|
PARTITION pa11 values less than MAXVALUE);
|
||||||
|
|
||||||
|
######## Create SPs, Functions, Views and Triggers Section ##############
|
||||||
|
|
||||||
|
delimiter |;
|
||||||
|
CREATE PROCEDURE test.proc_norm()
|
||||||
|
BEGIN
|
||||||
|
DECLARE ins_count INT DEFAULT 1000;
|
||||||
|
DECLARE del_count INT;
|
||||||
|
DECLARE cur_user VARCHAR(255);
|
||||||
|
DECLARE local_uuid VARCHAR(255);
|
||||||
|
DECLARE local_time TIMESTAMP;
|
||||||
|
|
||||||
|
SET local_time= NOW();
|
||||||
|
SET cur_user= CURRENT_USER();
|
||||||
|
SET local_uuid= UUID();
|
||||||
|
|
||||||
|
WHILE ins_count > 0 DO
|
||||||
|
INSERT INTO test.regular_tbl VALUES (NULL, NOW(), USER() , UUID(),
|
||||||
|
ins_count,'Going to test MBR for MySQL');
|
||||||
|
SET ins_count = ins_count - 1;
|
||||||
|
END WHILE;
|
||||||
|
|
||||||
|
SELECT MAX(id) FROM test.regular_tbl INTO del_count;
|
||||||
|
WHILE del_count > 0 DO
|
||||||
|
DELETE FROM test.regular_tbl WHERE id = del_count;
|
||||||
|
SET del_count = del_count - 2;
|
||||||
|
END WHILE;
|
||||||
|
END|
|
||||||
|
|
||||||
|
CREATE PROCEDURE test.proc_bykey()
|
||||||
|
BEGIN
|
||||||
|
DECLARE ins_count INT DEFAULT 1000;
|
||||||
|
DECLARE del_count INT;
|
||||||
|
DECLARE cur_user VARCHAR(255);
|
||||||
|
DECLARE local_uuid VARCHAR(255);
|
||||||
|
DECLARE local_time TIMESTAMP;
|
||||||
|
|
||||||
|
SET local_time= NOW();
|
||||||
|
SET cur_user= CURRENT_USER();
|
||||||
|
SET local_uuid= UUID();
|
||||||
|
|
||||||
|
WHILE ins_count > 0 DO
|
||||||
|
INSERT INTO test.bykey_tbl VALUES (NULL, NOW(), USER() , UUID(),
|
||||||
|
ins_count,'Going to test MBR for MySQL');
|
||||||
|
SET ins_count = ins_count - 1;
|
||||||
|
END WHILE;
|
||||||
|
|
||||||
|
SELECT MAX(id) FROM test.bykey_tbl INTO del_count;
|
||||||
|
WHILE del_count > 0 DO
|
||||||
|
DELETE FROM test.bykey_tbl WHERE id = del_count;
|
||||||
|
SET del_count = del_count - 2;
|
||||||
|
END WHILE;
|
||||||
|
END|
|
||||||
|
|
||||||
|
CREATE PROCEDURE test.proc_byrange()
|
||||||
|
BEGIN
|
||||||
|
DECLARE ins_count INT DEFAULT 1000;
|
||||||
|
DECLARE del_count INT;
|
||||||
|
DECLARE cur_user VARCHAR(255);
|
||||||
|
DECLARE local_uuid VARCHAR(255);
|
||||||
|
DECLARE local_time TIMESTAMP;
|
||||||
|
|
||||||
|
SET local_time= NOW();
|
||||||
|
SET cur_user = CURRENT_USER();
|
||||||
|
SET local_uuid=UUID();
|
||||||
|
|
||||||
|
WHILE ins_count > 0 DO
|
||||||
|
INSERT INTO test.byrange_tbl VALUES (NULL, NOW(), USER(), UUID(),
|
||||||
|
ins_count,'Going to test MBR for MySQL');
|
||||||
|
SET ins_count = ins_count - 1;
|
||||||
|
END WHILE;
|
||||||
|
|
||||||
|
SELECT MAX(id) FROM test.byrange_tbl INTO del_count;
|
||||||
|
WHILE del_count > 0 DO
|
||||||
|
DELETE FROM test.byrange_tbl WHERE id = del_count;
|
||||||
|
SET del_count = del_count - 2;
|
||||||
|
END WHILE;
|
||||||
|
END|
|
||||||
|
|
||||||
|
delimiter ;|
|
||||||
|
|
||||||
|
############ Finish Setup Section ###################
|
||||||
|
|
||||||
|
|
||||||
|
############ Test Section ###################
|
||||||
|
|
||||||
|
CALL test.proc_norm();
|
||||||
|
SELECT count(*) as "Master regular" FROM test.regular_tbl;
|
||||||
|
CALL test.proc_bykey();
|
||||||
|
SELECT count(*) as "Master bykey" FROM test.bykey_tbl;
|
||||||
|
CALL test.proc_byrange();
|
||||||
|
SELECT count(*) as "Master byrange" FROM test.byrange_tbl;
|
||||||
|
|
||||||
|
--sync_slave_with_master
|
||||||
|
connection slave;
|
||||||
|
show create table test.byrange_tbl;
|
||||||
|
--replace_column 4 MASTER_PORT 33 #
|
||||||
|
show slave status;
|
||||||
|
SELECT count(*) "Slave norm" FROM test.regular_tbl;
|
||||||
|
SELECT count(*) "Slave bykey" FROM test.bykey_tbl;
|
||||||
|
SELECT count(*) "Slave byrange" FROM test.byrange_tbl;
|
||||||
|
|
||||||
|
###### CLEAN UP SECTION ##############
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
DROP PROCEDURE test.proc_norm;
|
||||||
|
DROP PROCEDURE test.proc_bykey;
|
||||||
|
DROP PROCEDURE test.proc_byrange;
|
||||||
|
DROP TABLE test.regular_tbl;
|
||||||
|
DROP TABLE test.bykey_tbl;
|
||||||
|
DROP TABLE test.byrange_tbl;
|
||||||
|
|
||||||
|
--source include/master-slave-end.inc
|
66
mysql-test/suite/rpl/t/rpl_innodb_bug30888.test
Normal file
66
mysql-test/suite/rpl/t/rpl_innodb_bug30888.test
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_binlog_format_mixed_or_row.inc
|
||||||
|
--source include/master-slave.inc
|
||||||
|
|
||||||
|
# Set the default connection to 'master'
|
||||||
|
|
||||||
|
--vertical_results
|
||||||
|
|
||||||
|
#let $engine_type= 'myisam';
|
||||||
|
let $engine_type= 'innodb';
|
||||||
|
|
||||||
|
######## Creat Table Section #########
|
||||||
|
use test;
|
||||||
|
|
||||||
|
eval CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||||
|
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||||
|
fkid MEDIUMINT, filler VARCHAR(255),
|
||||||
|
PRIMARY KEY(id)) ENGINE=$engine_type;
|
||||||
|
|
||||||
|
######## Create SPs, Functions, Views and Triggers Section ##############
|
||||||
|
|
||||||
|
delimiter |;
|
||||||
|
CREATE PROCEDURE test.proc_norm()
|
||||||
|
BEGIN
|
||||||
|
DECLARE ins_count INT DEFAULT 1000;
|
||||||
|
DECLARE del_count INT;
|
||||||
|
DECLARE cur_user VARCHAR(255);
|
||||||
|
DECLARE local_uuid VARCHAR(255);
|
||||||
|
DECLARE local_time TIMESTAMP;
|
||||||
|
|
||||||
|
SET local_time= NOW();
|
||||||
|
SET cur_user= CURRENT_USER();
|
||||||
|
SET local_uuid= UUID();
|
||||||
|
|
||||||
|
WHILE ins_count > 0 DO
|
||||||
|
INSERT INTO test.regular_tbl VALUES (NULL, NOW(), USER() , UUID(),
|
||||||
|
ins_count,'Going to test MBR for MySQL');
|
||||||
|
SET ins_count = ins_count - 1;
|
||||||
|
END WHILE;
|
||||||
|
|
||||||
|
SELECT MAX(id) FROM test.regular_tbl INTO del_count;
|
||||||
|
WHILE del_count > 0 DO
|
||||||
|
DELETE FROM test.regular_tbl WHERE id = del_count;
|
||||||
|
SET del_count = del_count - 2;
|
||||||
|
END WHILE;
|
||||||
|
END|
|
||||||
|
|
||||||
|
delimiter ;|
|
||||||
|
|
||||||
|
############ Finish Setup Section ###################
|
||||||
|
|
||||||
|
|
||||||
|
############ Test Section ###################
|
||||||
|
|
||||||
|
CALL test.proc_norm();
|
||||||
|
|
||||||
|
--sync_slave_with_master
|
||||||
|
|
||||||
|
###### CLEAN UP SECTION ##############
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
DROP PROCEDURE test.proc_norm;
|
||||||
|
DROP TABLE test.regular_tbl;
|
||||||
|
|
||||||
|
--source include/master-slave-end.inc
|
||||||
|
|
1
mysql-test/suite/rpl/t/rpl_innodb_bug30919-master.opt
Normal file
1
mysql-test/suite/rpl/t/rpl_innodb_bug30919-master.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--innodb --innodb_autoinc_lock_mode=0
|
67
mysql-test/suite/rpl/t/rpl_innodb_bug30919.test
Normal file
67
mysql-test/suite/rpl/t/rpl_innodb_bug30919.test
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
--source include/have_innodb.inc
|
||||||
|
--vertical_results
|
||||||
|
let $engine_type= 'innodb';
|
||||||
|
|
||||||
|
######## Creat Table Section #########
|
||||||
|
use test;
|
||||||
|
|
||||||
|
eval CREATE TABLE test.part_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||||
|
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||||
|
fkid MEDIUMINT, filler VARCHAR(255),
|
||||||
|
PRIMARY KEY(id)) ENGINE=$engine_type
|
||||||
|
PARTITION BY RANGE(id)
|
||||||
|
SUBPARTITION BY hash(id) subpartitions 2
|
||||||
|
(PARTITION pa3 values less than (42),
|
||||||
|
PARTITION pa6 values less than (60),
|
||||||
|
PARTITION pa7 values less than (70),
|
||||||
|
PARTITION pa8 values less than (80),
|
||||||
|
PARTITION pa9 values less than (90),
|
||||||
|
PARTITION pa10 values less than (100),
|
||||||
|
PARTITION pa11 values less than MAXVALUE);
|
||||||
|
|
||||||
|
######## Create SPs, Functions, Views and Triggers Section ##############
|
||||||
|
|
||||||
|
delimiter |;
|
||||||
|
|
||||||
|
CREATE PROCEDURE test.proc_part()
|
||||||
|
BEGIN
|
||||||
|
DECLARE ins_count INT DEFAULT 1000;
|
||||||
|
DECLARE del_count INT;
|
||||||
|
DECLARE cur_user VARCHAR(255);
|
||||||
|
DECLARE local_uuid VARCHAR(255);
|
||||||
|
DECLARE local_time TIMESTAMP;
|
||||||
|
|
||||||
|
SET local_time= NOW();
|
||||||
|
SET cur_user= CURRENT_USER();
|
||||||
|
SET local_uuid= UUID();
|
||||||
|
|
||||||
|
WHILE ins_count > 0 DO
|
||||||
|
INSERT INTO test.part_tbl VALUES (NULL, NOW(), USER() , UUID(),
|
||||||
|
ins_count,'Going to test MBR for MySQL');
|
||||||
|
SET ins_count = ins_count - 1;
|
||||||
|
END WHILE;
|
||||||
|
SELECT MAX(id) FROM test.part_tbl INTO del_count;
|
||||||
|
WHILE del_count > 0 DO
|
||||||
|
DELETE FROM test.part_tbl WHERE id = del_count;
|
||||||
|
select count(*) as internal_count, del_count -- these two lines are for
|
||||||
|
FROM test.part_tbl; -- debug to show the problem
|
||||||
|
SET del_count = del_count - 2;
|
||||||
|
END WHILE;
|
||||||
|
END|
|
||||||
|
|
||||||
|
delimiter ;|
|
||||||
|
|
||||||
|
############ Finish Setup Section ###################
|
||||||
|
|
||||||
|
############ Test Section ###################
|
||||||
|
--horizontal_results
|
||||||
|
|
||||||
|
CALL test.proc_part();
|
||||||
|
|
||||||
|
select count(*) as Part from test.part_tbl;
|
||||||
|
|
||||||
|
###### CLEAN UP SECTION ##############
|
||||||
|
|
||||||
|
DROP PROCEDURE test.proc_part;
|
||||||
|
DROP TABLE test.part_tbl;
|
||||||
|
|
@ -56,6 +56,7 @@ static void set_no_inherit(int socket)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const int Listener::LISTEN_BACK_LOG_SIZE= 5; /* standard backlog size */
|
||||||
|
|
||||||
Listener::Listener(Thread_registry *thread_registry_arg,
|
Listener::Listener(Thread_registry *thread_registry_arg,
|
||||||
User_map *user_map_arg)
|
User_map *user_map_arg)
|
||||||
|
@ -39,7 +39,7 @@ protected:
|
|||||||
virtual void run();
|
virtual void run();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int LISTEN_BACK_LOG_SIZE= 5; /* standard backlog size */
|
static const int LISTEN_BACK_LOG_SIZE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Thread_info thread_info;
|
Thread_info thread_info;
|
||||||
|
@ -145,6 +145,8 @@ static uint alter_table_flags(uint flags __attribute__((unused)))
|
|||||||
HA_FAST_CHANGE_PARTITION);
|
HA_FAST_CHANGE_PARTITION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const uint ha_partition::NO_CURRENT_PART_ID= 0xFFFFFFFF;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Constructor method
|
Constructor method
|
||||||
|
|
||||||
@ -2691,7 +2693,17 @@ int ha_partition::write_row(uchar * buf)
|
|||||||
or a new row, then update the auto_increment value in the record.
|
or a new row, then update the auto_increment value in the record.
|
||||||
*/
|
*/
|
||||||
if (table->next_number_field && buf == table->record[0])
|
if (table->next_number_field && buf == table->record[0])
|
||||||
update_auto_increment();
|
{
|
||||||
|
error= update_auto_increment();
|
||||||
|
|
||||||
|
/*
|
||||||
|
If we have failed to set the auto-increment value for this row,
|
||||||
|
it is highly likely that we will not be able to insert it into
|
||||||
|
the correct partition. We must check and fail if neccessary.
|
||||||
|
*/
|
||||||
|
if (error)
|
||||||
|
DBUG_RETURN(error);
|
||||||
|
}
|
||||||
|
|
||||||
my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set);
|
my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set);
|
||||||
#ifdef NOT_NEEDED
|
#ifdef NOT_NEEDED
|
||||||
@ -5454,8 +5466,10 @@ void ha_partition::get_auto_increment(ulonglong offset, ulonglong increment,
|
|||||||
ulonglong first_value_part, last_value_part, nb_reserved_values_part,
|
ulonglong first_value_part, last_value_part, nb_reserved_values_part,
|
||||||
last_value= ~ (ulonglong) 0;
|
last_value= ~ (ulonglong) 0;
|
||||||
handler **pos, **end;
|
handler **pos, **end;
|
||||||
|
bool retry= TRUE;
|
||||||
DBUG_ENTER("ha_partition::get_auto_increment");
|
DBUG_ENTER("ha_partition::get_auto_increment");
|
||||||
|
|
||||||
|
again:
|
||||||
for (pos=m_file, end= m_file+ m_tot_parts; pos != end ; pos++)
|
for (pos=m_file, end= m_file+ m_tot_parts; pos != end ; pos++)
|
||||||
{
|
{
|
||||||
first_value_part= *first_value;
|
first_value_part= *first_value;
|
||||||
@ -5464,7 +5478,8 @@ void ha_partition::get_auto_increment(ulonglong offset, ulonglong increment,
|
|||||||
if (first_value_part == ~(ulonglong)(0)) // error in one partition
|
if (first_value_part == ~(ulonglong)(0)) // error in one partition
|
||||||
{
|
{
|
||||||
*first_value= first_value_part;
|
*first_value= first_value_part;
|
||||||
break;
|
sql_print_error("Partition failed to reserve auto_increment value");
|
||||||
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
Partition has reserved an interval. Intersect it with the intervals
|
Partition has reserved an interval. Intersect it with the intervals
|
||||||
@ -5477,6 +5492,25 @@ void ha_partition::get_auto_increment(ulonglong offset, ulonglong increment,
|
|||||||
}
|
}
|
||||||
if (last_value < *first_value) /* empty intersection, error */
|
if (last_value < *first_value) /* empty intersection, error */
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
When we have an empty intersection, it means that one or more
|
||||||
|
partitions may have a significantly different autoinc next value.
|
||||||
|
We should not fail here - it just means that we should try to
|
||||||
|
find a new reservation making use of the current *first_value
|
||||||
|
wbich should now be compatible with all partitions.
|
||||||
|
*/
|
||||||
|
if (retry)
|
||||||
|
{
|
||||||
|
retry= FALSE;
|
||||||
|
last_value= ~ (ulonglong) 0;
|
||||||
|
release_auto_increment();
|
||||||
|
goto again;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
We should not get here.
|
||||||
|
*/
|
||||||
|
sql_print_error("Failed to calculate auto_increment value for partition");
|
||||||
|
|
||||||
*first_value= ~(ulonglong)(0);
|
*first_value= ~(ulonglong)(0);
|
||||||
}
|
}
|
||||||
if (increment) // If not check for values
|
if (increment) // If not check for values
|
||||||
|
@ -468,7 +468,7 @@ public:
|
|||||||
virtual int reset(void);
|
virtual int reset(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const uint NO_CURRENT_PART_ID= 0xFFFFFFFF;
|
static const uint NO_CURRENT_PART_ID;
|
||||||
int loop_extra(enum ha_extra_function operation);
|
int loop_extra(enum ha_extra_function operation);
|
||||||
void late_extra_cache(uint partition_id);
|
void late_extra_cache(uint partition_id);
|
||||||
void late_extra_no_cache(uint partition_id);
|
void late_extra_no_cache(uint partition_id);
|
||||||
|
@ -510,7 +510,7 @@ unsigned int ZEXPORT azread ( azio_stream *s, voidp buf, unsigned int len, int *
|
|||||||
Writes the given number of uncompressed bytes into the compressed file.
|
Writes the given number of uncompressed bytes into the compressed file.
|
||||||
azwrite returns the number of bytes actually written (0 in case of error).
|
azwrite returns the number of bytes actually written (0 in case of error).
|
||||||
*/
|
*/
|
||||||
unsigned int azwrite (azio_stream *s, voidpc buf, unsigned int len)
|
unsigned int azwrite (azio_stream *s, const voidp buf, unsigned int len)
|
||||||
{
|
{
|
||||||
s->stream.next_in = (Bytef*)buf;
|
s->stream.next_in = (Bytef*)buf;
|
||||||
s->stream.avail_in = len;
|
s->stream.avail_in = len;
|
||||||
|
@ -273,7 +273,7 @@ extern unsigned int azread ( azio_stream *s, voidp buf, unsigned int len, int *e
|
|||||||
gzread returns the number of uncompressed bytes actually read (0 for
|
gzread returns the number of uncompressed bytes actually read (0 for
|
||||||
end of file, -1 for error). */
|
end of file, -1 for error). */
|
||||||
|
|
||||||
extern unsigned int azwrite (azio_stream *s, voidpc buf, unsigned int len);
|
extern unsigned int azwrite (azio_stream *s, const voidp buf, unsigned int len);
|
||||||
/*
|
/*
|
||||||
Writes the given number of uncompressed bytes into the compressed file.
|
Writes the given number of uncompressed bytes into the compressed file.
|
||||||
azwrite returns the number of uncompressed bytes actually written
|
azwrite returns the number of uncompressed bytes actually written
|
||||||
|
@ -1904,12 +1904,11 @@ retry:
|
|||||||
/* We just mark the SQL statement ended and do not do a
|
/* We just mark the SQL statement ended and do not do a
|
||||||
transaction commit */
|
transaction commit */
|
||||||
|
|
||||||
if (trx->auto_inc_lock) {
|
/* If we had reserved the auto-inc lock for some
|
||||||
/* If we had reserved the auto-inc lock for some
|
table in this SQL statement we release it now */
|
||||||
table in this SQL statement we release it now */
|
|
||||||
|
row_unlock_table_autoinc_for_mysql(trx);
|
||||||
|
|
||||||
row_unlock_table_autoinc_for_mysql(trx);
|
|
||||||
}
|
|
||||||
/* Store the current undo_no of the transaction so that we
|
/* Store the current undo_no of the transaction so that we
|
||||||
know where to roll back if we have to roll back the next
|
know where to roll back if we have to roll back the next
|
||||||
SQL statement */
|
SQL statement */
|
||||||
@ -1962,13 +1961,11 @@ innobase_rollback(
|
|||||||
|
|
||||||
innobase_release_stat_resources(trx);
|
innobase_release_stat_resources(trx);
|
||||||
|
|
||||||
if (trx->auto_inc_lock) {
|
/* If we had reserved the auto-inc lock for some table (if
|
||||||
/* If we had reserved the auto-inc lock for some table (if
|
we come here to roll back the latest SQL statement) we
|
||||||
we come here to roll back the latest SQL statement) we
|
release it now before a possibly lengthy rollback */
|
||||||
release it now before a possibly lengthy rollback */
|
|
||||||
|
|
||||||
row_unlock_table_autoinc_for_mysql(trx);
|
row_unlock_table_autoinc_for_mysql(trx);
|
||||||
}
|
|
||||||
|
|
||||||
if (all
|
if (all
|
||||||
|| !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) {
|
|| !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) {
|
||||||
@ -2002,13 +1999,11 @@ innobase_rollback_trx(
|
|||||||
|
|
||||||
innobase_release_stat_resources(trx);
|
innobase_release_stat_resources(trx);
|
||||||
|
|
||||||
if (trx->auto_inc_lock) {
|
/* If we had reserved the auto-inc lock for some table (if
|
||||||
/* If we had reserved the auto-inc lock for some table (if
|
we come here to roll back the latest SQL statement) we
|
||||||
we come here to roll back the latest SQL statement) we
|
release it now before a possibly lengthy rollback */
|
||||||
release it now before a possibly lengthy rollback */
|
|
||||||
|
|
||||||
row_unlock_table_autoinc_for_mysql(trx);
|
row_unlock_table_autoinc_for_mysql(trx);
|
||||||
}
|
|
||||||
|
|
||||||
error = trx_rollback_for_mysql(trx);
|
error = trx_rollback_for_mysql(trx);
|
||||||
|
|
||||||
@ -7168,7 +7163,7 @@ ha_innobase::innobase_read_and_init_auto_inc(
|
|||||||
|
|
||||||
if (auto_inc == 0) {
|
if (auto_inc == 0) {
|
||||||
dict_index_t* index;
|
dict_index_t* index;
|
||||||
ulint error = DB_SUCCESS;
|
ulint error;
|
||||||
const char* autoinc_col_name;
|
const char* autoinc_col_name;
|
||||||
|
|
||||||
ut_a(!innodb_table->autoinc_inited);
|
ut_a(!innodb_table->autoinc_inited);
|
||||||
@ -7240,12 +7235,10 @@ ha_innobase::innobase_get_auto_increment(
|
|||||||
trx = prebuilt->trx;
|
trx = prebuilt->trx;
|
||||||
dict_table_autoinc_unlock(prebuilt->table);
|
dict_table_autoinc_unlock(prebuilt->table);
|
||||||
|
|
||||||
if (trx->auto_inc_lock) {
|
/* If we had reserved the AUTO-INC
|
||||||
/* If we had reserved the AUTO-INC
|
lock in this SQL statement we release
|
||||||
lock in this SQL statement we release
|
it before retrying.*/
|
||||||
it before retrying.*/
|
row_unlock_table_autoinc_for_mysql(trx);
|
||||||
row_unlock_table_autoinc_for_mysql(trx);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Just to make sure */
|
/* Just to make sure */
|
||||||
ut_a(!trx->auto_inc_lock);
|
ut_a(!trx->auto_inc_lock);
|
||||||
@ -7287,6 +7280,7 @@ ha_innobase::get_auto_increment(
|
|||||||
ulonglong *first_value, /* out: the autoinc value */
|
ulonglong *first_value, /* out: the autoinc value */
|
||||||
ulonglong *nb_reserved_values) /* out: count of reserved values */
|
ulonglong *nb_reserved_values) /* out: count of reserved values */
|
||||||
{
|
{
|
||||||
|
trx_t* trx;
|
||||||
ulint error;
|
ulint error;
|
||||||
ulonglong autoinc = 0;
|
ulonglong autoinc = 0;
|
||||||
|
|
||||||
@ -7313,37 +7307,29 @@ ha_innobase::get_auto_increment(
|
|||||||
this method for the same statement results in different values which
|
this method for the same statement results in different values which
|
||||||
don't make sense. Therefore we store the value the first time we are
|
don't make sense. Therefore we store the value the first time we are
|
||||||
called and count down from that as rows are written (see write_row()).
|
called and count down from that as rows are written (see write_row()).
|
||||||
|
*/
|
||||||
|
|
||||||
We make one exception, if the *first_value is precomputed by MySQL
|
trx = prebuilt->trx;
|
||||||
we use that value. And set the number of reserved values to 1 if
|
|
||||||
this is the first time we were called for the SQL statement, this
|
|
||||||
will force MySQL to call us for the next value. If we are in the
|
|
||||||
middle of a multi-row insert we preserve the existing counter.*/
|
|
||||||
if (*first_value == 0) {
|
|
||||||
|
|
||||||
/* Called for the first time ? */
|
/* Called for the first time ? */
|
||||||
if (prebuilt->trx->n_autoinc_rows == 0) {
|
if (trx->n_autoinc_rows == 0) {
|
||||||
|
|
||||||
prebuilt->trx->n_autoinc_rows = (ulint) nb_desired_values;
|
trx->n_autoinc_rows = (ulint) nb_desired_values;
|
||||||
|
|
||||||
/* It's possible for nb_desired_values to be 0:
|
/* It's possible for nb_desired_values to be 0:
|
||||||
e.g., INSERT INTO T1(C) SELECT C FROM T2; */
|
e.g., INSERT INTO T1(C) SELECT C FROM T2; */
|
||||||
if (nb_desired_values == 0) {
|
if (nb_desired_values == 0) {
|
||||||
|
|
||||||
++prebuilt->trx->n_autoinc_rows;
|
trx->n_autoinc_rows = 1;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*first_value = autoinc;
|
set_if_bigger(*first_value, autoinc);
|
||||||
|
/* Not in the middle of a mult-row INSERT. */
|
||||||
} else if (prebuilt->trx->n_autoinc_rows == 0) {
|
} else if (prebuilt->last_value == 0) {
|
||||||
|
set_if_bigger(*first_value, autoinc);
|
||||||
prebuilt->trx->n_autoinc_rows = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ut_a(prebuilt->trx->n_autoinc_rows > 0);
|
*nb_reserved_values = trx->n_autoinc_rows;
|
||||||
|
|
||||||
*nb_reserved_values = prebuilt->trx->n_autoinc_rows;
|
|
||||||
|
|
||||||
/* With old style AUTOINC locking we only update the table's
|
/* With old style AUTOINC locking we only update the table's
|
||||||
AUTOINC counter after attempting to insert the row. */
|
AUTOINC counter after attempting to insert the row. */
|
||||||
@ -7670,12 +7656,10 @@ innobase_xa_prepare(
|
|||||||
/* We just mark the SQL statement ended and do not do a
|
/* We just mark the SQL statement ended and do not do a
|
||||||
transaction prepare */
|
transaction prepare */
|
||||||
|
|
||||||
if (trx->auto_inc_lock) {
|
/* If we had reserved the auto-inc lock for some
|
||||||
/* If we had reserved the auto-inc lock for some
|
table in this SQL statement we release it now */
|
||||||
table in this SQL statement we release it now */
|
|
||||||
|
|
||||||
row_unlock_table_autoinc_for_mysql(trx);
|
row_unlock_table_autoinc_for_mysql(trx);
|
||||||
}
|
|
||||||
|
|
||||||
/* Store the current undo_no of the transaction so that we
|
/* Store the current undo_no of the transaction so that we
|
||||||
know where to roll back if we have to roll back the next
|
know where to roll back if we have to roll back the next
|
||||||
@ -8026,7 +8010,7 @@ static MYSQL_SYSVAR_STR(data_file_path, innobase_data_file_path,
|
|||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
|
|
||||||
static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode,
|
static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode,
|
||||||
PLUGIN_VAR_RQCMDARG,
|
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
|
||||||
"The AUTOINC lock modes supported by InnoDB:\n"
|
"The AUTOINC lock modes supported by InnoDB:\n"
|
||||||
" 0 => Old style AUTOINC locking (for backward compatibility)\n"
|
" 0 => Old style AUTOINC locking (for backward compatibility)\n"
|
||||||
" 1 => New style AUTOINC locking\n"
|
" 1 => New style AUTOINC locking\n"
|
||||||
|
@ -4533,7 +4533,6 @@ row_search_autoinc_read_column(
|
|||||||
ibool unsigned_type) /* in: signed or unsigned flag */
|
ibool unsigned_type) /* in: signed or unsigned flag */
|
||||||
{
|
{
|
||||||
ulint len;
|
ulint len;
|
||||||
byte* ptr;
|
|
||||||
const byte* data;
|
const byte* data;
|
||||||
ib_longlong value;
|
ib_longlong value;
|
||||||
mem_heap_t* heap = NULL;
|
mem_heap_t* heap = NULL;
|
||||||
@ -4555,49 +4554,20 @@ row_search_autoinc_read_column(
|
|||||||
ut_a(len != UNIV_SQL_NULL);
|
ut_a(len != UNIV_SQL_NULL);
|
||||||
ut_a(len <= sizeof value);
|
ut_a(len <= sizeof value);
|
||||||
|
|
||||||
#ifdef WORDS_BIGENDIAN
|
|
||||||
/* Copy integer data and restore sign bit */
|
/* Copy integer data and restore sign bit */
|
||||||
|
if (unsigned_type || (data[0] & 128))
|
||||||
|
memset(dest, 0x00, sizeof(dest));
|
||||||
|
else
|
||||||
|
memset(dest, 0xff, sizeof(dest));
|
||||||
|
|
||||||
memcpy((ptr = dest), data, len);
|
memcpy(dest + (sizeof(value) - len), data, len);
|
||||||
|
|
||||||
if (!unsigned_type) {
|
if (!unsigned_type)
|
||||||
dest[0] ^= 128;
|
dest[sizeof(value) - len] ^= 128;
|
||||||
}
|
|
||||||
#else
|
|
||||||
/* Convert integer data from Innobase to a little-endian format,
|
|
||||||
sign bit restored to normal */
|
|
||||||
|
|
||||||
for (ptr = dest + len; ptr != dest; ++data) {
|
|
||||||
--ptr;
|
|
||||||
*ptr = *data;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!unsigned_type) {
|
|
||||||
dest[len - 1] ^= 128;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The assumption here is that the AUTOINC value can't be negative.*/
|
/* The assumption here is that the AUTOINC value can't be negative.*/
|
||||||
switch (len) {
|
value = (((ib_longlong) mach_read_from_4(dest)) << 32) |
|
||||||
case 8:
|
((ib_longlong) mach_read_from_4(dest + 4));
|
||||||
value = *(ib_longlong*) ptr;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 4:
|
|
||||||
value = *(ib_uint32_t*) ptr;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
value = *(uint16 *) ptr;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
value = *ptr;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
ut_error;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (UNIV_LIKELY_NULL(heap)) {
|
if (UNIV_LIKELY_NULL(heap)) {
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
|
Reference in New Issue
Block a user