summaryrefslogtreecommitdiff
path: root/innobase/row/row0sel.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/row/row0sel.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/row/row0sel.c')
-rw-r--r--innobase/row/row0sel.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c
index 2c0092adc6e..f8ebed4ea1c 100644
--- a/innobase/row/row0sel.c
+++ b/innobase/row/row0sel.c
@@ -1942,7 +1942,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 */
{
byte* original_buf = buf;
byte* original_key_ptr = key_ptr;
@@ -2025,7 +2026,7 @@ row_sel_convert_mysql_key_to_innobase(
ut_print_timestamp(stderr);
fputs(
" InnoDB: Error: BLOB or TEXT prefix > 255 bytes in query to table ", stderr);
- ut_print_name(stderr, index->table_name);
+ ut_print_name(stderr, trx, index->table_name);
putc('\n', stderr);
}
@@ -2069,11 +2070,13 @@ row_sel_convert_mysql_key_to_innobase(
ut_print_timestamp(stderr);
- fprintf(stderr,
+ fputs(
" InnoDB: Warning: using a partial-field key prefix in search.\n"
- "InnoDB: Table name %s, index name %s. Last data field length %lu bytes,\n"
+ "InnoDB: ", stderr);
+ dict_index_name_print(stderr, trx, index);
+ fprintf(stderr, ". Last data field length %lu bytes,\n"
"InnoDB: key ptr now exceeds key end by %lu bytes.\n"
- "InnoDB: Key value in the MySQL format:\n", index->table_name, index->name,
+ "InnoDB: Key value in the MySQL format:\n",
(ulong) data_field_len,
(ulong) (key_ptr - key_end));
fflush(stderr);
@@ -2116,7 +2119,7 @@ row_sel_store_row_id_to_prebuilt(
if (len != DATA_ROW_ID_LEN) {
fprintf(stderr,
"InnoDB: Error: Row id field is wrong length %lu in ", (ulong) len);
- dict_index_name_print(stderr, index);
+ dict_index_name_print(stderr, prebuilt->trx, index);
fprintf(stderr, "\n"
"InnoDB: Field number %lu, record:\n",
(ulong) dict_index_get_sys_col_pos(index, DATA_ROW_ID));
@@ -2275,7 +2278,11 @@ row_sel_store_mysql_rec(
ut_print_timestamp(stderr);
fprintf(stderr,
" InnoDB: Warning: could not allocate %lu + 1000000 bytes to retrieve\n"
-"InnoDB: a big column. Table name %s\n", (ulong) len, prebuilt->table->name);
+"InnoDB: a big column. Table name ", (ulong) len);
+ ut_print_name(stderr,
+ prebuilt->trx,
+ prebuilt->table->name);
+ putc('\n', stderr);
if (extern_field_heap) {
mem_heap_free(
@@ -2407,8 +2414,9 @@ row_sel_get_clust_rec_for_mysql(
trx_t* trx;
*out_rec = NULL;
+ trx = thr_get_trx(thr);
- row_build_row_ref_in_tuple(prebuilt->clust_ref, sec_index, rec);
+ row_build_row_ref_in_tuple(prebuilt->clust_ref, sec_index, rec, trx);
clust_index = dict_table_get_first_index(sec_index->table);
@@ -2441,7 +2449,7 @@ row_sel_get_clust_rec_for_mysql(
fputs(" InnoDB: error clustered record"
" for sec rec not found\n"
"InnoDB: ", stderr);
- dict_index_name_print(stderr, sec_index);
+ dict_index_name_print(stderr, trx, sec_index);
fputs("\n"
"InnoDB: sec index record ", stderr);
rec_print(stderr, rec);
@@ -2449,7 +2457,7 @@ row_sel_get_clust_rec_for_mysql(
"InnoDB: clust index record ", stderr);
rec_print(stderr, clust_rec);
putc('\n', stderr);
- trx_print(stderr, thr_get_trx(thr));
+ trx_print(stderr, trx);
fputs("\n"
"InnoDB: Submit a detailed bug report to http://bugs.mysql.com\n", stderr);
@@ -2477,8 +2485,6 @@ row_sel_get_clust_rec_for_mysql(
/* This is a non-locking consistent read: if necessary, fetch
a previous version of the record */
- trx = thr_get_trx(thr);
-
old_vers = NULL;
/* If the isolation level allows reading of uncommitted data,
@@ -2803,7 +2809,7 @@ row_search_for_mysql(
"InnoDB: Error: trying to free a corrupt\n"
"InnoDB: table handle. Magic n %lu, table name ",
(ulong) prebuilt->magic_n);
- ut_print_name(stderr, prebuilt->table->name);
+ ut_print_name(stderr, trx, prebuilt->table->name);
putc('\n', stderr);
mem_analyze_corruption((byte*)prebuilt);
@@ -3237,7 +3243,7 @@ rec_loop:
(ulong) (rec - buf_frame_align(rec)),
(ulong) next_offs,
(ulong) buf_frame_get_page_no(rec));
- dict_index_name_print(stderr, index);
+ dict_index_name_print(stderr, trx, index);
fputs(". Run CHECK TABLE. You may need to\n"
"InnoDB: restore from a backup, or dump + drop + reimport the table.\n",
stderr);
@@ -3255,7 +3261,7 @@ rec_loop:
(ulong) (rec - buf_frame_align(rec)),
(ulong) next_offs,
(ulong) buf_frame_get_page_no(rec));
- dict_index_name_print(stderr, index);
+ dict_index_name_print(stderr, trx, index);
fputs(". We try to skip the rest of the page.\n",
stderr);
@@ -3274,7 +3280,7 @@ rec_loop:
(ulong) (rec - buf_frame_align(rec)),
(ulong) next_offs,
(ulong) buf_frame_get_page_no(rec));
- dict_index_name_print(stderr, index);
+ dict_index_name_print(stderr, trx, index);
fputs(". We try to skip the record.\n",
stderr);