~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_proto_write.cc

  • Committer: Patrick Crews
  • Date: 2010-08-17 16:41:12 UTC
  • mfrom: (1711.6.2 staging)
  • mto: This revision was merged to the branch mainline in revision 1714.
  • Revision ID: gleebix@gmail.com-20100817164112-vaa55iprokbg6m1k
Merge Brian's recursive mutex removal tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
#include "config.h"
17
17
#include <drizzled/error.h>
96
96
 
97
97
    message::Table::Field::FieldType parser_type= attribute->type();
98
98
 
99
 
    if (field_arg->sql_type == DRIZZLE_TYPE_NULL)
100
 
    {
101
 
      my_error(ER_CANT_CREATE_TABLE, MYF(ME_BELL+ME_WAITTANG), table_proto.name().c_str(), -1);
102
 
      return -1;
103
 
    }
104
 
 
105
99
    attribute->set_type(message::internalFieldTypeToFieldProtoType(field_arg->sql_type));
106
100
 
107
101
    switch (attribute->type()) {
363
357
    table_options->set_collation(create_info->default_table_charset->name);
364
358
  }
365
359
 
366
 
  if (create_info->used_fields & HA_CREATE_USED_AUTO)
367
 
    table_options->set_has_user_set_auto_increment_value(true);
368
 
  else
369
 
    table_options->set_has_user_set_auto_increment_value(false);
370
 
 
371
360
  if (create_info->auto_increment_value)
372
361
    table_options->set_auto_increment_value(create_info->auto_increment_value);
373
362
 
454
443
 
455
444
      idx->set_comment(key_info[i].comment.str);
456
445
    }
457
 
    static const uint64_t unknown_index_flag= (HA_NOSAME | HA_PACK_KEY |
458
 
                                               HA_USES_BLOCK_SIZE | 
459
 
                                               HA_BINARY_PACK_KEY |
460
 
                                               HA_VAR_LENGTH_PART |
461
 
                                               HA_NULL_PART_KEY | 
462
 
                                               HA_KEY_HAS_PART_KEY_SEG |
463
 
                                               HA_GENERATED_KEY |
464
 
                                               HA_USES_COMMENT);
465
 
    if (key_info[i].flags & ~unknown_index_flag)
 
446
    if (key_info[i].flags & 
 
447
        ~(HA_NOSAME | HA_PACK_KEY | HA_USES_BLOCK_SIZE | 
 
448
          HA_BINARY_PACK_KEY | HA_VAR_LENGTH_PART | HA_NULL_PART_KEY | 
 
449
          HA_KEY_HAS_PART_KEY_SEG | HA_GENERATED_KEY | HA_USES_COMMENT))
466
450
      abort(); // Invalid (unknown) index flag.
467
451
 
468
452
    for(unsigned int j=0; j< key_info[i].key_parts; j++)
543
527
*/
544
528
 
545
529
bool rea_create_table(Session *session,
546
 
                      const TableIdentifier &identifier,
 
530
                      TableIdentifier &identifier,
547
531
                      message::Table &table_proto,
548
532
                      HA_CREATE_INFO *create_info,
549
533
                      List<CreateField> &create_fields,