summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@sun.com>2009-02-06 13:09:01 +0300
committerAlexey Kopytov <Alexey.Kopytov@sun.com>2009-02-06 13:09:01 +0300
commitc84fa38855adbf50dd9dee2c32c52e43007e112d (patch)
tree0594f1e1f4fd80619abb6973e5b19303bcdf27c7
parenta9004eb47243af08980118ae2e71330469aee483 (diff)
parenta03d62fd010c4143f9da98d25ccbfa46e64bab06 (diff)
downloadmariadb-git-c84fa38855adbf50dd9dee2c32c52e43007e112d.tar.gz
Merge from team tree.
-rw-r--r--mysql-test/r/status.result2
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_09.result3
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_09.result3
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_09.result3
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_trig_09.result3
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_09.inc1
-rw-r--r--mysql-test/suite/parts/inc/partition_auto_increment.inc10
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_blackhole.result2
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_innodb.result8
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_memory.result8
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_myisam.result8
-rw-r--r--mysql-test/suite/parts/r/partition_auto_increment_ndb.result8
-rw-r--r--mysql-test/t/status.test29
13 files changed, 52 insertions, 36 deletions
diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result
index b76109a3d0e..ca815540c29 100644
--- a/mysql-test/r/status.result
+++ b/mysql-test/r/status.result
@@ -196,7 +196,7 @@ create table db37908.t1(f1 int);
insert into db37908.t1 values(1);
grant usage,execute on test.* to mysqltest_1@localhost;
create procedure proc37908() begin select 1; end |
-create function func37908() returns int sql security invoker
+create function func37908() returns int sql security invoker
return (select * from db37908.t1 limit 1)|
select * from db37908.t1;
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't1'
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_09.result b/mysql-test/suite/funcs_1/r/innodb_trig_09.result
index b2ed4321a8f..986506b4e71 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_09.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_09.result
@@ -187,7 +187,8 @@ a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
0 0 0 0 0 0
Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
-ERROR 23000: Column 'f136' cannot be null
+Warnings:
+Warning 1048 Column 'f136' cannot be null
Update tb3 Set f122='Test 3.5.9.4-trig', f136=0, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
select f118, f121, f122, f136, f151, f163 from tb3
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_09.result b/mysql-test/suite/funcs_1/r/memory_trig_09.result
index aa9d93403dd..0795c3be36f 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_09.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_09.result
@@ -188,7 +188,8 @@ a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
0 0 0 0 0 0
Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
-ERROR 23000: Column 'f136' cannot be null
+Warnings:
+Warning 1048 Column 'f136' cannot be null
Update tb3 Set f122='Test 3.5.9.4-trig', f136=0, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
select f118, f121, f122, f136, f151, f163 from tb3
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_09.result b/mysql-test/suite/funcs_1/r/myisam_trig_09.result
index aa9d93403dd..0795c3be36f 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_09.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_09.result
@@ -188,7 +188,8 @@ a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
0 0 0 0 0 0
Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
-ERROR 23000: Column 'f136' cannot be null
+Warnings:
+Warning 1048 Column 'f136' cannot be null
Update tb3 Set f122='Test 3.5.9.4-trig', f136=0, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
select f118, f121, f122, f136, f151, f163 from tb3
diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_09.result b/mysql-test/suite/funcs_1/r/ndb_trig_09.result
index b2ed4321a8f..986506b4e71 100644
--- a/mysql-test/suite/funcs_1/r/ndb_trig_09.result
+++ b/mysql-test/suite/funcs_1/r/ndb_trig_09.result
@@ -187,7 +187,8 @@ a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
0 0 0 0 0 0
Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
-ERROR 23000: Column 'f136' cannot be null
+Warnings:
+Warning 1048 Column 'f136' cannot be null
Update tb3 Set f122='Test 3.5.9.4-trig', f136=0, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
select f118, f121, f122, f136, f151, f163 from tb3
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_09.inc b/mysql-test/suite/funcs_1/triggers/triggers_09.inc
index c20553a9435..47277afb63c 100644
--- a/mysql-test/suite/funcs_1/triggers/triggers_09.inc
+++ b/mysql-test/suite/funcs_1/triggers/triggers_09.inc
@@ -183,7 +183,6 @@ let $message= Testcase 3.5.9.4:;
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
--enable_query_log
---error ER_BAD_NULL_ERROR
Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
diff --git a/mysql-test/suite/parts/inc/partition_auto_increment.inc b/mysql-test/suite/parts/inc/partition_auto_increment.inc
index 5e9ad47aa2e..26375c72c0c 100644
--- a/mysql-test/suite/parts/inc/partition_auto_increment.inc
+++ b/mysql-test/suite/parts/inc/partition_auto_increment.inc
@@ -50,12 +50,7 @@ if (!$skip_update)
UPDATE t1 SET c1 = 40 WHERE c1 = 50;
SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
AND TABLE_NAME='t1';
- -- error 0, ER_BAD_NULL_ERROR
UPDATE t1 SET c1 = NULL WHERE c1 = 4;
-if (!$mysql_errno)
-{
- echo # ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY;
-}
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
}
@@ -203,12 +198,7 @@ if (!$skip_update)
UPDATE t1 SET c1 = 140 WHERE c1 = 150;
SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
AND TABLE_NAME='t1';
- -- error 0, ER_BAD_NULL_ERROR
UPDATE t1 SET c1 = NULL WHERE c1 = 4;
-if (!$mysql_errno)
-{
- echo # ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY;
-}
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
}
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result b/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
index 1946ebbf978..ac39d038c56 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
@@ -43,7 +43,6 @@ SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
AUTO_INCREMENT
1
UPDATE t1 SET c1 = NULL WHERE c1 = 4;
-# ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1 ORDER BY c1;
@@ -192,7 +191,6 @@ SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
AUTO_INCREMENT
1
UPDATE t1 SET c1 = NULL WHERE c1 = 4;
-# ERROR (only OK if Blackhole) should give ER_DUP_KEY or ER_DUP_ENTRY
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1 ORDER BY c1;
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result
index a30dfbcbe72..9a23cd4364e 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result
@@ -42,12 +42,14 @@ SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
AUTO_INCREMENT
31
UPDATE t1 SET c1 = NULL WHERE c1 = 4;
+Warnings:
+Warning 1048 Column 'c1' cannot be null
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1 ORDER BY c1;
c1
+0
2
-4
5
6
10
@@ -215,12 +217,14 @@ SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
AUTO_INCREMENT
141
UPDATE t1 SET c1 = NULL WHERE c1 = 4;
+Warnings:
+Warning 1048 Column 'c1' cannot be null
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1 ORDER BY c1;
c1
+0
2
-4
5
6
9
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_memory.result b/mysql-test/suite/parts/r/partition_auto_increment_memory.result
index 96925d206f6..77bab79f020 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_memory.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_memory.result
@@ -42,12 +42,14 @@ SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
AUTO_INCREMENT
52
UPDATE t1 SET c1 = NULL WHERE c1 = 4;
+Warnings:
+Warning 1048 Column 'c1' cannot be null
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1 ORDER BY c1;
c1
+0
2
-4
5
6
10
@@ -214,12 +216,14 @@ SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
AUTO_INCREMENT
152
UPDATE t1 SET c1 = NULL WHERE c1 = 4;
+Warnings:
+Warning 1048 Column 'c1' cannot be null
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1 ORDER BY c1;
c1
+0
2
-4
5
6
9
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result
index 204c241cfa8..b5b001ec17a 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result
@@ -42,12 +42,14 @@ SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
AUTO_INCREMENT
52
UPDATE t1 SET c1 = NULL WHERE c1 = 4;
+Warnings:
+Warning 1048 Column 'c1' cannot be null
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1 ORDER BY c1;
c1
+0
2
-4
5
6
10
@@ -214,12 +216,14 @@ SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
AUTO_INCREMENT
152
UPDATE t1 SET c1 = NULL WHERE c1 = 4;
+Warnings:
+Warning 1048 Column 'c1' cannot be null
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1 ORDER BY c1;
c1
+0
2
-4
5
6
9
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_ndb.result b/mysql-test/suite/parts/r/partition_auto_increment_ndb.result
index 85e226b749b..408f32cce78 100644
--- a/mysql-test/suite/parts/r/partition_auto_increment_ndb.result
+++ b/mysql-test/suite/parts/r/partition_auto_increment_ndb.result
@@ -43,12 +43,14 @@ SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
AUTO_INCREMENT
52
UPDATE t1 SET c1 = NULL WHERE c1 = 4;
+Warnings:
+Warning 1048 Column 'c1' cannot be null
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1 ORDER BY c1;
c1
+0
2
-4
5
6
10
@@ -215,12 +217,14 @@ SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test'
AUTO_INCREMENT
152
UPDATE t1 SET c1 = NULL WHERE c1 = 4;
+Warnings:
+Warning 1048 Column 'c1' cannot be null
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1 ORDER BY c1;
c1
+0
2
-4
5
6
9
diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test
index f487f0695a3..69ae56ff9a2 100644
--- a/mysql-test/t/status.test
+++ b/mysql-test/t/status.test
@@ -4,6 +4,9 @@
# embedded server causes different stat
-- source include/not_embedded.inc
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
# Disable concurrent inserts to avoid sporadic test failures as it might
# affect the the value of variables used throughout the test case.
set @old_concurrent_insert= @@global.concurrent_insert;
@@ -88,7 +91,7 @@ show status like 'last_query_cost';
drop table t1;
#
-# Test for Bug #15933 max_used_connections is wrong after FLUSH STATUS
+# Test for Bug#15933 max_used_connections is wrong after FLUSH STATUS
# if connections are cached
#
#
@@ -188,7 +191,7 @@ disconnect con1;
#
-# Bug #30377: EXPLAIN loses last_query_cost when used with UNION
+# Bug#30377 EXPLAIN loses last_query_cost when used with UNION
#
CREATE TABLE t1 ( a INT );
@@ -241,7 +244,7 @@ eval select substring_index('$rnd_next2',0x9,-1)-substring_index('$rnd_next',0x9
disconnect con1;
connection default;
-#
+#
# Bug#30252 Com_create_function is not incremented.
#
flush status;
@@ -261,7 +264,7 @@ drop function f1;
show status like 'Com%function';
#
-# Bug#37908: Skipped access right check caused server crash.
+# Bug#37908 Skipped access right check caused server crash.
#
connect (root, localhost, root,,test);
connection root;
@@ -273,20 +276,20 @@ insert into db37908.t1 values(1);
grant usage,execute on test.* to mysqltest_1@localhost;
delimiter |;
create procedure proc37908() begin select 1; end |
-create function func37908() returns int sql security invoker
+create function func37908() returns int sql security invoker
return (select * from db37908.t1 limit 1)|
delimiter ;|
-
+
connect (user1,localhost,mysqltest_1,,test);
connection user1;
---error 1142
+--error ER_TABLEACCESS_DENIED_ERROR
select * from db37908.t1;
---error 1142
+--error ER_TABLEACCESS_DENIED_ERROR
show status where variable_name ='uptime' and 2 in (select * from db37908.t1);
---error 1142
+--error ER_TABLEACCESS_DENIED_ERROR
show procedure status where name ='proc37908' and 1 in (select f1 from db37908.t1);
---error 1142
+--error ER_TABLEACCESS_DENIED_ERROR
show function status where name ='func37908' and 1 in (select func37908());
connection default;
@@ -297,6 +300,8 @@ drop procedure proc37908;
drop function func37908;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost;
DROP USER mysqltest_1@localhost;
+# Wait till we reached the initial number of concurrent sessions
+--source include/wait_until_count_sessions.inc
#
# Bug#41131 "Questions" fails to increment - ignores statements instead stored procs
@@ -339,3 +344,7 @@ DROP FUNCTION f1;
# Restore global concurrent_insert value. Keep in the end of the test file.
--connection default
set @@global.concurrent_insert= @old_concurrent_insert;
+
+# Wait till we reached the initial number of concurrent sessions
+--source include/wait_until_count_sessions.inc
+