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
743fbc7d
Commit
743fbc7d
authored
Sep 26, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/mydev/mysql-5.0
into mysql.com:/home/mydev/mysql-5.0-5000
parents
76c0417b
5e73c1cf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
9 deletions
+38
-9
innobase/row/row0ins.c
innobase/row/row0ins.c
+9
-7
mysql-test/r/type_float.result
mysql-test/r/type_float.result
+4
-0
mysql-test/t/type_float.test
mysql-test/t/type_float.test
+9
-0
sql/share/errmsg.txt
sql/share/errmsg.txt
+2
-0
sql/sql_parse.cc
sql/sql_parse.cc
+14
-2
No files found.
innobase/row/row0ins.c
View file @
743fbc7d
...
...
@@ -591,15 +591,17 @@ row_ins_set_detailed(
FILE
*
tf
=
os_file_create_tmpfile
();
ut_a
(
tf
);
ut_print_name
(
tf
,
trx
,
foreign
->
foreign_table_name
);
dict_print_info_on_foreign_key_in_create_format
(
tf
,
trx
,
foreign
,
FALSE
);
if
(
tf
)
{
ut_print_name
(
tf
,
trx
,
foreign
->
foreign_table_name
);
dict_print_info_on_foreign_key_in_create_format
(
tf
,
trx
,
foreign
,
FALSE
);
trx_set_detailed_error_from_file
(
trx
,
tf
);
trx_set_detailed_error_from_file
(
trx
,
tf
);
fclose
(
tf
);
fclose
(
tf
);
}
else
{
trx_set_detailed_error
(
trx
,
"temp file creation failed"
);
}
}
/*************************************************************************
...
...
mysql-test/r/type_float.result
View file @
743fbc7d
...
...
@@ -225,3 +225,7 @@ select * from t1 where reckey=1.09E2;
reckey recdesc
109 Has 109 as key
drop table t1;
create table t1 (s1 float(0,2));
ERROR 42000: For float(M,D) or double(M,D), M must be >= D (column 's1').
create table t1 (s1 float(1,2));
ERROR 42000: For float(M,D) or double(M,D), M must be >= D (column 's1').
mysql-test/t/type_float.test
View file @
743fbc7d
...
...
@@ -147,3 +147,12 @@ select * from t1 where reckey=1.09E2;
drop
table
t1
;
# End of 4.1 tests
#
# bug #12694 (float(m,d) specifications)
#
--
error
1453
create
table
t1
(
s1
float
(
0
,
2
));
--
error
1453
create
table
t1
(
s1
float
(
1
,
2
));
sql/share/errmsg.txt
View file @
743fbc7d
...
...
@@ -5419,3 +5419,5 @@ ER_ROW_IS_REFERENCED_2 23000
eng "Cannot delete or update a parent row: a foreign key constraint fails (%.192s)"
ER_NO_REFERENCED_ROW_2 23000
eng "Cannot add or update a child row: a foreign key constraint fails (%.192s)"
ER_M_BIGGER_THAN_D 42000 S1009
eng "For float(M,D) or double(M,D), M must be >= D (column '%-.64s')."
sql/sql_parse.cc
View file @
743fbc7d
...
...
@@ -5814,19 +5814,31 @@ new_create_field(THD *thd, char *field_name, enum_field_types type,
new_field
->
decimals
=
NOT_FIXED_DEC
;
break
;
}
if
(
!
length
)
if
(
!
length
&&
!
decimals
)
{
new_field
->
length
=
FLT_DIG
+
6
;
new_field
->
decimals
=
NOT_FIXED_DEC
;
}
if
(
new_field
->
length
<
new_field
->
decimals
&&
new_field
->
decimals
!=
NOT_FIXED_DEC
)
{
my_error
(
ER_M_BIGGER_THAN_D
,
MYF
(
0
),
field_name
);
DBUG_RETURN
(
NULL
);
}
break
;
case
FIELD_TYPE_DOUBLE
:
allowed_type_modifier
=
AUTO_INCREMENT_FLAG
;
if
(
!
length
)
if
(
!
length
&&
!
decimals
)
{
new_field
->
length
=
DBL_DIG
+
7
;
new_field
->
decimals
=
NOT_FIXED_DEC
;
}
if
(
new_field
->
length
<
new_field
->
decimals
&&
new_field
->
decimals
!=
NOT_FIXED_DEC
)
{
my_error
(
ER_M_BIGGER_THAN_D
,
MYF
(
0
),
field_name
);
DBUG_RETURN
(
NULL
);
}
break
;
case
FIELD_TYPE_TIMESTAMP
:
if
(
!
length
)
...
...
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