title: ERROR 1048 (23000) at line 1: Column cannot be null
body: <p>I have a database named "crea" with a table named "assets" and in this table i have 11 column named (name,description,assetType,local,temporary,data,id,create_time,access_time,asset_flags,CreatorID)</p>
  
  <p>I also have a directory folder with many picture in .jp2 format (xxxx.jp2)</p>
  
  <p>What im trying to do is to bulk insert these picture in the table "assets" of my database, so i decided to do it with 2 shell scripts, the both are in the directory with the pictures.</p>
  
  <p>When i launch ./assetadd.sh from the terminal, i get this error from MySQL :</p>
  
  <pre><code>ERROR 1048 (23000) at line 1: Column 'data' cannot be null
  </code></pre>
  
  <p>I checked many time and im sure that the column 'data' isnt NULL (Type: LONGBLOB Binaries Null: NO), so i really dont understand why i get this error.</p>
  
  <p>Help will be apreciated. Thank you</p>
  
  <p><em><strong>- Script 1 : assetsadd.sh</em></strong></p>
  
  <pre><code>#!/bin/bash
  
  path=$(pwd)
  find $path/ -type f \( -iname *.jp2 \) -exec ./insertjp2.sh {} \;
  
  echo "finished!!"
  </code></pre>
  
  <p><em><strong>- Script 2 : insertjp2.sh</em></strong></p>
  
  <pre><code>#!/bin/bash
  
  user="crea"
  password="crea"
  database="crea"
  dbhost="localhost"
  creator="crea"
  
  param=$@
  basenam=${param##*/}
  filenam=${basenam%.*}
  
  MYSQL=`/usr/bin/mysql -u$user -p$password -D$database -e"INSERT INTO assets (name,description,assetType,local,temporary,data,id,create_time,access_time​,asset_flags,CreatorID) VALUES ('$filenam','$filenam',0,0,0,LOAD_FILE('$param'),'$filenam',UNIX_TIMESTAMP(),1325304546,0,'$creator' );"`
  
  echo $param &gt;&gt; assetadd.log
  echo $MYSQL
  </code></pre>