summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-10-22 18:44:51 +0300
committerunknown <monty@mysql.com>2004-10-22 18:44:51 +0300
commitbc6652db9b1f5f302648c3a920fb1fa25449a6d8 (patch)
tree6faefd7a2f197f4031ef94eb74fc71f8f2936185 /innobase
parentcfcca61a177eecacdc2c525c1ba4fea082b1b1c4 (diff)
downloadmariadb-git-bc6652db9b1f5f302648c3a920fb1fa25449a6d8.tar.gz
Fix compiler warnings (detected by Intel's C++ compiler)
Fixed checking of privilege handling in CREATE ... SELECT (Bug #6094) client/mysql.cc: Fix compiler warnings client/mysqltest.c: Fix wrong counting of lines Remove compiler warnings heap/hp_hash.c: Fix compiler warnings innobase/dict/dict0load.c: Fix compiler warnings innobase/include/mem0mem.h: Fix compiler warnings libmysql/client_settings.h: Fix compiler warnings myisam/ft_nlq_search.c: Add comments about compiler warnings myisam/rt_index.c: Add comments about compiler warnings myisam/rt_mbr.c: Add comments about compiler warnings mysql-test/r/ps.result: Test case for bug#6094 mysql-test/t/ps.test: Test case for bug#6094 mysys/hash.c: Fix compiler warnings mysys/my_handler.c: Add comments about compiler warnings mysys/my_thr_init.c: Add comments about compiler warnings ndb/include/mgmapi/mgmapi.h: Fix compiler warnings regex/main.c: Fix compiler warnings sql/item.h: Fix compiler warnings sql/item_func.h: Add comments about compiler warnings sql/spatial.h: Add comments about compiler warnings sql/sql_lex.h: Fix compiler warning sql/sql_list.h: Fix compiler warning sql/sql_parse.cc: Move testing of access rights of tables in CREATE ... SELECT to create_table_precheck() to fix privilege checking in CREATE ... SELECT (Bug #6094) sql/sql_prepare.cc: Remove not needed empty line sql/sql_string.h: Fix compiler warnings strings/ctype-mb.c: Fix compiler warnings
Diffstat (limited to 'innobase')
-rw-r--r--innobase/dict/dict0load.c26
-rw-r--r--innobase/include/mem0mem.h6
2 files changed, 15 insertions, 17 deletions
diff --git a/innobase/dict/dict0load.c b/innobase/dict/dict0load.c
index 1866921c589..d430eadc97b 100644
--- a/innobase/dict/dict0load.c
+++ b/innobase/dict/dict0load.c
@@ -92,7 +92,7 @@ loop:
/* We found one */
- char* table_name = mem_strdupl(field, len);
+ char* table_name = mem_strdupl((char*) field, len);
btr_pcur_close(&pcur);
mtr_commit(&mtr);
@@ -154,7 +154,7 @@ loop:
/* We found one */
- char* table_name = mem_strdupl(field, len);
+ char* table_name = mem_strdupl((char*) field, len);
btr_pcur_store_position(&pcur, &mtr);
@@ -246,7 +246,7 @@ loop:
/* We found one */
- char* name = mem_strdupl(field, len);
+ char* name = mem_strdupl((char*) field, len);
field = rec_get_nth_field(rec, 9, &len);
ut_a(len == 4);
@@ -347,7 +347,7 @@ dict_load_columns(
dict_table_get_first_index(sys_columns), 4))->name));
field = rec_get_nth_field(rec, 4, &len);
- name = mem_heap_strdupl(heap, field, len);
+ name = mem_heap_strdupl(heap, (char*) field, len);
field = rec_get_nth_field(rec, 5, &len);
mtype = mach_read_from_4(field);
@@ -494,7 +494,7 @@ dict_load_fields(
field = rec_get_nth_field(rec, 4, &len);
dict_mem_index_add_field(index,
- mem_heap_strdupl(heap, field, len), 0, prefix_len);
+ mem_heap_strdupl(heap, (char*) field, len), 0, prefix_len);
btr_pcur_move_to_next_user_rec(&pcur, &mtr);
}
@@ -597,7 +597,7 @@ dict_load_indexes(
dict_table_get_first_index(sys_indexes), 4))->name));
field = rec_get_nth_field(rec, 4, &name_len);
- name_buf = mem_heap_strdupl(heap, field, name_len);
+ name_buf = mem_heap_strdupl(heap, (char*) field, name_len);
field = rec_get_nth_field(rec, 5, &len);
n_fields = mach_read_from_4(field);
@@ -805,7 +805,7 @@ dict_load_table(
table->mix_id = mach_read_from_8(field);
field = rec_get_nth_field(rec, 8, &len);
- table->cluster_name = mem_heap_strdupl(heap, field, len);
+ table->cluster_name = mem_heap_strdupl(heap, (char*) field, len);
#endif
}
@@ -938,7 +938,7 @@ dict_load_table_on_id(
/* Now we get the table name from the record */
field = rec_get_nth_field(rec, 1, &len);
/* Load the table definition to memory */
- table = dict_load_table(mem_heap_strdupl(heap, field, len));
+ table = dict_load_table(mem_heap_strdupl(heap, (char*) field, len));
btr_pcur_close(&pcur);
mtr_commit(&mtr);
@@ -1030,11 +1030,11 @@ dict_load_foreign_cols(
field = rec_get_nth_field(rec, 4, &len);
foreign->foreign_col_names[i] =
- mem_heap_strdupl(foreign->heap, field, len);
+ mem_heap_strdupl(foreign->heap, (char*) field, len);
field = rec_get_nth_field(rec, 5, &len);
foreign->referenced_col_names[i] =
- mem_heap_strdupl(foreign->heap, field, len);
+ mem_heap_strdupl(foreign->heap, (char*) field, len);
btr_pcur_move_to_next_user_rec(&pcur, &mtr);
}
@@ -1138,11 +1138,11 @@ dict_load_foreign(
field = rec_get_nth_field(rec, 3, &len);
foreign->foreign_table_name =
- mem_heap_strdupl(foreign->heap, field, len);
+ mem_heap_strdupl(foreign->heap, (char*) field, len);
field = rec_get_nth_field(rec, 4, &len);
foreign->referenced_table_name =
- mem_heap_strdupl(foreign->heap, field, len);
+ mem_heap_strdupl(foreign->heap, (char*) field, len);
btr_pcur_close(&pcur);
mtr_commit(&mtr);
@@ -1256,7 +1256,7 @@ loop:
/* Now we get a foreign key constraint id */
field = rec_get_nth_field(rec, 1, &len);
- id = mem_heap_strdupl(heap, field, len);
+ id = mem_heap_strdupl(heap, (char*) field, len);
btr_pcur_store_position(&pcur, &mtr);
diff --git a/innobase/include/mem0mem.h b/innobase/include/mem0mem.h
index 056d3dc508f..87afdb8f91c 100644
--- a/innobase/include/mem0mem.h
+++ b/innobase/include/mem0mem.h
@@ -136,10 +136,8 @@ void
mem_heap_free_func(
/*===============*/
mem_heap_t* heap, /* in, own: heap to be freed */
- const char* file_name __attribute__((unused)),
- /* in: file name where freed */
- ulint line __attribute__((unused)));
- /* in: line where freed */
+ const char* file_name, /* in: file name where freed */
+ ulint line); /* in: line where freed */
/*******************************************************************
Allocates n bytes of memory from a memory heap. */
UNIV_INLINE