~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

  • Committer: Brian Aker
  • Date: 2009-11-19 03:54:45 UTC
  • mto: (1223.1.4 push) (1226.1.2 push)
  • mto: This revision was merged to the branch mainline in revision 1224.
  • Revision ID: brian@gaz-20091119035445-01a1mcnq3x0w9b8q
Remove used flag for engine.

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
 
213
213
  buffer.length(0);
214
214
 
215
 
  if (store_create_info(table_list, &buffer, NULL, is_if_not_exists))
 
215
  if (store_create_info(table_list, &buffer, is_if_not_exists))
216
216
    return true;
217
217
 
218
218
  List<Item> field_list;
418
418
                      for.
419
419
    packet            Pointer to a string where statement will be
420
420
                      written.
421
 
    create_info_arg   Pointer to create information that can be used
422
 
                      to tailor the format of the statement.  Can be
423
 
                      NULL, in which case only SQL_MODE is considered
424
 
                      when building the statement.
425
421
 
426
422
  NOTE
427
423
    Currently always return 0, but might return error code in the
431
427
    0       OK
432
428
 */
433
429
 
434
 
int store_create_info(TableList *table_list, String *packet, HA_CREATE_INFO *create_info_arg, bool is_if_not_exists)
 
430
int store_create_info(TableList *table_list, String *packet, bool is_if_not_exists)
435
431
{
436
432
  List<Item> field_list;
437
433
  char tmp[MAX_FIELD_WIDTH], *for_str, def_value_buf[MAX_FIELD_WIDTH];
629
625
      to the CREATE TABLE statement
630
626
    */
631
627
 
632
 
    /*
633
 
      IF   check_create_info
634
 
      THEN add ENGINE only if it was used when creating the table
 
628
    /* 
 
629
      We should always store engine since we will now be 
 
630
      making sure engines accept options (aka... no
 
631
      dangling arguments for engines.
635
632
    */
636
 
    if (!create_info_arg ||
637
 
        (create_info_arg->used_fields & HA_CREATE_USED_ENGINE))
638
 
    {
639
 
      packet->append(STRING_WITH_LEN(" ENGINE="));
640
 
      packet->append(cursor->engine->getName().c_str());
641
 
    }
 
633
    packet->append(STRING_WITH_LEN(" ENGINE="));
 
634
    packet->append(cursor->engine->getName().c_str());
642
635
 
643
636
    if (share->db_create_options & HA_OPTION_PACK_KEYS)
644
637
      packet->append(STRING_WITH_LEN(" PACK_KEYS=1"));