mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
after merge fixes
strings/my_vsnprintf.c: %.#s support in my_vsnprintf BitKeeper/etc/ignore: Added EXCEPTIONS-CLIENT to the ignore list
This commit is contained in:
@ -613,7 +613,6 @@ show_failed_diff ()
|
||||
echo "http://www.mysql.com/doc/en/Reporting_mysqltest_bugs.html"
|
||||
echo "to find the reason to this problem and how to report this."
|
||||
echo ""
|
||||
echo "Test $1 failed!"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -478,7 +478,7 @@ alter table t1 drop key a;
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
alter table t1 rename to `t1\\`;
|
||||
Incorrect table name 't1\\'
|
||||
ERROR 42000: Incorrect table name 't1\\'
|
||||
rename table t1 to `t1\\`;
|
||||
Incorrect table name 't1\\'
|
||||
ERROR 42000: Incorrect table name 't1\\'
|
||||
drop table t1;
|
||||
|
@ -43,7 +43,7 @@ Warnings:
|
||||
Note 1003 select abs(-(10)) AS `abs(-10)`,sign(-(5)) AS `sign(-5)`,sign(5) AS `sign(5)`,sign(0) AS `sign(0)`
|
||||
select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
|
||||
log(exp(10)) exp(log(sqrt(10))*2) log(-1) log(NULL) log(1,1) log(3,9) log(-1,2) log(NULL,2)
|
||||
10.000000 10.000000 NULL NULL NULL 2.000000 NULL NULL
|
||||
10 10 NULL NULL NULL 2 NULL NULL
|
||||
explain extended select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
|
||||
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
|
||||
@ -51,7 +51,7 @@ Warnings:
|
||||
Note 1003 select log(exp(10)) AS `log(exp(10))`,exp((log(sqrt(10)) * 2)) AS `exp(log(sqrt(10))*2)`,log(-(1)) AS `log(-1)`,log(NULL) AS `log(NULL)`,log(1,1) AS `log(1,1)`,log(3,9) AS `log(3,9)`,log(-(1),2) AS `log(-1,2)`,log(NULL,2) AS `log(NULL,2)`
|
||||
select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL);
|
||||
ln(exp(10)) exp(ln(sqrt(10))*2) ln(-1) ln(0) ln(NULL)
|
||||
10.000000 10.000000 NULL NULL NULL
|
||||
10 10 NULL NULL NULL
|
||||
explain extended select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL);
|
||||
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
|
||||
@ -59,7 +59,7 @@ Warnings:
|
||||
Note 1003 select ln(exp(10)) AS `ln(exp(10))`,exp((ln(sqrt(10)) * 2)) AS `exp(ln(sqrt(10))*2)`,ln(-(1)) AS `ln(-1)`,ln(0) AS `ln(0)`,ln(NULL) AS `ln(NULL)`
|
||||
select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
|
||||
log2(8) log2(15) log2(-2) log2(0) log2(NULL)
|
||||
3.000000 3.906891 NULL NULL NULL
|
||||
3 3.9068905956085 NULL NULL NULL
|
||||
explain extended select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
|
||||
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
|
||||
@ -67,7 +67,7 @@ Warnings:
|
||||
Note 1003 select log2(8) AS `log2(8)`,log2(15) AS `log2(15)`,log2(-(2)) AS `log2(-2)`,log2(0) AS `log2(0)`,log2(NULL) AS `log2(NULL)`
|
||||
select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
|
||||
log10(100) log10(18) log10(-4) log10(0) log10(NULL)
|
||||
2.000000 1.255273 NULL NULL NULL
|
||||
2 1.2552725051033 NULL NULL NULL
|
||||
explain extended select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
|
||||
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
|
||||
@ -75,7 +75,7 @@ Warnings:
|
||||
Note 1003 select log10(100) AS `log10(100)`,log10(18) AS `log10(18)`,log10(-(4)) AS `log10(-4)`,log10(0) AS `log10(0)`,log10(NULL) AS `log10(NULL)`
|
||||
select pow(10,log10(10)),power(2,4);
|
||||
pow(10,log10(10)) power(2,4)
|
||||
10.000000 16.000000
|
||||
10 16
|
||||
explain extended select pow(10,log10(10)),power(2,4);
|
||||
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
|
||||
@ -90,35 +90,35 @@ 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 rand(999999) AS `rand(999999)`,rand() AS `rand()`
|
||||
select pi(),sin(pi()/2),cos(pi()/2),abs(tan(pi())),cot(1),asin(1),acos(0),atan(1);
|
||||
pi() sin(pi()/2) cos(pi()/2) abs(tan(pi())) cot(1) asin(1) acos(0) atan(1)
|
||||
3.141593 1.000000 0.000000 0.000000 0.64209262 1.570796 1.570796 0.785398
|
||||
explain extended select pi(),sin(pi()/2),cos(pi()/2),abs(tan(pi())),cot(1),asin(1),acos(0),atan(1);
|
||||
select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6);
|
||||
pi() format(sin(pi()/2),6) format(cos(pi()/2),6) format(abs(tan(pi())),6) format(cot(1),6) format(asin(1),6) format(acos(0),6) format(atan(1),6)
|
||||
3.141593 1.000000 0.000000 0.000000 0.642093 1.570796 1.570796 0.785398
|
||||
explain extended select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6);
|
||||
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 pi() AS `pi()`,sin((pi() / 2)) AS `sin(pi()/2)`,cos((pi() / 2)) AS `cos(pi()/2)`,abs(tan(pi())) AS `abs(tan(pi()))`,(1 / tan(1)) AS `cot(1)`,asin(1) AS `asin(1)`,acos(0) AS `acos(0)`,atan(1) AS `atan(1)`
|
||||
Note 1003 select pi() AS `pi()`,format(sin((pi() / 2)),6) AS `format(sin(pi()/2),6)`,format(cos((pi() / 2)),6) AS `format(cos(pi()/2),6)`,format(abs(tan(pi())),6) AS `format(abs(tan(pi())),6)`,format((1 / tan(1)),6) AS `format(cot(1),6)`,format(asin(1),6) AS `format(asin(1),6)`,format(acos(0),6) AS `format(acos(0),6)`,format(atan(1),6) AS `format(atan(1),6)`
|
||||
select degrees(pi()),radians(360);
|
||||
degrees(pi()) radians(360)
|
||||
180 6.2831853071796
|
||||
SELECT ACOS(1.0);
|
||||
ACOS(1.0)
|
||||
0.000000
|
||||
0
|
||||
SELECT ASIN(1.0);
|
||||
ASIN(1.0)
|
||||
1.570796
|
||||
1.5707963267949
|
||||
SELECT ACOS(0.2*5.0);
|
||||
ACOS(0.2*5.0)
|
||||
0.000000
|
||||
0
|
||||
SELECT ACOS(0.5*2.0);
|
||||
ACOS(0.5*2.0)
|
||||
0.000000
|
||||
0
|
||||
SELECT ASIN(0.8+0.2);
|
||||
ASIN(0.8+0.2)
|
||||
1.570796
|
||||
1.5707963267949
|
||||
SELECT ASIN(1.2-0.2);
|
||||
ASIN(1.2-0.2)
|
||||
1.570796
|
||||
1.5707963267949
|
||||
explain extended select degrees(pi()),radians(360);
|
||||
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
|
||||
|
@ -229,3 +229,22 @@ GRANT SELECT (
|
||||
REVOKE SELECT (<28><><EFBFBD>) ON <20><>.<2E><><EFBFBD> FROM <20><><EFBFBD><EFBFBD>@localhost;
|
||||
DROP DATABASE <20><>;
|
||||
SET NAMES latin1;
|
||||
insert into mysql.user (host, user) values ('localhost', 'test11');
|
||||
insert into mysql.db (host, db, user, select_priv) values
|
||||
('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
|
||||
alter table mysql.db order by db asc;
|
||||
flush privileges;
|
||||
show grants for test11@localhost;
|
||||
Grants for test11@localhost
|
||||
GRANT USAGE ON *.* TO 'test11'@'localhost'
|
||||
GRANT SELECT ON `ab%`.* TO 'test11'@'localhost'
|
||||
GRANT SELECT ON `a%`.* TO 'test11'@'localhost'
|
||||
alter table mysql.db order by db desc;
|
||||
flush privileges;
|
||||
show grants for test11@localhost;
|
||||
Grants for test11@localhost
|
||||
GRANT USAGE ON *.* TO 'test11'@'localhost'
|
||||
GRANT SELECT ON `ab%`.* TO 'test11'@'localhost'
|
||||
GRANT SELECT ON `a%`.* TO 'test11'@'localhost'
|
||||
delete from mysql.user where user='test11';
|
||||
delete from mysql.db where user='test11';
|
||||
|
@ -90,17 +90,17 @@ drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
`id` bigint(20) NOT NULL default '0',
|
||||
`description` text
|
||||
) TYPE=MyISAM;
|
||||
) ENGINE=MyISAM;
|
||||
CREATE TABLE t2 (
|
||||
`id` bigint(20) NOT NULL default '0',
|
||||
`description` varchar(20)
|
||||
) TYPE=MyISAM;
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1, 'test');
|
||||
INSERT INTO t2 VALUES (1, 'test');
|
||||
CREATE TABLE t3 (
|
||||
`id` bigint(20) NOT NULL default '0',
|
||||
`order_id` bigint(20) NOT NULL default '0'
|
||||
) TYPE=MyISAM;
|
||||
) ENGINE=MyISAM;
|
||||
select
|
||||
a.id, a.description,
|
||||
count(b.id) as c
|
||||
|
@ -222,7 +222,7 @@ CREATE TABLE `job_titles` (
|
||||
`job_title` char(18) NOT NULL default '',
|
||||
PRIMARY KEY (`job_title_id`),
|
||||
UNIQUE KEY `job_title_id` (`job_title_id`,`job_title`)
|
||||
) TYPE=HEAP;
|
||||
) ENGINE=HEAP;
|
||||
SELECT MAX(job_title_id) FROM job_titles;
|
||||
MAX(job_title_id)
|
||||
NULL
|
||||
|
@ -529,3 +529,12 @@ show keys from t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 1 a 1 a NULL NULL NULL NULL YES HASH
|
||||
drop table t1,t2;
|
||||
create table t1 ( a tinytext, b char(1), index idx (a(1),b) );
|
||||
insert into t1 values (null,''), (null,'');
|
||||
explain select count(*) from t1 where a is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref idx idx 4 const 1 Using where
|
||||
select count(*) from t1 where a is null;
|
||||
count(*)
|
||||
2
|
||||
drop table t1;
|
||||
|
@ -5,8 +5,12 @@ insert into t1 values (1);
|
||||
insert into t1 values (-1);
|
||||
Warnings:
|
||||
Warning 1264 Data truncated; out of range for column 'this' at row 1
|
||||
insert into t1 values ('5000000000');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'this' at row 1
|
||||
select * from t1;
|
||||
this
|
||||
1
|
||||
0
|
||||
4294967295
|
||||
drop table t1;
|
||||
|
@ -84,12 +84,12 @@ drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
`id` bigint(20) NOT NULL default '0',
|
||||
`description` text
|
||||
) TYPE=MyISAM;
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE t2 (
|
||||
`id` bigint(20) NOT NULL default '0',
|
||||
`description` varchar(20)
|
||||
) TYPE=MyISAM;
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
INSERT INTO t1 VALUES (1, 'test');
|
||||
INSERT INTO t2 VALUES (1, 'test');
|
||||
@ -97,7 +97,7 @@ INSERT INTO t2 VALUES (1, 'test');
|
||||
CREATE TABLE t3 (
|
||||
`id` bigint(20) NOT NULL default '0',
|
||||
`order_id` bigint(20) NOT NULL default '0'
|
||||
) TYPE=MyISAM;
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
select
|
||||
a.id, a.description,
|
||||
|
@ -159,7 +159,7 @@ CREATE TABLE `job_titles` (
|
||||
`job_title` char(18) NOT NULL default '',
|
||||
PRIMARY KEY (`job_title_id`),
|
||||
UNIQUE KEY `job_title_id` (`job_title_id`,`job_title`)
|
||||
) TYPE=HEAP;
|
||||
) ENGINE=HEAP;
|
||||
|
||||
SELECT MAX(job_title_id) FROM job_titles;
|
||||
|
||||
|
@ -234,14 +234,3 @@ alter table t1 add i int default 10;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test for bug #4491, TIMESTAMP(19) should be possible to create and not
|
||||
# only read in 4.0
|
||||
#
|
||||
create table t1 (ts timestamp(19));
|
||||
show create table t1;
|
||||
set TIMESTAMP=1000000000;
|
||||
insert into t1 values ();
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
|
Reference in New Issue
Block a user