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
1821bf0b
Commit
1821bf0b
authored
Apr 06, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_3361/mysql-4.0
parents
73f3229b
c2ac4d50
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
6 deletions
+48
-6
client/mysqldump.c
client/mysqldump.c
+4
-4
mysql-test/r/mysqldump.result
mysql-test/r/mysqldump.result
+16
-2
mysql-test/t/mysqldump.test
mysql-test/t/mysqldump.test
+28
-0
No files found.
client/mysqldump.c
View file @
1821bf0b
...
...
@@ -1116,9 +1116,9 @@ static void dumpTable(uint numFields, char *table)
if
(
field
->
type
==
FIELD_TYPE_DECIMAL
)
{
/* add " signs around */
dynstr_append
(
&
extended_row
,
"
\
"
"
);
dynstr_append
(
&
extended_row
,
"
\
'
"
);
dynstr_append
(
&
extended_row
,
ptr
);
dynstr_append
(
&
extended_row
,
"
\
"
"
);
dynstr_append
(
&
extended_row
,
"
\
'
"
);
}
else
dynstr_append
(
&
extended_row
,
ptr
);
...
...
@@ -1162,9 +1162,9 @@ static void dumpTable(uint numFields, char *table)
if
(
field
->
type
==
FIELD_TYPE_DECIMAL
)
{
/* add " signs around */
fputs
(
"
\
"
"
,
md_result_file
);
fputs
(
"
\
'
"
,
md_result_file
);
fputs
(
ptr
,
md_result_file
);
fputs
(
"
\
"
"
,
md_result_file
);
fputs
(
"
\
'
"
,
md_result_file
);
}
else
fputs
(
ptr
,
md_result_file
);
...
...
mysql-test/r/mysqldump.result
View file @
1821bf0b
...
...
@@ -22,8 +22,8 @@ CREATE TABLE t1 (
a decimal(240,20) default NULL
) TYPE=MyISAM;
INSERT INTO t1 VALUES (
"1234567890123456789012345678901234567890.00000000000000000000"
);
INSERT INTO t1 VALUES (
"0987654321098765432109876543210987654321.00000000000000000000"
);
INSERT INTO t1 VALUES (
'1234567890123456789012345678901234567890.00000000000000000000'
);
INSERT INTO t1 VALUES (
'0987654321098765432109876543210987654321.00000000000000000000'
);
DROP TABLE t1;
CREATE TABLE t1 (a double);
...
...
@@ -35,3 +35,17 @@ CREATE TABLE t1 (
INSERT INTO t1 VALUES (RES);
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT);
INSERT INTO t1 VALUES (1.2345, 2.3456);
INSERT INTO t1 VALUES ('1.2345', 2.3456);
INSERT INTO t1 VALUES ("1.2345", 2.3456);
CREATE TABLE t1 (
a decimal(10,5) default NULL,
b float default NULL
) TYPE=MyISAM;
INSERT INTO t1 VALUES ('1.23450',2.3456);
INSERT INTO t1 VALUES ('1.23450',2.3456);
INSERT INTO t1 VALUES ('1.23450',2.3456);
DROP TABLE t1;
mysql-test/t/mysqldump.test
View file @
1821bf0b
...
...
@@ -30,3 +30,31 @@ INSERT INTO t1 VALUES (-9e999999);
--
replace_result
(
-
1.79769313486232e+308
)
(
RES
)
(
NULL
)
(
RES
)
--
exec
$MYSQL_DUMP
--
skip
-
comments
test
t1
DROP
TABLE
t1
;
#
# Bug #3361 mysqldum quotes DECIMAL values
#
CREATE
TABLE
t1
(
a
DECIMAL
(
10
,
5
),
b
FLOAT
);
# check at first how mysql work with quoted decimal
INSERT
INTO
t1
VALUES
(
1.2345
,
2.3456
);
INSERT
INTO
t1
VALUES
(
'1.2345'
,
2.3456
);
INSERT
INTO
t1
VALUES
(
"1.2345"
,
2.3456
);
# The code below should be uncommented in mysql-4.1 to fix
# behaviour of quoting DECIMAL fields with different
# values of sql_mode
########
#SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ANSI_QUOTES';
#INSERT INTO t1 VALUES (1.2345, 2.3456);
#INSERT INTO t1 VALUES ('1.2345', 2.3456);
#--error 1054
#INSERT INTO t1 VALUES ("1.2345", 2.3456);
#SET SQL_MODE=@OLD_SQL_MODE;
########
# check how mysqldump make quoting
--
exec
$MYSQL_DUMP
--
skip
-
comments
test
t1
DROP
TABLE
t1
;
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