-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better support my sql5.5 #52
base: master
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,7 +164,7 @@ private function __construct() | |
|
||
'point' => [ | ||
'increased_size' => '', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is what I know: when I use this script, it fails on all of my point data types ( contain latitude and longitude). This change allows my data to import. Here is what I have learned: Here is what I am guessing: As this post points out - you can not convert from one to the other. I don't claim to be a PostgreSQL expert. If there is another way to make this import work I would like to know. I can provide a MySQL test case if that would help. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test-case would be appreciated... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MySQL test case: create table testGeoPoint ( insert into testGeoPoint values ( 1, GeomFromText('POINT(-74.0445000000 40.6892000000 )' ), 40.6892000000, -74.0445000000 ); There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Error output I see is:
CONTEXT: COPY testGeoPoint, line 1, column GEOPOINT: "0101000000022B8716D98252C09C33A2B437584440"
|
||
'type' => 'point', | ||
'type' => 'geometry', | ||
'mySqlVarLenPgSqlFixedLen' => false, | ||
], | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will this code deal with MySQL version < 5.5 , or version > 5.5 ?
Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AsBinary() and AsWKB() are deprecated as of MySQL 5.7.6 and will be removed in a future MySQL release.
As far as I know ST_AsWKB will only work for 5.6 and above.
Would you prefer to see:
if( mysql <= 5.5 )
{
AsWKB
}
else
{
ST_AsWKB
}
I will modify the PR how ever you see fit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, that
if( mysql <= 5.5 )
is much better option.Could you modify the P.R. a little bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will do.