Commit 015f5bd5 authored by unknown's avatar unknown
Browse files

Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0

into deer.(none):/home/hf/work/mysql-5.0.12267


sql/sql_yacc.yy:
  Auto merged
parents 54d1558c e579fe3e
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -170,3 +170,30 @@ insert into t1 values (1);
select rand(i) from t1;
ERROR HY000: Incorrect arguments to RAND
drop table t1;
set sql_mode='traditional';
select ln(-1);
ln(-1)
NULL
Warnings:
Error	1365	Division by 0
select log10(-1);
log10(-1)
NULL
Warnings:
Error	1365	Division by 0
select log2(-1);
log2(-1)
NULL
Warnings:
Error	1365	Division by 0
select log(2,-1);
log(2,-1)
NULL
Warnings:
Error	1365	Division by 0
select log(-2,1);
log(-2,1)
NULL
Warnings:
Error	1365	Division by 0
set sql_mode='';
+8 −0
Original line number Diff line number Diff line
@@ -680,3 +680,11 @@ select astext(fn3());
astext(fn3())
POINT(1 1)
drop function fn3;
create table t1(pt POINT);
alter table t1 add primary key pti(pt);
drop table t1;
create table t1(pt GEOMETRY);
alter table t1 add primary key pti(pt);
ERROR 42000: BLOB/TEXT column 'pt' used in key specification without a key length
alter table t1 add primary key pti(pt(20));
drop table t1;
+2 −0
Original line number Diff line number Diff line
@@ -1019,3 +1019,5 @@ drop procedure wg2;
select cast(@non_existing_user_var/2 as DECIMAL);
cast(@non_existing_user_var/2 as DECIMAL)
NULL
create table t (d decimal(0,10));
ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 'd').
+12 −0
Original line number Diff line number Diff line
@@ -117,3 +117,15 @@ select rand(i) from t1;
drop table t1;

# End of 4.1 tests

#
# Bug #13820 (No warning on log(negative)
#
set sql_mode='traditional';
select ln(-1);
select log10(-1);
select log2(-1);
select log(2,-1);
select log(-2,1);
set sql_mode='';
+11 −0
Original line number Diff line number Diff line
@@ -395,3 +395,14 @@ show create function fn3;
select astext(fn3());
drop function fn3;

#
# Bug #12267 (primary key over GIS)
#
create table t1(pt POINT);
alter table t1 add primary key pti(pt);
drop table t1;
create table t1(pt GEOMETRY);
--error 1170
alter table t1 add primary key pti(pt);
alter table t1 add primary key pti(pt(20));
drop table t1;
Loading