summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2006-01-06 00:47:49 +0200
committerunknown <monty@mysql.com>2006-01-06 00:47:49 +0200
commit64206b1850bc93c74f93c3e0dd2e2e909240fcda (patch)
treecd157631ca39d533f8aa37ebb570f304e91c81e2 /mysql-test/r
parentbca61bcfde103f2e8bf7b20c436951f3b81a019b (diff)
downloadmariadb-git-64206b1850bc93c74f93c3e0dd2e2e909240fcda.tar.gz
Review fixes of new pushed code
- Fixed tests - Optimized new code - Fixed some unlikely core dumps - Better bug fixes for: - #14397 - OPTIMIZE TABLE with an open HANDLER causes a crash - #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null mysql-test/r/create.result: Update results after removing wrong warnings for CREATE ... SELECT New tests mysql-test/r/handler.result: Drop used tables mysql-test/r/kill.result: Make test portable mysql-test/r/mysqlshow.result: Drop tables used by previous test mysql-test/r/trigger.result: Reuse old procedure name mysql-test/r/view.result: Extra tests mysql-test/t/create.test: New tests to test fix of removing wrong warnings for CREATE ... SELECT mysql-test/t/disabled.def: Enable 'kill' test (should now be portable) mysql-test/t/handler.test: Drop used tables mysql-test/t/kill.test: Make test portable even if kill doesn't work at once mysql-test/t/mysqlshow.test: Drop tables used by previous test mysql-test/t/trigger.test: Reuse old procedure name mysql-test/t/view.test: Extra tests sql/field.cc: Removed compiler warning sql/ha_federated.cc: my_snprintf -> strmake() (Simple optimization) sql/ha_ndbcluster.cc: Indentation cleanups and trival optimization sql/item.cc: Moved save_org_in_field() to item.cc to make it easier to test Remove setting of null_value as this is not needed sql/item.h: Moved save_org_in_field() to item.cc to make it easier to test sql/log_event.cc: Remove inline of slave_load_file_stem() Added 'extension' parameter to slave_load_file_stem() to get smaller code Removed not critical (or needed) DBUG_ASSERT()'s Cleaned up usage of slave_load_file_stem() to not depend on constant string lengths Indentation fixes sql/opt_range.cc: Moved code from declaration to function body (To make it more readable) sql/parse_file.cc: Fixed DBUG_PRINT sql/sp.cc: Simple cleanups - Removed not needed {} level - Ensure saved variables starts with old_ sql/sp_head.cc: Indentation fixes Remove core dump when using --debug when m_next_cached_sp == 0 Fixed compiler warnings Trivial optimizations sql/sp_head.h: Changed argument to set_definer() to const Added THD argument to recursion_level_error() to avoid call to current_thd sql/sql_acl.cc: Removed not needed test (first_not_own_table is the guard) sql/sql_base.cc: Removed extra empty line sql/sql_handler.cc: Don't test table version in mysql_ha_read() as this is already tested in lock_tables() Moved call to insert_fields to be after lock_table() to guard aganst reopen of tables (Better fix for Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash) sql/sql_insert.cc: Mark fields that are set in CREATE ... SELECT as used (Removed wrong warnings about field not having a default value) sql/sql_parse.cc: Removed not needed test of 'tables' (first_not_own_table is the guard) Simplify code sql/sql_select.cc: Use group->field to check if value is null instead of item called by 'save_org_in_field' This is a better bug fix for #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null) sql/sql_trigger.cc: Move sql_modes_parameters outside of function Indentation fixes Fixed compiler warning Ensure that thd->lex->query_tables_own_last is set properly before calling check_table_access() (This allows us to remove the extra test in check_grant() and check_table_access())
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/create.result41
-rw-r--r--mysql-test/r/handler.result2
-rw-r--r--mysql-test/r/kill.result2
-rw-r--r--mysql-test/r/mysqlshow.result2
-rw-r--r--mysql-test/r/trigger.result7
-rw-r--r--mysql-test/r/view.result3
6 files changed, 35 insertions, 22 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index a201af78518..199fdd1eb5d 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -287,7 +287,6 @@ a b
create table if not exists t1 select 3 as 'a',4 as 'b';
Warnings:
Note 1050 Table 't1' already exists
-Warning 1364 Field 'a' doesn't have a default value
create table if not exists t1 select 3 as 'a',3 as 'b';
ERROR 23000: Duplicate entry '3' for key 1
select * from t1;
@@ -645,8 +644,6 @@ create table t1 (
a varchar(112) charset utf8 collate utf8_bin not null,
primary key (a)
) select 'test' as a ;
-Warnings:
-Warning 1364 Field 'a' doesn't have a default value
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -662,14 +659,39 @@ create table t1 (
a varchar(12) charset utf8 collate utf8_bin not null,
b int not null, primary key (a)
) select a, 1 as b from t2 ;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(12) character set utf8 collate utf8_bin NOT NULL,
+ `b` int(11) NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+create table t1 (
+a varchar(12) charset utf8 collate utf8_bin not null,
+b int not null, primary key (a)
+) select a, 1 as c from t2 ;
Warnings:
-Warning 1364 Field 'a' doesn't have a default value
Warning 1364 Field 'b' doesn't have a default value
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(12) character set utf8 collate utf8_bin NOT NULL,
`b` int(11) NOT NULL,
+ `a` varchar(12) character set utf8 collate utf8_bin NOT NULL,
+ `c` bigint(1) NOT NULL default '0',
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+create table t1 (
+a varchar(12) charset utf8 collate utf8_bin not null,
+b int null, primary key (a)
+) select a, 1 as c from t2 ;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `b` int(11) default NULL,
+ `a` varchar(12) character set utf8 collate utf8_bin NOT NULL,
+ `c` bigint(1) NOT NULL default '0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -677,9 +699,6 @@ create table t1 (
a varchar(12) charset utf8 collate utf8_bin not null,
b int not null, primary key (a)
) select 'a' as a , 1 as b from t2 ;
-Warnings:
-Warning 1364 Field 'a' doesn't have a default value
-Warning 1364 Field 'b' doesn't have a default value
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -692,8 +711,6 @@ create table t1 (
a varchar(12) charset utf8 collate utf8_bin,
b int not null, primary key (a)
) select 'a' as a , 1 as b from t2 ;
-Warnings:
-Warning 1364 Field 'b' doesn't have a default value
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -712,8 +729,6 @@ a1 varchar(12) charset utf8 collate utf8_bin not null,
a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
primary key (a1)
) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
-Warnings:
-Warning 1364 Field 'a1' doesn't have a default value
drop table t2;
create table t2 (
a1 varchar(12) charset utf8 collate utf8_bin,
@@ -729,8 +744,6 @@ a1 varchar(12) charset utf8 collate utf8_bin not null,
a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
primary key (a1)
) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
-Warnings:
-Warning 1364 Field 'a1' doesn't have a default value
drop table t2;
create table t2 ( a int default 3, b int default 3)
select a1,a2 from t1;
diff --git a/mysql-test/r/handler.result b/mysql-test/r/handler.result
index 133683fb273..104025e83eb 100644
--- a/mysql-test/r/handler.result
+++ b/mysql-test/r/handler.result
@@ -1,4 +1,4 @@
-drop table if exists t1;
+drop table if exists t1,t3,t4,t5;
create table t1 (a int, b char(10), key a(a), key b(a,b));
insert into t1 values
(17,"ddd"),(18,"eee"),(19,"fff"),(19,"yyy"),
diff --git a/mysql-test/r/kill.result b/mysql-test/r/kill.result
index 754568093ff..2413834be4f 100644
--- a/mysql-test/r/kill.result
+++ b/mysql-test/r/kill.result
@@ -5,8 +5,6 @@ select ((@id := kill_id) - kill_id) from t1;
((@id := kill_id) - kill_id)
0
kill @id;
-select 1;
-Got one of the listed errors
select ((@id := kill_id) - kill_id) from t1;
((@id := kill_id) - kill_id)
0
diff --git a/mysql-test/r/mysqlshow.result b/mysql-test/r/mysqlshow.result
index 355c20fdad3..942cde83f21 100644
--- a/mysql-test/r/mysqlshow.result
+++ b/mysql-test/r/mysqlshow.result
@@ -1,4 +1,4 @@
-DROP TABLE IF EXISTS t1,t2;
+DROP TABLE IF EXISTS t1,t2,test1,test2;
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1),(2),(3);
CREATE TABLE t2 (a int, b int);
diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result
index ff92fc543d4..0ad5c485b28 100644
--- a/mysql-test/r/trigger.result
+++ b/mysql-test/r/trigger.result
@@ -767,8 +767,7 @@ deallocate prepare stmt1;
drop procedure p1;
drop table t1, t2, t3;
create table t1 (a int);
-drop procedure if exists p2;
-CREATE PROCEDURE `p2`()
+CREATE PROCEDURE `p1`()
begin
insert into t1 values (1);
end//
@@ -777,6 +776,6 @@ begin
declare done int default 0;
set done= not done;
end//
-CALL p2();
-drop procedure p2;
+CALL p1();
+drop procedure p1;
drop table t1;
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index ebb2c190eb1..c26671ac937 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -2418,6 +2418,9 @@ drop view v1;
drop table t1;
create table t1(f1 int, f2 int);
insert into t1 values (null, 10), (null,2);
+select f1, sum(f2) from t1 group by f1;
+f1 sum(f2)
+NULL 12
create view v1 as select * from t1;
select f1, sum(f2) from v1 group by f1;
f1 sum(f2)