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
4f368f9f
Commit
4f368f9f
authored
Jan 21, 2006
by
hf@eagle.intranet.mysql.r18.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merging
parents
f2c3ed8e
02ce3d0c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
59 additions
and
11 deletions
+59
-11
mysql-test/ndb/ndbcluster.sh
mysql-test/ndb/ndbcluster.sh
+1
-1
mysql-test/r/func_gconcat.result
mysql-test/r/func_gconcat.result
+3
-3
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+3
-3
mysql-test/r/type_float.result
mysql-test/r/type_float.result
+22
-0
mysql-test/t/func_math.test
mysql-test/t/func_math.test
+2
-0
mysql-test/t/type_float.test
mysql-test/t/type_float.test
+17
-0
sql/item_func.cc
sql/item_func.cc
+10
-3
sql/spatial.h
sql/spatial.h
+1
-1
No files found.
mysql-test/ndb/ndbcluster.sh
View file @
4f368f9f
...
@@ -134,7 +134,7 @@ if [ ! -x "$exec_waiter" ]; then
...
@@ -134,7 +134,7 @@ if [ ! -x "$exec_waiter" ]; then
fi
fi
exec_mgmtclient
=
"
$exec_mgmtclient
--no-defaults
$NDB_MGM_EXTRA_OPTS
"
exec_mgmtclient
=
"
$exec_mgmtclient
--no-defaults
$NDB_MGM_EXTRA_OPTS
"
exec_mgmtsrvr
=
"
$exec_mgmtsrvr
$NDB_MGMD_EXTRA_OPTS
"
exec_mgmtsrvr
=
"
$exec_mgmtsrvr
--no-defaults
$NDB_MGMD_EXTRA_OPTS
"
exec_ndb
=
"
$exec_ndb
--no-defaults
$NDBD_EXTRA_OPTS
"
exec_ndb
=
"
$exec_ndb
--no-defaults
$NDBD_EXTRA_OPTS
"
exec_waiter
=
"
$exec_waiter
--no-defaults"
exec_waiter
=
"
$exec_waiter
--no-defaults"
...
...
mysql-test/r/func_gconcat.result
View file @
4f368f9f
...
@@ -131,9 +131,9 @@ grp group_concat(a separator "")+0
...
@@ -131,9 +131,9 @@ grp group_concat(a separator "")+0
3 456789
3 456789
select grp, group_concat(a separator "")+0.0 from t1 group by grp;
select grp, group_concat(a separator "")+0.0 from t1 group by grp;
grp group_concat(a separator "")+0.0
grp group_concat(a separator "")+0.0
1 1
.0
1 1
2 23
.0
2 23
3 456789
.0
3 456789
select grp, ROUND(group_concat(a separator "")) from t1 group by grp;
select grp, ROUND(group_concat(a separator "")) from t1 group by grp;
grp ROUND(group_concat(a separator ""))
grp ROUND(group_concat(a separator ""))
1 1
1 1
...
...
mysql-test/r/subselect.result
View file @
4f368f9f
...
@@ -215,9 +215,9 @@ select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from
...
@@ -215,9 +215,9 @@ select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from
a
a
select b,(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) from t4;
select b,(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) from t4;
b (select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2)
b (select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2)
8 7.5
000
8 7.5
8 4.5
000
8 4.5
9 7.5
000
9 7.5
explain extended select b,(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) from t4;
explain extended select b,(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) from t4;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t4 ALL NULL NULL NULL NULL 3
1 PRIMARY t4 ALL NULL NULL NULL NULL 3
...
...
mysql-test/r/type_float.result
View file @
4f368f9f
...
@@ -240,6 +240,28 @@ t3 CREATE TABLE `t3` (
...
@@ -240,6 +240,28 @@ t3 CREATE TABLE `t3` (
`d` double(22,9) default NULL
`d` double(22,9) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2, t3;
drop table t1, t2, t3;
create table t1 select 105213674794682365.00 + 0.0 x;
show warnings;
Level Code Message
desc t1;
Field Type Null Key Default Extra
x double 0
drop table t1;
create table t1 select 0.0 x;
desc t1;
Field Type Null Key Default Extra
x double(3,1) 0.0
create table t2 select 105213674794682365.00 y;
desc t2;
Field Type Null Key Default Extra
y double(21,2) 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 double 0
drop table t1,t2,t3;
create table t1 (s1 float(0,2));
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').
ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 's1').
create table t1 (s1 float(1,2));
create table t1 (s1 float(1,2));
...
...
mysql-test/t/func_math.test
View file @
4f368f9f
...
@@ -121,7 +121,9 @@ drop table t1;
...
@@ -121,7 +121,9 @@ drop table t1;
#
#
# InnoDB is required to reproduce the fault, but it is okay if we default to
# InnoDB is required to reproduce the fault, but it is okay if we default to
# MyISAM when testing.
# MyISAM when testing.
--
disable_warnings
create
table
t1
(
a
varchar
(
90
),
ts
datetime
not
null
,
index
(
a
))
engine
=
innodb
default
charset
=
utf8
;
create
table
t1
(
a
varchar
(
90
),
ts
datetime
not
null
,
index
(
a
))
engine
=
innodb
default
charset
=
utf8
;
--
enable_warnings
insert
into
t1
values
(
'http://www.foo.com/'
,
now
());
insert
into
t1
values
(
'http://www.foo.com/'
,
now
());
select
a
from
t1
where
a
=
'http://www.foo.com/'
order
by
abs
(
timediff
(
ts
,
0
));
select
a
from
t1
where
a
=
'http://www.foo.com/'
order
by
abs
(
timediff
(
ts
,
0
));
drop
table
t1
;
drop
table
t1
;
...
...
mysql-test/t/type_float.test
View file @
4f368f9f
...
@@ -159,6 +159,23 @@ show create table t3;
...
@@ -159,6 +159,23 @@ show create table t3;
drop
table
t1
,
t2
,
t3
;
drop
table
t1
,
t2
,
t3
;
#
# Bug #9855 (inconsistent column type for create select
#
create
table
t1
select
105213674794682365.00
+
0.0
x
;
show
warnings
;
desc
t1
;
drop
table
t1
;
create
table
t1
select
0.0
x
;
desc
t1
;
create
table
t2
select
105213674794682365.00
y
;
desc
t2
;
create
table
t3
select
x
+
y
a
from
t1
,
t2
;
show
warnings
;
desc
t3
;
drop
table
t1
,
t2
,
t3
;
# End of 4.1 tests
# End of 4.1 tests
#
#
...
...
sql/item_func.cc
View file @
4f368f9f
...
@@ -429,12 +429,19 @@ my_decimal *Item_real_func::val_decimal(my_decimal *decimal_value)
...
@@ -429,12 +429,19 @@ my_decimal *Item_real_func::val_decimal(my_decimal *decimal_value)
void
Item_func
::
fix_num_length_and_dec
()
void
Item_func
::
fix_num_length_and_dec
()
{
{
decimals
=
0
;
uint
fl_length
=
0
;
decimals
=
0
;
for
(
uint
i
=
0
;
i
<
arg_count
;
i
++
)
for
(
uint
i
=
0
;
i
<
arg_count
;
i
++
)
{
{
set_if_bigger
(
decimals
,
args
[
i
]
->
decimals
);
set_if_bigger
(
decimals
,
args
[
i
]
->
decimals
);
set_if_bigger
(
fl_length
,
args
[
i
]
->
max_length
);
}
max_length
=
float_length
(
decimals
);
if
(
fl_length
>
max_length
)
{
decimals
=
NOT_FIXED_DEC
;
max_length
=
float_length
(
NOT_FIXED_DEC
);
}
}
max_length
=
float_length
(
decimals
);
}
}
...
...
sql/spatial.h
View file @
4f368f9f
...
@@ -142,7 +142,7 @@ struct MBR
...
@@ -142,7 +142,7 @@ struct MBR
bool
inner_point
(
double
x
,
double
y
)
const
bool
inner_point
(
double
x
,
double
y
)
const
{
{
/* The following should be safe, even if we compare doubles */
/* The following should be safe, even if we compare doubles */
return
(
xmin
<
x
)
&&
(
xmax
>
x
)
&&
(
ymin
<
y
)
&&
(
ymax
>
x
);
return
(
xmin
<
x
)
&&
(
xmax
>
x
)
&&
(
ymin
<
y
)
&&
(
ymax
>
y
);
}
}
int
overlaps
(
const
MBR
*
mbr
)
int
overlaps
(
const
MBR
*
mbr
)
...
...
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