summaryrefslogtreecommitdiff
path: root/innobase/include
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/include
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/include')
-rw-r--r--innobase/include/dict0dict.h3
-rw-r--r--innobase/include/row0row.h3
-rw-r--r--innobase/include/row0sel.h3
-rw-r--r--innobase/include/row0upd.h5
-rw-r--r--innobase/include/row0upd.ic5
-rw-r--r--innobase/include/trx0rec.h1
-rw-r--r--innobase/include/ut0ut.h13
7 files changed, 28 insertions, 5 deletions
diff --git a/innobase/include/dict0dict.h b/innobase/include/dict0dict.h
index ebb34f7dda0..a1a1ebdfe08 100644
--- a/innobase/include/dict0dict.h
+++ b/innobase/include/dict0dict.h
@@ -356,6 +356,7 @@ dict_print_info_on_foreign_keys(
a CREATE TABLE, otherwise in the format
of SHOW TABLE STATUS */
FILE* file, /* in: file where to print */
+ trx_t* trx, /* in: transaction */
dict_table_t* table); /* in: table */
/**************************************************************************
Outputs info on a foreign key of a table in a format suitable for
@@ -364,6 +365,7 @@ void
dict_print_info_on_foreign_key_in_create_format(
/*============================================*/
FILE* file, /* in: file where to print */
+ trx_t* trx, /* in: transaction */
dict_foreign_t* foreign);/* in: foreign key constraint */
/************************************************************************
Displays the names of the index and the table. */
@@ -371,6 +373,7 @@ void
dict_index_name_print(
/*==================*/
FILE* file, /* in: output stream */
+ trx_t* trx, /* in: transaction */
const dict_index_t* index); /* in: index to print */
/************************************************************************
Gets the first index on the table (the clustered index). */
diff --git a/innobase/include/row0row.h b/innobase/include/row0row.h
index 3956f3c1692..951e211fb37 100644
--- a/innobase/include/row0row.h
+++ b/innobase/include/row0row.h
@@ -147,12 +147,13 @@ row_build_row_ref_in_tuple(
dtuple_t* ref, /* in/out: row reference built; see the
NOTE below! */
dict_index_t* index, /* in: index */
- rec_t* rec); /* in: record in the index;
+ rec_t* rec, /* in: record in the index;
NOTE: the data fields in ref will point
directly into this record, therefore,
the buffer page of this record must be
at least s-latched and the latch held
as long as the row reference is used! */
+ trx_t* trx); /* in: transaction */
/***********************************************************************
From a row build a row reference with which we can search the clustered
index record. */
diff --git a/innobase/include/row0sel.h b/innobase/include/row0sel.h
index 0be224eb255..bb6fb70ca86 100644
--- a/innobase/include/row0sel.h
+++ b/innobase/include/row0sel.h
@@ -105,7 +105,8 @@ row_sel_convert_mysql_key_to_innobase(
ulint buf_len, /* in: buffer length */
dict_index_t* index, /* in: index of the key value */
byte* key_ptr, /* in: MySQL key value */
- ulint key_len); /* in: MySQL key value length */
+ ulint key_len, /* in: MySQL key value length */
+ trx_t* trx); /* in: transaction */
/************************************************************************
Searches for rows in the database. This is used in the interface to
MySQL. This function opens a cursor, and also implements fetch next
diff --git a/innobase/include/row0upd.h b/innobase/include/row0upd.h
index f5e0a88231f..28210364833 100644
--- a/innobase/include/row0upd.h
+++ b/innobase/include/row0upd.h
@@ -55,7 +55,8 @@ upd_field_set_field_no(
upd_field_t* upd_field, /* in: update vector field */
ulint field_no, /* in: field number in a clustered
index */
- dict_index_t* index); /* in: index */
+ dict_index_t* index, /* in: index */
+ trx_t* trx); /* in: transaction */
/*************************************************************************
Writes into the redo log the values of trx id and roll ptr and enough info
to determine their positions within a clustered index record. */
@@ -149,6 +150,7 @@ row_upd_build_sec_rec_difference_binary(
dict_index_t* index, /* in: index */
dtuple_t* entry, /* in: entry to insert */
rec_t* rec, /* in: secondary index record */
+ trx_t* trx, /* in: transaction */
mem_heap_t* heap); /* in: memory heap from which allocated */
/*******************************************************************
Builds an update vector from those fields, excluding the roll ptr and
@@ -166,6 +168,7 @@ row_upd_build_difference_binary(
externally stored fields in entry, or NULL */
ulint n_ext_vec,/* in: number of fields in ext_vec */
rec_t* rec, /* in: clustered index record */
+ trx_t* trx, /* in: transaction */
mem_heap_t* heap); /* in: memory heap from which allocated */
/***************************************************************
Replaces the new column values stored in the update vector to the index entry
diff --git a/innobase/include/row0upd.ic b/innobase/include/row0upd.ic
index d89938d696a..a124228a0de 100644
--- a/innobase/include/row0upd.ic
+++ b/innobase/include/row0upd.ic
@@ -78,7 +78,8 @@ upd_field_set_field_no(
upd_field_t* upd_field, /* in: update vector field */
ulint field_no, /* in: field number in a clustered
index */
- dict_index_t* index) /* in: index */
+ dict_index_t* index, /* in: index */
+ trx_t* trx) /* in: transaction */
{
upd_field->field_no = field_no;
@@ -86,7 +87,7 @@ upd_field_set_field_no(
fprintf(stderr,
"InnoDB: Error: trying to access field %lu in ",
(ulong) field_no);
- dict_index_name_print(stderr, index);
+ dict_index_name_print(stderr, trx, index);
fprintf(stderr, "\n"
"InnoDB: but index only has %lu fields\n",
(ulong) dict_index_get_n_fields(index));
diff --git a/innobase/include/trx0rec.h b/innobase/include/trx0rec.h
index 50d942d9040..9d7f41cd94e 100644
--- a/innobase/include/trx0rec.h
+++ b/innobase/include/trx0rec.h
@@ -145,6 +145,7 @@ trx_undo_update_rec_get_update(
dulint trx_id, /* in: transaction id from this undorecord */
dulint roll_ptr,/* in: roll pointer from this undo record */
ulint info_bits,/* in: info bits from this undo record */
+ trx_t* trx, /* in: transaction */
mem_heap_t* heap, /* in: memory heap from which the memory
needed is allocated */
upd_t** upd); /* out, own: update vector */
diff --git a/innobase/include/ut0ut.h b/innobase/include/ut0ut.h
index f4a682c57ec..dee8785c9e7 100644
--- a/innobase/include/ut0ut.h
+++ b/innobase/include/ut0ut.h
@@ -198,12 +198,24 @@ ut_print_buf(
ulint len); /* in: length of the buffer */
/**************************************************************************
+Outputs a NUL-terminated file name, quoted with apostrophes. */
+
+void
+ut_print_filename(
+/*==============*/
+ FILE* f, /* in: output stream */
+ const char* name); /* in: name to print */
+
+/**************************************************************************
Outputs a NUL-terminated string, quoted as an SQL identifier. */
+struct trx_struct;
+
void
ut_print_name(
/*==========*/
FILE* f, /* in: output stream */
+ struct trx_struct*trx, /* in: transaction */
const char* name); /* in: name to print */
/**************************************************************************
@@ -213,6 +225,7 @@ void
ut_print_namel(
/*==========*/
FILE* f, /* in: output stream */
+ struct trx_struct*trx, /* in: transaction (NULL=no quotes) */
const char* name, /* in: name to print */
ulint namelen);/* in: length of name */