36
36
uint types, char **names);
37
37
static uint find_field(Field **fields, uchar *record, uint start, uint length);
39
inline bool is_system_table_name(const char *name, uint length);
41
39
/**************************************************************************
42
40
Object_creation_ctx implementation.
43
41
**************************************************************************/
146
144
return TABLE_CATEGORY_INFORMATION;
149
if ((db->length == MYSQL_SCHEMA_NAME.length) &&
150
(my_strcasecmp(system_charset_info,
151
MYSQL_SCHEMA_NAME.str,
154
if (is_system_table_name(name->str, name->length))
156
return TABLE_CATEGORY_SYSTEM;
160
147
return TABLE_CATEGORY_USER;
344
331
DBUG_VOID_RETURN;
349
Return TRUE if a table name matches one of the system table names.
352
help_category, help_keyword, help_relation, help_topic,
354
time_zone, time_zone_leap_second, time_zone_name, time_zone_transition,
355
time_zone_transition_type
357
This function trades accuracy for speed, so may return false
358
positives. Presumably mysql.* database is for internal purposes only
359
and should not contain user tables.
362
inline bool is_system_table_name(const char *name, uint length)
364
CHARSET_INFO *ci= system_charset_info;
367
/* mysql.proc table */
370
my_tolower(ci, name[0]) == 'p' &&
371
my_tolower(ci, name[1]) == 'r' &&
372
my_tolower(ci, name[2]) == 'o' &&
373
my_tolower(ci, name[3]) == 'c'
376
/* one of mysql.help* tables */
379
my_tolower(ci, name[0]) == 'h' &&
380
my_tolower(ci, name[1]) == 'e' &&
381
my_tolower(ci, name[2]) == 'l' &&
382
my_tolower(ci, name[3]) == 'p'
385
/* one of mysql.time_zone* tables */
387
my_tolower(ci, name[0]) == 't' &&
388
my_tolower(ci, name[1]) == 'i' &&
389
my_tolower(ci, name[2]) == 'm' &&
390
my_tolower(ci, name[3]) == 'e'
397
335
Read table definition from a binary / text based .frm file
591
531
if (share->frm_version == FRM_VER_TRUE_VARCHAR -1 && head[33] == 5)
592
532
share->frm_version= FRM_VER_TRUE_VARCHAR;
594
legacy_db_type= (enum legacy_db_type) (uint) *(head+3);
534
legacy_db_type= DB_TYPE_FIRST_DYNAMIC;
595
535
DBUG_ASSERT(share->db_plugin == NULL);
597
537
if the storage engine is dynamic, no point in resolving it by its
679
619
keyinfo->block_size= uint2korr(strpos+6);
684
keyinfo->flags= ((uint) strpos[0]) ^ HA_NOSAME;
685
keyinfo->key_length= (uint) uint2korr(strpos+1);
686
keyinfo->key_parts= (uint) strpos[3];
687
keyinfo->algorithm= HA_KEY_ALG_UNDEF;
691
623
keyinfo->key_part= key_part;
692
624
keyinfo->rec_per_key= rec_per_key;