Commit ae270c42 authored by unknown's avatar unknown

result fix

parent 83540130
...@@ -1125,7 +1125,7 @@ INDEX(`int_field`) ...@@ -1125,7 +1125,7 @@ INDEX(`int_field`)
); );
DESCRIBE t1; DESCRIBE t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
int_field int(10) unsigned NO MUL int_field int(10) unsigned NO MUL NULL
char_field char(10) YES NULL char_field char(10) YES NULL
SHOW INDEXES FROM t1; SHOW INDEXES FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
...@@ -1146,16 +1146,16 @@ unsigned_int_field char_field ...@@ -1146,16 +1146,16 @@ unsigned_int_field char_field
5 pet 5 pet
DESCRIBE t2; DESCRIBE t2;
Field Type Null Key Default Extra Field Type Null Key Default Extra
unsigned_int_field int(10) unsigned NO MUL unsigned_int_field int(10) unsigned NO MUL NULL
char_field char(10) YES NULL char_field char(10) YES NULL
DESCRIBE t2; DESCRIBE t2;
Field Type Null Key Default Extra Field Type Null Key Default Extra
unsigned_int_field int(10) unsigned NO MUL unsigned_int_field int(10) unsigned NO MUL NULL
char_field char(10) YES NULL char_field char(10) YES NULL
ALTER TABLE t2 MODIFY unsigned_int_field BIGINT UNSIGNED NOT NULL; ALTER TABLE t2 MODIFY unsigned_int_field BIGINT UNSIGNED NOT NULL;
DESCRIBE t2; DESCRIBE t2;
Field Type Null Key Default Extra Field Type Null Key Default Extra
unsigned_int_field bigint(20) unsigned NO MUL unsigned_int_field bigint(20) unsigned NO MUL NULL
char_field char(10) YES NULL char_field char(10) YES NULL
DROP TABLE t2; DROP TABLE t2;
CREATE TABLE t1 (f1 INT, f2 INT, f3 INT); CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
......
...@@ -74,16 +74,16 @@ slow_log CREATE TABLE `slow_log` ( ...@@ -74,16 +74,16 @@ slow_log CREATE TABLE `slow_log` (
show fields from mysql.slow_log; show fields from mysql.slow_log;
Field Type Null Key Default Extra Field Type Null Key Default Extra
start_time timestamp NO CURRENT_TIMESTAMP start_time timestamp NO CURRENT_TIMESTAMP
user_host mediumtext NO user_host mediumtext NO NULL
query_time time NO query_time time NO NULL
lock_time time NO lock_time time NO NULL
rows_sent int(11) NO rows_sent int(11) NO NULL
rows_examined int(11) NO rows_examined int(11) NO NULL
db varchar(512) YES NULL db varchar(512) YES NULL
last_insert_id int(11) YES NULL last_insert_id int(11) YES NULL
insert_id int(11) YES NULL insert_id int(11) YES NULL
server_id int(11) YES NULL server_id int(11) YES NULL
sql_text mediumtext NO sql_text mediumtext NO NULL
flush logs; flush logs;
flush tables; flush tables;
SET GLOBAL GENERAL_LOG=ON; SET GLOBAL GENERAL_LOG=ON;
......
...@@ -791,246 +791,6 @@ select 1 from information_schema.tables limit 1; ...@@ -791,246 +791,6 @@ select 1 from information_schema.tables limit 1;
show status like 'slow_queries'; show status like 'slow_queries';
Variable_name Value Variable_name Value
Slow_queries 1 Slow_queries 1
----------------------------------------------------------------
SHOW TRIGGERS LIKE 't1';
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def TRIGGERS TRIGGER_NAME Trigger 253 192 5 N 1 0 33
def TRIGGERS EVENT_MANIPULATION Event 253 18 6 N 1 0 33
def TRIGGERS EVENT_OBJECT_TABLE Table 253 192 2 N 1 0 33
def TRIGGERS ACTION_STATEMENT Statement 252 589815 10 N 17 0 33
def TRIGGERS ACTION_TIMING Timing 253 18 6 N 1 0 33
def TRIGGERS CREATED Created 12 19 0 Y 128 0 63
def TRIGGERS SQL_MODE sql_mode 252 589815 0 N 17 0 33
def TRIGGERS DEFINER Definer 252 589815 14 N 17 0 33
Trigger Event Table Statement Timing Created sql_mode Definer
t1_bi INSERT t1 SET @a = 1 BEFORE NULL root@localhost
----------------------------------------------------------------
SELECT
TRIGGER_CATALOG,
TRIGGER_SCHEMA,
TRIGGER_NAME,
EVENT_MANIPULATION,
EVENT_OBJECT_CATALOG,
EVENT_OBJECT_SCHEMA,
EVENT_OBJECT_TABLE,
ACTION_CONDITION,
ACTION_STATEMENT,
ACTION_ORIENTATION,
ACTION_TIMING,
ACTION_REFERENCE_OLD_TABLE,
ACTION_REFERENCE_NEW_TABLE,
ACTION_REFERENCE_OLD_ROW,
ACTION_REFERENCE_NEW_ROW,
SQL_MODE,
DEFINER
FROM INFORMATION_SCHEMA.TRIGGERS
WHERE trigger_name = 't1_bi';
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def TRIGGERS TRIGGER_CATALOG TRIGGER_CATALOG 253 1536 0 Y 0 0 33
def TRIGGERS TRIGGER_SCHEMA TRIGGER_SCHEMA 253 192 4 N 1 0 33
def TRIGGERS TRIGGER_NAME TRIGGER_NAME 253 192 5 N 1 0 33
def TRIGGERS EVENT_MANIPULATION EVENT_MANIPULATION 253 18 6 N 1 0 33
def TRIGGERS EVENT_OBJECT_CATALOG EVENT_OBJECT_CATALOG 253 1536 0 Y 0 0 33
def TRIGGERS EVENT_OBJECT_SCHEMA EVENT_OBJECT_SCHEMA 253 192 4 N 1 0 33
def TRIGGERS EVENT_OBJECT_TABLE EVENT_OBJECT_TABLE 253 192 2 N 1 0 33
def TRIGGERS ACTION_CONDITION ACTION_CONDITION 252 589815 0 Y 16 0 33
def TRIGGERS ACTION_STATEMENT ACTION_STATEMENT 252 589815 10 N 17 0 33
def TRIGGERS ACTION_ORIENTATION ACTION_ORIENTATION 253 27 3 N 1 0 33
def TRIGGERS ACTION_TIMING ACTION_TIMING 253 18 6 N 1 0 33
def TRIGGERS ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_OLD_TABLE 253 192 0 Y 0 0 33
def TRIGGERS ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_NEW_TABLE 253 192 0 Y 0 0 33
def TRIGGERS ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_OLD_ROW 253 9 3 N 1 0 33
def TRIGGERS ACTION_REFERENCE_NEW_ROW ACTION_REFERENCE_NEW_ROW 253 9 3 N 1 0 33
def TRIGGERS SQL_MODE SQL_MODE 252 589815 0 N 17 0 33
def TRIGGERS DEFINER DEFINER 252 589815 14 N 17 0 33
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW SQL_MODE DEFINER
NULL test t1_bi INSERT NULL test t1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW root@localhost
----------------------------------------------------------------
SHOW CREATE VIEW v1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def View 253 63 2 N 1 31 33
def Create View 253 1023 103 N 1 31 33
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1`
----------------------------------------------------------------
SELECT *
FROM INFORMATION_SCHEMA.VIEWS
WHERE table_name = 'v1';
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def VIEWS TABLE_CATALOG TABLE_CATALOG 253 1536 0 Y 0 0 33
def VIEWS TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 1 0 33
def VIEWS TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33
def VIEWS VIEW_DEFINITION VIEW_DEFINITION 252 589815 41 N 17 0 33
def VIEWS CHECK_OPTION CHECK_OPTION 253 24 4 N 1 0 33
def VIEWS IS_UPDATABLE IS_UPDATABLE 253 9 2 N 1 0 33
def VIEWS DEFINER DEFINER 253 231 14 N 1 0 33
def VIEWS SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE
NULL test v1 /* ALGORITHM=UNDEFINED */ select 1 AS `1` NONE NO root@localhost DEFINER
----------------------------------------------------------------
SHOW CREATE PROCEDURE p1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Procedure 253 63 2 N 1 31 33
def sql_mode 253 0 0 N 1 31 33
def Create Procedure 253 2046 59 Y 0 31 33
Procedure sql_mode Create Procedure
p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
SELECT 1
----------------------------------------------------------------
SELECT
SPECIFIC_NAME,
ROUTINE_CATALOG,
ROUTINE_SCHEMA,
ROUTINE_NAME,
ROUTINE_TYPE,
DTD_IDENTIFIER,
ROUTINE_BODY,
ROUTINE_DEFINITION,
EXTERNAL_NAME,
EXTERNAL_LANGUAGE,
PARAMETER_STYLE,
IS_DETERMINISTIC,
SQL_DATA_ACCESS,
SQL_PATH,
SECURITY_TYPE,
SQL_MODE,
ROUTINE_COMMENT,
DEFINER
FROM INFORMATION_SCHEMA.ROUTINES
WHERE routine_name = 'p1';
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def ROUTINES SPECIFIC_NAME SPECIFIC_NAME 253 192 2 N 1 0 33
def ROUTINES ROUTINE_CATALOG ROUTINE_CATALOG 253 1536 0 Y 0 0 33
def ROUTINES ROUTINE_SCHEMA ROUTINE_SCHEMA 253 192 4 N 1 0 33
def ROUTINES ROUTINE_NAME ROUTINE_NAME 253 192 2 N 1 0 33
def ROUTINES ROUTINE_TYPE ROUTINE_TYPE 253 27 9 N 1 0 33
def ROUTINES DTD_IDENTIFIER DTD_IDENTIFIER 253 192 0 Y 0 0 33
def ROUTINES ROUTINE_BODY ROUTINE_BODY 253 24 3 N 1 0 33
def ROUTINES ROUTINE_DEFINITION ROUTINE_DEFINITION 252 589815 8 Y 16 0 33
def ROUTINES EXTERNAL_NAME EXTERNAL_NAME 253 192 0 Y 0 0 33
def ROUTINES EXTERNAL_LANGUAGE EXTERNAL_LANGUAGE 253 192 0 Y 0 0 33
def ROUTINES PARAMETER_STYLE PARAMETER_STYLE 253 24 3 N 1 0 33
def ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 9 2 N 1 0 33
def ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 192 12 N 1 0 33
def ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33
def ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33
def ROUTINES SQL_MODE SQL_MODE 252 589815 0 N 17 0 33
def ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 253 192 0 N 1 0 33
def ROUTINES DEFINER DEFINER 253 231 14 N 1 0 33
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE SQL_MODE ROUTINE_COMMENT DEFINER
p1 NULL test p1 PROCEDURE NULL SQL SELECT 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER root@localhost
----------------------------------------------------------------
SHOW CREATE FUNCTION f1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Function 253 63 2 N 1 31 33
def sql_mode 253 0 0 N 1 31 33
def Create Function 253 2046 74 Y 0 31 33
Function sql_mode Create Function
f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
RETURN 1
----------------------------------------------------------------
SELECT
SPECIFIC_NAME,
ROUTINE_CATALOG,
ROUTINE_SCHEMA,
ROUTINE_NAME,
ROUTINE_TYPE,
DTD_IDENTIFIER,
ROUTINE_BODY,
ROUTINE_DEFINITION,
EXTERNAL_NAME,
EXTERNAL_LANGUAGE,
PARAMETER_STYLE,
IS_DETERMINISTIC,
SQL_DATA_ACCESS,
SQL_PATH,
SECURITY_TYPE,
SQL_MODE,
ROUTINE_COMMENT,
DEFINER
FROM INFORMATION_SCHEMA.ROUTINES
WHERE routine_name = 'f1';
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def ROUTINES SPECIFIC_NAME SPECIFIC_NAME 253 192 2 N 1 0 33
def ROUTINES ROUTINE_CATALOG ROUTINE_CATALOG 253 1536 0 Y 0 0 33
def ROUTINES ROUTINE_SCHEMA ROUTINE_SCHEMA 253 192 4 N 1 0 33
def ROUTINES ROUTINE_NAME ROUTINE_NAME 253 192 2 N 1 0 33
def ROUTINES ROUTINE_TYPE ROUTINE_TYPE 253 27 8 N 1 0 33
def ROUTINES DTD_IDENTIFIER DTD_IDENTIFIER 253 192 7 Y 0 0 33
def ROUTINES ROUTINE_BODY ROUTINE_BODY 253 24 3 N 1 0 33
def ROUTINES ROUTINE_DEFINITION ROUTINE_DEFINITION 252 589815 8 Y 16 0 33
def ROUTINES EXTERNAL_NAME EXTERNAL_NAME 253 192 0 Y 0 0 33
def ROUTINES EXTERNAL_LANGUAGE EXTERNAL_LANGUAGE 253 192 0 Y 0 0 33
def ROUTINES PARAMETER_STYLE PARAMETER_STYLE 253 24 3 N 1 0 33
def ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 9 2 N 1 0 33
def ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 192 12 N 1 0 33
def ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33
def ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33
def ROUTINES SQL_MODE SQL_MODE 252 589815 0 N 17 0 33
def ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 253 192 0 N 1 0 33
def ROUTINES DEFINER DEFINER 253 231 14 N 1 0 33
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE SQL_MODE ROUTINE_COMMENT DEFINER
f1 NULL test f1 FUNCTION int(11) SQL RETURN 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER root@localhost
----------------------------------------------------------------
DROP DATABASE mysqltest1;
DROP TABLE t1;
DROP VIEW v1;
DROP PROCEDURE p1;
DROP FUNCTION f1;
set names koi8r;
DROP DATABASE IF EXISTS mysqltest1;
CREATE DATABASE mysqltest1;
use mysqltest1;
CREATE TABLE t1(ËÏÌÏÎËÁ1 INT);
---> Dumping mysqltest1 to show_check.mysqltest1.sql
DROP DATABASE mysqltest1;
---> Restoring mysqltest1...
SHOW CREATE TABLE mysqltest1.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`ËÏÌÏÎËÁ1` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP DATABASE mysqltest1;
use test;
flush status;
show variables like "log_queries_not_using_indexes";
Variable_name Value
log_queries_not_using_indexes ON
select 1 from information_schema.tables limit 1;
1
1
show status like 'slow_queries';
Variable_name Value
Slow_queries 1
set global log_queries_not_using_indexes=OFF;
show variables like "log_queries_not_using_indexes";
Variable_name Value
log_queries_not_using_indexes OFF
select 1 from information_schema.tables limit 1;
1
1
show status like 'slow_queries';
Variable_name Value
Slow_queries 1
set global log_queries_not_using_indexes=ON;
show variables like "log_queries_not_using_indexes";
Variable_name Value
log_queries_not_using_indexes ON
select 1 from information_schema.tables limit 1;
1
1
show status like 'slow_queries';
Variable_name Value
Slow_queries 2
show variables like 'myisam_recover_options';
Variable_name Value
myisam_recover_options OFF
End of 5.0 tests
create table t1 (a int); create table t1 (a int);
create trigger tr1 before insert on t1 for each row create trigger tr1 before insert on t1 for each row
begin begin
...@@ -1240,7 +1000,7 @@ def COLUMNS COLUMN_KEY Key 253 9 3 N 1 0 33 ...@@ -1240,7 +1000,7 @@ def COLUMNS COLUMN_KEY Key 253 9 3 N 1 0 33
def COLUMNS COLUMN_DEFAULT Default 252 589815 0 Y 16 0 33 def COLUMNS COLUMN_DEFAULT Default 252 589815 0 Y 16 0 33
def COLUMNS EXTRA Extra 253 60 0 N 1 0 33 def COLUMNS EXTRA Extra 253 60 0 N 1 0 33
Field Type Null Key Default Extra Field Type Null Key Default Extra
c int(11) NO PRI c int(11) NO PRI NULL
---------------------------------------------------------------- ----------------------------------------------------------------
SHOW TRIGGERS LIKE 't1'; SHOW TRIGGERS LIKE 't1';
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
...@@ -1444,7 +1204,7 @@ set names koi8r; ...@@ -1444,7 +1204,7 @@ set names koi8r;
DROP DATABASE IF EXISTS mysqltest1; DROP DATABASE IF EXISTS mysqltest1;
CREATE DATABASE mysqltest1; CREATE DATABASE mysqltest1;
use mysqltest1; use mysqltest1;
CREATE TABLE t1(ËÏÌÏÎËÁ1 INT); CREATE TABLE t1(1 INT);
---> Dumping mysqltest1 to show_check.mysqltest1.sql ---> Dumping mysqltest1 to show_check.mysqltest1.sql
...@@ -1456,7 +1216,7 @@ DROP DATABASE mysqltest1; ...@@ -1456,7 +1216,7 @@ DROP DATABASE mysqltest1;
SHOW CREATE TABLE mysqltest1.t1; SHOW CREATE TABLE mysqltest1.t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`ËÏÌÏÎËÁ1` int(11) DEFAULT NULL `1` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP DATABASE mysqltest1; DROP DATABASE mysqltest1;
use test; use test;
...@@ -1633,14 +1393,14 @@ DROP PROCEDURE IF EXISTS p1; ...@@ -1633,14 +1393,14 @@ DROP PROCEDURE IF EXISTS p1;
DROP FUNCTION IF EXISTS f1; DROP FUNCTION IF EXISTS f1;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
DROP EVENT IF EXISTS ev1; DROP EVENT IF EXISTS ev1;
CREATE VIEW v1 AS SELECT 'ÔÅÓÔ' AS test; CREATE VIEW v1 AS SELECT '' AS test;
CREATE PROCEDURE p1() SELECT 'ÔÅÓÔ' AS test; CREATE PROCEDURE p1() SELECT '' AS test;
CREATE FUNCTION f1() RETURNS CHAR(10) RETURN 'ÔÅÓÔ'; CREATE FUNCTION f1() RETURNS CHAR(10) RETURN '';
CREATE TABLE t1(c1 CHAR(10)); CREATE TABLE t1(c1 CHAR(10));
CREATE TRIGGER t1_bi BEFORE INSERT ON t1 CREATE TRIGGER t1_bi BEFORE INSERT ON t1
FOR EACH ROW FOR EACH ROW
SET NEW.c1 = 'ÔÅÓÔ'; SET NEW.c1 = '';
CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO SELECT 'ÔÅÓÔ' AS test; CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO SELECT '' AS test;
set names utf8; set names utf8;
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
......
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