~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_insert.cc

  • Committer: Brian Aker
  • Date: 2010-06-08 06:42:22 UTC
  • Revision ID: brian@gaz-20100608064222-91h6yilydxke9umi
Cursor now fully handles the update to timestamp for the engine.

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
    if (table->timestamp_field) // Don't automaticly set timestamp if used
122
122
    {
123
123
      if (table->timestamp_field->isWriteSet())
 
124
      {
124
125
        clear_timestamp_auto_bits(table->timestamp_field_type,
125
126
                                  TIMESTAMP_AUTO_SET_ON_INSERT);
 
127
      }
126
128
      else
127
129
      {
128
130
        table->setWriteSet(table->timestamp_field->field_index);
177
179
  {
178
180
    /* Don't set timestamp column if this is modified. */
179
181
    if (table->timestamp_field->isWriteSet())
 
182
    {
180
183
      clear_timestamp_auto_bits(table->timestamp_field_type,
181
184
                                TIMESTAMP_AUTO_SET_ON_UPDATE);
 
185
    }
 
186
 
182
187
    if (timestamp_mark)
 
188
    {
183
189
      table->setWriteSet(table->timestamp_field->field_index);
 
190
    }
184
191
  }
185
192
  return 0;
186
193
}