mirror of
https://github.com/MariaDB/server.git
synced 2025-05-25 13:42:52 +03:00
Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/work/mysql-4.0
This commit is contained in:
commit
05dddb73e1
@ -363,9 +363,198 @@ CREATE TABLE t1 (a_dec DECIMAL(-2,1));
|
|||||||
Too big column length for column 'a_dec' (max = 255). Use BLOB instead
|
Too big column length for column 'a_dec' (max = 255). Use BLOB instead
|
||||||
CREATE TABLE t1 (a_dec DECIMAL(-1,1));
|
CREATE TABLE t1 (a_dec DECIMAL(-1,1));
|
||||||
Too big column length for column 'a_dec' (max = 255). Use BLOB instead
|
Too big column length for column 'a_dec' (max = 255). Use BLOB instead
|
||||||
create table t1(a decimal(10,4));
|
create table t1(a decimal(7,3));
|
||||||
insert into t1 values ("+0000100000000");
|
insert into t1 values ('1'),('+1'),('-1'),('0000000001'),('+0000000001'),('-0000000001'),('10'),('+10'),('-10'),('0000000010'),('+0000000010'),('-0000000010'),('100'),('+100'),('-100'),('0000000100'),('+0000000100'),('-0000000100'),('1000'),('+1000'),('-1000'),('0000001000'),('+0000001000'),('-0000001000'),('10000'),('+10000'),('-10000'),('0000010000'),('+0000010000'),('-0000010000'),('100000'),('+100000'),('-100000'),('0000100000'),('+0000100000'),('-0000100000'),('1000000'),('+1000000'),('-1000000'),('0001000000'),('+0001000000'),('-0001000000'),('10000000'),('+10000000'),('-10000000'),('0010000000'),('+0010000000'),('-0010000000'),('100000000'),('+100000000'),('-100000000'),('0100000000'),('+0100000000'),('-0100000000'),('1000000000'),('+1000000000'),('-1000000000'),('1000000000'),('+1000000000'),('-1000000000');
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
9999999.9999
|
1.000
|
||||||
|
+1.000
|
||||||
|
-1.000
|
||||||
|
00001.000
|
||||||
|
+0001.000
|
||||||
|
-0001.000
|
||||||
|
10.000
|
||||||
|
+10.000
|
||||||
|
-10.000
|
||||||
|
00010.000
|
||||||
|
+0010.000
|
||||||
|
-0010.000
|
||||||
|
100.000
|
||||||
|
+100.000
|
||||||
|
-100.000
|
||||||
|
00100.000
|
||||||
|
+0100.000
|
||||||
|
-0100.000
|
||||||
|
1000.000
|
||||||
|
+1000.000
|
||||||
|
-1000.000
|
||||||
|
01000.000
|
||||||
|
+1000.000
|
||||||
|
-1000.000
|
||||||
|
10000.000
|
||||||
|
10000.000
|
||||||
|
-9999.999
|
||||||
|
10000.000
|
||||||
|
10000.000
|
||||||
|
-9999.999
|
||||||
|
99999.999
|
||||||
|
99999.999
|
||||||
|
-9999.999
|
||||||
|
99999.999
|
||||||
|
99999.999
|
||||||
|
-9999.999
|
||||||
|
99999.999
|
||||||
|
99999.999
|
||||||
|
-9999.999
|
||||||
|
99999.999
|
||||||
|
99999.999
|
||||||
|
-9999.999
|
||||||
|
99999.999
|
||||||
|
99999.999
|
||||||
|
-9999.999
|
||||||
|
99999.999
|
||||||
|
99999.999
|
||||||
|
-9999.999
|
||||||
|
99999.999
|
||||||
|
99999.999
|
||||||
|
-9999.999
|
||||||
|
99999.999
|
||||||
|
99999.999
|
||||||
|
-9999.999
|
||||||
|
99999.999
|
||||||
|
99999.999
|
||||||
|
-9999.999
|
||||||
|
99999.999
|
||||||
|
99999.999
|
||||||
|
-9999.999
|
||||||
|
drop table t1;
|
||||||
|
create table t1(a decimal(7,3) unsigned);
|
||||||
|
insert into t1 values ('1'),('+1'),('-1'),('0000000001'),('+0000000001'),('-0000000001'),('10'),('+10'),('-10'),('0000000010'),('+0000000010'),('-0000000010'),('100'),('+100'),('-100'),('0000000100'),('+0000000100'),('-0000000100'),('1000'),('+1000'),('-1000'),('0000001000'),('+0000001000'),('-0000001000'),('10000'),('+10000'),('-10000'),('0000010000'),('+0000010000'),('-0000010000'),('100000'),('+100000'),('-100000'),('0000100000'),('+0000100000'),('-0000100000'),('1000000'),('+1000000'),('-1000000'),('0001000000'),('+0001000000'),('-0001000000'),('10000000'),('+10000000'),('-10000000'),('0010000000'),('+0010000000'),('-0010000000'),('100000000'),('+100000000'),('-100000000'),('0100000000'),('+0100000000'),('-0100000000'),('1000000000'),('+1000000000'),('-1000000000'),('1000000000'),('+1000000000'),('-1000000000');
|
||||||
|
select * from t1;
|
||||||
|
a
|
||||||
|
1.000
|
||||||
|
+1.000
|
||||||
|
0.000
|
||||||
|
0001.000
|
||||||
|
+001.000
|
||||||
|
0.000
|
||||||
|
10.000
|
||||||
|
+10.000
|
||||||
|
0.000
|
||||||
|
0010.000
|
||||||
|
+010.000
|
||||||
|
0.000
|
||||||
|
100.000
|
||||||
|
+100.000
|
||||||
|
0.000
|
||||||
|
0100.000
|
||||||
|
+100.000
|
||||||
|
0.000
|
||||||
|
1000.000
|
||||||
|
1000.000
|
||||||
|
0.000
|
||||||
|
1000.000
|
||||||
|
1000.000
|
||||||
|
0.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0.000
|
||||||
|
drop table t1;
|
||||||
|
create table t1(a decimal(7,3) zerofill);
|
||||||
|
insert into t1 values ('1'),('+1'),('-1'),('0000000001'),('+0000000001'),('-0000000001'),('10'),('+10'),('-10'),('0000000010'),('+0000000010'),('-0000000010'),('100'),('+100'),('-100'),('0000000100'),('+0000000100'),('-0000000100'),('1000'),('+1000'),('-1000'),('0000001000'),('+0000001000'),('-0000001000'),('10000'),('+10000'),('-10000'),('0000010000'),('+0000010000'),('-0000010000'),('100000'),('+100000'),('-100000'),('0000100000'),('+0000100000'),('-0000100000'),('1000000'),('+1000000'),('-1000000'),('0001000000'),('+0001000000'),('-0001000000'),('10000000'),('+10000000'),('-10000000'),('0010000000'),('+0010000000'),('-0010000000'),('100000000'),('+100000000'),('-100000000'),('0100000000'),('+0100000000'),('-0100000000'),('1000000000'),('+1000000000'),('-1000000000'),('1000000000'),('+1000000000'),('-1000000000');
|
||||||
|
select * from t1;
|
||||||
|
a
|
||||||
|
0001.000
|
||||||
|
0001.000
|
||||||
|
0000.000
|
||||||
|
0001.000
|
||||||
|
0001.000
|
||||||
|
0000.000
|
||||||
|
0010.000
|
||||||
|
0010.000
|
||||||
|
0000.000
|
||||||
|
0010.000
|
||||||
|
0010.000
|
||||||
|
0000.000
|
||||||
|
0100.000
|
||||||
|
0100.000
|
||||||
|
0000.000
|
||||||
|
0100.000
|
||||||
|
0100.000
|
||||||
|
0000.000
|
||||||
|
1000.000
|
||||||
|
1000.000
|
||||||
|
0000.000
|
||||||
|
1000.000
|
||||||
|
1000.000
|
||||||
|
0000.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0000.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0000.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0000.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0000.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0000.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0000.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0000.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0000.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0000.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0000.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0000.000
|
||||||
|
9999.999
|
||||||
|
9999.999
|
||||||
|
0000.000
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -241,8 +241,19 @@ CREATE TABLE t1 (a_dec DECIMAL(-2,1));
|
|||||||
--error 1074
|
--error 1074
|
||||||
CREATE TABLE t1 (a_dec DECIMAL(-1,1));
|
CREATE TABLE t1 (a_dec DECIMAL(-1,1));
|
||||||
|
|
||||||
|
#
|
||||||
# Zero prepend overflow bug
|
# Zero prepend overflow bug
|
||||||
create table t1(a decimal(10,4));
|
#
|
||||||
insert into t1 values ("+0000100000000");
|
|
||||||
|
create table t1(a decimal(7,3));
|
||||||
|
insert into t1 values ('1'),('+1'),('-1'),('0000000001'),('+0000000001'),('-0000000001'),('10'),('+10'),('-10'),('0000000010'),('+0000000010'),('-0000000010'),('100'),('+100'),('-100'),('0000000100'),('+0000000100'),('-0000000100'),('1000'),('+1000'),('-1000'),('0000001000'),('+0000001000'),('-0000001000'),('10000'),('+10000'),('-10000'),('0000010000'),('+0000010000'),('-0000010000'),('100000'),('+100000'),('-100000'),('0000100000'),('+0000100000'),('-0000100000'),('1000000'),('+1000000'),('-1000000'),('0001000000'),('+0001000000'),('-0001000000'),('10000000'),('+10000000'),('-10000000'),('0010000000'),('+0010000000'),('-0010000000'),('100000000'),('+100000000'),('-100000000'),('0100000000'),('+0100000000'),('-0100000000'),('1000000000'),('+1000000000'),('-1000000000'),('1000000000'),('+1000000000'),('-1000000000');
|
||||||
|
select * from t1;
|
||||||
|
drop table t1;
|
||||||
|
create table t1(a decimal(7,3) unsigned);
|
||||||
|
insert into t1 values ('1'),('+1'),('-1'),('0000000001'),('+0000000001'),('-0000000001'),('10'),('+10'),('-10'),('0000000010'),('+0000000010'),('-0000000010'),('100'),('+100'),('-100'),('0000000100'),('+0000000100'),('-0000000100'),('1000'),('+1000'),('-1000'),('0000001000'),('+0000001000'),('-0000001000'),('10000'),('+10000'),('-10000'),('0000010000'),('+0000010000'),('-0000010000'),('100000'),('+100000'),('-100000'),('0000100000'),('+0000100000'),('-0000100000'),('1000000'),('+1000000'),('-1000000'),('0001000000'),('+0001000000'),('-0001000000'),('10000000'),('+10000000'),('-10000000'),('0010000000'),('+0010000000'),('-0010000000'),('100000000'),('+100000000'),('-100000000'),('0100000000'),('+0100000000'),('-0100000000'),('1000000000'),('+1000000000'),('-1000000000'),('1000000000'),('+1000000000'),('-1000000000');
|
||||||
|
select * from t1;
|
||||||
|
drop table t1;
|
||||||
|
create table t1(a decimal(7,3) zerofill);
|
||||||
|
insert into t1 values ('1'),('+1'),('-1'),('0000000001'),('+0000000001'),('-0000000001'),('10'),('+10'),('-10'),('0000000010'),('+0000000010'),('-0000000010'),('100'),('+100'),('-100'),('0000000100'),('+0000000100'),('-0000000100'),('1000'),('+1000'),('-1000'),('0000001000'),('+0000001000'),('-0000001000'),('10000'),('+10000'),('-10000'),('0000010000'),('+0000010000'),('-0000010000'),('100000'),('+100000'),('-100000'),('0000100000'),('+0000100000'),('-0000100000'),('1000000'),('+1000000'),('-1000000'),('0001000000'),('+0001000000'),('-0001000000'),('10000000'),('+10000000'),('-10000000'),('0010000000'),('+0010000000'),('-0010000000'),('100000000'),('+100000000'),('-100000000'),('0100000000'),('+0100000000'),('-0100000000'),('1000000000'),('+1000000000'),('-1000000000'),('1000000000'),('+1000000000'),('-1000000000');
|
||||||
select * from t1;
|
select * from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user