An error occurred fetching the project authors.
- 06 Dec, 2005 1 commit
-
-
unknown authored
statement that generated a warning. (Bug #15510) sql-common/client.c: Reset warning_count in free_old_query(), don't stomp old value for it in cli_read_query_result(). tests/mysql_client_test.c: Add new regression test
-
- 02 Dec, 2005 1 commit
-
-
unknown authored
Allow for configuration of the maximum number of indexes per table. Added and used a configure.in macro. Replaced fixed limits by the configurable limit. Limited MyISAM indexes to its hard limit. Fixed a bug in opt_range.cc for many indexes with InnoDB. Tested for 2, 63, 64, 65, 127, 128, 129, 255, 256, and 257 indexes. Testing this part of the bugfix requires rebuilding of the server with different options. This cannot be done with our test suite. Therefore I added the necessary test files to the bug report. If you repeat the tests, please note that the ps_* tests fail for everything but 64 indexes. This is because of differences in the meta data, namely field lengths for index names etc. config/ac-macros/misc.m4: Bug#10932 - Building server with key limit of 128, makes test cases fail Allow for configuration of the maximum number of indexes per table. Added a macro for the new build option. configure.in: Bug#10932 - Building server with key limit of 128, makes test cases fail Allow for configuration of the maximum number of indexes per table. Added a call for the new macro. include/myisam.h: Bug#10932 - Building server with key limit of 128, makes test cases fail Allow for configuration of the maximum number of indexes per table. Limit the number of keys for MyISAM to its hard limit. sql/mysql_priv.h: Bug#10932 - Building server with key limit of 128, makes test cases fail Allow for configuration of the maximum number of indexes per table. Stick with the optimized Bitmap<64> if indexes are limited to 64 or lower. Otherwise use a bigger bitmap. It must be defined as a multiple of 8. sql/opt_range.cc: Bug#10932 - Building server with key limit of 128, makes test cases fail Allow for configuration of the maximum number of indexes per table. Initialize an object element to avoid a crash when using InnoDB with many indexes. sql/unireg.h: Bug#10932 - Building server with key limit of 128, makes test cases fail Allow for configuration of the maximum number of indexes per table. Replace the fixed limit by the configurable limit. tests/mysql_client_test.c: Bug#10932 - Building server with key limit of 128, makes test cases fail Allow for configuration of the maximum number of indexes per table. Replace the fixed limit by the configurable limit.
-
- 18 Nov, 2005 1 commit
-
-
unknown authored
when COUNT(*) is 0". The bug itself cannot be repeated. mysql-test/r/sp.result: Test results were fixed (Bug#14845) mysql-test/t/sp.test: An SQL language test case for Bug#14845 tests/mysql_client_test.c: A test case for Bug#14845
-
- 17 Nov, 2005 1 commit
-
-
unknown authored
incorrect warning on open cursor" sql/sql_prepare.cc: A fix for Bug#13524 "lock timeout gives incorrect warning on open cursor": reset the connection for next command before performing a cursor fetch (add an omitted line). tests/mysql_client_test.c: A test case for Bug#13524 "lock timeout gives incorrect warning on open cursor"
-
- 09 Nov, 2005 1 commit
-
-
unknown authored
gives MYSQL_DATA_TRUNCATED" sql/sql_cursor.cc: A partial fix for Bug#13488 "Left outer join query incorrectly gives MYSQL_DATA_TRUNCATED": send the correct metadata of the cursor result set at execute. The full fix would be to make sure that the metadata doesn't change between prepare and execute. tests/mysql_client_test.c: A test case for Bug#13488 "Left outer join query incorrectly gives MYSQL_DATA_TRUNCATED"
-
- 03 Nov, 2005 1 commit
-
-
unknown authored
large table gives server crash": make sure that when a MyISAM temporary table is created for a cursor, it's created in its memory root, not the memory root of the current query. mysql-test/r/sp.result: Test results fixed: a test case for Bug#14210 mysql-test/t/sp.test: A test case for Bug#14210 "Simple query with > operator on large table gives server crash" sql/handler.cc: - rewrite get_new_handler to accept a memory root and use it for sql/handler.h: - get_new_handler declaration changed sql/opt_range.cc: - get_new_handler declaration changed sql/sql_base.cc: - get_new_handler declaration changed sql/sql_select.cc: - the actual fix for Bug#14210. In create_myisam_from_heap we should create the new table handler in TABLE::mem_root, not in THD::mem_root: the latter is freed shortly after cursor is open. - adjust create_tmp_table to explicitly supply &table->mem_root to get_new_handler when creating a handler for a new temporary table sql/sql_table.cc: - get_new_handler declaration changed sql/table.cc: - get_new_handler declaration changed sql/unireg.cc: - get_new_handler declaration changed tests/mysql_client_test.c: A test case for Bug#14210 "Simple query with > operator on large table gives server crash": a C API test case is worth adding because of different memory allocation/freeing patterns in handling of C API and SP cursors
-
- 25 Oct, 2005 1 commit
-
-
unknown authored
options to the wrong value. (Bug #12925) mysql-test/t/mysql_client_test.test: Add parameter for testing getopt bug mysys/my_getopt.c: Remove incorrect and unnecessary casts tests/mysql_client_test.c: Add test case for Bug #12925 (my_getopt bug)
-
- 13 Oct, 2005 2 commits
-
-
unknown authored
- Move test for bug#93 from mysql_client_test.c to show_check.test - No need for test written in c mysql-test/r/show_check.result: Add test case for bug#93, moved from mysql_client_test.c mysql-test/t/show_check.test: Add test case for bug#93, moved from mysql_client_test.c tests/mysql_client_test.c: Remove test for bug#95 to show_check.test
-
unknown authored
- The testcase create a .frm file consisting of "junk". Unfortunately the "junk" wasn't written to the .frm file if mysql_client_test was run with -s option to make it run silent. This most likely caused the file never to be created on windows, and thus the test case failed. tests/mysql_client_test.c: Always write "junk" to the test file.
-
- 21 Sep, 2005 1 commit
-
-
unknown authored
cursor is interpreted latin1 character and Bug#9819 "Cursors: Mysql Server Crash while fetching from table with 5 million records." A fix for a possible memory leak when fetching into an SP cursor in a long loop. The patch uses a common implementation of cursors in the binary protocol and in stored procedures and implements materialized cursors. For implementation details, see comments in sql_cursor.cc include/my_sys.h: - declaration for multi_alloc_root libmysqld/Makefile.am: - drop protocol_cursor.cc, add sql_cursor.cc (replaces the old implementation of cursors with a new one) mysql-test/r/ctype_ujis.result: - test results fixed (a test case for Bug#6513) mysql-test/r/sp-big.result: - test results fixed (a test case for Bug#9819) mysql-test/t/ctype_ujis.test: Add a test case for Bug#6513 "Test Suite: Values inserted by using cursor is interpreted latin1 character" mysql-test/t/sp-big.test: Add a restricted test case for Bug#9819 "Cursors: Mysql Server Crash while fetching from table with 5 million records." mysys/my_alloc.c: - an implementation of multi_alloc_root; this is largely a copy-paste from mulalloc.c, but the function is small and there is no easy way to reuse the existing C function. sql/Makefile.am: - add sql_cursor.h, sql_cursor.cc (a new implementation of stored procedure cursors) and drop protocol_cursor.cc (the old one) sql/handler.cc: - now TABLE object has its mem_root always initialized. Adjust the implementation handler::ha_open sql/item_subselect.cc: - adjust to the changed declaration of st_select_lex_unit::prepare sql/protocol.h: - drop Protocol_cursor sql/sp_head.cc: - move juggling with Query_arena::free_list and Item::next to sp_eval_func_item, as this is needed in 3 places already. sql/sp_head.h: - declare a no-op implementation for cleanup_stmt in sp_instr_cpush. This method is needed for non-materializing cursors, which are yet not used in stored procedures. - declaration for sp_eval_func_item sql/sp_rcontext.cc: - reimplement sp_cursor using the new implementation of server side cursors. - use sp_eval_func_item to assign values of SP variables from the row fetched from a cursor. This should fix a possible memory leak in the old implementation of sp_cursor::fetch sql/sp_rcontext.h: - reimplement sp_cursor using the new implementation of server side cursors. sql/sql_class.cc: - disable the functionality that closes transient cursors at commit/rollback; transient cursors are not used in 5.0, instead we use materialized ones. To be enabled in a later version. sql/sql_class.h: - adjust to the rename Cursor -> Server_side_cursor - additional declarations of select_union used in materialized cursors sql/sql_derived.cc: - reuse bits of tmp table code in UNION, derived tables, and materialized cursors - cleanup comments sql/sql_lex.h: - declarations of auxiliary methods used by materialized cursors - a cleanup in st_select_lex_unit interface sql/sql_list.h: - add an array operator new[] to class Sql_alloc sql/sql_prepare.cc: - split the tight coupling of cursors and prepared statements to reuse the same implementation in stored procedures - cleanups of error processing in Prepared_statement::{prepare,execute} sql/sql_select.cc: - move the implementation of sensitive (non-materializing) cursors to sql_cursor.cc - make temporary tables self-contained: the table, its record and fields are allocated in TABLE::mem_root. This implementation is not clean and resets thd->mem_root several times because of the way create_tmp_table works (many additional things are done inside it). - adjust to the changed declaration of st_select_lex_unit::prepare sql/sql_select.h: - move the declaration of sensitive (non-materializing) cursors to sql_cursor.cc sql/sql_union.cc: - move pieces of st_select_unit::prepare to select_union and st_table methods to be able to reuse code in the implementation of materialized cursors sql/sql_view.cc: - adjust to the changed signature of st_select_lex_unit::prepare sql/table.cc: - implement auxiliary st_table methods for use with temporary tables sql/table.h: - add declarations for auxiliary methods of st_table used to work with temporary tables tests/mysql_client_test.c: - if cursors are materialized, a parallel update of the table used in the cursor may go through: update the test. sql/sql_cursor.cc: New BitKeeper file ``sql/sql_cursor.cc'' -- implementation of server side cursors sql/sql_cursor.h: New BitKeeper file ``sql/sql_cursor.h'' - declarations for server side cursors.
-
- 09 Sep, 2005 1 commit
-
-
unknown authored
This fix is cancellation of ChangeSet 1.2329 05/07/12 08:35:30 reggie@linux.site +8 -0 Bug 7142 Show Fields from fails using Borland's dbExpress interface The reason is we can't fix bug#7142 without breaking of existing applications/APIs that worked fine with earlier 4.1 bug 7142 is fixed in 5.0 mysql-test/r/ps_1general.result: Bug #12817 SHOW STATUS now blob fields mysql-test/r/ps_2myisam.result: Bug #12817 SHOW STATUS now blob fields mysql-test/r/ps_3innodb.result: Bug #12817 SHOW STATUS now blob fields mysql-test/r/ps_4heap.result: Bug #12817 SHOW STATUS now blob fields mysql-test/r/ps_5merge.result: Bug #12817 SHOW STATUS now blob fields sql/item.cc: Bug #12817 SHOW STATUS now blob fields sql/sql_show.cc: Bug #12817 SHOW STATUS now blob fields tests/mysql_client_test.c: Bug #12817 SHOW STATUS now blob fields
-
- 30 Aug, 2005 1 commit
-
-
unknown authored
include/my_alloc.h: Fix incorrect spelling mysql-test/t/rpl000009.test: Fix incorrect spelling mysql-test/t/system_mysql_db_fix.test: Fix incorrect spelling sql/sql_table.cc: Fix incorrect spelling tests/mysql_client_test.c: Fix incorrect spelling
-
- 26 Aug, 2005 1 commit
-
-
unknown authored
sql/sql_select.cc: reset the group functions and copy the values of the first row before exiting because of maximal number of rows has been read for this cursor fetch. the additional variable is needed to save code duplication. tests/mysql_client_test.c: test for bug #11904 (cursor grouping wrong result)
-
- 23 Aug, 2005 1 commit
-
-
unknown authored
* Provide backwards compatibility extension to name resolution of coalesced columns. The patch allows such columns to be qualified with a table (and db) name, as it is in 4.1. Based on a patch from Monty. * Adjusted tests accordingly to test both backwards compatible name resolution of qualified columns, and ANSI-style resolution of non-qualified columns. For this, each affected test has two versions - one with qualified columns, and one without. mysql-test/include/ps_query.inc: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/bdb.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/innodb.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/join.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/join_nested.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/join_outer.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/null_key.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/order_by.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/ps_2myisam.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/ps_3innodb.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/ps_4heap.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/ps_5merge.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/ps_6bdb.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/ps_7ndb.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/select.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/subselect.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/r/type_ranges.result: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/t/bdb.test: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/t/innodb.test: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/t/join.test: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/t/join_nested.test: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/t/join_outer.test: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/t/null_key.test: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/t/order_by.test: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/t/select.test: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/t/subselect.test: Put back old tests to test that coalesced columns of natural joins can be qualified. mysql-test/t/type_ranges.test: Put back old tests to test that coalesced columns of natural joins can be qualified. sql/sql_base.cc: * Applied Monty's patch for backwards compatible name resolution of qualified columns. The idea is: - When a column is qualified, search for the column in all tables/views underlying each natural join. In this case natural joins are *not* considered leaves. - If a column is not qualified, then consider natural joins as leaves, thus directly search the result columns of natural joins. * Simplified 'find_field_in_tables()' - unified two similar loops into one. sql/table.cc: - Removed method & members not needed after Monty's patch. sql/table.h: - Removed method & members not needed after Monty's patch. tests/mysql_client_test.c: Put back old tests to test that coalesced columns of natural joins can be qualified.
-
- 17 Aug, 2005 1 commit
-
-
unknown authored
create_tmp_field_from_item() was creating tmp field without regard to original field type of Item. This results in wrong type being reported to client. To create_tmp_field_from_item() added special handling for Items with DATE/TIME field types to preserve their type. sql/sql_select.cc: Fix bug #11718 query with function, join and order by returns wrong type. tests/mysql_client_test.c: Test case for bug #11718: query with function, join and order by returns wrong type
-
- 12 Aug, 2005 1 commit
-
-
unknown authored
"Process NATURAL and USING joins according to SQL:2003". * Some of the main problems fixed by the patch: - in "select *" queries the * expanded correctly according to ANSI for arbitrary natural/using joins - natural/using joins are correctly transformed into JOIN ... ON for any number/nesting of the joins. - column references are correctly resolved against natural joins of any nesting and combined with arbitrary other joins. * This patch also contains a fix for name resolution of items inside the ON condition of JOIN ... ON - in this case items must be resolved only against the JOIN operands. To support such 'local' name resolution, the patch introduces a stack of name resolution contexts used at parse time. NOTICE: - This patch is not complete in the sense that - there are 2 test cases that still do not pass - one in join.test, one in select.test. Both are marked with a comment "TODO: WL#2486". - it does not include a new test specific for the task mysql-test/include/ps_query.inc: Adjusted according to standard NATURAL/USING join semantics., mysql-test/r/bdb.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/derived.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/errors.result: The column as a whole cannot be resolved, so different error message. mysql-test/r/fulltext.result: Adjusted according to standard JOIN ... ON semantics => the ON condition can refer only to the join operands. mysql-test/r/fulltext_order_by.result: More detailed error message. mysql-test/r/innodb.result: Adjusted according to standard NATURAL/USING join semantics. This test doesn't pass completetly yet! mysql-test/r/insert_select.result: More detailed error message. mysql-test/r/join.result: Adjusted according to standard NATURAL/USING join semantics. NOTICE: there is one test case that still fails, and it is commeted out and marked with WL#2486 in the test file. mysql-test/r/join_crash.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/join_nested.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/join_outer.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/multi_update.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/null_key.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/order_by.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/ps_2myisam.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/ps_3innodb.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/ps_4heap.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/ps_5merge.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/ps_6bdb.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/ps_7ndb.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/select.result: Adjusted according to standard NATURAL/USING join semantics. NOTICE: there is one failing test case which is commented with WL#2486 in the test file. mysql-test/r/subselect.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/type_ranges.result: Adjusted according to standard NATURAL/USING join semantics. mysql-test/r/union.result: More detailed error message. mysql-test/t/bdb.test: Adjusted according to standard NATURAL/USING join semantics. mysql-test/t/errors.test: Adjusted according to standard NATURAL/USING join semantics. mysql-test/t/fulltext.test: Adjusted according to standard JOIN ... ON semantics => the ON condition can refer only to the join operands. mysql-test/t/fulltext_order_by.test: More detailed error message. mysql-test/t/innodb.test: Adjusted according to standard NATURAL/USING join semantics. This test doesn't pass completetly yet! mysql-test/t/insert_select.test: More detailed error message. mysql-test/t/join.test: Adjusted according to standard NATURAL/USING join semantics. NOTICE: there is one test case that still fails, and it is commeted out and marked with WL#2486 in the test file. mysql-test/t/join_crash.test: Adjusted according to standard NATURAL/USING join semantics. mysql-test/t/join_nested.test: Adjusted according to standard NATURAL/USING join semantics. mysql-test/t/join_outer.test: Adjusted according to standard NATURAL/USING join semantics. mysql-test/t/null_key.test: Adjusted according to standard NATURAL/USING join semantics. mysql-test/t/order_by.test: Adjusted according to standard NATURAL/USING join semantics. mysql-test/t/select.test: Adjusted according to standard NATURAL/USING join semantics. NOTICE: there is one test case that still fails, and it is commeted out and marked with WL#2486 in the test file. mysql-test/t/subselect.test: Adjusted according to standard NATURAL/USING join semantics. mysql-test/t/type_ranges.test: Adjusted according to standard NATURAL/USING join semantics. mysql-test/t/union.test: More detailed error message. sql/item.cc: - extra parameter to find_field_in_tables - find_field_in_real_table renamed to find_field_in_table - fixed comments/typos sql/item.h: - added [first | last]_name_resolution_table to class Name_resolution_context - commented old code - standardized formatting sql/mysql_priv.h: - refactored the find_field_in_XXX procedures, - added a new procedure for natural join table references, - renamed the find_field_in_XXX procedures to clearer names sql/sp.cc: - pass the top-most list of the FROM clause to setup_tables - extra parameter to find_field_in_tables sql/sql_acl.cc: - renamed find_field_in_table => find_field_in_table_ref - extra parameter to find_field_in_table_ref - commented old code sql/sql_base.cc: This file contains the core of the implementation of the processing of NATURAL/USING joins (WL#2486). - added many comments to old code - refactored the group of find_field_in_XXX procedures, and added a new procedure for natural joins. There is one find_field_in_XXX procedure per each type of table reference (stored table, merge view, or natural join); one meta-procedure that selects the correct one depeneding on the table reference; and one procedure that goes over a list of table referenes. - NATURAL/USING joins are processed through the procedures: mark_common_columns, store_natural_using_join_columns, store_top_level_join_columns, setup_natural_join_row_types. The entry point to processing NATURAL/USING joins is the procedure 'setup_natural_join_row_types'. - Replaced the specialized Field_iterator_XXX iterators with one generic iterator over the fields of a table reference. - Simplified 'insert_fields' and 'setup_conds' due to encapsulation of the processing of natural joins in a separate set of procedures. sql/sql_class.h: - Commented old code. sql/sql_delete.cc: - Pass the FROM clause to setup_tables. sql/sql_help.cc: - pass the end name resolution table to find_field_in_tables - adjust the list of tables for name resolution sql/sql_insert.cc: - Changed the code that saves and restores the current context to support the list of tables for name resolution - context->first_name_resolution_table, and table_list->next_name_resolution_table. Needed to support an ugly trick to resolve inserted columns only in the first table. - Added Name_resolution_context::[first | last]_name_resolution_table. - Commented old code sql/sql_lex.cc: - set select_lex.parent_lex correctly - set correct state of the current name resolution context sql/sql_lex.h: - Added a stack of name resolution contexts to support local contexts for JOIN ... ON conditions. - Commented old code. sql/sql_load.cc: - Pass the FROM clause to setup_tables. sql/sql_olap.cc: - Pass the FROM clause to setup_tables. sql/sql_parse.cc: - correctly set SELECT_LEX::parent_lex - set the first table of the current name resoltion context - added support for NATURAL/USING joins - commented old code sql/sql_select.cc: - Pass the FROM clause to setup_tables. - Pass the end table to find_field_in_tables - Improved comments sql/sql_show.cc: - Set SELECT_LEX::parent_lex. sql/sql_update.cc: - Pass the FROM clause to setup_tables. sql/sql_yacc.yy: - Added support for a stack of name resolution contexts needed to implement name resolution for JOIN ... ON. A context is pushed for each new JOIN ... ON, and popped afterwards. - Added support for NATURAL/USING joins. sql/table.cc: - Added new class Natural_join_column to hide the heterogeneous representation of column references for stored tables and for views. - Added a new list TABLE_LIST::next_name_resolution_table to support name resolution with NATURAL/USING joins. Also added other members to TABLE_LIST to support NATURAL/USING joins. - Added a generic iterator over the fields of table references of various types - class Field_iterator_table_ref sql/table.h: - Added new class Natural_join_column to hide the heterogeneous representation of column references for stored tables and for views. - Added a new list TABLE_LIST::next_name_resolution_table to support name resolution with NATURAL/USING joins. Also added other members to TABLE_LIST to support NATURAL/USING joins. - Added a generic iterator over the fields of table references of various types - class Field_iterator_table_ref tests/mysql_client_test.c: Adjusted according to standard NATURAL JOIN syntax.
-
- 10 Aug, 2005 3 commits
-
-
unknown authored
cursors (+ commit)" and Bug#11832 "Server crash with InnoDB + Cursors" See comments to the changed files. innobase/include/read0read.h: - add cursor_view_t::n_mysql_tables_in_use innobase/read/read0read.c: - maintain cursor_view_t::n_mysql_tables_in_use. InnoDB maintains trx->n_mysql_tables_in_use to know when it can auto-commit a read-only statement. When this count drops to zero, MySQL has ended processing of such statement and InnoDB can commit. Cursors should not break this invariant, and should exclude the tables used in a cursor from the count of active tables. When a cursor is closed, the number of its tables is added back, to ensure that close_thread_tables->unlock_external-> ha_innobase::external_lock(F_UNLCK) won't drop the count in trx below zero. innobase/row/row0sel.c: - remove the restoration of the global read view from row_search_for_mysql: MySQL may call row_search_for_mysql more than once when fetching a row for a cursor (e.g. if there is a WHERE clause that filters out some rows). sql/ha_innodb.cc: - add more verbose printout for the case when we close an InnoDB connection without priorlly issuing a commit or rollback. The problem should be investigated. tests/mysql_client_test.c: - add a test case for Bug#12243 "MySQL Server crashes with 2 cursors (+ commit)"
-
unknown authored
-
unknown authored
subqry order by server crash": failing DBUG_ASSERT(curr_join == this) when opening a cursor. Ensure that for top-level join curr_join == join (always), and thus fix the failing assert. curr_join is a hack to ensure that uncacheable subqueries can be re-evaluated safely, and should be never different from main join in case of top-level join. sql/sql_select.cc: - utilize tmp_join only if we evaluate an uncacheable subquery. sql/sql_select.h: - implement JOIN::is_top_level_join() tests/mysql_client_test.c: A test case for Bug#11901 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY join in subqry order by server crash"
-
- 08 Aug, 2005 1 commit
-
-
unknown authored
CURSOR_TYPE_READ_ONLY nested queries corrupt result" sql/sql_prepare.cc: If there is a cursor, use its protocol for fetch: Protocol instances have a state and thd->protocol_prep can't be used for multiple cursors. sql/sql_select.cc: - init Cursor::protocol sql/sql_select.h: - add Cursor::protocol tests/mysql_client_test.c: A test case for Bug#11909 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY nested queries corrupt result"
-
- 28 Jul, 2005 1 commit
-
-
unknown authored
client/mysqldump.c: Fixed wrong argument to printf() client/mysqltest.c: Fixed compiler warning myisam/ft_boolean_search.c: Fixed compiler warning myisammrg/myrg_static.c: Fixed compiler warning mysql-test/r/rpl_drop_temp.result: Drop used database mysql-test/t/rpl_drop_temp.test: Drop used database ndb/src/common/logger/LogHandler.cpp: Fixed compiler warning sql/field.cc: Fixed compiler warning sql/ha_ndbcluster.cc: Fixed compiler warning sql/sql_base.cc: Fixed compiler warning tests/mysql_client_test.c: Fixed compiler warning
-
- 20 Jul, 2005 2 commits
-
-
unknown authored
cursors. This should fix Bug#11813 when InnoDB part is in (tested with a draft patch). The idea of the patch is that if a storage engine supports consistent read views, we open one when open a cursor, set is as the active view when fetch from the cursor, and close together with cursor close. sql/examples/ha_archive.cc: - extend handlerton with cursors methods; fix coding style sql/examples/ha_example.cc: - extend handlerton with cursors methods; fix coding style sql/examples/ha_tina.cc: - extend handlerton with cursors methods; fix coding style sql/ha_berkeley.cc: - extend handlerton with cursors methods sql/ha_blackhole.cc: - extend handlerton with cursors methods; fix coding style sql/ha_federated.cc: - extend handlerton with cursors methods; fix coding style sql/ha_heap.cc: - extend handlerton with cursors methods; fix coding style sql/ha_innodb.cc: - extend handlerton with cursors methods sql/ha_myisam.cc: - extend handlerton with cursors methods; fix coding style sql/ha_myisammrg.cc: - extend handlerton with cursors methods; fix coding style sql/ha_ndbcluster.cc: - extend handlerton with cursors methods sql/handler.h: - extend handlerton with cursors methods sql/sql_select.cc: - create a consistent read view when we open a cursor, set it for a fetch, and free when we closing the cursor. sql/sql_select.h: - add Cursor::ht_info to remember read views used in a cursor. tests/mysql_client_test.c: Disable an assert that will be no longer valid when consistent read views in InnoDB are used.
-
unknown authored
-
- 19 Jul, 2005 3 commits
-
-
unknown authored
mysql-test/r/ps_1general.result: Update results mysql-test/r/ps_2myisam.result: Update results mysql-test/r/ps_3innodb.result: Update results mysql-test/r/ps_4heap.result: Update results mysql-test/r/ps_5merge.result: Update results mysql-test/r/ps_6bdb.result: Update results mysql-test/r/ps_7ndb.result: Update results mysql-test/r/select.result: Update results mysql-test/t/disabled.def: Disable ndb_condition_pushdown test mysql-test/t/select.test: Fix bad merge sql/field_conv.cc: Update name of warning message sql/mysqld.cc: Set proper thd->killed tests/mysql_client_test.c: Update test cases, change verify_prepared_field() help function so it is passed the filename and line from where it is called and includes that in the error message.
-
unknown authored
The idea of the patch is that every cursor gets its own lock id for table level locking. Thus cursors are protected from updates performed within the same connection. Additionally a list of transient (must be closed at commit) cursors is maintained and all transient cursors are closed when necessary. Lastly, this patch adds support for deadlock timeouts to TLL locking when using cursors. + post-review fixes. include/thr_lock.h: - add a notion of lock owner to table level locking. When using cursors, lock owner can not be identified by a thread id any more, as we must protect cursors from updates issued within the same connection (thread). So, each cursor has its own lock identifier to use with table level locking. - extend return values of thr_lock and thr_multi_lock with THR_LOCK_TIMEOUT and THR_LOCK_DEADLOCK, since these conditions are now possible (see comments to thr_lock.c) mysys/thr_lock.c: Better support for cursors: - use THR_LOCK_OWNER * as lock identifier, not pthread_t. - check and return an error for a trivial deadlock case, when an update statement is issued to a table locked by a cursor which has been previously opened in the same connection. - add support for locking timeouts: with use of cursors, trivial deadlocks can occur. For now the only remedy is the lock wait timeout, which is initialized from a new global variable 'table_lock_wait_timeout' Example of a deadlock (assuming the storage engine does not downgrade locks): con1: open cursor for select * from t1; con2: open cursor for select * from t2; con1: update t2 set id=id*2; -- blocked con2: update t1 set id=id*2; -- deadlock Lock timeouts are active only if a connection is using cursors. - the check in the wait_for_lock loop has been changed from data->cond != cond to data->cond != 0. data->cond is zeroed in every place it's changed. - added comments sql/examples/ha_archive.cc: - extend the handlerton with the info about cursor behaviour at commit. sql/examples/ha_archive.h: - ctor moved to .cc to make use of archive handlerton sql/examples/ha_example.cc: - add handlerton instance, init handler::ht with it sql/examples/ha_example.h: - ctor moved to .cc to make use of ha_example handlerton sql/examples/ha_tina.cc: - add handlerton instance, init handler::ht with it sql/examples/ha_tina.h: - ctor moved to .cc to make use of CSV handlerton sql/ha_berkeley.cc: - init handlerton::flags and handler::ht sql/ha_berkeley.h: - ctor moved to .cc to make use of BerkeleyDB handlerton sql/ha_blackhole.cc: - add handlerton instance, init handler::ht with it sql/ha_blackhole.h: - ctor moved to .cc to make use of blackhole handlerton sql/ha_federated.cc: - add handlerton instance, init handler::ht with it sql/ha_federated.h: - ctor moved to .cc to make use of federated handlerton sql/ha_heap.cc: - add handlerton instance, init handler::ht with it sql/ha_heap.h: - ctor moved to .cc to make use of ha_heap handlerton sql/ha_innodb.cc: - init handlerton::flags and handler::ht of innobase storage engine sql/ha_innodb.h: - ctor moved to .cc to make use of archive handlerton sql/ha_myisam.cc: - add handlerton instance, init handler::ht with it sql/ha_myisam.h: - ctor moved to .cc to make use of MyISAM handlerton sql/ha_myisammrg.cc: - init handler::ht in the ctor sql/ha_myisammrg.h: - ctor moved to .cc to make use of MyISAM MERGE handlerton sql/ha_ndbcluster.cc: - init handlerton::flags and handler::ht sql/handler.cc: - drop support for ISAM storage engine, which was removed from 5.0 - close all "transient" cursors at COMMIT/ROLLBACK. A "transient" SQL level cursor is a cursor that uses tables that have a transaction- specific state. sql/handler.h: - extend struct handlerton with flags, add handlerton *ht to every handler instance. sql/lock.cc: - extend mysql_lock_tables to send error to the client if thr_multi_lock returns a timeout or a deadlock error. sql/mysqld.cc: - add server option --table_lock_wait_timeout (in seconds) sql/set_var.cc: - add new global variable 'table_lock_wait_timeout' to specify a wait timeout for table-level locks of MySQL (in seconds). The default timeout is 50 seconds. The timeout is active only if the connection has open cursors. sql/sql_class.cc: - implement Statement_map::close_transient_cursors - safety suggests that we need an assert ensuring llock_info->n_cursors is functioning properly, adjust destruction of the Statement_map to allow such assert in THD::~THD sql/sql_class.h: - add support for Cursors registry to Statement map. sql/sql_prepare.cc: - maintain a list of cursors that must be closed at commit/rollback. sql/sql_select.cc: - extend class Cursor to support specific at-COMMIT/ROLLBACK behavior. If a cursor uses tables of a storage engine that invalidates all open tables at COMMIT/ROLLBACK, it must be closed before COMMIT/ROLLBACK is executed. sql/sql_select.h: - add an own lock_id and commit/rollback status flag to class Cursor tests/mysql_client_test.c: A test case for Bug#10760 and complementary issues: test a simple deadlock case too. mysql-test/var: New BitKeeper file ``mysql-test/var''
-
unknown authored
sql-common/client.c: fixed wrong offset tests/mysql_client_test.c: testcase for bug #12001
-
- 18 Jul, 2005 1 commit
-
-
unknown authored
Changed defaults option --instance to --defaults-group-suffix Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX mysql_print_defaults now understands --defaults-group-suffix Remove usage of my_tempnam() (not safe function) if( -> if ( and while( to while ( BitKeeper/deleted/.del-my_tempnam.c~a8562f15dad3012f: Delete: mysys/my_tempnam.c VC++Files/client/mysqlclient.dsp: Remove not used file my_tempnam.c VC++Files/client/mysqlclient_ia64.dsp: Remove not used file my_tempnam.c VC++Files/libmysql/libmysql.dsp: Remove not used file my_tempnam.c VC++Files/libmysql/libmysql_ia64.dsp: Remove not used file my_tempnam.c VC++Files/mysys/mysys.dsp: Remove not used file my_tempnam.c VC++Files/mysys/mysys_ia64.dsp: Remove not used file my_tempnam.c client/mysql.cc: Change to use get_defaults_options() Remove compiler warnings client/mysqldump.c: Indentation fixes Use quoted table name for 'primary_key_fields' extra/my_print_defaults.c: Add support for --defaults-group-suffix change to use get_default_options() extra/replace.c: Replace my_tempnam() with create_tmp_file() to allow us to remove my_tempnam.c include/config-win.h: Added DEFAULT_GROUP_SUFFIX_ENV include/my_sys.h: Change defaults_instance -> defaults_group_suffix Change get_defaults_files -> get_defaults_options libmysql/Makefile.shared: Added DEFAULT_GROUP_SUFFIX_ENV mysys/Makefile.am: Added DEFAULT_GROUP_SUFFIX_ENV Remove my_tempnam.c mysys/default.c: Changed --instance to --defaults-group-suffix Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX and moved the name to Makefile.am (mysys shouldn't by MySQL independent) Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order mysys/default_modify.c: Optimized code to use allocated space more efficently Reduce code size Ensure that realloc() works independent of argument size mysys/my_bitmap.c: Added missing return sql/ha_innodb.cc: Change if( -> if ( sql/ha_ndbcluster.cc: Change while( -> while ( sql/item_cmpfunc.cc: Break loop early (simple optimization) sql/item_strfunc.cc: Change if( -> if ( sql/log.cc: Fixed comment sql/mysqld.cc: Change if( -> if ( sql/opt_range.cc: while( -> while ( if( -> if ( sql/parse_file.cc: Change if( -> if ( sql/sql_cache.cc: while( -> while ( sql/sql_parse.cc: Change if( -> if ( sql/sql_prepare.cc: Added comment sql/sql_select.cc: while( -> while ( Removed index variable by incrementing pointer sql/sql_show.cc: Change if( -> if ( sql/sql_yacc.yy: Change if( -> if ( tests/mysql_client_test.c: Added cast to first argument to bzero()
-
- 16 Jul, 2005 1 commit
-
-
unknown authored
-
- 15 Jul, 2005 2 commits
-
-
unknown authored
test_client_character_set tests/mysql_client_test.c: minor fix for restoring the previous characterset.
-
unknown authored
When all rows are fetched subsequent calls to mysql_stmt_fetch return now MYSQL_NO_DATA instead of errorcode 1. libmysql/libmysql.c: fix for bug#11037 tests/mysql_client_test.c: added new testcase for bug #11037
-
- 14 Jul, 2005 4 commits
-
-
unknown authored
information about error". libmysql/libmysql.c: Clear the last error on the statement if mysql_stmt_reset succeeded. tests/mysql_client_test.c: A test case for Bug#11183 "mysql_stmt_reset() doesn't reset information about error"
-
unknown authored
tests/mysql_client_test.c: fix for #11808 backported. cmp_double() introduced in order to avoid using long double registers (for local double vars).
-
unknown authored
in cursors. libmysql/libmysql.c: - reset_stmt_handle(): don't reset the server side just because we have an open cursor: the server will close the cursor automatically if needed sql/sql_prepare.cc: - implement Prepared_statement::close_cursor, - implicitly close an open cursor in mysql_stmt_execute instead of issuing an error (to reduce the need to explicitly close cursors and save network bandwidth). - cleanup sql/sql_select.cc: Remove a destructor: cursor destruction can not be done by simply calling a destructor, because of cross-references between cursor and statement memory. sql/sql_select.h: - add an empty Cursor destructor tests/mysql_client_test.c: - remove a test for dropped functionality
-
unknown authored
No separate typecode for MEDIUMTEXT/LONGTEXT is added, as we have no sound decision yet what typecodes and for what types are sent by the server (aka what constitutes a distinct type in MySQL). mysql-test/r/ps_2myisam.result: Test results fixed: new longtext/longblob length (2^32) mysql-test/r/ps_3innodb.result: Test results fixed: new longtext/longblob length (2^32) mysql-test/r/ps_4heap.result: Test results fixed: new longtext/longblob length (2^32) mysql-test/r/ps_5merge.result: Test results fixed: new longtext/longblob length (2^32) mysql-test/r/ps_6bdb.result: Test results fixed: new longtext/longblob length (2^32) mysql-test/r/ps_7ndb.result: Test results fixed: new longtext/longblob length (2^32) sql/field.cc: A fix for Bug#9735 "mysql_fetch_fields() acts strange on LONGBLOB/LONGTEXT": fix wrong initialization of field_length in case of BLOB fields. tests/mysql_client_test.c: A test case for Bug#9735 "mysql_fetch_fields() acts strange on LONGBLOB/LONGTEXT"
-
- 13 Jul, 2005 2 commits
- 12 Jul, 2005 3 commits
-
-
unknown authored
The problem here is that columns that have an especially long type such as an enum type with many options would be longer than 40 chars but the type column returned from show columns always was defined as varchar(40). This is fixed in 5.0 using info schema. mysql-test/r/ps_1general.result: update columns which will now be reported as blobs mysql-test/r/ps_2myisam.result: update columns which will now be reported as blobs mysql-test/r/ps_3innodb.result: update columns which will now be reported as blobs mysql-test/r/ps_4heap.result: update columns which will now be reported as blobs mysql-test/r/ps_5merge.result: update columns which will now be reported as blobs sql/item.cc: report a column as a particular blob type if it's size warrants sql/sql_show.cc: Add function to iterate over all the fields of a table and determine the longest type name. We call this function at the top of our show fields code. We pass in either 40 or max_len whichever is longer to the ctor of Item_empty_string. tests/mysql_client_test.c: update columns which will now be reported as blobs
-
unknown authored
-
unknown authored
Added api function mysql_get_character_set_info which provides information about the current client character set. include/mysql.h: Added api function mysql_get_character_set_info which provides information about the current client character set. libmysql/libmysql.c: Added api function mysql_get_character_set_info which provides information about the current client character set. libmysql/libmysql.def: Added api function mysql_get_character_set_info which provides information about the current client character set. tests/mysql_client_test.c: Added api function mysql_get_character_set_info which provides information about the current client character set.
-
- 01 Jul, 2005 1 commit
-
-
unknown authored
Add a test case for Bug#11656 "Server crash with mysql_stmt_fetch (cursors)", the bug itself is no longer present. tests/mysql_client_test.c: Add a test case for Bug#11656 "Server crash with mysql_stmt_fetch (cursors)", the bug itself is no longer present.
-