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
e512bddc
Commit
e512bddc
authored
Sep 13, 2005
by
jani@ua141d10.elisa.omakaista.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-tmp
parents
5b8bfd4d
cb4f1320
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
sql/sql_analyse.cc
sql/sql_analyse.cc
+8
-10
No files found.
sql/sql_analyse.cc
View file @
e512bddc
...
@@ -879,24 +879,22 @@ void field_real::get_opt_type(String *answer,
...
@@ -879,24 +879,22 @@ void field_real::get_opt_type(String *answer,
if
(
!
max_notzero_dec_len
)
if
(
!
max_notzero_dec_len
)
{
{
int
len
=
(
int
)
max_length
-
((
item
->
decimals
==
NOT_FIXED_DEC
)
?
0
:
(
item
->
decimals
+
1
));
if
(
min_arg
>=
-
128
&&
max_arg
<=
(
min_arg
>=
0
?
255
:
127
))
if
(
min_arg
>=
-
128
&&
max_arg
<=
(
min_arg
>=
0
?
255
:
127
))
sprintf
(
buff
,
"TINYINT(%d)"
,
(
int
)
max_length
-
sprintf
(
buff
,
"TINYINT(%d)"
,
len
);
((
item
->
decimals
==
NOT_FIXED_DEC
)
?
0
:
(
item
->
decimals
+
1
)));
else
if
(
min_arg
>=
INT_MIN16
&&
max_arg
<=
(
min_arg
>=
0
?
else
if
(
min_arg
>=
INT_MIN16
&&
max_arg
<=
(
min_arg
>=
0
?
UINT_MAX16
:
INT_MAX16
))
UINT_MAX16
:
INT_MAX16
))
sprintf
(
buff
,
"SMALLINT(%d)"
,
(
int
)
max_length
-
sprintf
(
buff
,
"SMALLINT(%d)"
,
len
);
((
item
->
decimals
==
NOT_FIXED_DEC
)
?
0
:
(
item
->
decimals
+
1
)));
else
if
(
min_arg
>=
INT_MIN24
&&
max_arg
<=
(
min_arg
>=
0
?
else
if
(
min_arg
>=
INT_MIN24
&&
max_arg
<=
(
min_arg
>=
0
?
UINT_MAX24
:
INT_MAX24
))
UINT_MAX24
:
INT_MAX24
))
sprintf
(
buff
,
"MEDIUMINT(%d)"
,
(
int
)
max_length
-
sprintf
(
buff
,
"MEDIUMINT(%d)"
,
len
);
((
item
->
decimals
==
NOT_FIXED_DEC
)
?
0
:
(
item
->
decimals
+
1
)));
else
if
(
min_arg
>=
INT_MIN32
&&
max_arg
<=
(
min_arg
>=
0
?
else
if
(
min_arg
>=
INT_MIN32
&&
max_arg
<=
(
min_arg
>=
0
?
UINT_MAX32
:
INT_MAX32
))
UINT_MAX32
:
INT_MAX32
))
sprintf
(
buff
,
"INT(%d)"
,
(
int
)
max_length
-
sprintf
(
buff
,
"INT(%d)"
,
len
);
((
item
->
decimals
==
NOT_FIXED_DEC
)
?
0
:
(
item
->
decimals
+
1
)));
else
else
sprintf
(
buff
,
"BIGINT(%d)"
,
(
int
)
max_length
-
sprintf
(
buff
,
"BIGINT(%d)"
,
len
);
((
item
->
decimals
==
NOT_FIXED_DEC
)
?
0
:
(
item
->
decimals
+
1
)));
answer
->
append
(
buff
,
(
uint
)
strlen
(
buff
));
answer
->
append
(
buff
,
(
uint
)
strlen
(
buff
));
if
(
min_arg
>=
0
)
if
(
min_arg
>=
0
)
answer
->
append
(
" UNSIGNED"
);
answer
->
append
(
" UNSIGNED"
);
...
...
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