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
8aa20764
Commit
8aa20764
authored
Nov 13, 2023
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "MDEV-22243 type_test.type_test_double fails with 'NUMERIC_SCALE NULL'"
This reverts commit
9d19b652
.
parent
8bbf6697
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
60 deletions
+39
-60
plugin/type_test/mysql-test/type_test/type_test_double.result
...in/type_test/mysql-test/type_test/type_test_double.result
+1
-1
sql/field.cc
sql/field.cc
+0
-54
sql/field.h
sql/field.h
+38
-5
No files found.
plugin/type_test/mysql-test/type_test/type_test_double.result
View file @
8aa20764
...
...
@@ -290,7 +290,7 @@ DATA_TYPE test_double
CHARACTER_MAXIMUM_LENGTH NULL
CHARACTER_OCTET_LENGTH NULL
NUMERIC_PRECISION 22
NUMERIC_SCALE
NULL
NUMERIC_SCALE
31
DATETIME_PRECISION NULL
CHARACTER_SET_NAME NULL
COLLATION_NAME NULL
...
...
sql/field.cc
View file @
8aa20764
...
...
@@ -4645,28 +4645,6 @@ bool Field_longlong::is_max()
single precision float
****************************************************************************/
Field_float
::
Field_float
(
uchar
*
ptr_arg
,
uint32
len_arg
,
uchar
*
null_ptr_arg
,
uchar
null_bit_arg
,
enum
utype
unireg_check_arg
,
const
LEX_CSTRING
*
field_name_arg
,
uint8
dec_arg
,
bool
zero_arg
,
bool
unsigned_arg
)
:
Field_real
(
ptr_arg
,
len_arg
,
null_ptr_arg
,
null_bit_arg
,
unireg_check_arg
,
field_name_arg
,
(
dec_arg
>=
FLOATING_POINT_DECIMALS
?
NOT_FIXED_DEC
:
dec_arg
),
zero_arg
,
unsigned_arg
)
{
}
Field_float
::
Field_float
(
uint32
len_arg
,
bool
maybe_null_arg
,
const
LEX_CSTRING
*
field_name_arg
,
uint8
dec_arg
)
:
Field_real
((
uchar
*
)
0
,
len_arg
,
maybe_null_arg
?
(
uchar
*
)
""
:
0
,
(
uint
)
0
,
NONE
,
field_name_arg
,
(
dec_arg
>=
FLOATING_POINT_DECIMALS
?
NOT_FIXED_DEC
:
dec_arg
),
0
,
0
)
{
}
int
Field_float
::
store
(
const
char
*
from
,
size_t
len
,
CHARSET_INFO
*
cs
)
{
int
error
;
...
...
@@ -4815,38 +4793,6 @@ Binlog_type_info Field_float::binlog_type_info() const
double precision floating point numbers
****************************************************************************/
Field_double
::
Field_double
(
uchar
*
ptr_arg
,
uint32
len_arg
,
uchar
*
null_ptr_arg
,
uchar
null_bit_arg
,
enum
utype
unireg_check_arg
,
const
LEX_CSTRING
*
field_name_arg
,
uint8
dec_arg
,
bool
zero_arg
,
bool
unsigned_arg
)
:
Field_real
(
ptr_arg
,
len_arg
,
null_ptr_arg
,
null_bit_arg
,
unireg_check_arg
,
field_name_arg
,
(
dec_arg
>=
FLOATING_POINT_DECIMALS
?
NOT_FIXED_DEC
:
dec_arg
),
zero_arg
,
unsigned_arg
)
{
}
Field_double
::
Field_double
(
uint32
len_arg
,
bool
maybe_null_arg
,
const
LEX_CSTRING
*
field_name_arg
,
uint8
dec_arg
)
:
Field_real
((
uchar
*
)
0
,
len_arg
,
maybe_null_arg
?
(
uchar
*
)
""
:
0
,
(
uint
)
0
,
NONE
,
field_name_arg
,
(
dec_arg
>=
FLOATING_POINT_DECIMALS
?
NOT_FIXED_DEC
:
dec_arg
),
0
,
0
)
{
}
Field_double
::
Field_double
(
uint32
len_arg
,
bool
maybe_null_arg
,
const
LEX_CSTRING
*
field_name_arg
,
uint8
dec_arg
,
bool
not_fixed_arg
)
:
Field_real
((
uchar
*
)
0
,
len_arg
,
maybe_null_arg
?
(
uchar
*
)
""
:
0
,
(
uint
)
0
,
NONE
,
field_name_arg
,
(
dec_arg
>=
FLOATING_POINT_DECIMALS
?
NOT_FIXED_DEC
:
dec_arg
),
0
,
0
)
{
not_fixed
=
not_fixed_arg
;
}
int
Field_double
::
store
(
const
char
*
from
,
size_t
len
,
CHARSET_INFO
*
cs
)
{
int
error
;
...
...
sql/field.h
View file @
8aa20764
...
...
@@ -2842,9 +2842,22 @@ class Field_float final :public Field_real {
Field_float
(
uchar
*
ptr_arg
,
uint32
len_arg
,
uchar
*
null_ptr_arg
,
uchar
null_bit_arg
,
enum
utype
unireg_check_arg
,
const
LEX_CSTRING
*
field_name_arg
,
uint8
dec_arg
,
bool
zero_arg
,
bool
unsigned_arg
);
uint8
dec_arg
,
bool
zero_arg
,
bool
unsigned_arg
)
:
Field_real
(
ptr_arg
,
len_arg
,
null_ptr_arg
,
null_bit_arg
,
unireg_check_arg
,
field_name_arg
,
dec_arg
,
zero_arg
,
unsigned_arg
)
{
if
(
dec_arg
>=
FLOATING_POINT_DECIMALS
)
dec_arg
=
NOT_FIXED_DEC
;
}
Field_float
(
uint32
len_arg
,
bool
maybe_null_arg
,
const
LEX_CSTRING
*
field_name_arg
,
uint8
dec_arg
);
const
LEX_CSTRING
*
field_name_arg
,
uint8
dec_arg
)
:
Field_real
((
uchar
*
)
0
,
len_arg
,
maybe_null_arg
?
(
uchar
*
)
""
:
0
,
(
uint
)
0
,
NONE
,
field_name_arg
,
dec_arg
,
0
,
0
)
{
if
(
dec_arg
>=
FLOATING_POINT_DECIMALS
)
dec_arg
=
NOT_FIXED_DEC
;
}
const
Type_handler
*
type_handler
()
const
override
{
return
&
type_handler_float
;
}
enum
ha_base_keytype
key_type
()
const
override
{
return
HA_KEYTYPE_FLOAT
;
}
...
...
@@ -2877,12 +2890,32 @@ class Field_double :public Field_real {
Field_double
(
uchar
*
ptr_arg
,
uint32
len_arg
,
uchar
*
null_ptr_arg
,
uchar
null_bit_arg
,
enum
utype
unireg_check_arg
,
const
LEX_CSTRING
*
field_name_arg
,
uint8
dec_arg
,
bool
zero_arg
,
bool
unsigned_arg
);
uint8
dec_arg
,
bool
zero_arg
,
bool
unsigned_arg
)
:
Field_real
(
ptr_arg
,
len_arg
,
null_ptr_arg
,
null_bit_arg
,
unireg_check_arg
,
field_name_arg
,
dec_arg
,
zero_arg
,
unsigned_arg
)
{
if
(
dec_arg
>=
FLOATING_POINT_DECIMALS
)
dec_arg
=
NOT_FIXED_DEC
;
}
Field_double
(
uint32
len_arg
,
bool
maybe_null_arg
,
const
LEX_CSTRING
*
field_name_arg
,
uint8
dec_arg
);
const
LEX_CSTRING
*
field_name_arg
,
uint8
dec_arg
)
:
Field_real
((
uchar
*
)
0
,
len_arg
,
maybe_null_arg
?
(
uchar
*
)
""
:
0
,
(
uint
)
0
,
NONE
,
field_name_arg
,
dec_arg
,
0
,
0
)
{
if
(
dec_arg
>=
FLOATING_POINT_DECIMALS
)
dec_arg
=
NOT_FIXED_DEC
;
}
Field_double
(
uint32
len_arg
,
bool
maybe_null_arg
,
const
LEX_CSTRING
*
field_name_arg
,
uint8
dec_arg
,
bool
not_fixed_arg
);
uint8
dec_arg
,
bool
not_fixed_arg
)
:
Field_real
((
uchar
*
)
0
,
len_arg
,
maybe_null_arg
?
(
uchar
*
)
""
:
0
,
(
uint
)
0
,
NONE
,
field_name_arg
,
dec_arg
,
0
,
0
)
{
not_fixed
=
not_fixed_arg
;
if
(
dec_arg
>=
FLOATING_POINT_DECIMALS
)
dec_arg
=
NOT_FIXED_DEC
;
}
void
init_for_tmp_table
(
Field
*
org_field
,
TABLE
*
new_table
)
override
{
Field
::
init_for_tmp_table
(
org_field
,
new_table
);
...
...
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