543
543
if (use_mb(default_charset_info))
545
545
/* Warn that we may be changing the size of character columns */
546
sql_print_warning("'%s' had no or invalid character set, "
546
sql_print_warning(_("'%s' had no or invalid character set, "
547
547
"and default character set is multi-byte, "
548
"so character column sizes may have changed",
548
"so character column sizes may have changed"),
549
549
share->path.str);
551
551
share->table_charset= default_charset_info;
980
980
field_length= my_decimal_precision_to_length(field_length,
982
982
f_is_dec(pack_flag) == 0);
983
sql_print_error("Found incompatible DECIMAL field '%s' in %s; "
984
"Please do \"ALTER TABLE '%s' FORCE\" to fix it!",
983
sql_print_error(_("Found incompatible DECIMAL field '%s' in %s; "
984
"Please do \"ALTER TABLE '%s' FORCE\" to fix it!"),
985
985
share->fieldnames.type_names[i], share->table_name.str,
986
986
share->table_name.str);
987
987
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
988
988
ER_CRASHED_ON_USAGE,
989
"Found incompatible DECIMAL field '%s' in %s; "
990
"Please do \"ALTER TABLE '%s' FORCE\" to fix it!",
989
_("Found incompatible DECIMAL field '%s' in %s; "
990
"Please do \"ALTER TABLE '%s' FORCE\" to fix it!"),
991
991
share->fieldnames.type_names[i],
992
992
share->table_name.str,
993
993
share->table_name.str);
1158
1158
key_part->store_length-= (uint16_t)(key_part->length -
1159
1159
field->key_length());
1160
1160
key_part->length= (uint16_t)field->key_length();
1161
sql_print_error("Found wrong key definition in %s; "
1162
"Please do \"ALTER TABLE '%s' FORCE \" to fix it!",
1161
sql_print_error(_("Found wrong key definition in %s; "
1162
"Please do \"ALTER TABLE '%s' FORCE \" to fix it!"),
1163
1163
share->table_name.str,
1164
1164
share->table_name.str);
1165
1165
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
1166
1166
ER_CRASHED_ON_USAGE,
1167
"Found wrong key definition in %s; "
1167
_("Found wrong key definition in %s; "
1168
1168
"Please do \"ALTER TABLE '%s' FORCE\" to fix "
1170
1170
share->table_name.str,
1171
1171
share->table_name.str);
1172
1172
share->crashed= 1; // Marker for CHECK TABLE
1809
1809
my_printf_error(ER_UNKNOWN_COLLATION,
1810
"Unknown collation '%s' in table '%-.64s' definition",
1810
_("Unknown collation '%s' in table '%-.64s' definition"),
1811
1811
MYF(0), csname, share->table_name.str);
1815
1815
strxmov(buff, share->normalized_path.str, reg_ext, NullS);
1816
1816
my_printf_error(ER_NOT_FORM_FILE,
1817
"Table '%-.64s' was created with a different version "
1818
"of MySQL and cannot be read",
1817
_("Table '%-.64s' was created with a different version "
1818
"of MySQL and cannot be read"),
2403
2403
Still this can be a sign of a tampered table, output an error
2404
2404
to the error log.
2406
sql_print_error("Incorrect definition of table %s.%s: "
2407
"expected column '%s' at position %d, found '%s'.",
2406
sql_print_error(_("Incorrect definition of table %s.%s: "
2407
"expected column '%s' at position %d, found '%s'."),
2408
2408
table->s->db.str, table->alias, table_def->name.str, i,
2409
2409
field->field_name);
2429
2429
if (strncmp(sql_type.c_ptr_safe(), table_def->type.str,
2430
2430
table_def->type.length - 1))
2432
sql_print_error("Incorrect definition of table %s.%s: "
2432
sql_print_error(_("Incorrect definition of table %s.%s: "
2433
2433
"expected column '%s' at position %d to have type "
2434
"%s, found type %s.", table->s->db.str, table->alias,
2434
"%s, found type %s."), table->s->db.str, table->alias,
2435
2435
table_def->name.str, i, table_def->type.str,
2436
2436
sql_type.c_ptr_safe());
2439
2439
else if (table_def->cset.str && !field->has_charset())
2441
sql_print_error("Incorrect definition of table %s.%s: "
2441
sql_print_error(_("Incorrect definition of table %s.%s: "
2442
2442
"expected the type of column '%s' at position %d "
2443
2443
"to have character set '%s' but the type has no "
2444
"character set.", table->s->db.str, table->alias,
2444
"character set."), table->s->db.str, table->alias,
2445
2445
table_def->name.str, i, table_def->cset.str);
2448
2448
else if (table_def->cset.str &&
2449
2449
strcmp(field->charset()->csname, table_def->cset.str))
2451
sql_print_error("Incorrect definition of table %s.%s: "
2451
sql_print_error(_("Incorrect definition of table %s.%s: "
2452
2452
"expected the type of column '%s' at position %d "
2453
2453
"to have character set '%s' but found "
2454
"character set '%s'.", table->s->db.str, table->alias,
2454
"character set '%s'."), table->s->db.str, table->alias,
2455
2455
table_def->name.str, i, table_def->cset.str,
2456
2456
field->charset()->csname);
2462
sql_print_error("Incorrect definition of table %s.%s: "
2462
sql_print_error(_("Incorrect definition of table %s.%s: "
2463
2463
"expected column '%s' at position %d to have type %s "
2464
" but the column is not found.",
2464
" but the column is not found."),
2465
2465
table->s->db.str, table->alias,
2466
2466
table_def->name.str, i, table_def->type.str);