Commit 644efa51 authored by unknown's avatar unknown
Browse files

after merge fix


mysql-test/r/strict.result:
  Auto merged
mysql-test/r/type_ranges.result:
  Auto merged
mysql-test/t/strict.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
mysql-test/r/information_schema.result:
  manual merge
mysql-test/t/information_schema.test:
  manual merge
parents 52078846 fc2e96ee
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -1162,3 +1162,16 @@ select user,db from information_schema.processlist;
user	db
user3148	test
drop user user3148@localhost;
grant select on test.* to mysqltest_1@localhost;
create table t1 (id int);
create view v1 as select * from t1;
create definer = mysqltest_1@localhost
sql security definer view v2 as select 1;
select * from information_schema.views
where table_name='v1' or table_name='v2';
TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	VIEW_DEFINITION	CHECK_OPTION	IS_UPDATABLE	DEFINER	SECURITY_TYPE
NULL	test	v1		NONE	YES	root@localhost	DEFINER
NULL	test	v2	select 1 AS `1`	NONE	NO	mysqltest_1@localhost	DEFINER
drop view v1, v2;
drop table t1;
drop user mysqltest_1@localhost;
+10 −0
Original line number Diff line number Diff line
@@ -1288,3 +1288,13 @@ ERROR 22001: Data too long for column 'a' at row 1
select * from t1;
a
drop table t1;
set sql_mode='traditional';
create table t1 (date date not null);
create table t2 select date from t1;
show create table t2;
Table	Create Table
t2	CREATE TABLE `t2` (
  `date` date NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t2,t1;
set @@sql_mode= @org_mode;
+2 −2
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ Field Type Collation Null Key Default Extra Privileges Comment
auto	int(5) unsigned	NULL	NO		0		#	
string	char(10)	latin1_swedish_ci	YES		newdefault		#	
tiny	tinyint(4)	NULL	NO		0		#	
short	smallint(6)	NULL	NO		0		#	
short	smallint(6)	NULL	NO				#	
medium	mediumint(8)	NULL	NO		0		#	
long_int	int(11)	NULL	NO		0		#	
longlong	bigint(13)	NULL	NO		0		#	
@@ -259,7 +259,7 @@ date_time datetime NULL YES NULL #
new_blob_col	varchar(20)	latin1_swedish_ci	YES		NULL		#	
tinyblob_col	tinyblob	NULL	YES		NULL		#	
mediumblob_col	mediumblob	NULL	NO				#	
options	enum('one','two','tree')	latin1_swedish_ci	NO		one		#	
options	enum('one','two','tree')	latin1_swedish_ci	NO				#	
flags	set('one','two','tree')	latin1_swedish_ci	NO				#	
new_field	char(10)	latin1_swedish_ci	NO		new		#	
select t1.auto,t2.auto from t1,t2 where t1.auto=t2.auto and ((t1.string<>t2.string and (t1.string is not null or t2.string is not null)) or (t1.tiny<>t2.tiny and (t1.tiny is not null or t2.tiny is not null)) or (t1.short<>t2.short and (t1.short is not null or t2.short is not null)) or (t1.medium<>t2.medium and (t1.medium is not null or t2.medium is not null)) or (t1.long_int<>t2.long_int and (t1.long_int is not null or t2.long_int is not null)) or (t1.longlong<>t2.longlong and (t1.longlong is not null or t2.longlong is not null)) or (t1.real_float<>t2.real_float and (t1.real_float is not null or t2.real_float is not null)) or (t1.real_double<>t2.real_double and (t1.real_double is not null or t2.real_double is not null)) or (t1.utiny<>t2.utiny and (t1.utiny is not null or t2.utiny is not null)) or (t1.ushort<>t2.ushort and (t1.ushort is not null or t2.ushort is not null)) or (t1.umedium<>t2.umedium and (t1.umedium is not null or t2.umedium is not null)) or (t1.ulong<>t2.ulong and (t1.ulong is not null or t2.ulong is not null)) or (t1.ulonglong<>t2.ulonglong and (t1.ulonglong is not null or t2.ulonglong is not null)) or (t1.time_stamp<>t2.time_stamp and (t1.time_stamp is not null or t2.time_stamp is not null)) or (t1.date_field<>t2.date_field and (t1.date_field is not null or t2.date_field is not null)) or (t1.time_field<>t2.time_field and (t1.time_field is not null or t2.time_field is not null)) or (t1.date_time<>t2.date_time and (t1.date_time is not null or t2.date_time is not null)) or (t1.new_blob_col<>t2.new_blob_col and (t1.new_blob_col is not null or t2.new_blob_col is not null)) or (t1.tinyblob_col<>t2.tinyblob_col and (t1.tinyblob_col is not null or t2.tinyblob_col is not null)) or (t1.mediumblob_col<>t2.mediumblob_col and (t1.mediumblob_col is not null or t2.mediumblob_col is not null)) or (t1.options<>t2.options and (t1.options is not null or t2.options is not null)) or (t1.flags<>t2.flags and (t1.flags is not null or t2.flags is not null)) or (t1.new_field<>t2.new_field and (t1.new_field is not null or t2.new_field is not null)));
+18 −0
Original line number Diff line number Diff line
@@ -846,4 +846,22 @@ select user,db from information_schema.processlist;
connection default;
drop user user3148@localhost;

#
# Bug#16681 information_schema shows forbidden VIEW details
#
grant select on test.* to mysqltest_1@localhost;
create table t1 (id int);
create view v1 as select * from t1;
create definer = mysqltest_1@localhost
sql security definer view v2 as select 1;

connect (con16681,localhost,mysqltest_1,,test);
connection con16681;

select * from information_schema.views
where table_name='v1' or table_name='v2';
connection default;
drop view v1, v2;
drop table t1;
drop user mysqltest_1@localhost;
+10 −0
Original line number Diff line number Diff line
@@ -1145,3 +1145,13 @@ create table t1(a bit(2));
insert into t1 values(b'101');
select * from t1;
drop table t1;

#
# Bug#17626 CREATE TABLE ... SELECT failure with TRADITIONAL SQL mode
#
set sql_mode='traditional';
create table t1 (date date not null);
create table t2 select date from t1;
show create table t2;
drop table t2,t1;
set @@sql_mode= @org_mode;
Loading