mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Added TRASH() to table->record[0] to find out if we access not initialzed data.
- Changed Cached_item_field not copy data for fields with NULL value - In key_copy() and key_restore() don't copy data for fields with NULL value Fixed code to avoid valgrind warnings - Use c_ptr_safe instead of c_ptr() Removed "QQ" from comments (QQ was ment to be used for internal comments that should be removed before pushing) Fixed wrong alias used (from previous patch) sql/event_db_repository.cc: Update testing if event table is valid (to avoid valgrind errors) sql/ha_partition.cc: m_ordered_scan_ongoing was not initialized Reset null bits in record to avoid valgrind errors sql/handler.h: Added flag if storage engine will write row verbatim and the row contains varchar or null fields (in which case we must clear the row to avoid valgrind warnings) sql/item_buff.cc: Changed Cached_item_field not copy data for fields with NULL value (Optimization and avoids valgrind warnings) sql/item_func.cc: c_ptr() -> c_ptr_safe() sql/key.cc: In key_copy() and key_restore() don't copy data for fields with NULL value sql/opt_range.cc: c_ptr() -> c_ptr_safe() sql/sql_base.cc: Added TRASH() to table->record[0] to find out if we access not initialzed data. Initialize null_bytes to: - Get consistent tests - Ensure we don't get valgrind warnings for null fields (as we may only update a couple of bits in a byte) sql/sql_class.cc: Removed "QQ" from comments sql/sql_insert.cc: Initialize row to default values if we are using valgrind and row will be copied verbatim to disk in storage engine. sql/sql_load.cc: QQ -> TODO sql/sql_parse.cc: Removed old not used code marked QQ and withing "#ifdef REMOVED" sql/sql_select.cc: QQ -> TODO Initialize some variables that was used uninitialized Added DBUG_ASSERT() to find out if thd was not properly initialized for sub queries sql/sql_test.cc: Fixed format for printing to DBUG file Fixed wrong alias used (from previous patch) sql/sql_trigger.h: QQ -> TODO sql/table.cc: QQ -> TODO storage/maria/ha_maria.cc: Mark table with HA_RECORD_MUST_BE_CLEAN_ON_WRITE, if row is written verbatim to disk and contains varchar or null fields. storage/maria/ma_open.c: Added flags if table has varchar or null fields storage/maria/maria_def.h: Added flags if table has varchar or null fields storage/myisam/ha_myisam.cc: Mark table with HA_RECORD_MUST_BE_CLEAN_ON_WRITE, if row is written verbatim to disk and contains varchar or null fields. storage/myisam/mi_open.c: Fixed memory overrun bug when using fulltext keys storage/xtradb/row/row0sel.c: Removed initialization of null bits. (not needed anymore)
This commit is contained in:
@ -241,11 +241,11 @@ void print_keyuse(KEYUSE *keyuse)
|
||||
fieldname= keyuse->table->key_info[keyuse->key].key_part[keyuse->keypart].field->field_name;
|
||||
longlong2str(keyuse->used_tables, buf2, 16, 0);
|
||||
DBUG_LOCK_FILE;
|
||||
fprintf(DBUG_FILE, "KEYUSE: %s.%s=%s optimize= %d used_tables=%s "
|
||||
"ref_table_rows= %lu keypart_map= %0lx\n",
|
||||
keyuse->table->alias, fieldname, str.ptr(),
|
||||
keyuse->optimize, buf2, (ulong)keyuse->ref_table_rows,
|
||||
keyuse->keypart_map);
|
||||
fprintf(DBUG_FILE, "KEYUSE: %s.%s=%s optimize: %u used_tables: %s "
|
||||
"ref_table_rows: %lu keypart_map: %0lx\n",
|
||||
keyuse->table->alias.c_ptr(), fieldname, str.ptr(),
|
||||
(uint) keyuse->optimize, buf2, (ulong) keyuse->ref_table_rows,
|
||||
(ulong) keyuse->keypart_map);
|
||||
DBUG_UNLOCK_FILE;
|
||||
//key_part_map keypart_map; --?? there can be several?
|
||||
}
|
||||
@ -371,7 +371,7 @@ void print_sjm(SJ_MATERIALIZATION_INFO *sjm)
|
||||
for (uint i= 0;i < sjm->tables; i++)
|
||||
{
|
||||
fprintf(DBUG_FILE, " %s%s\n",
|
||||
sjm->positions[i].table->table->alias,
|
||||
sjm->positions[i].table->table->alias.c_ptr(),
|
||||
(i == sjm->tables -1)? "": ",");
|
||||
}
|
||||
fprintf(DBUG_FILE, " }\n");
|
||||
|
Reference in New Issue
Block a user