mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
83c02f3237
- Fixed code that was not ready for a major version number > 9 - Fixed test cases that assumed max major version number could be 9 Updated version number for depricated options (will be removed in a later commit) VERSION: Version number 10.0.0 client/mysqlbinlog.cc: Added support for major version numbers > 9 cmake/mysql_version.cmake: Added support for version numbers that is 0 mysql-test/r/comments.result: Modified test to handle version number 100000 mysql-test/r/func_system.result: Modified test to handle version number 100000 mysql-test/r/log_state.result: Updated depricated error message mysql-test/r/sp.result: Modified test to handle version number 100000 mysql-test/r/subselect4.result: Updated depricated error message mysql-test/r/variables.result: Updated depricated error message mysql-test/suite/rpl/r/rpl_conditional_comments.result: Modified test to handle version number 100000 mysql-test/suite/rpl/r/rpl_loaddatalocal.result: Modified test to handle version number 100000 mysql-test/suite/rpl/t/rpl_conditional_comments.test: Modified test to handle version number 100000 mysql-test/suite/rpl/t/rpl_loaddatalocal.test: Modified test to handle version number 100000 mysql-test/suite/sys_vars/r/debug_basic.result: Updated depricated error message mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result: Updated depricated error message mysql-test/suite/sys_vars/r/log_basic.result: Updated depricated error message mysql-test/suite/sys_vars/r/log_slow_queries_basic.result: Updated depricated error message mysql-test/suite/sys_vars/r/multi_range_count_basic.result: Updated depricated error message mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic.result: Updated depricated error message mysql-test/suite/sys_vars/r/sql_big_selects_func.result: Updated depricated error message mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result: Updated depricated error message mysql-test/suite/sys_vars/r/sql_max_join_size_func.result: Updated depricated error message mysql-test/t/comments.test: Modified test to handle version number 100000 mysql-test/t/file_contents.test: Modified test to handle version number 100000 mysql-test/t/func_system.test: Modified test to handle version number 100000 mysql-test/t/parser_not_embedded.test: Modified test to handle version number 100000 mysql-test/t/sp.test: Modified test to handle version number 100000 sql/mysqld.cc: Updated version number for depricated options (will be removed in a later commit) sql/slave.cc: Modified test to handle version number 100000 Better error messages sql/sql_lex.cc: Modified test to handle version number 100000 in comment syntax sql/sys_vars.cc: Updated version number for depricated options (will be removed in a later commit)
97 lines
2.6 KiB
Text
97 lines
2.6 KiB
Text
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()>="03.23.29";
|
|
version()>="03.23.29"
|
|
1
|
|
select version()>=_utf8"03.23.29";
|
|
version()>=_utf8"03.23.29"
|
|
1
|
|
select version()>=_latin1"03.23.29";
|
|
version()>=_latin1"03.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 filtered Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select database() AS `database()`,user() AS `user()`
|
|
create table t1 (version char(60)) 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(60) 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
|
|
create table t1 (c1 char(5)) character set=latin1;
|
|
insert into t1 values('row 1');
|
|
insert into t1 values('row 2');
|
|
insert into t1 values('row 3');
|
|
select concat(user(), '--', c1) from t1;
|
|
concat(user(), '--', c1)
|
|
root@localhost--row 1
|
|
root@localhost--row 2
|
|
root@localhost--row 3
|
|
select concat(database(), '--', c1) from t1;
|
|
concat(database(), '--', c1)
|
|
test--row 1
|
|
test--row 2
|
|
test--row 3
|
|
drop table t1;
|
|
create table t1 (a char(10)) character set latin1;
|
|
select * from t1 where a=version();
|
|
a
|
|
select * from t1 where a=database();
|
|
a
|
|
select * from t1 where a=user();
|
|
a
|
|
insert into t1 values ('a');
|
|
select left(concat(a,version()),1) from t1;
|
|
left(concat(a,version()),1)
|
|
a
|
|
drop table t1;
|