activerecord-mysql2spatial-adapter icon indicating copy to clipboard operation
activerecord-mysql2spatial-adapter copied to clipboard

force little endian byte order

Open jeffgran opened this issue 9 years ago • 1 comments

Tested on MySQL 5.7.11 on OSX

force geometry WKB to be generated little endian byte order since mysql seems to have a bug:

https://dev.mysql.com/worklog/task/?id=1076

Quote:

http://postgis.refractions.net/pipermail/postgis-users/2003-June/002651.html

  • The MySQL code contains an assumption in the WKB handling that all WBK will be little endian. If you run MySQL spatial on a big endian machine (Sparc, PowerPC, PA-RISC) you will find things go amiss when you try to send WKB to little endian machines (x86), because your big endian machine will be creating invalid data (big endian data incorrectly flagged as little endian).

jeffgran avatar Oct 14 '16 15:10 jeffgran

Missed this one for some reason. I'll review soon.

januszm avatar Jun 23 '17 21:06 januszm