Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
5842dcaa
Commit
5842dcaa
authored
May 17, 2006
by
kent@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/data0/mysqldev/my/tmp_merge
into mysql.com:/tmp/mysql-5.1-new
parents
62f61f52
98b81c4f
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
25 additions
and
31 deletions
+25
-31
mysql-test/r/case.result
mysql-test/r/case.result
+1
-1
mysql-test/r/metadata.result
mysql-test/r/metadata.result
+1
-1
mysql-test/r/ps_2myisam.result
mysql-test/r/ps_2myisam.result
+2
-2
mysql-test/r/ps_3innodb.result
mysql-test/r/ps_3innodb.result
+2
-2
mysql-test/r/ps_4heap.result
mysql-test/r/ps_4heap.result
+2
-2
mysql-test/r/ps_5merge.result
mysql-test/r/ps_5merge.result
+4
-4
mysql-test/r/ps_6bdb.result
mysql-test/r/ps_6bdb.result
+2
-2
mysql-test/r/ps_7ndb.result
mysql-test/r/ps_7ndb.result
+2
-2
mysql-test/r/type_float.result
mysql-test/r/type_float.result
+4
-4
mysql-test/r/type_newdecimal.result
mysql-test/r/type_newdecimal.result
+5
-5
sql/item.cc
sql/item.cc
+0
-6
No files found.
mysql-test/r/case.result
View file @
5842dcaa
...
...
@@ -152,7 +152,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`COALESCE(1)` int(1) NOT NULL DEFAULT '0',
`COALESCE(1.0)` decimal(2,1)
unsigned
NOT NULL DEFAULT '0.0',
`COALESCE(1.0)` decimal(2,1) NOT NULL DEFAULT '0.0',
`COALESCE('a')` varchar(1) NOT NULL DEFAULT '',
`COALESCE(1,1.0)` decimal(2,1) NOT NULL DEFAULT '0.0',
`COALESCE(1,'1')` varbinary(1) NOT NULL DEFAULT '',
...
...
mysql-test/r/metadata.result
View file @
5842dcaa
...
...
@@ -2,7 +2,7 @@ drop table if exists t1,t2;
select 1, 1.0, -1, "hello", NULL;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def 1 8 1 1 N 32897 0 63
def 1.0 246
3 3 N 161
1 63
def 1.0 246
4 3 N 129
1 63
def -1 8 2 2 N 32897 0 63
def hello 253 5 5 N 1 31 8
def NULL 6 0 0 Y 32896 0 63
...
...
mysql-test/r/ps_2myisam.result
View file @
5842dcaa
...
...
@@ -1777,7 +1777,7 @@ Table Create Table
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1)
unsigned
NOT NULL DEFAULT '0.0',
`const02` decimal(2,1) NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
...
...
@@ -1807,7 +1807,7 @@ select * from t5 ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246
3 3 N 33
1 63
def test t5 t5 const02 const02 246
4 3 N 1
1 63
def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
...
...
mysql-test/r/ps_3innodb.result
View file @
5842dcaa
...
...
@@ -1760,7 +1760,7 @@ Table Create Table
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1)
unsigned
NOT NULL DEFAULT '0.0',
`const02` decimal(2,1) NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
...
...
@@ -1790,7 +1790,7 @@ select * from t5 ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246
3 3 N 33
1 63
def test t5 t5 const02 const02 246
4 3 N 1
1 63
def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
...
...
mysql-test/r/ps_4heap.result
View file @
5842dcaa
...
...
@@ -1761,7 +1761,7 @@ Table Create Table
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1)
unsigned
NOT NULL DEFAULT '0.0',
`const02` decimal(2,1) NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
...
...
@@ -1791,7 +1791,7 @@ select * from t5 ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246
3 3 N 33
1 63
def test t5 t5 const02 const02 246
4 3 N 1
1 63
def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
...
...
mysql-test/r/ps_5merge.result
View file @
5842dcaa
...
...
@@ -1697,7 +1697,7 @@ Table Create Table
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1)
unsigned
NOT NULL DEFAULT '0.0',
`const02` decimal(2,1) NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
...
...
@@ -1727,7 +1727,7 @@ select * from t5 ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246
3 3 N 33
1 63
def test t5 t5 const02 const02 246
4 3 N 1
1 63
def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
...
...
@@ -4711,7 +4711,7 @@ Table Create Table
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1)
unsigned
NOT NULL DEFAULT '0.0',
`const02` decimal(2,1) NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
...
...
@@ -4741,7 +4741,7 @@ select * from t5 ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246
3 3 N 33
1 63
def test t5 t5 const02 const02 246
4 3 N 1
1 63
def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
...
...
mysql-test/r/ps_6bdb.result
View file @
5842dcaa
...
...
@@ -1760,7 +1760,7 @@ Table Create Table
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL DEFAULT '0',
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1)
unsigned
NOT NULL DEFAULT '0.0',
`const02` decimal(2,1) NOT NULL DEFAULT '0.0',
`param02` decimal(65,30) DEFAULT NULL,
`const03` double NOT NULL DEFAULT '0',
`param03` double DEFAULT NULL,
...
...
@@ -1790,7 +1790,7 @@ select * from t5 ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246
3 3 N 33
1 63
def test t5 t5 const02 const02 246
4 3 N 1
1 63
def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
...
...
mysql-test/r/ps_7ndb.result
View file @
5842dcaa
...
...
@@ -1760,7 +1760,7 @@ Table Create Table
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL default '0',
`param01` bigint(20) default NULL,
`const02` decimal(2,1)
unsigned
NOT NULL default '0.0',
`const02` decimal(2,1) NOT NULL default '0.0',
`param02` decimal(65,30) default NULL,
`const03` double NOT NULL default '0',
`param03` double default NULL,
...
...
@@ -1790,7 +1790,7 @@ select * from t5 ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246
3 3 N 33
1 63
def test t5 t5 const02 const02 246
4 3 N 1
1 63
def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
...
...
mysql-test/r/type_float.result
View file @
5842dcaa
...
...
@@ -245,22 +245,22 @@ show warnings;
Level Code Message
desc t1;
Field Type Null Key Default Extra
x decimal(21,2)
unsigned
NO 0.00
x decimal(21,2) NO 0.00
drop table t1;
create table t1 select 0.0 x;
desc t1;
Field Type Null Key Default Extra
x decimal(2,1)
unsigned
NO 0.0
x decimal(2,1) NO 0.0
create table t2 select 105213674794682365.00 y;
desc t2;
Field Type Null Key Default Extra
y decimal(20,2)
unsigned
NO 0.00
y decimal(20,2) NO 0.00
create table t3 select x+y a from t1,t2;
show warnings;
Level Code Message
desc t3;
Field Type Null Key Default Extra
a decimal(21,2)
unsigned
NO 0.00
a decimal(21,2) NO 0.00
drop table t1,t2,t3;
create table t1 (s1 float(0,2));
ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 's1').
...
...
mysql-test/r/type_newdecimal.result
View file @
5842dcaa
...
...
@@ -68,10 +68,10 @@ NULL 1.1 NULL NULL NULL 1
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`nullif(1.1, 1.1)` decimal(2,1)
unsigned
DEFAULT NULL,
`nullif(1.1, 1.2)` decimal(2,1)
unsigned
DEFAULT NULL,
`nullif(1.1, 1.1)` decimal(2,1) DEFAULT NULL,
`nullif(1.1, 1.2)` decimal(2,1) DEFAULT NULL,
`nullif(1.1, 0.11e1)` decimal(2,1) unsigned DEFAULT NULL,
`nullif(1.0, 1)` decimal(2,1)
unsigned
DEFAULT NULL,
`nullif(1.0, 1)` decimal(2,1) DEFAULT NULL,
`nullif(1, 1.0)` int(1) DEFAULT NULL,
`nullif(1, 1.1)` int(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
...
...
@@ -174,7 +174,7 @@ create table t1 select round(15.4,-1), truncate(-5678.123451,-3), abs(-1.1), -(-
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`round(15.4,-1)` decimal(3,0)
unsigned
NOT NULL DEFAULT '0',
`round(15.4,-1)` decimal(3,0) NOT NULL DEFAULT '0',
`truncate(-5678.123451,-3)` decimal(4,0) NOT NULL DEFAULT '0',
`abs(-1.1)` decimal(2,1) NOT NULL DEFAULT '0.0',
`-(-1.1)` decimal(2,1) NOT NULL DEFAULT '0.0'
...
...
@@ -771,7 +771,7 @@ create table t1 as select 0.5;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`0.5` decimal(2,1)
unsigned
NOT NULL DEFAULT '0.0'
`0.5` decimal(2,1) NOT NULL DEFAULT '0.0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select round(1.5),round(2.5);
...
...
sql/item.cc
View file @
5842dcaa
...
...
@@ -1890,7 +1890,6 @@ Item_decimal::Item_decimal(const char *str_arg, uint length,
name
=
(
char
*
)
str_arg
;
decimals
=
(
uint8
)
decimal_value
.
frac
;
fixed
=
1
;
unsigned_flag
=
!
decimal_value
.
sign
();
max_length
=
my_decimal_precision_to_length
(
decimal_value
.
intg
+
decimals
,
decimals
,
unsigned_flag
);
}
...
...
@@ -1900,7 +1899,6 @@ Item_decimal::Item_decimal(longlong val, bool unsig)
int2my_decimal
(
E_DEC_FATAL_ERROR
,
val
,
unsig
,
&
decimal_value
);
decimals
=
(
uint8
)
decimal_value
.
frac
;
fixed
=
1
;
unsigned_flag
=
!
decimal_value
.
sign
();
max_length
=
my_decimal_precision_to_length
(
decimal_value
.
intg
+
decimals
,
decimals
,
unsigned_flag
);
}
...
...
@@ -1911,7 +1909,6 @@ Item_decimal::Item_decimal(double val, int precision, int scale)
double2my_decimal
(
E_DEC_FATAL_ERROR
,
val
,
&
decimal_value
);
decimals
=
(
uint8
)
decimal_value
.
frac
;
fixed
=
1
;
unsigned_flag
=
!
decimal_value
.
sign
();
max_length
=
my_decimal_precision_to_length
(
decimal_value
.
intg
+
decimals
,
decimals
,
unsigned_flag
);
}
...
...
@@ -1924,7 +1921,6 @@ Item_decimal::Item_decimal(const char *str, const my_decimal *val_arg,
name
=
(
char
*
)
str
;
decimals
=
(
uint8
)
decimal_par
;
max_length
=
length
;
unsigned_flag
=
!
decimal_value
.
sign
();
fixed
=
1
;
}
...
...
@@ -1934,7 +1930,6 @@ Item_decimal::Item_decimal(my_decimal *value_par)
my_decimal2decimal
(
value_par
,
&
decimal_value
);
decimals
=
(
uint8
)
decimal_value
.
frac
;
fixed
=
1
;
unsigned_flag
=
!
decimal_value
.
sign
();
max_length
=
my_decimal_precision_to_length
(
decimal_value
.
intg
+
decimals
,
decimals
,
unsigned_flag
);
}
...
...
@@ -1946,7 +1941,6 @@ Item_decimal::Item_decimal(const char *bin, int precision, int scale)
&
decimal_value
,
precision
,
scale
);
decimals
=
(
uint8
)
decimal_value
.
frac
;
fixed
=
1
;
unsigned_flag
=
!
decimal_value
.
sign
();
max_length
=
my_decimal_precision_to_length
(
precision
,
decimals
,
unsigned_flag
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment