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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
22c1bfbb
Commit
22c1bfbb
authored
May 30, 2007
by
gkodinov/kgeorge@magare.gmz
Browse files
Options
Browse Files
Download
Plain Diff
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B28492-5.0-opt
parents
a109df80
a5b04a3b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
46 additions
and
19 deletions
+46
-19
mysql-test/r/analyse.result
mysql-test/r/analyse.result
+12
-12
mysql-test/r/metadata.result
mysql-test/r/metadata.result
+11
-0
mysql-test/r/olap.result
mysql-test/r/olap.result
+2
-2
mysql-test/r/sp.result
mysql-test/r/sp.result
+1
-1
mysql-test/r/view.result
mysql-test/r/view.result
+1
-1
mysql-test/t/metadata.test
mysql-test/t/metadata.test
+11
-0
sql/field.h
sql/field.h
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+7
-2
No files found.
mysql-test/r/analyse.result
View file @
22c1bfbb
...
...
@@ -39,10 +39,10 @@ t2 CREATE TABLE `t2` (
`Field_name` varbinary(255) NOT NULL default '',
`Min_value` varbinary(255) default NULL,
`Max_value` varbinary(255) default NULL,
`Min_length` int(11) NOT NULL default '0',
`Max_length` int(11) NOT NULL default '0',
`Empties_or_zeros` int(11) NOT NULL default '0',
`Nulls` int(11) NOT NULL default '0',
`Min_length`
big
int(11) NOT NULL default '0',
`Max_length`
big
int(11) NOT NULL default '0',
`Empties_or_zeros`
big
int(11) NOT NULL default '0',
`Nulls`
big
int(11) NOT NULL default '0',
`Avg_value_or_avg_length` varbinary(255) NOT NULL default '',
`Std` varbinary(255) default NULL,
`Optimal_fieldtype` varbinary(64) NOT NULL default ''
...
...
@@ -58,10 +58,10 @@ t2 CREATE TABLE `t2` (
`Field_name` varbinary(255) NOT NULL default '',
`Min_value` varbinary(255) default NULL,
`Max_value` varbinary(255) default NULL,
`Min_length` int(11) NOT NULL default '0',
`Max_length` int(11) NOT NULL default '0',
`Empties_or_zeros` int(11) NOT NULL default '0',
`Nulls` int(11) NOT NULL default '0',
`Min_length`
big
int(11) NOT NULL default '0',
`Max_length`
big
int(11) NOT NULL default '0',
`Empties_or_zeros`
big
int(11) NOT NULL default '0',
`Nulls`
big
int(11) NOT NULL default '0',
`Avg_value_or_avg_length` varbinary(255) NOT NULL default '',
`Std` varbinary(255) default NULL,
`Optimal_fieldtype` varbinary(64) NOT NULL default ''
...
...
@@ -81,10 +81,10 @@ t2 CREATE TABLE `t2` (
`Field_name` varbinary(255) NOT NULL default '',
`Min_value` varbinary(255) default NULL,
`Max_value` varbinary(255) default NULL,
`Min_length` int(11) NOT NULL default '0',
`Max_length` int(11) NOT NULL default '0',
`Empties_or_zeros` int(11) NOT NULL default '0',
`Nulls` int(11) NOT NULL default '0',
`Min_length`
big
int(11) NOT NULL default '0',
`Max_length`
big
int(11) NOT NULL default '0',
`Empties_or_zeros`
big
int(11) NOT NULL default '0',
`Nulls`
big
int(11) NOT NULL default '0',
`Avg_value_or_avg_length` varbinary(255) NOT NULL default '',
`Std` varbinary(255) default NULL,
`Optimal_fieldtype` varbinary(64) NOT NULL default ''
...
...
mysql-test/r/metadata.result
View file @
22c1bfbb
...
...
@@ -130,3 +130,14 @@ def v3 renamed 8 12 0 Y 32896 0 63
renamed
drop table t1;
drop view v1,v2,v3;
select a.* from (select 2147483648 as v_large) a;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def a v_large v_large 8 10 10 N 32769 0 63
v_large
2147483648
select a.* from (select 214748364 as v_small) a;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def a v_small v_small 3 9 9 N 32769 0 63
v_small
214748364
End of 5.0 tests
mysql-test/r/olap.result
View file @
22c1bfbb
...
...
@@ -696,8 +696,8 @@ CREATE VIEW v1 AS
SELECT a, LENGTH(a), COUNT(*) FROM t1 GROUP BY a WITH ROLLUP;
DESC v1;
Field Type Null Key Default Extra
a
int(11) YES 0
LENGTH(a) int(10) YES NULL
a
bigint(11) YES NULL
LENGTH(a)
big
int(10) YES NULL
COUNT(*) bigint(21) NO 0
SELECT * FROM v1;
a LENGTH(a) COUNT(*)
...
...
mysql-test/r/sp.result
View file @
22c1bfbb
...
...
@@ -4909,7 +4909,7 @@ create table t3 as select * from v1|
show create table t3|
Table Create Table
t3 CREATE TABLE `t3` (
`j` int(11) default NULL
`j`
big
int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t3|
j
...
...
mysql-test/r/view.result
View file @
22c1bfbb
...
...
@@ -2779,7 +2779,7 @@ CREATE TABLE t1 (i int, j int);
CREATE VIEW v1 AS SELECT COALESCE(i,j) FROM t1;
DESCRIBE v1;
Field Type Null Key Default Extra
COALESCE(i,j) int(11) YES NULL
COALESCE(i,j)
big
int(11) YES NULL
CREATE TABLE t2 SELECT COALESCE(i,j) FROM t1;
DESCRIBE t2;
Field Type Null Key Default Extra
...
...
mysql-test/t/metadata.test
View file @
22c1bfbb
...
...
@@ -81,3 +81,14 @@ drop view v1,v2,v3;
--
disable_metadata
# End of 4.1 tests
#
# Bug #28492: subselect returns LONG in >5.0.24a and LONGLONG in <=5.0.24a
#
--
enable_metadata
select
a
.*
from
(
select
2147483648
as
v_large
)
a
;
select
a
.*
from
(
select
214748364
as
v_small
)
a
;
--
disable_metadata
--
echo
End
of
5.0
tests
sql/field.h
View file @
22c1bfbb
...
...
@@ -675,7 +675,7 @@ class Field_long :public Field_num {
void
sort_string
(
char
*
buff
,
uint
length
);
uint32
pack_length
()
const
{
return
4
;
}
void
sql_type
(
String
&
str
)
const
;
uint32
max_display_length
()
{
return
11
;
}
uint32
max_display_length
()
{
return
MY_INT32_NUM_DECIMAL_DIGITS
;
}
};
...
...
sql/sql_select.cc
View file @
22c1bfbb
...
...
@@ -8869,8 +8869,13 @@ static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
item
->
name
,
table
,
item
->
decimals
,
TRUE
);
break
;
case
INT_RESULT
:
/* Select an integer type with the minimal fit precision */
if
(
item
->
max_length
>
MY_INT32_NUM_DECIMAL_DIGITS
)
/*
Select an integer type with the minimal fit precision.
MY_INT32_NUM_DECIMAL_DIGITS is sign inclusive, don't consider the sign.
Values with MY_INT32_NUM_DECIMAL_DIGITS digits may or may not fit into
Field_long : make them Field_longlong.
*/
if
(
item
->
max_length
>=
(
MY_INT32_NUM_DECIMAL_DIGITS
-
1
))
new_field
=
new
Field_longlong
(
item
->
max_length
,
maybe_null
,
item
->
name
,
table
,
item
->
unsigned_flag
);
else
...
...
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