mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge linux.site:/home/omer/source/bld50_0724
into linux.site:/home/omer/source/jrg51 mysql-test/suite/funcs_1/datadict/datadict_master.inc: Auto merged mysql-test/suite/funcs_1/r/innodb__datadict.result: Auto merged mysql-test/suite/funcs_1/r/innodb_trig_0102.result: Auto merged mysql-test/suite/funcs_1/r/innodb_trig_08.result: Auto merged mysql-test/suite/funcs_1/r/innodb_trig_09.result: Auto merged mysql-test/suite/funcs_1/r/innodb_views.result: Auto merged mysql-test/suite/funcs_1/r/memory__datadict.result: Auto merged mysql-test/suite/funcs_1/r/memory_trig_0102.result: Auto merged mysql-test/suite/funcs_1/r/memory_trig_08.result: Auto merged mysql-test/suite/funcs_1/r/memory_trig_09.result: Auto merged mysql-test/suite/funcs_1/r/memory_views.result: Auto merged mysql-test/suite/funcs_1/r/myisam__datadict.result: Auto merged mysql-test/suite/funcs_1/r/myisam_trig_0102.result: Auto merged mysql-test/suite/funcs_1/r/myisam_trig_08.result: Auto merged mysql-test/suite/funcs_1/r/myisam_trig_09.result: Auto merged mysql-test/suite/funcs_1/triggers/triggers_0102.inc: Auto merged mysql-test/suite/funcs_1/views/func_view.inc: Auto merged mysql-test/suite/funcs_1/r/innodb_func_view.result: manual merge mysql-test/suite/funcs_1/r/memory_func_view.result: manual merge mysql-test/suite/funcs_1/r/myisam_func_view.result: manual merge mysql-test/suite/funcs_1/r/myisam_views.result: manual merge
This commit is contained in:
@ -437,19 +437,23 @@ eval SELECT *
|
||||
# check also with a 'simple' user
|
||||
CREATE USER user_3212@localhost;
|
||||
GRANT ALL ON db_datadict.* TO user_3212@localhost;
|
||||
# OBN: The following line was added following the fix to bug 28181
|
||||
# where queries to information_schema will fail if exporting to
|
||||
# a file without having the FILE attribute
|
||||
GRANT FILE ON *.* TO user_3212@localhost;
|
||||
|
||||
|
||||
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
|
||||
connect (u3212,localhost,user_3212,,db_datadict);
|
||||
--source suite/funcs_1/include/show_connection.inc
|
||||
|
||||
# no db given --> db_datadict.schema does not exist
|
||||
--error 1045
|
||||
--error 1146
|
||||
eval SELECT *
|
||||
INTO OUTFILE '../tmp/out.$ENGINE_TYPE.user.file'
|
||||
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
|
||||
LINES TERMINATED BY '\n'
|
||||
FROM schemata LIMIT 0, 5;
|
||||
# FIXME 3.2.1.2: why do we get different error numbers with and without OUTFILE ?
|
||||
--error 1146
|
||||
eval SELECT *
|
||||
FROM schemata LIMIT 0, 5;
|
||||
@ -460,8 +464,6 @@ eval SELECT *
|
||||
LINES TERMINATED BY '\n'
|
||||
FROM information_schema.schemata
|
||||
WHERE schema_name LIKE 'db_%';
|
||||
# The above will fail with access error as long as
|
||||
# BUBG#28181 - a regression introduced in 5.0.42 is not fixed
|
||||
|
||||
eval SELECT *
|
||||
FROM information_schema.schemata
|
||||
@ -469,14 +471,11 @@ eval SELECT *
|
||||
|
||||
USE information_schema;
|
||||
|
||||
# no db given --> db_datadict.schema does not exist
|
||||
eval SELECT *
|
||||
INTO OUTFILE '../tmp/out.$ENGINE_TYPE.user_2.file'
|
||||
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
|
||||
LINES TERMINATED BY '\n'
|
||||
FROM schemata LIMIT 0, 5;
|
||||
# The above will fail with access error as long as
|
||||
# BUBG#28181 - a regression introduced in 5.0.42 is not fixed
|
||||
|
||||
eval SELECT *
|
||||
FROM schemata LIMIT 0, 5;
|
||||
@ -487,8 +486,6 @@ eval SELECT *
|
||||
LINES TERMINATED BY '\n'
|
||||
FROM information_schema.schemata
|
||||
WHERE schema_name LIKE 'db_%';
|
||||
# The above will fail with access error as long as
|
||||
# BUBG#28181 - a regression introduced in 5.0.42 is not fixed
|
||||
|
||||
eval SELECT *
|
||||
FROM information_schema.schemata
|
||||
|
@ -6055,6 +6055,7 @@ INTO OUTFILE '../tmp/out.innodb.db.file'
|
||||
WHERE schema_name LIKE 'db_%';
|
||||
CREATE USER user_3212@localhost;
|
||||
GRANT ALL ON db_datadict.* TO user_3212@localhost;
|
||||
GRANT FILE ON *.* TO user_3212@localhost;
|
||||
connect(localhost,user_3212,,db_datadict,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_3212@localhost db_datadict
|
||||
@ -6063,7 +6064,7 @@ INTO OUTFILE '../tmp/out.innodb.user.file'
|
||||
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
|
||||
LINES TERMINATED BY '\n'
|
||||
FROM schemata LIMIT 0, 5;
|
||||
ERROR 28000: Access denied for user 'user_3212'@'localhost' (using password: NO)
|
||||
ERROR 42S02: Table 'db_datadict.schemata' doesn't exist
|
||||
SELECT *
|
||||
FROM schemata LIMIT 0, 5;
|
||||
ERROR 42S02: Table 'db_datadict.schemata' doesn't exist
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -242,7 +242,7 @@ create table t1 (f1 integer) engine = innodb;
|
||||
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;
|
||||
|
@ -492,9 +492,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;
|
||||
|
||||
|
@ -10202,7 +10202,8 @@ SHOW FIELDS FROM v1;
|
||||
ERROR 42S02: Table 'test.v1' doesn't exist
|
||||
CHECK TABLE v1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.v1 check error Table 'test.v1' doesn't exist
|
||||
test.v1 check Error Table 'test.v1' doesn't exist
|
||||
test.v1 check error Corrupt
|
||||
DESCRIBE v1;
|
||||
ERROR 42S02: Table 'test.v1' doesn't exist
|
||||
EXPLAIN SELECT * FROM v1;
|
||||
|
@ -6038,6 +6038,7 @@ INTO OUTFILE '../tmp/out.memory.db.file'
|
||||
WHERE schema_name LIKE 'db_%';
|
||||
CREATE USER user_3212@localhost;
|
||||
GRANT ALL ON db_datadict.* TO user_3212@localhost;
|
||||
GRANT FILE ON *.* TO user_3212@localhost;
|
||||
connect(localhost,user_3212,,db_datadict,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_3212@localhost db_datadict
|
||||
@ -6046,7 +6047,7 @@ INTO OUTFILE '../tmp/out.memory.user.file'
|
||||
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
|
||||
LINES TERMINATED BY '\n'
|
||||
FROM schemata LIMIT 0, 5;
|
||||
ERROR 28000: Access denied for user 'user_3212'@'localhost' (using password: NO)
|
||||
ERROR 42S02: Table 'db_datadict.schemata' doesn't exist
|
||||
SELECT *
|
||||
FROM schemata LIMIT 0, 5;
|
||||
ERROR 42S02: Table 'db_datadict.schemata' doesn't exist
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -238,7 +238,7 @@ create table t1 (f1 integer) engine = memory;
|
||||
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;
|
||||
|
@ -488,9 +488,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;
|
||||
|
||||
|
@ -10207,7 +10207,8 @@ SHOW FIELDS FROM v1;
|
||||
ERROR 42S02: Table 'test.v1' doesn't exist
|
||||
CHECK TABLE v1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.v1 check error Table 'test.v1' doesn't exist
|
||||
test.v1 check Error Table 'test.v1' doesn't exist
|
||||
test.v1 check error Corrupt
|
||||
DESCRIBE v1;
|
||||
ERROR 42S02: Table 'test.v1' doesn't exist
|
||||
EXPLAIN SELECT * FROM v1;
|
||||
|
@ -6108,6 +6108,7 @@ INTO OUTFILE '../tmp/out.myisam.db.file'
|
||||
WHERE schema_name LIKE 'db_%';
|
||||
CREATE USER user_3212@localhost;
|
||||
GRANT ALL ON db_datadict.* TO user_3212@localhost;
|
||||
GRANT FILE ON *.* TO user_3212@localhost;
|
||||
connect(localhost,user_3212,,db_datadict,MYSQL_PORT,MYSQL_SOCK);
|
||||
|
||||
user_3212@localhost db_datadict
|
||||
@ -6116,7 +6117,7 @@ INTO OUTFILE '../tmp/out.myisam.user.file'
|
||||
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
|
||||
LINES TERMINATED BY '\n'
|
||||
FROM schemata LIMIT 0, 5;
|
||||
ERROR 28000: Access denied for user 'user_3212'@'localhost' (using password: NO)
|
||||
ERROR 42S02: Table 'db_datadict.schemata' doesn't exist
|
||||
SELECT *
|
||||
FROM schemata LIMIT 0, 5;
|
||||
ERROR 42S02: Table 'db_datadict.schemata' doesn't exist
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -242,7 +242,7 @@ create table t1 (f1 integer) engine = myisam;
|
||||
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;
|
||||
|
@ -492,9 +492,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;
|
||||
|
||||
|
@ -1948,7 +1948,7 @@ f1 f2
|
||||
2 two
|
||||
4 four
|
||||
INSERT INTO v1 VALUES(2,'two');
|
||||
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
|
||||
ERROR 23000: Duplicate entry '2' for key 1
|
||||
INSERT INTO v1 VALUES(3,'three');
|
||||
affected rows: 1
|
||||
INSERT INTO v1 VALUES(6,'six');
|
||||
@ -1967,7 +1967,7 @@ f1 f2
|
||||
3 three
|
||||
4 four
|
||||
UPDATE v1 SET f1 = 2 WHERE f1 = 3;
|
||||
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
|
||||
ERROR 23000: Duplicate entry '2' for key 1
|
||||
UPDATE v1 SET f2 = 'number' WHERE f1 = 3;
|
||||
affected rows: 1
|
||||
info: Rows matched: 1 Changed: 1 Warnings: 0
|
||||
@ -2014,12 +2014,12 @@ DROP VIEW IF EXISTS test.v1;
|
||||
CREATE TABLE t1 (f1 ENUM('A', 'B', 'C') NOT NULL, f2 INTEGER)
|
||||
ENGINE = myisam;
|
||||
INSERT INTO t1 VALUES ('A', 1);
|
||||
SELECT * FROM t1 order by f1, f2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
A 1
|
||||
CREATE VIEW v1 AS SELECT * FROM t1 WHERE f2 BETWEEN 1 AND 2
|
||||
WITH CASCADED CHECK OPTION ;
|
||||
SELECT * FROM v1 order by f1, f2;
|
||||
SELECT * FROM v1;
|
||||
f1 f2
|
||||
A 1
|
||||
UPDATE v1 SET f2 = 2 WHERE f2 = 1;
|
||||
@ -2027,7 +2027,7 @@ affected rows: 1
|
||||
info: Rows matched: 1 Changed: 1 Warnings: 0
|
||||
INSERT INTO v1 VALUES('B',2);
|
||||
affected rows: 1
|
||||
SELECT * FROM v1 order by f1, f2;
|
||||
SELECT * FROM v1;
|
||||
f1 f2
|
||||
A 2
|
||||
B 2
|
||||
@ -2035,7 +2035,7 @@ UPDATE v1 SET f2 = 4;
|
||||
ERROR HY000: CHECK OPTION failed 'test.v1'
|
||||
INSERT INTO v1 VALUES('B',3);
|
||||
ERROR HY000: CHECK OPTION failed 'test.v1'
|
||||
SELECT * FROM v1 order by f1, f2;
|
||||
SELECT * FROM v1;
|
||||
f1 f2
|
||||
A 2
|
||||
B 2
|
||||
@ -10224,7 +10224,8 @@ SHOW FIELDS FROM v1;
|
||||
ERROR 42S02: Table 'test.v1' doesn't exist
|
||||
CHECK TABLE v1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.v1 check error Table 'test.v1' doesn't exist
|
||||
test.v1 check Error Table 'test.v1' doesn't exist
|
||||
test.v1 check error Corrupt
|
||||
DESCRIBE v1;
|
||||
ERROR 42S02: Table 'test.v1' doesn't exist
|
||||
EXPLAIN SELECT * FROM v1;
|
||||
@ -10575,7 +10576,7 @@ f1 f2 f3 f4
|
||||
DELETE FROM t1;
|
||||
INSERT INTO v1 SET f2 = 'ABC';
|
||||
INSERT INTO v1 SET f2 = 'ABC';
|
||||
ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
|
||||
ERROR 23000: Duplicate entry '0' for key 1
|
||||
SELECT * from t1;
|
||||
f1 f2 f3 f4
|
||||
0 ABC NULL NULL
|
||||
@ -10644,7 +10645,7 @@ DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT f2, f3 FROM t1;
|
||||
INSERT INTO v1 SET f2 = 'ABC';
|
||||
INSERT INTO v1 SET f2 = 'ABC';
|
||||
ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
|
||||
ERROR 23000: Duplicate entry '0' for key 1
|
||||
SELECT * from t1;
|
||||
f1 f2 f3 f4
|
||||
0 ABC NULL NULL
|
||||
@ -10979,11 +10980,11 @@ f1 bigint(20) YES NULL
|
||||
f2 date YES NULL
|
||||
f4 char(5) YES NULL
|
||||
report char(10) YES NULL
|
||||
SELECT * FROM t1 order by f1, report;
|
||||
SELECT * FROM t1;
|
||||
f1 f2 f4 report
|
||||
-1 NULL ABC t1 0
|
||||
-1 NULL ABC v1 0
|
||||
SELECT * FROM v1 order by f1, report;
|
||||
SELECT * FROM v1;
|
||||
f1 f2 f4 report
|
||||
-1 NULL ABC t1 0
|
||||
-1 NULL ABC v1 0
|
||||
@ -11003,12 +11004,12 @@ f4x char(5) YES NULL
|
||||
report char(10) YES NULL
|
||||
DESCRIBE v1;
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
SELECT * FROM t1 order by f1, report;
|
||||
SELECT * FROM t1;
|
||||
f1 f2 f4x report
|
||||
-1 NULL ABC t1 0
|
||||
-1 NULL ABC v1 0
|
||||
0 NULL ABC t1 1
|
||||
SELECT * FROM v1 order by f1, report;
|
||||
SELECT * FROM v1;
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
ALTER TABLE t1 CHANGE COLUMN f4x f4 CHAR(5);
|
||||
ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(10);
|
||||
@ -11026,14 +11027,14 @@ f1 bigint(20) YES NULL
|
||||
f2 date YES NULL
|
||||
f4 char(10) YES NULL
|
||||
report char(10) YES NULL
|
||||
SELECT * FROM t1 order by f1, report;
|
||||
SELECT * FROM t1;
|
||||
f1 f2 f4 report
|
||||
-1 NULL ABC t1 0
|
||||
-1 NULL ABC v1 0
|
||||
0 NULL ABC t1 1
|
||||
2 NULL <-- 10 --> t1 2
|
||||
2 NULL <-- 10 --> v1 2
|
||||
SELECT * FROM v1 order by f1, report;
|
||||
SELECT * FROM v1;
|
||||
f1 f2 f4 report
|
||||
-1 NULL ABC t1 0
|
||||
-1 NULL ABC v1 0
|
||||
@ -11062,7 +11063,7 @@ f1 bigint(20) YES NULL
|
||||
f2 date YES NULL
|
||||
f4 char(8) YES NULL
|
||||
report char(10) YES NULL
|
||||
SELECT * FROM t1 order by f1, report;
|
||||
SELECT * FROM t1;
|
||||
f1 f2 f4 report
|
||||
-1 NULL ABC t1 0
|
||||
-1 NULL ABC v1 0
|
||||
@ -11071,7 +11072,7 @@ f1 f2 f4 report
|
||||
2 NULL <-- 10 - v1 2
|
||||
3 NULL <-- 10 - t1 3
|
||||
3 NULL <-- 10 - v1 3
|
||||
SELECT * FROM v1 order by f1, report;
|
||||
SELECT * FROM v1;
|
||||
f1 f2 f4 report
|
||||
-1 NULL ABC t1 0
|
||||
-1 NULL ABC v1 0
|
||||
@ -11095,7 +11096,7 @@ f1 bigint(20) YES NULL
|
||||
f2 date YES NULL
|
||||
f4 varchar(20) YES NULL
|
||||
report char(10) YES NULL
|
||||
SELECT * FROM t1 order by f1, report;
|
||||
SELECT * FROM t1;
|
||||
f1 f2 f4 report
|
||||
-1 NULL ABC t1 0
|
||||
-1 NULL ABC v1 0
|
||||
@ -11106,7 +11107,7 @@ f1 f2 f4 report
|
||||
3 NULL <-- 10 - v1 3
|
||||
4 NULL <------ 20 --------> t1 4
|
||||
4 NULL <------ 20 --------> v1 4
|
||||
SELECT * FROM v1 order by f1, report;
|
||||
SELECT * FROM v1;
|
||||
f1 f2 f4 report
|
||||
-1 NULL ABC t1 0
|
||||
-1 NULL ABC v1 0
|
||||
@ -11134,7 +11135,7 @@ f1 varchar(30) YES NULL
|
||||
f2 date YES NULL
|
||||
f4 varchar(20) YES NULL
|
||||
report char(10) YES NULL
|
||||
SELECT * FROM t1 order by f1, report;
|
||||
SELECT * FROM t1;
|
||||
f1 f2 f4 report
|
||||
-1 NULL ABC t1 0
|
||||
-1 NULL ABC v1 0
|
||||
@ -11147,7 +11148,7 @@ f1 f2 f4 report
|
||||
4 NULL <------ 20 --------> v1 4
|
||||
<------------- 30 -----------> NULL <------ 20 --------> t1 5
|
||||
<------------- 30 -----------> NULL <------ 20 --------> v1 5
|
||||
SELECT * FROM v1 order by f1, report;
|
||||
SELECT * FROM v1;
|
||||
f1 f2 f4 report
|
||||
-1 NULL ABC t1 0
|
||||
-1 NULL ABC v1 0
|
||||
@ -11171,7 +11172,7 @@ f4 varchar(20) YES NULL
|
||||
report char(10) YES NULL
|
||||
DESCRIBE v1;
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
SELECT * FROM t1 order by f1, report;
|
||||
SELECT * FROM t1;
|
||||
f1 f4 report
|
||||
-1 ABC t1 0
|
||||
-1 ABC v1 0
|
||||
@ -11185,7 +11186,7 @@ f1 f4 report
|
||||
<------------- 30 -----------> <------ 20 --------> t1 5
|
||||
<------------- 30 -----------> <------ 20 --------> v1 5
|
||||
ABC <------ 20 --------> t1 6
|
||||
SELECT * FROM v1 order by f1, report;
|
||||
SELECT * FROM v1;
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
ALTER TABLE t1 ADD COLUMN f2 DATE DEFAULT NULL;
|
||||
INSERT INTO t1 SET f1 = 'ABC', f2 = '1500-12-04',
|
||||
@ -11204,7 +11205,7 @@ f1 varchar(30) YES NULL
|
||||
f2 date YES NULL
|
||||
f4 varchar(20) YES NULL
|
||||
report char(10) YES NULL
|
||||
SELECT * FROM t1 order by f1, report;
|
||||
SELECT * FROM t1;
|
||||
f1 f4 report f2
|
||||
-1 ABC t1 0 NULL
|
||||
-1 ABC v1 0 NULL
|
||||
@ -11220,7 +11221,7 @@ f1 f4 report f2
|
||||
ABC <------ 20 --------> t1 6 NULL
|
||||
ABC <------ 20 --------> t1 7 1500-12-04
|
||||
ABC <------ 20 --------> v1 7 1500-12-04
|
||||
SELECT * FROM v1 order by f1, report;
|
||||
SELECT * FROM v1;
|
||||
f1 f2 f4 report
|
||||
-1 NULL ABC t1 0
|
||||
-1 NULL ABC v1 0
|
||||
@ -11254,7 +11255,7 @@ f1 varchar(30) YES NULL
|
||||
f2 float YES NULL
|
||||
f4 varchar(20) YES NULL
|
||||
report char(10) YES NULL
|
||||
SELECT * FROM t1 order by f1, report;
|
||||
SELECT * FROM t1;
|
||||
f1 f4 report f2
|
||||
-1 ABC t1 0 NULL
|
||||
-1 ABC v1 0 NULL
|
||||
@ -11269,10 +11270,10 @@ f1 f4 report f2
|
||||
<------------- 30 -----------> <------ 20 --------> v1 5 NULL
|
||||
ABC <------ 20 --------> t1 6 NULL
|
||||
ABC <------ 20 --------> t1 7 NULL
|
||||
ABC <------ 20 --------> t1 8 -0.00033
|
||||
ABC <------ 20 --------> v1 7 NULL
|
||||
ABC <------ 20 --------> t1 8 -0.00033
|
||||
ABC <------ 20 --------> v1 8 -0.00033
|
||||
SELECT * FROM v1 order by f1, report;
|
||||
SELECT * FROM v1;
|
||||
f1 f2 f4 report
|
||||
-1 NULL ABC t1 0
|
||||
-1 NULL ABC v1 0
|
||||
@ -11287,8 +11288,8 @@ f1 f2 f4 report
|
||||
<------------- 30 -----------> NULL <------ 20 --------> v1 5
|
||||
ABC NULL <------ 20 --------> t1 6
|
||||
ABC NULL <------ 20 --------> t1 7
|
||||
ABC -0.00033 <------ 20 --------> t1 8
|
||||
ABC NULL <------ 20 --------> v1 7
|
||||
ABC -0.00033 <------ 20 --------> t1 8
|
||||
ABC -0.00033 <------ 20 --------> v1 8
|
||||
ALTER TABLE t1 ADD COLUMN f3 NUMERIC(7,2);
|
||||
INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
|
||||
@ -11311,7 +11312,7 @@ f1 varchar(30) YES NULL
|
||||
f2 float YES NULL
|
||||
f4 varchar(20) YES NULL
|
||||
report char(10) YES NULL
|
||||
SELECT * FROM t1 order by f1, report;
|
||||
SELECT * FROM t1;
|
||||
f1 f4 report f2 f3
|
||||
-1 ABC t1 0 NULL NULL
|
||||
-1 ABC v1 0 NULL NULL
|
||||
@ -11326,12 +11327,12 @@ f1 f4 report f2 f3
|
||||
<------------- 30 -----------> <------ 20 --------> v1 5 NULL NULL
|
||||
ABC <------ 20 --------> t1 6 NULL NULL
|
||||
ABC <------ 20 --------> t1 7 NULL NULL
|
||||
ABC <------ 20 --------> t1 8 -0.00033 NULL
|
||||
ABC <------ 20 --------> t1 9 -0.00033 -2.20
|
||||
ABC <------ 20 --------> v1 7 NULL NULL
|
||||
ABC <------ 20 --------> t1 8 -0.00033 NULL
|
||||
ABC <------ 20 --------> v1 8 -0.00033 NULL
|
||||
ABC <------ 20 --------> t1 9 -0.00033 -2.20
|
||||
ABC <------ 20 --------> v1 9a -0.00033 NULL
|
||||
SELECT * FROM v1 order by f1, report;
|
||||
SELECT * FROM v1;
|
||||
f1 f2 f4 report
|
||||
-1 NULL ABC t1 0
|
||||
-1 NULL ABC v1 0
|
||||
@ -11346,10 +11347,10 @@ f1 f2 f4 report
|
||||
<------------- 30 -----------> NULL <------ 20 --------> v1 5
|
||||
ABC NULL <------ 20 --------> t1 6
|
||||
ABC NULL <------ 20 --------> t1 7
|
||||
ABC -0.00033 <------ 20 --------> t1 8
|
||||
ABC -0.00033 <------ 20 --------> t1 9
|
||||
ABC NULL <------ 20 --------> v1 7
|
||||
ABC -0.00033 <------ 20 --------> t1 8
|
||||
ABC -0.00033 <------ 20 --------> v1 8
|
||||
ABC -0.00033 <------ 20 --------> t1 9
|
||||
ABC -0.00033 <------ 20 --------> v1 9a
|
||||
DROP TABLE t1;
|
||||
DROP VIEW v1;
|
||||
@ -11364,10 +11365,10 @@ DESCRIBE v1;
|
||||
Field Type Null Key Default Extra
|
||||
f1 char(10) YES NULL
|
||||
my_sqrt double YES NULL
|
||||
SELECT * FROM t1 order by f1, f2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
ABC 3
|
||||
SELECT * FROM v1 order by 2;
|
||||
SELECT * FROM v1;
|
||||
f1 my_sqrt
|
||||
ABC 1.7320508075689
|
||||
ALTER TABLE t1 CHANGE COLUMN f2 f2 VARCHAR(30);
|
||||
@ -11380,21 +11381,21 @@ DESCRIBE v1;
|
||||
Field Type Null Key Default Extra
|
||||
f1 char(10) YES NULL
|
||||
my_sqrt double YES NULL
|
||||
SELECT * FROM t1 order by f1, f2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
ABC 3
|
||||
ABC DEF
|
||||
SELECT * FROM v1 order by 2;
|
||||
SELECT * FROM v1;
|
||||
f1 my_sqrt
|
||||
ABC 0
|
||||
ABC 1.7320508075689
|
||||
ABC 0
|
||||
SELECT SQRT('DEF');
|
||||
SQRT('DEF')
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'DEF'
|
||||
CREATE VIEW v2 AS SELECT SQRT('DEF');
|
||||
SELECT * FROM v2 order by 1;
|
||||
SELECT * FROM v2;
|
||||
SQRT('DEF')
|
||||
0
|
||||
Warnings:
|
||||
@ -11404,27 +11405,27 @@ DESCRIBE v2;
|
||||
Field Type Null Key Default Extra
|
||||
f1 char(10) YES NULL
|
||||
my_sqrt double YES NULL
|
||||
SELECT * FROM v2 order by 2;
|
||||
SELECT * FROM v2;
|
||||
f1 my_sqrt
|
||||
ABC 0
|
||||
ABC 1.7320508075689
|
||||
CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
|
||||
SELECT * FROM t2 order by 2;
|
||||
f1 my_sqrt
|
||||
ABC 0
|
||||
CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
|
||||
SELECT * FROM t2;
|
||||
f1 my_sqrt
|
||||
ABC 1.73205080756888
|
||||
ABC 0
|
||||
DROP TABLE t2;
|
||||
CREATE TABLE t2 AS SELECT * FROM v1;
|
||||
SELECT * FROM t2 order by 2;
|
||||
SELECT * FROM t2;
|
||||
f1 my_sqrt
|
||||
ABC 0
|
||||
ABC 1.73205080756888
|
||||
ABC 0
|
||||
DROP TABLE t2;
|
||||
CREATE TABLE t2 AS SELECT * FROM v2;
|
||||
SELECT * FROM t2 order by 2;
|
||||
SELECT * FROM t2;
|
||||
f1 my_sqrt
|
||||
ABC 0
|
||||
ABC 1.73205080756888
|
||||
ABC 0
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP VIEW v1;
|
||||
|
@ -273,7 +273,7 @@ let $message= Testcase 3.5.1.8:;
|
||||
|
||||
# Can't create a trigger in a different database
|
||||
use test;
|
||||
--error 1435
|
||||
--error 1146
|
||||
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
|
||||
for each row set @ret_trg6_2 = 5;
|
||||
|
||||
|
@ -606,7 +606,8 @@ let $col_type= my_year;
|
||||
|
||||
|
||||
# 1.1.6. CAST --> DECIMAL
|
||||
let $target_type= DECIMAL;
|
||||
# Set the following to (37,2) since the default was changed to (10,0) - OBN
|
||||
let $target_type= DECIMAL(37,2);
|
||||
#
|
||||
let $col_type= my_char_30;
|
||||
--source suite/funcs_1/views/fv_cast.inc
|
||||
|
Reference in New Issue
Block a user