From e94087c5ddc3f5b61ce69cfd51240d1a16999597 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Oct 2006 19:57:33 +0300 Subject: Changed several char* to LEX_STRING*. BUILD/SETUP.sh: Added check for CCACHE_DISABLE. If set, do not use ccache at all. BUILD/compile-pentium-gcov: Moved CCACHE_DISABLE up before going into SETUP.sh. Added debug_extra_flags to extra_flags. mysql-test/r/create.result: Added tests for incorrect database names. mysql-test/r/ctype_create.result: Added tests for incorrect alter database names. mysql-test/r/events.result: Added tests for incorrect database names. mysql-test/r/grant.result: Output changed to capital letters. mysql-test/t/alter_table.test: Removed extra empty line mysql-test/t/create.test: Added tests for incorrect database names. mysql-test/t/ctype_create.test: Added tests for incorrect name handling mysql-test/t/events.test: Added tests for incorrect database names. sql/item_timefunc.cc: Added dummy case to avoid compiler warning. sql/mysql_priv.h: Changed argument from char pointer to LEX_STRING pointer. sql/mysqld.cc: Added a missing component from struct. sql/sql_class.h: Added function LEX_STRING_make that sets the string and length. sql/sql_db.cc: Changed several char pointers to lex_strings. sql/sql_lex.cc: name is now LEX_STRING sql/sql_lex.h: Changed name to LEX_STRING. sql/sql_parse.cc: Changed several char pointers to lex_strings. db_length needed a trick, because in old client protocol there was an extra char zero added to the string. check_db_name() now takes LEX_STRING pointer as an argument. Changed remove_escape() to take LEX_STRING pointer as an argument. Removed COM_CREATE_DB and COM_DROP_DB. These are obsolete. sql/sql_table.cc: char* -> LEX_STRING* sql/sql_yacc.yy: Changed char* -> LEX_STRING* sql/table.cc: check_db_name() now takes LEX_STRING* as argument instead of char*. Optimized code a bit. tests/mysql_client_test.c: Added test for (short) status. After defining out (ifdef) COM_DROP_DB and COM_CREATE_DB in mysqld.cc mysql_client_test needed to be informed that failing in recognizing these commands is not fatal error anymore. --- sql/mysql_priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/mysql_priv.h') diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 7de6f6d04e0..466a37c7d77 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1828,7 +1828,7 @@ int create_frm(THD *thd, const char *name, const char *db, const char *table, HA_CREATE_INFO *create_info, uint keys); void update_create_info_from_table(HA_CREATE_INFO *info, TABLE *form); int rename_file_ext(const char * from,const char * to,const char * ext); -bool check_db_name(char *db); +bool check_db_name(LEX_STRING *db); bool check_column_name(const char *name); bool check_table_name(const char *name, uint length); char *get_field(MEM_ROOT *mem, Field *field); -- cgit v1.2.1 From 2a7cf59fc92ce322671bb687e2941275dd23d1c5 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 31 Oct 2006 17:31:56 -0800 Subject: Fixed bug #21727. This is a performance issue for queries with subqueries evaluation of which requires filesort. Allocation of memory for the sort buffer at each evaluation of a subquery may take a significant amount of time if the buffer is rather big. With the fix we allocate the buffer at the first evaluation of the subquery and reuse it at each subsequent evaluation. mysql-test/r/subselect.result: Added a test case for bug #21727. mysql-test/t/subselect.test: Added a test case for bug #21727. sql/item_subselect.h: Fixed bug #21727. This is a performance issue for queries with subqueries evaluation of which requires filesort. Added an implementation for Item_subselect::is_uncacheable() returning TRUE if the engine if the subselect is uncacheable. sql/mysql_priv.h: Fixed bug #21727. This is a performance issue for queries with subqueries evaluation of which requires filesort. Added a new boolean parameter to the filesort_free_buffers procedure. If the value of this parameter is TRUE the procedure frees the sort_keys buffpek buffers. sql/records.cc: Fixed bug #21727. This is a performance issue for queries with subqueries evaluation of which requires filesort. Added a new boolean parameter to the filesort_free_buffers procedure. If the value of this parameter is TRUE the procedure frees the sort_keys buffpek buffers. sql/sql_base.cc: Fixed bug #21727. Made sure that st_table::pos_in_table_list would be always initialized. sql/sql_select.cc: Fixed bug #21727. This is a performance issue for queries with subqueries evaluation of which requires filesort. Added a new boolean parameter to the filesort_free_buffers procedure. If the value of this parameter is TRUE the procedure frees the sort_keys buffpek buffers. sql/sql_show.cc: Fixed bug #21727. This is a performance issue for queries with subqueries evaluation of which requires filesort. Added a new boolean parameter to the filesort_free_buffers procedure. If the value of this parameter is TRUE the procedure frees the sort_keys buffpek buffers. sql/sql_table.cc: Fixed bug #21727. This is a performance issue for queries with subqueries evaluation of which requires filesort. Cleanup. sql/table.cc: Fixed bug #21727. This is a performance issue for queries with subqueries evaluation of which requires filesort. Added st_table_list::in_subselect() returning for a table the subselect that contains the FROM list this table is taken from (if there is any). sql/table.h: Fixed bug #21727. This is a performance issue for queries with subqueries evaluation of which requires filesort. Added fields for sort_keys and buffpek buffers to the FILESORT_INFO structure. --- sql/mysql_priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/mysql_priv.h') diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index ea3b3a9bd83..13e44b49b53 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1465,7 +1465,7 @@ void end_read_record(READ_RECORD *info); ha_rows filesort(THD *thd, TABLE *form,struct st_sort_field *sortorder, uint s_length, SQL_SELECT *select, ha_rows max_rows, ha_rows *examined_rows); -void filesort_free_buffers(TABLE *table); +void filesort_free_buffers(TABLE *table, bool full); void change_double_for_sort(double nr,byte *to); double my_double_round(double value, int dec, bool truncate); int get_quick_record(SQL_SELECT *select); -- cgit v1.2.1 From 85a590a26cb2e8d60a630678ae9fbf55fb97f4da Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 21 Nov 2006 22:32:58 +0200 Subject: Added --debug-info to most clients to detect memory leaks in mysql-test-run Moved .progress files into the log directory Moved 'cluster' database tables into the MySQL database, to not have 'cluster' beeing a reserved database name Fixed bug where mysqld got a core dump when trying to use a table created by MySQL 3.23 Fixed some compiler warnings Fixed small memory leak in libmysql Note that this doesn't changeset doesn't include the new mysqldump.c code required to run some tests. This will be added when I merge 5.0 to 5.1 client/client_priv.h: Added OPT_DEBUG_INFO and OPT_COLUMN_TYPES client/mysql.cc: Split --debug-info into --debug-info and --column-type-info client/mysql_upgrade.c: Give only error info at end if using --debug-info client/mysqladmin.cc: Added --debug-info to detect memory leaks in mysqltest client/mysqlbinlog.cc: Added --debug-info to detect memory leaks in mysqltest client/mysqlcheck.c: Added --debug-info to detect memory leaks in mysqltest client/mysqlimport.c: Added --debug-info to detect memory leaks in mysqltest client/mysqlshow.c: Added --debug-info to detect memory leaks in mysqltest client/mysqltest.c: Added --debug-info to detect memory leaks in mysqltest Added option --logdir to force .progress files in a specific directory libmysql/libmysql.c: Fixed memory leak mysql-test/include/ndb_setup_slave.inc: Moved cluster tables under 'mysql' mysql-test/include/query_cache.inc: Added more tests for query cache mysql-test/lib/init_db.sql: Move cluster.binlog_index -> mysql.binlog_index mysql-test/lib/mtr_report.pl: Find memory leaks mysql-test/mysql-test-run-shell.sh: Added --debug-info to programs to detect memory leaks mysql-test/mysql-test-run.pl: Added --debug-info to programs to detect memory leaks Force log files to var/log cluster tables moved under 'mysql' mysql-test/r/cache_innodb.result: New query cache test with innodb mysql-test/r/connect.result: binlog_index is now in mysql mysql-test/r/drop.result: Removed 'cluster' database mysql-test/r/information_schema.result: Removed 'cluster' database mysql-test/r/mysqlcheck.result: cluster.binlog_index -> mysql.binlog_index mysql-test/r/ndb_binlog_basic.result: cluster.binlog_index -> mysql.binlog_index mysql-test/r/ndb_binlog_ddl_multi.result: cluster -> mysql mysql-test/r/ndb_binlog_discover.result: cluster -> mysql mysql-test/r/ndb_binlog_multi.result: cluster -> mysql mysql-test/r/ndb_restore_compat.result: cluster -> mysql mysql-test/r/ps_1general.result: Removed cluster database mysql-test/r/rpl_create_database.result: Removed cluster database mysql-test/r/rpl_load_from_master.result: Removed cluster database mysql-test/r/rpl_loaddata_m.result: Removed cluster database mysql-test/r/rpl_ndb_bank.result: cluster -> mysql mysql-test/r/rpl_ndb_dd_advance.result: cluster -> mysql mysql-test/r/rpl_ndb_dd_basic.result: cluster -> mysql mysql-test/r/rpl_ndb_idempotent.result: cluster -> mysql mysql-test/r/rpl_ndb_log.result: cluster -> mysql mysql-test/r/rpl_ndb_multi.result: cluster -> mysql mysql-test/r/rpl_ndb_sync.result: cluster -> mysql mysql-test/r/rpl_row_basic_11bugs.result: Removed cluster database mysql-test/r/rpl_truncate_7ndb.result: Position have changed mysql-test/r/rpl_truncate_7ndb_2.result: cluster -> mysql mysql-test/r/schema.result: Removed cluster database mysql-test/r/show_check.result: Removed cluster database mysql-test/r/system_mysql_db.result: binlog_index moved under mysql mysql-test/r/upgrade.result: More tests mysql-test/t/information_schema.test: cluster -> mysql mysql-test/t/mysqldump.test: More test to detect memory leaks mysql-test/t/ndb_binlog_basic.test: cluster -> mysql mysql-test/t/ndb_binlog_multi.test: cluster -> mysql mysql-test/t/ndb_restore_compat.test: cluster -> mysql mysql-test/t/rpl_ndb_bank.test: cluster -> mysql mysql-test/t/rpl_ndb_dd_advance.test: cluster -> mysql mysql-test/t/rpl_ndb_idempotent.test: cluster -> mysql mysql-test/t/rpl_ndb_multi.test: cluster -> mysql mysql-test/t/rpl_ndb_sync.test: cluster -> mysql mysql-test/t/system_mysql_db_fix.test: Drop also binlog_index mysql-test/t/upgrade.test: Check that tables created with 3.23 works mysys/my_error.c: Remove all registered errors (to avoid memory leaks) mysys/my_init.c: call my_error_unregister_all() to avoid some possible memory leaks mysys/mysys_priv.h: Added prototype scripts/mysql_create_system_tables.sh: cluster -> mysql scripts/mysql_fix_privilege_tables.sql: Changed -- to # Create binlog_index table if it dosesn't exist sql/field.cc: Made offset() inline sql/field.h: Changed prototype of offset() to not make it depending on TABLE structure sql/field_conv.cc: Removed some usage of current_thd sql/ha_ndbcluster_tables.h: cluster -> mysql sql/item_sum.cc: Usage of new 'offset' parameters sql/key.cc: Changed 'find_ref_key' to not be dependent on field->table (This fixed a crash when using a table created in MySQL 3.23) sql/mysql_priv.h: Changed find_ref_key() to not use field->table sql/mysqld.cc: Fix that plugin_init() works properly on bootstrap (Previously we got warnings from plugin_init) sql/sql_class.cc: new 'field->offset()' sql/sql_select.cc: New field->offset() sql/table.cc: We don't need field->table to be set in find_ref_key() or find_field() anymore. storage/archive/ha_archive.cc: New field->offset() storage/federated/ha_federated.cc: New field->offset() storage/innobase/handler/ha_innodb.cc: Fixed compiler warnings storage/myisam/ha_myisam.cc: Fixed compiler warnings (Wrong paramter to sprintf()) New field->offset() storage/myisam/ha_myisam.h: Fixed wrong type of table_flags storage/ndb/tools/restore/Restore.cpp: Fixed compiler warning mysql-test/r/1st.result: New BitKeeper file ``mysql-test/r/1st.result'' mysql-test/std_data/old_table-323.frm: New BitKeeper file ``mysql-test/std_data/old_table-323.frm'' mysql-test/t/1st.test: New BitKeeper file ``mysql-test/t/1st.test'' --- sql/mysql_priv.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/mysql_priv.h') diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 0bf75982626..e68fb4e442e 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1427,7 +1427,8 @@ void print_plan(JOIN* join,uint idx, double record_count, double read_time, #endif void mysql_print_status(); /* key.cc */ -int find_ref_key(KEY *key, uint key_count, Field *field, uint *key_length); +int find_ref_key(KEY *key, uint key_count, byte *record, Field *field, + uint *key_length); void key_copy(byte *to_key, byte *from_record, KEY *key_info, uint key_length); void key_restore(byte *to_record, byte *from_key, KEY *key_info, uint key_length); -- cgit v1.2.1