297
297
share->version= refresh_version;
300
This constant is used to mark that no table map version has been
301
assigned. No arithmetic is done on the value: it will be
302
overwritten with a value taken from MYSQL_BIN_LOG.
304
share->table_map_version= ~(ulonglong)0;
307
300
Since alloc_table_share() can be called without any locking (for
308
301
example, ha_create_table... functions), we do not assign a table
309
302
map id here. Instead we assign a value that is not used
366
359
share->path.length= share->normalized_path.length= strlen(path);
367
360
share->frm_version= FRM_VER_TRUE_VARCHAR;
370
Temporary tables are not replicated, but we set up these fields
371
anyway to be able to catch errors.
373
share->table_map_version= ~(ulonglong)0;
374
362
share->cached_row_logging_check= -1;
2702
2690
char *name= org_name->str;
2703
2691
uint name_length= org_name->length;
2692
bool check_for_path_chars;
2705
2694
if (!name_length || name_length > NAME_LEN)
2697
if ((check_for_path_chars= check_mysql50_prefix(name)))
2699
name+= MYSQL50_TABLE_NAME_PREFIX_LENGTH;
2700
name_length-= MYSQL50_TABLE_NAME_PREFIX_LENGTH;
2708
2703
if (lower_case_table_names && name != any_db)
2709
2704
my_casedn_str(files_charset_info, name);
2711
#if defined(USE_MB) && defined(USE_MB_IDENT)
2712
if (use_mb(system_charset_info))
2715
bool last_char_is_space= TRUE;
2716
char *end= name + org_name->length;
2720
last_char_is_space= my_isspace(system_charset_info, *name);
2721
len= my_ismbchar(system_charset_info, name, end);
2727
return (last_char_is_space || name_length > NAME_CHAR_LEN);
2731
return ((org_name->str[org_name->length - 1] != ' ') ||
2732
(name_length > NAME_CHAR_LEN)); /* purecov: inspected */
2706
return check_table_name(name, name_length, check_for_path_chars);
2736
2711
Allow anything as a table name, as long as it doesn't contain an
2738
2713
returns 1 on error
2742
2716
bool check_table_name(const char *name, uint length, bool check_for_path_chars)
2744
2718
uint name_length= 0; // name length in symbols
4381
Add fields used by a specified index to the table's read_set.
4384
The original state can be restored with
4385
restore_column_maps_after_mark_index().
4388
void st_table::add_read_columns_used_by_index(uint index)
4390
MY_BITMAP *bitmap= &tmp_set;
4391
DBUG_ENTER("st_table::add_read_columns_used_by_index");
4394
bitmap_copy(bitmap, read_set);
4395
mark_columns_used_by_index_no_reset(index, bitmap);
4396
column_bitmaps_set(bitmap, write_set);
4407
4402
Restore to use normal column maps after key read