~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_share.h

  • Committer: Eric Day
  • Date: 2010-03-25 19:28:37 UTC
  • mfrom: (1405 staging)
  • mto: This revision was merged to the branch mainline in revision 1409.
  • Revision ID: eday@oddments.org-20100325192837-4exmacbrywjovsqp
Merged trunk, rsolved conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
584
584
    RETURN
585
585
    Length of key
586
586
  */
587
 
 
588
 
  static inline uint32_t createKey(char *key, std::string& db_arg,
589
 
                                   std::string& table_name_arg)
590
 
  {
591
 
    return createKey(key, db_arg.c_str(), table_name_arg.c_str());
592
 
  }
593
 
 
594
587
  static inline uint32_t createKey(char *key, const char *db_arg, const char *table_name_arg)
595
588
  {
596
589
    uint32_t key_length;
604
597
    return key_length;
605
598
  }
606
599
 
 
600
  static inline uint32_t createKey(char *key, TableIdentifier &identifier)
 
601
  {
 
602
    uint32_t key_length;
 
603
    char *key_pos= key;
 
604
 
 
605
    key_pos= strcpy(key_pos, identifier.getSchemaName().c_str()) + identifier.getSchemaName().length();
 
606
    key_pos= strcpy(key_pos + 1, identifier.getTableName().c_str()) + identifier.getTableName().length();
 
607
    key_length= (uint32_t)(key_pos-key)+1;
 
608
 
 
609
    return key_length;
 
610
  }
 
611
 
607
612
  static void cacheStart(void);
608
613
  static void cacheStop(void);
609
614
  static void release(TableShare *share);
610
615
  static void release(const char *key, uint32_t key_length);
611
616
  static TableDefinitionCache &getCache();
612
617
  static TableShare *getShare(TableIdentifier &identifier);
613
 
  static TableShare *getShare(const char *db, const char *table_name);
614
618
  static TableShare *getShare(Session *session, 
615
619
                              TableList *table_list, char *key,
616
620
                              uint32_t key_length, uint32_t, int *error);