mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-30 04:26:45 +03:00 
			
		
		
		
	Fixed compiler warnings String results in CREATE ... SELECT are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length myisam/myisampack.c: Indentation cleanup mysql-test/r/analyse.result: Update results for new varchar handling mysql-test/r/case.result: Update results for new varchar handling mysql-test/r/cast.result: Update results for new varchar handling mysql-test/r/create.result: Update results for new varchar handling mysql-test/r/ctype_mb.result: Update results for new varchar handling mysql-test/r/ctype_ucs.result: Update results for new varchar handling mysql-test/r/ctype_utf8.result: Update results for new varchar handling mysql-test/r/func_group.result: Update results for new varchar handling mysql-test/r/func_str.result: Update results for new varchar handling mysql-test/r/func_system.result: Update results for new varchar handling mysql-test/r/heap.result: Update results for new varchar handling mysql-test/r/heap_hash.result: Update results for new varchar handling mysql-test/r/information_schema.result: Update results for new varchar handling mysql-test/r/metadata.result: Update results for new varchar handling mysql-test/r/null.result: Update results for new varchar handling mysql-test/r/ps_2myisam.result: Update results for new varchar handling mysql-test/r/ps_3innodb.result: Update results for new varchar handling mysql-test/r/ps_4heap.result: Update results for new varchar handling mysql-test/r/ps_5merge.result: Update results for new varchar handling mysql-test/r/ps_6bdb.result: Update results for new varchar handling mysql-test/r/subselect.result: Update results for new varchar handling mysql-test/r/type_ranges.result: Update results for new varchar handling mysql-test/r/union.result: Update results for new varchar handling mysql-test/t/heap.test: Update results for new varchar handling mysql-test/t/type_ranges.test: Added extra test to test generated type for string functions sql/field.cc: Update results for new varchar handling sql/field.h: Update results for new varchar handling We have to use orig_table instead of table as 'table' may point to a new field in the created table sql/field_conv.cc: Update results for new varchar handling sql/ha_heap.cc: Indentation fixes sql/ha_innodb.cc: Update results for new varchar handling sql/item.cc: Update results for new varchar handling Remove compiler warnings String results in CREATE ... SELECT are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length sql/item.h: Update results for new varchar handling sql/item_func.cc: Update results for new varchar handling String results in CREATE ... SELECT are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length sql/item_func.h: ANALYZE now return VARCHAR columns sql/procedure.h: Update results for new varchar handling sql/sql_acl.cc: After merge fixes sql/sql_select.cc: Update results for new varchar handling String results in temporary tables are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length sql/sql_show.cc: After merge fixes sql/sql_table.cc: After merge fixes strings/ctype-tis620.c: After merge fixes tests/client_test.c: Fixed results, as in MySQL 5.0 strings in CREATE ... SELECT are creates VARCHAR columns
		
			
				
	
	
		
			71 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			71 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| select database();
 | |
| database()
 | |
| test
 | |
| select charset(database());
 | |
| charset(database())
 | |
| utf8
 | |
| select database() = "test";
 | |
| database() = "test"
 | |
| 1
 | |
| select database() = _utf8"test";
 | |
| database() = _utf8"test"
 | |
| 1
 | |
| select database() = _latin1"test";
 | |
| database() = _latin1"test"
 | |
| 1
 | |
| select user() like "%@%";
 | |
| user() like "%@%"
 | |
| 1
 | |
| select user() like _utf8"%@%";
 | |
| user() like _utf8"%@%"
 | |
| 1
 | |
| select user() like _latin1"%@%";
 | |
| user() like _latin1"%@%"
 | |
| 1
 | |
| select charset(user());
 | |
| charset(user())
 | |
| utf8
 | |
| select version()>="3.23.29";
 | |
| version()>="3.23.29"
 | |
| 1
 | |
| select version()>=_utf8"3.23.29";
 | |
| version()>=_utf8"3.23.29"
 | |
| 1
 | |
| select version()>=_latin1"3.23.29";
 | |
| version()>=_latin1"3.23.29"
 | |
| 1
 | |
| select charset(version());
 | |
| charset(version())
 | |
| utf8
 | |
| explain extended select database(), user();
 | |
| id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 | |
| 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
 | |
| Warnings:
 | |
| Note	1003	select sql_no_cache database() AS `database()`,user() AS `user()`
 | |
| create table t1 (version char(40)) select database(), user(), version() as 'version';
 | |
| show create table t1;
 | |
| Table	Create Table
 | |
| t1	CREATE TABLE `t1` (
 | |
|   `database()` varchar(34) character set utf8 default NULL,
 | |
|   `user()` varchar(77) character set utf8 NOT NULL default '',
 | |
|   `version` char(40) default NULL
 | |
| ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 | |
| drop table t1;
 | |
| select charset(charset(_utf8'a')), charset(collation(_utf8'a'));
 | |
| charset(charset(_utf8'a'))	charset(collation(_utf8'a'))
 | |
| utf8	utf8
 | |
| select collation(charset(_utf8'a')), collation(collation(_utf8'a'));
 | |
| collation(charset(_utf8'a'))	collation(collation(_utf8'a'))
 | |
| utf8_general_ci	utf8_general_ci
 | |
| create table t1 select charset(_utf8'a'), collation(_utf8'a');
 | |
| show create table t1;
 | |
| Table	Create Table
 | |
| t1	CREATE TABLE `t1` (
 | |
|   `charset(_utf8'a')` varchar(64) character set utf8 NOT NULL default '',
 | |
|   `collation(_utf8'a')` varchar(64) character set utf8 NOT NULL default ''
 | |
| ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 | |
| drop table t1;
 | |
| select TRUE,FALSE,NULL;
 | |
| TRUE	FALSE	NULL
 | |
| 1	0	NULL
 |