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
84580f95
Commit
84580f95
authored
Feb 18, 2014
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-5481 mysqldump fails to dump geometry types properly.
Fixed so the MYSQL_TYPE_GEOMETRY is treated as BLOB.
parent
820b1a66
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
client/mysqldump.c
client/mysqldump.c
+2
-1
mysql-test/r/mysqldump.result
mysql-test/r/mysqldump.result
+14
-0
mysql-test/t/mysqldump.test
mysql-test/t/mysqldump.test
+15
-0
No files found.
client/mysqldump.c
View file @
84580f95
...
...
@@ -3637,7 +3637,8 @@ static void dump_table(char *table, char *db)
field
->
type
==
MYSQL_TYPE_BLOB
||
field
->
type
==
MYSQL_TYPE_LONG_BLOB
||
field
->
type
==
MYSQL_TYPE_MEDIUM_BLOB
||
field
->
type
==
MYSQL_TYPE_TINY_BLOB
))
?
1
:
0
;
field
->
type
==
MYSQL_TYPE_TINY_BLOB
||
field
->
type
==
MYSQL_TYPE_GEOMETRY
))
?
1
:
0
;
if
(
extended_insert
&&
!
opt_xml
)
{
if
(
i
==
0
)
...
...
mysql-test/r/mysqldump.result
View file @
84580f95
...
...
@@ -5193,6 +5193,20 @@ slow_log CREATE TABLE `slow_log` (
SET @@global.log_output= @old_log_output_state;
SET @@global.slow_query_log= @old_slow_query_log_state;
SET @@global.general_log= @old_general_log_state;
# MDEV-5481 mysqldump fails to dump geometry types properly
create table t1 (g GEOMETRY) CHARSET koi8r;
create table t2 (g GEOMETRY) CHARSET koi8r;
insert into t1 values (point(1,1)), (point(2,2));
##################################################
\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?
\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@
##################################################
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET koi8r;
select astext(g) from t2;
astext(g)
POINT(1 1)
POINT(2 2)
drop table t1, t2;
#
# End of 5.1 tests
#
mysql-test/t/mysqldump.test
View file @
84580f95
...
...
@@ -2345,6 +2345,21 @@ SET @@global.log_output= @old_log_output_state;
SET
@@
global
.
slow_query_log
=
@
old_slow_query_log_state
;
SET
@@
global
.
general_log
=
@
old_general_log_state
;
--
echo
# MDEV-5481 mysqldump fails to dump geometry types properly
create
table
t1
(
g
GEOMETRY
)
CHARSET
koi8r
;
create
table
t2
(
g
GEOMETRY
)
CHARSET
koi8r
;
insert
into
t1
values
(
point
(
1
,
1
)),
(
point
(
2
,
2
));
--
exec
$MYSQL_DUMP
--
hex
-
blob
--
character
-
sets
-
dir
=
$MYSQL_SHAREDIR
/
charsets
--
tab
=
$MYSQLTEST_VARDIR
/
tmp
/
test
t1
--
echo
##################################################
--
cat_file
$file
--
echo
##################################################
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
eval
LOAD
DATA
INFILE
'$file'
INTO
TABLE
t2
CHARACTER
SET
koi8r
--
remove_file
$file
select
astext
(
g
)
from
t2
;
drop
table
t1
,
t2
;
--
echo
#
--
echo
# End of 5.1 tests
--
echo
#
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