5 Replies Latest reply on Jan 10, 2012 11:28 AM by TSGal

    Crash when importing binary data via ODBC

    IwaoAVE!

      Summary

      Crash when importing binary data via ODBC

      Product

      FileMaker Pro

      Version

      10, 11

      Operating system version

      Windows XP SP3

      Description of the issue

      When importing binary data from mysql table using 'Import Records' script step, FileMaker Pro crashes or the imported data corrupts.

      Environment:
      - FileMaker Pro 11v2 running on Windows XP SP3
      - MySQL 5.x
      - MySQL ODBC connector 5.1.8 (32bit)

      Steps to reproduce the problem

      (1) Create a new database and a table in MySQL.
      CREATE DATABASE bintest CHARACTER SET utf8;
      CREATE TABLE bintable (
      id INT NOT NULL PRIMARY KEY,
      bin LONGBLOB
      ) ENGINE=MyISAM DEFAULT CHARSET=utf8;

      (2) Insert a new row with a binary data.

      (3) Define a new DSN for 'bintest'.

      (4) Create a new FileMaker file (bintest.fp7) with a table.
      id: number
      bin container

      (5) Create a new script
      Import Records [No dialog; DSN: bintest; SQL Text: select `bintable`.`id`, `bintable`.`bin` from `bintable`; Add; Shift JIS]

      (6) Execute the script.

      Expected result

      New records are created in the FileMaker table and the 'bin' field contains 'Untitled.dat'.
      By using 'Export Field Contents', the original binary data can be obtained.

      Actual result

      One of the following:
      (a) FileMaker Pro crashes.
      (b) The script runs OK, but the imported binary data corrupts (examining the file saved using 'Export Field Contents', the bytes after offset 8192 are all 0x00).
      (c) When a file is small enough (< 8192 bytes? not confirmed), the binary data is imported successfully.

      Exact text of any error message(s) that appear

      The common message 'FileMaker Pro Advanced.exe has encountered a problem...' in Japanese.

      Configuration information

      - The same script works as expected on FM 11v2 / Mac OS X with the Actual ODBC Driver. No data corruption.
      - The crash occurs on FM 10 as well, but the frequency of the crash seems to be lower (e.g. importing a particular BLOB data, FM11 crashes but FM10 does not).
      - It works if I exclude the binary column from the query.