summaryrefslogtreecommitdiff
path: root/innobase/dict/dict0load.c
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2004-10-01 11:51:59 +0300
committerunknown <marko@hundin.mysql.fi>2004-10-01 11:51:59 +0300
commita418a35ceba85354328b5f75bb4e908f88b6759f (patch)
treecd5df16f04eff773fc341cd412fa9d695ff0680c /innobase/dict/dict0load.c
parent927179ecd464e6dca78d0eabc2653ec63072456f (diff)
downloadmariadb-git-a418a35ceba85354328b5f75bb4e908f88b6759f.tar.gz
InnoDB: quote identifiers according to MySQL settings (Bug #5292)
innobase/btr/btr0btr.c: Add parameter to ut_print_name() and dict_index_name_print() calls innobase/btr/btr0cur.c: Add parameter to dict_index_name_print() calls innobase/buf/buf0buf.c: Add parameter to dict_index_name_print() calls innobase/dict/dict0crea.c: Add parameter to ut_print_name() calls innobase/dict/dict0dict.c: Add parameter to ut_print_name() calls Update documentation links to http://dev.mysql.com innobase/dict/dict0load.c: Add parameter to ut_print_name() calls innobase/fil/fil0fil.c: Use ut_print_filename() Update links to documentation to http://dev.mysql.com innobase/ibuf/ibuf0ibuf.c: Replaced printf(...) with fprintf(stderr,...) innobase/include/dict0dict.h: Added trx parameters innobase/include/row0row.h: Added trx parameter innobase/include/row0sel.h: Added trx parameter innobase/include/row0upd.h: Added trx parameters innobase/include/row0upd.ic: Added trx parameter for dict_index_name_print() innobase/include/trx0rec.h: Added trx parameter innobase/include/ut0ut.h: Added ut_print_filename() Added trx parameter to ut_print_name() and ut_print_namel() innobase/lock/lock0lock.c: Added parameter to dict_index_name_print() and ut_print_name() calls innobase/page/page0page.c: Added parameter to dict_index_name_print() calls innobase/pars/pars0opt.c: Added parameter to dict_index_name_print() call innobase/pars/pars0pars.c: Added parameter to upd_field_set_field_no() call innobase/row/row0ins.c: Added trx parameters innobase/row/row0mysql.c: Added trx parameters innobase/row/row0purge.c: Added trx parameter innobase/row/row0row.c: Added trx parameter innobase/row/row0sel.c: Added trx parameters innobase/row/row0umod.c: Added trx parameters innobase/row/row0upd.c: Added trx parameters innobase/trx/trx0rec.c: Added trx parameters innobase/trx/trx0roll.c: Added parameter to ut_print_name() calls innobase/ut/ut0ut.c: Added ut_print_filename() Added trx parameter to ut_print_namel() and ut_print_name() calls sql/ha_innodb.cc: Added trx parameters Rewrote mysql_get_identifier_quote_char() sql/mysql_priv.h: Added get_quote_char_for_identifier() sql/sql_show.cc: Added get_quote_char_for_identifier() Removed append_quoted_simple_identifier() Make append_identifier() use get_quote_char_for_identifier()
Diffstat (limited to 'innobase/dict/dict0load.c')
-rw-r--r--innobase/dict/dict0load.c48
1 files changed, 20 insertions, 28 deletions
diff --git a/innobase/dict/dict0load.c b/innobase/dict/dict0load.c
index ee4ae9dd1a1..9293b117899 100644
--- a/innobase/dict/dict0load.c
+++ b/innobase/dict/dict0load.c
@@ -30,7 +30,7 @@ dict_get_first_table_name_in_db(
/* out, own: table name, NULL if
does not exist; the caller must
free the memory in the string! */
- const char* name) /* in: database name which ends to '/' */
+ const char* name) /* in: database name which ends in '/' */
{
dict_table_t* sys_tables;
btr_pcur_t pcur;
@@ -165,7 +165,7 @@ loop:
if (table == NULL) {
fputs("InnoDB: Failed to load table ", stderr);
- ut_print_namel(stderr, field, len);
+ ut_print_namel(stderr, NULL, field, len);
putc('\n', stderr);
} else {
/* The table definition was corrupt if there
@@ -389,18 +389,16 @@ Report that an index field or index for a table has been delete marked. */
static
void
dict_load_report_deleted_index(
+/*===========================*/
const char* name, /* in: table name */
ulint field) /* in: index field, or ULINT_UNDEFINED */
{
- fputs("InnoDB: Error: data dictionary entry"
- " for table ", stderr);
- ut_print_name(stderr, name);
- fputs(" is corrupt!\n", stderr);
+ fprintf(stderr, "InnoDB: Error: data dictionary entry"
+ " for table %s is corrupt!\n", name);
if (field != ULINT_UNDEFINED) {
fprintf(stderr,
"InnoDB: Index field %lu is delete marked.\n", field);
- }
- else {
+ } else {
fputs("InnoDB: An index is delete marked.\n", stderr);
}
}
@@ -620,12 +618,10 @@ dict_load_indexes(
if (page_no == FIL_NULL) {
- fputs("InnoDB: Error: trying to load index ", stderr);
- ut_print_name(stderr, name_buf);
- fputs(" for table ", stderr);
- ut_print_name(stderr, table->name);
- fputs("\n"
- "InnoDB: but the index tree has been freed!\n", stderr);
+ fprintf(stderr,
+ "InnoDB: Error: trying to load index %s for table %s\n"
+ "InnoDB: but the index tree has been freed!\n",
+ name_buf, table->name);
btr_pcur_close(&pcur);
mtr_commit(&mtr);
@@ -636,12 +632,10 @@ dict_load_indexes(
if ((type & DICT_CLUSTERED) == 0
&& NULL == dict_table_get_first_index(table)) {
- fputs("InnoDB: Error: trying to load index ", stderr);
- ut_print_namel(stderr, name_buf, name_len);
- fputs(" for table ", stderr);
- ut_print_name(stderr, table->name);
- fputs("\n"
- "InnoDB: but the first index is not clustered!\n", stderr);
+ fprintf(stderr,
+ "InnoDB: Error: trying to load index %s for table %s\n"
+ "InnoDB: but the first index is not clustered!\n",
+ name_buf, table->name);
btr_pcur_close(&pcur);
mtr_commit(&mtr);
@@ -1097,10 +1091,9 @@ dict_load_foreign(
|| rec_get_deleted_flag(rec)) {
/* Not found */
- fputs("InnoDB: Error A: cannot load foreign constraint ",
- stderr);
- ut_print_name(stderr, id);
- putc('\n', stderr);
+ fprintf(stderr,
+ "InnoDB: Error A: cannot load foreign constraint %s\n",
+ id);
btr_pcur_close(&pcur);
mtr_commit(&mtr);
@@ -1114,10 +1107,9 @@ dict_load_foreign(
/* Check if the id in record is the searched one */
if (len != ut_strlen(id) || ut_memcmp(id, field, len) != 0) {
- fputs("InnoDB: Error B: cannot load foreign constraint ",
- stderr);
- ut_print_name(stderr, id);
- putc('\n', stderr);
+ fprintf(stderr,
+ "InnoDB: Error B: cannot load foreign constraint %s\n",
+ id);
btr_pcur_close(&pcur);
mtr_commit(&mtr);