Commit db577155 authored by tomas@whalegate.ndb.mysql.com's avatar tomas@whalegate.ndb.mysql.com

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
parents b22826fe 83cc4e8d
......@@ -146,8 +146,8 @@ test-bt:
cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=NIST+ps --force --suite=nist --ps-protocol ; \
fi
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress
# Re-enable the "jp" suite when bug#28563 is fixed
# -cd mysql-test ; MTR_BUILD_THREAD=auto \
......
......@@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
#
# When changing major version number please also check switch statement
# in mysqlbinlog::check_master_version().
AM_INIT_AUTOMAKE(mysql, 5.1.22-beta)
AM_INIT_AUTOMAKE(mysql, 5.1.22-rc)
AM_CONFIG_HEADER([include/config.h:config.h.in])
PROTOCOL_VERSION=10
......
......@@ -55,7 +55,7 @@ f106 year(3) not null default 2000,
f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set"
) engine = innodb;
) engine = ndb;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb2.txt' into table tb2 ;
......@@ -1211,7 +1211,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 37
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -1232,7 +1232,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 424
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -1253,7 +1253,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 901
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -1274,7 +1274,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Dynamic
TABLE_ROWS 0
TABLE_ROWS 479
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
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 2 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 name 1 name A 0 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 name 1 name 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 37 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 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 2 help_topic_id A 0 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 name 1 name 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 479 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 2 Db 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
select max(cardinality) from statistics;
max(cardinality)
393
901
select concat("View '",
table_name, "' is associated with the database '", table_schema, "'.")
AS "Who is Who for the Views"
......@@ -4547,7 +4547,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 37
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -4568,7 +4568,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 424
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -4589,7 +4589,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 901
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -4610,7 +4610,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Dynamic
TABLE_ROWS 0
TABLE_ROWS 479
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -5826,7 +5826,7 @@ routine_definition
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
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 db 1 mysql User 1 User A 1 NULL NULL BTREE
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 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 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_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_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_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_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 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 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 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 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
......@@ -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 2 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 name 1 name A 0 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 name 1 name 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 37 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 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 2 help_topic_id A 0 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 name 1 name 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 479 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 2 Db 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';
END//
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
USE db_storedproc_1;
root@localhost db_storedproc_1
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
......@@ -92,6 +93,7 @@ CREATE PROCEDURE sp1(v1 char(20))
BEGIN
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
END//
USE db_storedproc_1;
root@localhost db_storedproc_1
DROP USER 'user_1'@'localhost';
......@@ -117,6 +119,7 @@ CREATE FUNCTION fn1(v1 int) returns int
BEGIN
return v1;
END//
USE db_storedproc_1;
root@localhost db_storedproc_1
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:
--------------------------------------------------------------------------------
USE db_storedproc;
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'
SELECT fn31105( 9 );
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
USE db_storedproc;
root@localhost db_storedproc
CALL sp31102();
......@@ -114,6 +114,7 @@ a` a` 1000-01-01 -5000 a` -5000
SELECT fn31105( 9 );
fn31105( 9 )
81
USE db_storedproc;
root@localhost db_storedproc
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'
SELECT fn31105( 9 );
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
USE db_storedproc;
root@localhost db_storedproc
DROP PROCEDURE sp31102;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1209,7 +1209,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 37
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -1230,7 +1230,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 424
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -1251,7 +1251,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 901
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -1272,7 +1272,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Dynamic
TABLE_ROWS 0
TABLE_ROWS 479
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
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 2 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 name 1 name A 0 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 name 1 name 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 37 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 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 2 help_topic_id A 0 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 name 1 name 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 479 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 2 Db 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
select max(cardinality) from statistics;
max(cardinality)
393
901
select concat("View '",
table_name, "' is associated with the database '", table_schema, "'.")
AS "Who is Who for the Views"
......@@ -4530,7 +4530,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 37
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -4551,7 +4551,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 424
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -4572,7 +4572,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 901
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -4593,7 +4593,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Dynamic
TABLE_ROWS 0
TABLE_ROWS 479
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -5809,7 +5809,7 @@ routine_definition
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
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 db 1 mysql User 1 User A 1 NULL NULL BTREE
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 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 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_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_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_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_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 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 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 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 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
......@@ -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 2 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 name 1 name A 0 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 name 1 name 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 37 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 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 2 help_topic_id A 0 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 name 1 name 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 479 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 2 Db 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';
END//
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
USE db_storedproc_1;
root@localhost db_storedproc_1
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
......@@ -92,6 +93,7 @@ CREATE PROCEDURE sp1(v1 char(20))
BEGIN
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
END//
USE db_storedproc_1;
root@localhost db_storedproc_1
DROP USER 'user_1'@'localhost';
......@@ -117,6 +119,7 @@ CREATE FUNCTION fn1(v1 int) returns int
BEGIN
return v1;
END//
USE db_storedproc_1;
root@localhost db_storedproc_1
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:
--------------------------------------------------------------------------------
USE db_storedproc;
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'
SELECT fn31105( 9 );
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
USE db_storedproc;
root@localhost db_storedproc
CALL sp31102();
......@@ -114,6 +114,7 @@ a` a` 1000-01-01 -5000 a` -5000
SELECT fn31105( 9 );
fn31105( 9 )
81
USE db_storedproc;
root@localhost db_storedproc
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'
SELECT fn31105( 9 );
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
USE db_storedproc;
root@localhost db_storedproc
DROP PROCEDURE sp31102;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1239,7 +1239,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 37
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -1260,7 +1260,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 424
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -1281,7 +1281,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 901
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -1302,7 +1302,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Dynamic
TABLE_ROWS 0
TABLE_ROWS 479
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
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 2 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 name 1 name A 0 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 name 1 name 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 37 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 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 2 help_topic_id A 0 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 name 1 name 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 479 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 2 Db 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
select max(cardinality) from statistics;
max(cardinality)
393
901
select concat("View '",
table_name, "' is associated with the database '", table_schema, "'.")
AS "Who is Who for the Views"
......@@ -4600,7 +4600,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 37
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -4621,7 +4621,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 424
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -4642,7 +4642,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS 0
TABLE_ROWS 901
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -4663,7 +4663,7 @@ TABLE_TYPE BASE TABLE
ENGINE MyISAM
VERSION 10
ROW_FORMAT Dynamic
TABLE_ROWS 0
TABLE_ROWS 479
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
......@@ -5879,7 +5879,7 @@ routine_definition
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
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 db 1 mysql User 1 User A 1 NULL NULL BTREE
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 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 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_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_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_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_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 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 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 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 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
......@@ -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 2 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 name 1 name A 0 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 name 1 name 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 37 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 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 2 help_topic_id A 0 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 name 1 name 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 479 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 2 Db 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';
END//
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
USE db_storedproc_1;
root@localhost db_storedproc_1
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
......@@ -92,6 +93,7 @@ CREATE PROCEDURE sp1(v1 char(20))
BEGIN
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
END//
USE db_storedproc_1;
root@localhost db_storedproc_1
DROP USER 'user_1'@'localhost';
......@@ -117,6 +119,7 @@ CREATE FUNCTION fn1(v1 int) returns int
BEGIN
return v1;
END//
USE db_storedproc_1;
root@localhost db_storedproc_1
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:
--------------------------------------------------------------------------------
USE db_storedproc;
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'
SELECT fn31105( 9 );
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
USE db_storedproc;
root@localhost db_storedproc
CALL sp31102();
......@@ -114,6 +114,7 @@ a` a` 1000-01-01 -5000 a` -5000
SELECT fn31105( 9 );
fn31105( 9 )
81
USE db_storedproc;
root@localhost db_storedproc
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'
SELECT fn31105( 9 );
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
USE db_storedproc;
root@localhost db_storedproc
DROP PROCEDURE sp31102;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -75,7 +75,7 @@ Note 1265 Data truncated for column 'f45' at row 1
Note 1265 Data truncated for column 'f47' at row 1
Note 1265 Data truncated for column 'f49' at row 1
Note 1265 Data truncated for column 'f51' at row 1
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb1.txt' into table tb1 ;
NOT YET IMPLEMENTED: cursor tests
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -81,6 +81,7 @@ BEGIN
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
END//
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
USE db_storedproc_1;
root@localhost db_storedproc_1
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
......@@ -92,6 +93,7 @@ CREATE PROCEDURE sp1(v1 char(20))
BEGIN
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
END//
USE db_storedproc_1;
root@localhost db_storedproc_1
DROP USER 'user_1'@'localhost';
......@@ -117,6 +119,7 @@ CREATE FUNCTION fn1(v1 int) returns int
BEGIN
return v1;
END//
USE db_storedproc_1;
root@localhost db_storedproc_1
drop user 'user_1'@'localhost';
......
......@@ -90,7 +90,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
END if;
END//
SHOW CREATE PROCEDURE sp1;
Procedure sql_mode Create Procedure
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
sp1 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`()
BEGIN
declare a tinyint;
......@@ -104,7 +104,7 @@ INSERT INTO result VALUES (@cur_val_sql_mode, 'value restored');
ELSE
INSERT INTO result VALUES (@cur_val_sql_mode, 'value not restored');
END if;
END
END latin1 latin1_swedish_ci latin1_swedish_ci
set @@sql_mode='';
SHOW VARIABLES LIKE 'sql_mode';
Variable_name Value
......@@ -143,12 +143,12 @@ SET @@sql_mode='MAXDB';
SHOW VARIABLES LIKE 'sql_mode';
END//
SHOW CREATE PROCEDURE sp2;
Procedure sql_mode Create Procedure
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
sp2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`()
BEGIN
SET @@sql_mode='MAXDB';
SHOW VARIABLES LIKE 'sql_mode';
END
END latin1 latin1_swedish_ci latin1_swedish_ci
... show value prior calling procedure
SHOW VARIABLES LIKE 'sql_mode';
Variable_name Value
......
......@@ -122,6 +122,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME fn_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -146,6 +149,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT created with INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_1
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -168,6 +174,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -190,6 +199,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT created with INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1;
Function fn_1
sql_mode
......@@ -199,6 +211,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE FUNCTION fn_2;
Function fn_2
sql_mode
......@@ -210,6 +225,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_1;
Procedure sp_1
sql_mode
......@@ -217,6 +235,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_2;
Procedure sp_2
sql_mode
......@@ -226,6 +247,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW FUNCTION STATUS LIKE 'fn_%';
Db db_storedproc
Name fn_1
......@@ -235,6 +259,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name fn_2
Type FUNCTION
......@@ -243,6 +270,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment created with INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW PROCEDURE STATUS LIKE 'sp_%';
Db db_storedproc
Name sp_1
......@@ -252,6 +282,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name sp_2
Type PROCEDURE
......@@ -260,6 +293,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment created with INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
... now change some stuff:
--------------------------
......@@ -304,6 +340,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, FN changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME fn_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -328,6 +367,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT FN changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_1
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -350,6 +392,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, SP changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -372,6 +417,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT SP changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1;
Function fn_1
sql_mode
......@@ -384,6 +432,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE FUNCTION fn_2;
Function fn_2
sql_mode
......@@ -395,6 +446,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_1;
Procedure sp_1
sql_mode
......@@ -404,6 +458,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_2;
Procedure sp_2
sql_mode
......@@ -413,6 +470,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW FUNCTION STATUS LIKE 'fn_%';
Db db_storedproc
Name fn_1
......@@ -422,6 +482,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, FN changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name fn_2
Type FUNCTION
......@@ -430,6 +493,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment FN changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW PROCEDURE STATUS LIKE 'sp_%';
Db db_storedproc
Name sp_1
......@@ -439,6 +505,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, SP changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name sp_2
Type PROCEDURE
......@@ -447,6 +516,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment SP changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
... change back to default and check result:
--------------------------------------------
......@@ -479,6 +551,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, FN changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME fn_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -503,6 +578,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT FN changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_1
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -525,6 +603,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT new comment, SP changed to INVOKER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SPECIFIC_NAME sp_2
ROUTINE_CATALOG NULL
ROUTINE_SCHEMA db_storedproc
......@@ -547,6 +628,9 @@ LAST_ALTERED <created>
SQL_MODE
ROUTINE_COMMENT SP changed to DEFINER
DEFINER root@localhost
CHARACTER_SET_CLIENT latin1
COLLATION_CONNECTION latin1_swedish_ci
DATABASE_COLLATION latin1_swedish_ci
SHOW CREATE FUNCTION fn_1;
Function fn_1
sql_mode
......@@ -559,6 +643,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE FUNCTION fn_2;
Function fn_2
sql_mode
......@@ -569,6 +656,9 @@ set @x=i1;
set @y=@x;
return i4;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_1;
Procedure sp_1
sql_mode
......@@ -578,6 +668,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_1`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW CREATE PROCEDURE sp_2;
Procedure sp_2
sql_mode
......@@ -587,6 +680,9 @@ Create Procedure CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_2`(i1 int)
BEGIN
set @x=i1;
END
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW FUNCTION STATUS LIKE 'fn_%';
Db db_storedproc
Name fn_1
......@@ -596,6 +692,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, FN changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name fn_2
Type FUNCTION
......@@ -604,6 +703,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment FN changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
SHOW PROCEDURE STATUS LIKE 'sp_%';
Db db_storedproc
Name sp_1
......@@ -613,6 +715,9 @@ Modified <modified>
Created <created>
Security_type INVOKER
Comment new comment, SP changed to INVOKER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
Db db_storedproc
Name sp_2
Type PROCEDURE
......@@ -621,6 +726,9 @@ Modified <modified>
Created <created>
Security_type DEFINER
Comment SP changed to DEFINER
character_set_client latin1
collation_connection latin1_swedish_ci
Database Collation latin1_swedish_ci
... cleanup
-----------
......
......@@ -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:
--------------------------------------------------------------------------------
USE db_storedproc;
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'
SELECT fn31105( 9 );
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
USE db_storedproc;
root@localhost db_storedproc
CALL sp31102();
......@@ -114,6 +114,7 @@ a` a` 1000-01-01 -5000 a` -5000
SELECT fn31105( 9 );
fn31105( 9 )
81
USE db_storedproc;
root@localhost db_storedproc
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'
SELECT fn31105( 9 );
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
USE db_storedproc;
root@localhost db_storedproc
DROP PROCEDURE sp31102;
......
......@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase: 3.5.1.1:
......@@ -243,7 +243,7 @@ create table t1 (f1 integer) engine = ndb;
use test;
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
for each row set @ret_trg6_2 = 5;
ERROR HY000: Trigger in wrong schema
ERROR 42S02: Table 'trig_db.tb3' doesn't exist
use trig_db;
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
for each row set @ret_trg6_3 = 18;
......
......@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase 3.5.3:
......
......@@ -263,7 +263,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant select, insert, update on priv_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
......@@ -296,7 +296,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
show tables;
Tables_in_priv_db
t1
......@@ -317,7 +317,7 @@ select current_user;
current_user
test_yesprivs@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-yes';
select current_user;
......@@ -453,9 +453,9 @@ ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for tabl
create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-yes';
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
select current_user;
current_user
test_noprivs@localhost
......@@ -570,11 +570,11 @@ current_user
test_yesprivs@localhost
use priv_db;
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
trg1_1 INSERT t1 set new.f1 = 'trig 1_1-yes' BEFORE NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
select * from information_schema.triggers;
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
NULL priv_db trg1_1 INSERT NULL priv_db t1 0 NULL set new.f1 = 'trig 1_1-yes' ROW BEFORE NULL NULL OLD NEW NULL test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
drop trigger trg1_1;
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
select current_user;
......@@ -863,7 +863,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
......@@ -878,7 +878,7 @@ select current_user;
current_user
test_yesprivs@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-yes';
create trigger trg2_1 before INSERT on t2 for each row
......@@ -990,7 +990,7 @@ select current_user;
current_user
root@localhost
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant select, insert, update ,trigger
on priv_db.t1 to test_yesprivs@localhost
with grant option;
......
......@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase: 3.5:
......
......@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase: 3.5:
......@@ -493,9 +493,8 @@ BEGIN
WHILE @counter1 < new.f136
SET @counter1 = @counter1 + 1;
END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE @counter1 < new.f136
SET @counter1 = @counter1 + 1;
END' at line 3
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1;
END' at line 4
delete from tb3 where f122='Test 3.5.8.5-while';
drop trigger trg7;
......
......@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase 3.5.9.1/2:
......
......@@ -65,7 +65,7 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
Testcase 3.5.10.1/2/3:
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -18,9 +18,9 @@
let $message= Section 3.1.6 - Privilege Checks:;
--source include/show_msg80.inc
USE db_storedproc_1;
connection default;
USE db_storedproc_1;
--source suite/funcs_1/include/show_connection.inc
# ------------------------------------------------------------------------------
......@@ -58,6 +58,7 @@ disconnect user1a;
# add privilege again and check
connection default;
USE db_storedproc_1;
--source suite/funcs_1/include/show_connection.inc
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
......@@ -77,6 +78,7 @@ disconnect user1b;
# cleanup
connection default;
USE db_storedproc_1;
--source suite/funcs_1/include/show_connection.inc
DROP USER 'user_1'@'localhost';
......@@ -132,6 +134,7 @@ disconnect user2;
# cleanup
connection default;
USE db_storedproc_1;
--source suite/funcs_1/include/show_connection.inc
drop user 'user_1'@'localhost';
......
......@@ -21,7 +21,6 @@ let $message= Section 3.1.10 - CALL checks:;
--source include/show_msg80.inc
USE db_storedproc;
# ------------------------------------------------------------------------------
let $message= Testcase 3.1.10.2 + 3.1.10.5:;
......@@ -80,6 +79,7 @@ SELECT fn31105( 9 );
# now 'add' EXECUTE to INVOKER
connection default;
USE db_storedproc;
--source suite/funcs_1/include/show_connection.inc
# root can execute ...
CALL sp31102();
......@@ -98,6 +98,7 @@ disconnect user2_3;
# now 'remove' SELECT from INVOKER
connection default;
USE db_storedproc;
--source suite/funcs_1/include/show_connection.inc
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES;
......@@ -115,6 +116,7 @@ disconnect user2_4;
# cleanup
connection default;
USE db_storedproc;
--source suite/funcs_1/include/show_connection.inc
DROP PROCEDURE sp31102;
......
......@@ -145,33 +145,33 @@ Insert into t1 values (500,9866);
--enable_warnings
CREATE VIEW v1 AS select f59,f60,f61
FROM test.tb2 where f59=250;
select * FROM v1 limit 0,10;
select * FROM v1 order by f60,f61 limit 0,10;
#(02)
Drop view if exists v1 ;
CREATE VIEW v1 AS select f59,f60,f61
FROM test.tb2 limit 100;
select * FROM v1 limit 0,10;
select * FROM v1 order by f59,f60,f61 limit 0,10;
#(03)
CREATE or REPLACE VIEW v1 AS select f59,f60,f61
FROM test.tb2 limit 4,3;
select * FROM v1 limit 0,10;
select * FROM v1 order by f59,f60,f61 limit 0,10;
#(04)
CREATE or REPLACE VIEW v1 AS select distinct f59
FROM test.tb2 limit 4,3;
select * FROM v1 limit 0,10;
select * FROM v1 order by f59 limit 0,10;
#(05)
ALTER VIEW v1 AS select f59
FROM test.tb2 limit 6,2;
select * FROM v1 limit 0,10;
select * FROM v1 order by f59 limit 0,10;
#(06)
CREATE or REPLACE VIEW v1 AS select f59
from tb2 order by f59 limit 100;
select * FROM v1 limit 0,10;
select * FROM v1 order by f59 limit 0,10;
#(07)
CREATE or REPLACE VIEW v1 AS select f59
......@@ -186,32 +186,32 @@ Insert into t1 values (500,9866);
#(09)
CREATE or REPLACE VIEW v1 AS select f59
from tb2 group by f59 limit 100;
select * FROM v1 limit 0,10;
select * FROM v1 order by f59 limit 0,10;
#(10)
CREATE or REPLACE VIEW v1 AS select f59
from tb2 group by f59 asc limit 100;
select * FROM v1 limit 0,10;
select * FROM v1 order by f59 limit 0,10;
#(11)
CREATE or REPLACE VIEW v1 AS select f59
from tb2 group by f59 desc limit 100;
select * FROM v1 limit 0,10;
select * FROM v1 order by f59 limit 0,10;
#(12)
CREATE or REPLACE VIEW v1 AS (select f59 from tb2)
union (select f59 from t1) limit 100;
select * FROM v1 limit 0,10;
select * FROM v1 order by f59 limit 0,10;
#(13)
CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
UNION DISTINCT(select f59 FROM t1) ;
select * FROM v1 limit 0,10;
select * FROM v1 order by f59 limit 0,10;
#(14)
CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
UNION ALL(select f59 FROM t1) ;
select * FROM v1 limit 0,10;
select * FROM v1 order by f59 limit 0,10;
#(15)
if ($have_bug_11589)
......@@ -220,24 +220,24 @@ if ($have_bug_11589)
}
CREATE or REPLACE VIEW v1 AS select *
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)
CREATE or REPLACE VIEW v1 AS select *
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
#(17)
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 WITH CASCADED CHECK OPTION;
SELECT * FROM v1 limit 0,10;
SELECT * FROM v1 order by f59,f60 limit 0,10;
#(18)
CREATE or REPLACE VIEW v1 AS select f59, f60
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 TABLE t1 ;
......@@ -816,18 +816,18 @@ AS SELECT * FROM t1 limit 2;
SHOW CREATE VIEW test.v1;
SELECT * FROM test.v1;
# 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;
if ($have_bug_11589)
{
--disable_ps_protocol
}
SELECT * FROM test.v1 ;
SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65;
--enable_ps_protocol
# Switch the SELECT but not the base table
CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2 limit 10,100;
SHOW CREATE VIEW test.v1;
SELECT * FROM test.v1;
SELECT * FROM test.v1 order by F59;
Drop table test.t1 ;
Drop view test.v1 ;
......@@ -1020,7 +1020,7 @@ let $message= Testcase 3.3.1.21 ;
DROP VIEW IF EXISTS v1;
--enable_warnings
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 ;
......@@ -1175,7 +1175,7 @@ Drop VIEW IF EXISTS test.v1_1 ;
--enable_warnings
Create view test.v1 AS Select * from test.tb2 limit 2 ;
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_1 ;
......@@ -1197,7 +1197,7 @@ if ($have_bug_11589)
{
--disable_ps_protocol
}
Select * from v1 ;
Select * from v1 order by f59,f60,f61,f62,f63,f64,f65;
--enable_ps_protocol
Select * from test2.v2 ;
Drop view if exists test2.v1 ;
......@@ -1287,7 +1287,7 @@ CREATE VIEW test.v1
AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
FROM test.v1_firstview INNER JOIN test.v1_secondview
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_secondview ;
Drop view if exists test.v1 ;
......@@ -1314,7 +1314,7 @@ CREATE VIEW v1
AS SELECT test.v1_firstview.F59, test.v1_firstview.F60
FROM test.v1_firstview INNER JOIN test.v1_secondview
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 test.v1_firstview ;
Drop view test.v1_secondview ;
......@@ -1339,7 +1339,7 @@ CREATE VIEW test.v1
AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
FROM test.v1_firstview INNER JOIN test.tb2
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_firstview;
......@@ -1360,7 +1360,7 @@ CREATE VIEW v1_firstview AS SELECT * FROM test.tb2 ;
CREATE VIEW v1
AS SELECT v1_firstview.f59, v1_firstview.f60
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 ;
......@@ -1385,7 +1385,7 @@ Drop view if exists test.v1_1 ;
Drop view if exists test.v1_main ;
--enable_warnings
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);
Insert into t1 values (90,507) ;
......@@ -1396,7 +1396,7 @@ Select * from v1_1 ;
Create view v1_main
as SELECT test.tb2.f59 FROM test.tb2 JOIN test.v1
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 view test.v1 ;
......@@ -1505,7 +1505,7 @@ Drop view if exists test1.v1_1 ;
Drop database if exists test3 ;
--enable_warnings
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) ;
Insert into test1.t1 values (199,507) ;
......@@ -1550,7 +1550,7 @@ Drop view if exists test.v1 ;
CREATE VIEW test.v1
AS Select f59 from (Select * FROM tb2 limit 20) tx ;
--error 1146
SELECT * FROM test.v1 ;
SELECT * FROM test.v1 order by f59 ;
--disable_warnings
Drop view if exists test.v1 ;
--enable_warnings
......@@ -1709,7 +1709,7 @@ CREATE VIEW test.v1 AS SELECT * FROM test.tb2 where f59 = 04;
--enable_info
UPDATE test.v1 SET f59 = 30 where F59 = 04 ;
--disable_info
SELECT * FROM test.v1 where f59 = 30 ;
SELECT * FROM test.v1 where f59 = 30 order by f59;
if ($have_bug_11589)
{
--disable_ps_protocol
......@@ -1726,7 +1726,7 @@ if ($have_bug_11589)
}
SELECT * FROM tb2 where f59 = 100 ;
--enable_ps_protocol
SELECT * FROM test.v1 ;
SELECT * FROM test.v1 order by f59 ;
drop view if exists test.v1 ;
......@@ -1821,7 +1821,7 @@ FROM test.tb2 where f59 = 195 WITH CHECK OPTION ;
--error 1369
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 ;
......@@ -1846,7 +1846,7 @@ CREATE VIEW test.v2 as SELECT * FROM test.v1 ;
# This UPDATE violates the definition of VIEW test.v1.
--error 1369
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
# does not count, because the UPDATE runs on test.v2, which
......@@ -2299,7 +2299,7 @@ if ($have_bug_11589)
{
--disable_ps_protocol
}
SELECT * FROM test.v1 ;
SELECT * FROM test.v1 order by f59 ;
--enable_ps_protocol
drop view test.v1 ;
###############################################################################
......@@ -2310,7 +2310,7 @@ drop view test.v1 ;
# AS SELECT col1, col3 FROM <table name>.
###############################################################################
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 ;
###############################################################################
# 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>
# 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)
{
--disable_ps_protocol
}
SELECT * FROM test.v1;
SELECT * FROM test.v1 order by f59,f60,f61 ;
--enable_ps_protocol
drop view test.v1 ;
###############################################################################
......@@ -2335,7 +2335,7 @@ drop view test.v1 ;
# <view name> AS SELECT col1, col3 FROM <table name> WHERE ..
###############################################################################
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 ;
......@@ -2363,7 +2363,7 @@ Insert into t2 values (2,2000) ;
Insert into t2 values (31,97) ;
Create view test.v1 as select t1.f59, t1.f60
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.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,
t1.f61 t1_f61, t2.f61 t2_f61
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,
t1.f61 t1_f61, t2.f61 t2_f61
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
Select t1.f59 AS t1_f59, t2.f59 AS t2_f59
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
FROM t2 cross join t1;
......@@ -2474,7 +2474,7 @@ FROM t2 cross join t1;
Create or replace view test.v1 as
Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59
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
FROM t2,t1;
......@@ -2482,7 +2482,7 @@ FROM t2,t1;
Create or replace view test.v1 as
Select f59, f60, f61, a, b
FROM t2 natural join t1;
Select * from v1;
Select * from v1 order by f59;
Select f59, f60, f61, a, b
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,
t1.f61 t1_f61, t2.f61 t2_f61
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,
t1.f61 t1_f61, t2.f61 t2_f61
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
Select f59, f60, f61, t1.a, t2.b
FROM t2 natural left outer join t1;
Select * from v1;
Select * from v1 order by f59;
Select f59, f60, f61, t1.a, t2.b
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,
t1.f61 t1_f61, t2.f61 t2_f61
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,
t1.f61 t1_f61, t2.f61 t2_f61
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
Select f59, f60, a, b
FROM t2 natural right outer join t1;
Select * from v1;
Select * from v1 order by f59 desc;
Select f59, f60, a, b
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
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 ;
# Testcase 3.3.1.A2 ;
......@@ -2566,7 +2566,7 @@ Insert into t1 values (201,201,201) ;
Create or replace view test.v1
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 ;
# Testcase 3.3.1.A3 ;
......@@ -2581,7 +2581,7 @@ Insert into t1 values (21,21,21) ;
Create or replace view test.v1
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 ;
......@@ -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 )
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 )
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 )
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 ;
......@@ -2631,25 +2631,25 @@ insert into t1 values (901,801,401);
create or replace view test.v1 as
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
(select f59 from tb2 where f59=107 )
union all
(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
(select f59 from tb2 where f59=107 )
union
(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
(select f59 from tb2 where f59=107 )
union distinct
(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 table t1;
......@@ -2668,7 +2668,7 @@ Drop view if exists test.v1 ;
CREATE VIEW test.v1 AS SELECT F59
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 *
FROM test.tb2 WHERE test.tb2.f59 = 242 ;
......@@ -2676,7 +2676,7 @@ if ($have_bug_11589)
{
--disable_ps_protocol
}
SELECT * FROM test.v1 limit 0,10;
SELECT * FROM test.v1 order by f59 limit 0,10;
--enable_ps_protocol
Drop view test.v1 ;
......@@ -2899,10 +2899,14 @@ eval EXPLAIN SELECT * FROM test3.v$toplevel;
# and OBN's box performs excessive paging.
# (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
# 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 = 30;
SET @join_limit = 28; # OBN - see above
SET @max_level = @join_limit - 1;
--enable_query_log
......@@ -3184,7 +3188,7 @@ if ($have_bug_11589)
}
SELECT * FROM tb2 where f59 = 8 and f60 = 105;
--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 ;
......@@ -3212,7 +3216,7 @@ if ($have_bug_11589)
}
SELECT * FROM tb2 where f59 = 891 and f60 = 105;
--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 ;
......@@ -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 ;
--disable_info
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 ;
......@@ -3256,7 +3260,7 @@ DELETE FROM test.v1 where f59 = 711 ;
--disable_info
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 ;
......
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;
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;
use test;
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='innodb'
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 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|
CALL test.proc_part();
internal_count del_count
999 1000
internal_count del_count
998 998
internal_count del_count
997 996
internal_count del_count
996 994
internal_count del_count
995 992
internal_count del_count
994 990
internal_count del_count
993 988
internal_count del_count
992 986
internal_count del_count
991 984
internal_count del_count
990 982
internal_count del_count
989 980
internal_count del_count
988 978
internal_count del_count
987 976
internal_count del_count
986 974
internal_count del_count
985 972
internal_count del_count
984 970
internal_count del_count
983 968
internal_count del_count
982 966
internal_count del_count
981 964
internal_count del_count
980 962
internal_count del_count
979 960
internal_count del_count
978 958
internal_count del_count
977 956
internal_count del_count
976 954
internal_count del_count
975 952
internal_count del_count
974 950
internal_count del_count
973 948
internal_count del_count
972 946
internal_count del_count
971 944
internal_count del_count
970 942
internal_count del_count
969 940
internal_count del_count
968 938
internal_count del_count
967 936
internal_count del_count
966 934
internal_count del_count
965 932
internal_count del_count
964 930
internal_count del_count
963 928
internal_count del_count
962 926
internal_count del_count
961 924
internal_count del_count
960 922
internal_count del_count
959 920
internal_count del_count
958 918
internal_count del_count
957 916
internal_count del_count
956 914
internal_count del_count
955 912
internal_count del_count
954 910
internal_count del_count
953 908
internal_count del_count
952 906
internal_count del_count
951 904
internal_count del_count
950 902
internal_count del_count
949 900
internal_count del_count
948 898
internal_count del_count
947 896
internal_count del_count
946 894
internal_count del_count
945 892
internal_count del_count
944 890
internal_count del_count
943 888
internal_count del_count
942 886
internal_count del_count
941 884
internal_count del_count
940 882
internal_count del_count
939 880
internal_count del_count
938 878
internal_count del_count
937 876
internal_count del_count
936 874
internal_count del_count
935 872
internal_count del_count
934 870
internal_count del_count
933 868
internal_count del_count
932 866
internal_count del_count
931 864
internal_count del_count
930 862
internal_count del_count
929 860
internal_count del_count
928 858
internal_count del_count
927 856
internal_count del_count
926 854
internal_count del_count
925 852
internal_count del_count
924 850
internal_count del_count
923 848
internal_count del_count
922 846
internal_count del_count
921 844
internal_count del_count
920 842
internal_count del_count
919 840
internal_count del_count
918 838
internal_count del_count
917 836
internal_count del_count
916 834
internal_count del_count
915 832
internal_count del_count
914 830
internal_count del_count
913 828
internal_count del_count
912 826
internal_count del_count
911 824
internal_count del_count
910 822
internal_count del_count
909 820
internal_count del_count
908 818
internal_count del_count
907 816
internal_count del_count
906 814
internal_count del_count
905 812
internal_count del_count
904 810
internal_count del_count
903 808
internal_count del_count
902 806
internal_count del_count
901 804
internal_count del_count
900 802
internal_count del_count
899 800
internal_count del_count
898 798
internal_count del_count
897 796
internal_count del_count
896 794
internal_count del_count
895 792
internal_count del_count
894 790
internal_count del_count
893 788
internal_count del_count
892 786
internal_count del_count
891 784
internal_count del_count
890 782
internal_count del_count
889 780
internal_count del_count
888 778
internal_count del_count
887 776
internal_count del_count
886 774
internal_count del_count
885 772
internal_count del_count
884 770
internal_count del_count
883 768
internal_count del_count
882 766
internal_count del_count
881 764
internal_count del_count
880 762
internal_count del_count
879 760
internal_count del_count
878 758
internal_count del_count
877 756
internal_count del_count
876 754
internal_count del_count
875 752
internal_count del_count
874 750
internal_count del_count
873 748
internal_count del_count
872 746
internal_count del_count
871 744
internal_count del_count
870 742
internal_count del_count
869 740
internal_count del_count
868 738
internal_count del_count
867 736
internal_count del_count
866 734
internal_count del_count
865 732
internal_count del_count
864 730
internal_count del_count
863 728
internal_count del_count
862 726
internal_count del_count
861 724
internal_count del_count
860 722
internal_count del_count
859 720
internal_count del_count
858 718
internal_count del_count
857 716
internal_count del_count
856 714
internal_count del_count
855 712
internal_count del_count
854 710
internal_count del_count
853 708
internal_count del_count
852 706
internal_count del_count
851 704
internal_count del_count
850 702
internal_count del_count
849 700
internal_count del_count
848 698
internal_count del_count
847 696
internal_count del_count
846 694
internal_count del_count
845 692
internal_count del_count
844 690
internal_count del_count
843 688
internal_count del_count
842 686
internal_count del_count
841 684
internal_count del_count
840 682
internal_count del_count
839 680
internal_count del_count
838 678
internal_count del_count
837 676
internal_count del_count
836 674
internal_count del_count
835 672
internal_count del_count
834 670
internal_count del_count
833 668
internal_count del_count
832 666
internal_count del_count
831 664
internal_count del_count
830 662
internal_count del_count
829 660
internal_count del_count
828 658
internal_count del_count
827 656
internal_count del_count
826 654
internal_count del_count
825 652
internal_count del_count
824 650
internal_count del_count
823 648
internal_count del_count
822 646
internal_count del_count
821 644
internal_count del_count
820 642
internal_count del_count
819 640
internal_count del_count
818 638
internal_count del_count
817 636
internal_count del_count
816 634
internal_count del_count
815 632
internal_count del_count
814 630
internal_count del_count
813 628
internal_count del_count
812 626
internal_count del_count
811 624
internal_count del_count
810 622
internal_count del_count
809 620
internal_count del_count
808 618
internal_count del_count
807 616
internal_count del_count
806 614
internal_count del_count
805 612
internal_count del_count
804 610
internal_count del_count
803 608
internal_count del_count
802 606
internal_count del_count
801 604
internal_count del_count
800 602
internal_count del_count
799 600
internal_count del_count
798 598
internal_count del_count
797 596
internal_count del_count
796 594
internal_count del_count
795 592
internal_count del_count
794 590
internal_count del_count
793 588
internal_count del_count
792 586
internal_count del_count
791 584
internal_count del_count
790 582
internal_count del_count
789 580
internal_count del_count
788 578
internal_count del_count
787 576
internal_count del_count
786 574
internal_count del_count
785 572
internal_count del_count
784 570
internal_count del_count
783 568
internal_count del_count
782 566
internal_count del_count
781 564
internal_count del_count
780 562
internal_count del_count
779 560
internal_count del_count
778 558
internal_count del_count
777 556
internal_count del_count
776 554
internal_count del_count
775 552
internal_count del_count
774 550
internal_count del_count
773 548
internal_count del_count
772 546
internal_count del_count
771 544
internal_count del_count
770 542
internal_count del_count
769 540
internal_count del_count
768 538
internal_count del_count
767 536
internal_count del_count
766 534
internal_count del_count
765 532
internal_count del_count
764 530
internal_count del_count
763 528
internal_count del_count
762 526
internal_count del_count
761 524
internal_count del_count
760 522
internal_count del_count
759 520
internal_count del_count
758 518
internal_count del_count
757 516
internal_count del_count
756 514
internal_count del_count
755 512
internal_count del_count
754 510
internal_count del_count
753 508
internal_count del_count
752 506
internal_count del_count
751 504
internal_count del_count
750 502
internal_count del_count
749 500
internal_count del_count
748 498
internal_count del_count
747 496
internal_count del_count
746 494
internal_count del_count
745 492
internal_count del_count
744 490
internal_count del_count
743 488
internal_count del_count
742 486
internal_count del_count
741 484
internal_count del_count
740 482
internal_count del_count
739 480
internal_count del_count
738 478
internal_count del_count
737 476
internal_count del_count
736 474
internal_count del_count
735 472
internal_count del_count
734 470
internal_count del_count
733 468
internal_count del_count
732 466
internal_count del_count
731 464
internal_count del_count
730 462
internal_count del_count
729 460
internal_count del_count
728 458
internal_count del_count
727 456
internal_count del_count
726 454
internal_count del_count
725 452
internal_count del_count
724 450
internal_count del_count
723 448
internal_count del_count
722 446
internal_count del_count
721 444
internal_count del_count
720 442
internal_count del_count
719 440
internal_count del_count
718 438
internal_count del_count
717 436
internal_count del_count
716 434
internal_count del_count
715 432
internal_count del_count
714 430
internal_count del_count
713 428
internal_count del_count
712 426
internal_count del_count
711 424
internal_count del_count
710 422
internal_count del_count
709 420
internal_count del_count
708 418
internal_count del_count
707 416
internal_count del_count
706 414
internal_count del_count
705 412
internal_count del_count
704 410
internal_count del_count
703 408
internal_count del_count
702 406
internal_count del_count
701 404
internal_count del_count
700 402
internal_count del_count
699 400
internal_count del_count
698 398
internal_count del_count
697 396
internal_count del_count
696 394
internal_count del_count
695 392
internal_count del_count
694 390
internal_count del_count
693 388
internal_count del_count
692 386
internal_count del_count
691 384
internal_count del_count
690 382
internal_count del_count
689 380
internal_count del_count
688 378
internal_count del_count
687 376
internal_count del_count
686 374
internal_count del_count
685 372
internal_count del_count
684 370
internal_count del_count
683 368
internal_count del_count
682 366
internal_count del_count
681 364
internal_count del_count
680 362
internal_count del_count
679 360
internal_count del_count
678 358
internal_count del_count
677 356
internal_count del_count
676 354
internal_count del_count
675 352
internal_count del_count
674 350
internal_count del_count
673 348
internal_count del_count
672 346
internal_count del_count
671 344
internal_count del_count
670 342
internal_count del_count
669 340
internal_count del_count
668 338
internal_count del_count
667 336
internal_count del_count
666 334
internal_count del_count
665 332
internal_count del_count
664 330
internal_count del_count
663 328
internal_count del_count
662 326
internal_count del_count
661 324
internal_count del_count
660 322
internal_count del_count
659 320
internal_count del_count
658 318
internal_count del_count
657 316
internal_count del_count
656 314
internal_count del_count
655 312
internal_count del_count
654 310
internal_count del_count
653 308
internal_count del_count
652 306
internal_count del_count
651 304
internal_count del_count
650 302
internal_count del_count
649 300
internal_count del_count
648 298
internal_count del_count
647 296
internal_count del_count
646 294
internal_count del_count
645 292
internal_count del_count
644 290
internal_count del_count
643 288
internal_count del_count
642 286
internal_count del_count
641 284
internal_count del_count
640 282
internal_count del_count
639 280
internal_count del_count
638 278
internal_count del_count
637 276
internal_count del_count
636 274
internal_count del_count
635 272
internal_count del_count
634 270
internal_count del_count
633 268
internal_count del_count
632 266
internal_count del_count
631 264
internal_count del_count
630 262
internal_count del_count
629 260
internal_count del_count
628 258
internal_count del_count
627 256
internal_count del_count
626 254
internal_count del_count
625 252
internal_count del_count
624 250
internal_count del_count
623 248
internal_count del_count
622 246
internal_count del_count
621 244
internal_count del_count
620 242
internal_count del_count
619 240
internal_count del_count
618 238
internal_count del_count
617 236
internal_count del_count
616 234
internal_count del_count
615 232
internal_count del_count
614 230
internal_count del_count
613 228
internal_count del_count
612 226
internal_count del_count
611 224
internal_count del_count
610 222
internal_count del_count
609 220
internal_count del_count
608 218
internal_count del_count
607 216
internal_count del_count
606 214
internal_count del_count
605 212
internal_count del_count
604 210
internal_count del_count
603 208
internal_count del_count
602 206
internal_count del_count
601 204
internal_count del_count
600 202
internal_count del_count
599 200
internal_count del_count
598 198
internal_count del_count
597 196
internal_count del_count
596 194
internal_count del_count
595 192
internal_count del_count
594 190
internal_count del_count
593 188
internal_count del_count
592 186
internal_count del_count
591 184
internal_count del_count
590 182
internal_count del_count
589 180
internal_count del_count
588 178
internal_count del_count
587 176
internal_count del_count
586 174
internal_count del_count
585 172
internal_count del_count
584 170
internal_count del_count
583 168
internal_count del_count
582 166
internal_count del_count
581 164
internal_count del_count
580 162
internal_count del_count
579 160
internal_count del_count
578 158
internal_count del_count
577 156
internal_count del_count
576 154
internal_count del_count
575 152
internal_count del_count
574 150
internal_count del_count
573 148
internal_count del_count
572 146
internal_count del_count
571 144
internal_count del_count
570 142
internal_count del_count
569 140
internal_count del_count
568 138
internal_count del_count
567 136
internal_count del_count
566 134
internal_count del_count
565 132
internal_count del_count
564 130
internal_count del_count
563 128
internal_count del_count
562 126
internal_count del_count
561 124
internal_count del_count
560 122
internal_count del_count
559 120
internal_count del_count
558 118
internal_count del_count
557 116
internal_count del_count
556 114
internal_count del_count
555 112
internal_count del_count
554 110
internal_count del_count
553 108
internal_count del_count
552 106
internal_count del_count
551 104
internal_count del_count
550 102
internal_count del_count
549 100
internal_count del_count
548 98
internal_count del_count
547 96
internal_count del_count
546 94
internal_count del_count
545 92
internal_count del_count
544 90
internal_count del_count
543 88
internal_count del_count
542 86
internal_count del_count
541 84
internal_count del_count
540 82
internal_count del_count
539 80
internal_count del_count
538 78
internal_count del_count
537 76
internal_count del_count
536 74
internal_count del_count
535 72
internal_count del_count
534 70
internal_count del_count
533 68
internal_count del_count
532 66
internal_count del_count
531 64
internal_count del_count
530 62
internal_count del_count
529 60
internal_count del_count
528 58
internal_count del_count
527 56
internal_count del_count
526 54
internal_count del_count
525 52
internal_count del_count
524 50
internal_count del_count
523 48
internal_count del_count
522 46
internal_count del_count
521 44
internal_count del_count
520 42
internal_count del_count
519 40
internal_count del_count
518 38
internal_count del_count
517 36
internal_count del_count
516 34
internal_count del_count
515 32
internal_count del_count
514 30
internal_count del_count
513 28
internal_count del_count
512 26
internal_count del_count
511 24
internal_count del_count
510 22
internal_count del_count
509 20
internal_count del_count
508 18
internal_count del_count
507 16
internal_count del_count
506 14
internal_count del_count
505 12
internal_count del_count
504 10
internal_count del_count
503 8
internal_count del_count
502 6
internal_count del_count
501 4
internal_count del_count
500 2
select count(*) as Part from test.part_tbl;
Part
500
DROP PROCEDURE test.proc_part;
DROP TABLE test.part_tbl;
--innodb --innodb_autoinc_lock_mode=0
--innodb --innodb_autoinc_lock_mode=0
--innodb --innodb_autoinc_lock_mode=0
--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
--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
--innodb --innodb_autoinc_lock_mode=0
--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
}
const int Listener::LISTEN_BACK_LOG_SIZE= 5; /* standard backlog size */
Listener::Listener(Thread_registry *thread_registry_arg,
User_map *user_map_arg)
......
......@@ -39,7 +39,7 @@ class Listener: public Thread
virtual void run();
private:
static const int LISTEN_BACK_LOG_SIZE= 5; /* standard backlog size */
static const int LISTEN_BACK_LOG_SIZE;
private:
Thread_info thread_info;
......
......@@ -145,6 +145,8 @@ static uint alter_table_flags(uint flags __attribute__((unused)))
HA_FAST_CHANGE_PARTITION);
}
const uint ha_partition::NO_CURRENT_PART_ID= 0xFFFFFFFF;
/*
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.
*/
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);
#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,
last_value= ~ (ulonglong) 0;
handler **pos, **end;
bool retry= TRUE;
DBUG_ENTER("ha_partition::get_auto_increment");
again:
for (pos=m_file, end= m_file+ m_tot_parts; pos != end ; pos++)
{
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
{
*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
......@@ -5477,6 +5492,25 @@ void ha_partition::get_auto_increment(ulonglong offset, ulonglong increment,
}
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);
}
if (increment) // If not check for values
......
......@@ -468,7 +468,7 @@ class ha_partition :public handler
virtual int reset(void);
private:
static const uint NO_CURRENT_PART_ID= 0xFFFFFFFF;
static const uint NO_CURRENT_PART_ID;
int loop_extra(enum ha_extra_function operation);
void late_extra_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.
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.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
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.
azwrite returns the number of uncompressed bytes actually written
......
......@@ -1904,12 +1904,11 @@ innobase_commit(
/* We just mark the SQL statement ended and do not do a
transaction commit */
if (trx->auto_inc_lock) {
/* If we had reserved the auto-inc lock for some
table in this SQL statement we release it now */
/* If we had reserved the auto-inc lock for some
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
know where to roll back if we have to roll back the next
SQL statement */
......@@ -1962,13 +1961,11 @@ innobase_rollback(
innobase_release_stat_resources(trx);
if (trx->auto_inc_lock) {
/* If we had reserved the auto-inc lock for some table (if
we come here to roll back the latest SQL statement) we
release it now before a possibly lengthy rollback */
/* If we had reserved the auto-inc lock for some table (if
we come here to roll back the latest SQL statement) we
release it now before a possibly lengthy rollback */
row_unlock_table_autoinc_for_mysql(trx);
}
row_unlock_table_autoinc_for_mysql(trx);
if (all
|| !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) {
......@@ -2002,13 +1999,11 @@ innobase_rollback_trx(
innobase_release_stat_resources(trx);
if (trx->auto_inc_lock) {
/* If we had reserved the auto-inc lock for some table (if
we come here to roll back the latest SQL statement) we
release it now before a possibly lengthy rollback */
/* If we had reserved the auto-inc lock for some table (if
we come here to roll back the latest SQL statement) we
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);
......@@ -7168,7 +7163,7 @@ ha_innobase::innobase_read_and_init_auto_inc(
if (auto_inc == 0) {
dict_index_t* index;
ulint error = DB_SUCCESS;
ulint error;
const char* autoinc_col_name;
ut_a(!innodb_table->autoinc_inited);
......@@ -7240,12 +7235,10 @@ ha_innobase::innobase_get_auto_increment(
trx = prebuilt->trx;
dict_table_autoinc_unlock(prebuilt->table);
if (trx->auto_inc_lock) {
/* If we had reserved the AUTO-INC
lock in this SQL statement we release
it before retrying.*/
row_unlock_table_autoinc_for_mysql(trx);
}
/* If we had reserved the AUTO-INC
lock in this SQL statement we release
it before retrying.*/
row_unlock_table_autoinc_for_mysql(trx);
/* Just to make sure */
ut_a(!trx->auto_inc_lock);
......@@ -7287,6 +7280,7 @@ ha_innobase::get_auto_increment(
ulonglong *first_value, /* out: the autoinc value */
ulonglong *nb_reserved_values) /* out: count of reserved values */
{
trx_t* trx;
ulint error;
ulonglong autoinc = 0;
......@@ -7313,37 +7307,29 @@ ha_innobase::get_auto_increment(
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
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
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 ? */
if (prebuilt->trx->n_autoinc_rows == 0) {
trx = prebuilt->trx;
prebuilt->trx->n_autoinc_rows = (ulint) nb_desired_values;
/* Called for the first time ? */
if (trx->n_autoinc_rows == 0) {
/* It's possible for nb_desired_values to be 0:
e.g., INSERT INTO T1(C) SELECT C FROM T2; */
if (nb_desired_values == 0) {
trx->n_autoinc_rows = (ulint) nb_desired_values;
++prebuilt->trx->n_autoinc_rows;
}
/* It's possible for nb_desired_values to be 0:
e.g., INSERT INTO T1(C) SELECT C FROM T2; */
if (nb_desired_values == 0) {
trx->n_autoinc_rows = 1;
}
*first_value = autoinc;
} else if (prebuilt->trx->n_autoinc_rows == 0) {
prebuilt->trx->n_autoinc_rows = 1;
set_if_bigger(*first_value, autoinc);
/* Not in the middle of a mult-row INSERT. */
} else if (prebuilt->last_value == 0) {
set_if_bigger(*first_value, autoinc);
}
ut_a(prebuilt->trx->n_autoinc_rows > 0);
*nb_reserved_values = prebuilt->trx->n_autoinc_rows;
*nb_reserved_values = trx->n_autoinc_rows;
/* With old style AUTOINC locking we only update the table's
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
transaction prepare */
if (trx->auto_inc_lock) {
/* If we had reserved the auto-inc lock for some
table in this SQL statement we release it now */
/* If we had reserved the auto-inc lock for some
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
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);
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"
" 0 => Old style AUTOINC locking (for backward compatibility)\n"
" 1 => New style AUTOINC locking\n"
......
......@@ -4533,7 +4533,6 @@ row_search_autoinc_read_column(
ibool unsigned_type) /* in: signed or unsigned flag */
{
ulint len;
byte* ptr;
const byte* data;
ib_longlong value;
mem_heap_t* heap = NULL;
......@@ -4555,49 +4554,20 @@ row_search_autoinc_read_column(
ut_a(len != UNIV_SQL_NULL);
ut_a(len <= sizeof value);
#ifdef WORDS_BIGENDIAN
/* 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) {
dest[0] ^= 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
if (!unsigned_type)
dest[sizeof(value) - len] ^= 128;
/* The assumption here is that the AUTOINC value can't be negative.*/
switch (len) {
case 8:
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;
}
value = (((ib_longlong) mach_read_from_4(dest)) << 32) |
((ib_longlong) mach_read_from_4(dest + 4));
if (UNIV_LIKELY_NULL(heap)) {
mem_heap_free(heap);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment