title: MySQL: Column cannot be null
body: <p>First of all, I googled this question but didn't find any similar situations.
  So I appreсiate any help.</p>
  
  <p>I have a table:</p>
  
  <pre><code>CREATE TABLE tinypurses.purses (
    id SMALLINT(6) NOT NULL AUTO_INCREMENT,
    Time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    keyyy CHAR(100) DEFAULT NULL,
    LastSeed SMALLINT(6) NOT NULL DEFAULT 0,
    PRIMARY KEY (id),
    INDEX purses_id_index (id)
  )
  ENGINE = INNODB
  AUTO_INCREMENT = 2
  CHARACTER SET utf8
  COLLATE utf8_general_ci;
  </code></pre>
  
  <p>When I try insert a new record into it, I got an error:</p>
  
  <p><em>Database error: [MySQL][ODBC 5.1 Driver][mysqld-5.1.47-community]Column 'LastSeed' cannot be null</em></p>
  
  <p>I'm confused because I explicitly set value for column 'LastSeed':</p>
  
  <pre><code>statement.prepare(connection(), "insert into purses (time, keyyy, LastSeed) values(?, ?, ?)");
  statement.param(1).set_as_systemtime(sysTime);
  statement.param(2).set_as_string(key);
  statement.param(3).set_as_long(1);
  if (!stmt.execute())
  {
      LOG &lt;&lt; statement.last_error(); // got this error here
  }
  </code></pre>
  
  <p>Moreover, this code works fine on Windows XP and 7, but not on Windows 8 (with the same version of MySQL server).</p>
  
  <p>Does anybody have any ideas why it works on a such strange manner?</p>
  
  <p>Thank you.</p>