An error occurred fetching the project authors.
- 28 Sep, 2006 1 commit
-
-
unknown authored
post-review fixes as indicated by Serg. manual testing of error cases done in 5.0 due to support for DBUG_EXECUTE_IF to insert errors. Unable to write test case for mysql-test until 5.1 due to support for setting debug options at runtime. sql/ha_blackhole.cc: update for handler::info() now returning int sql/ha_blackhole.h: update for handler::info() now returning int sql/ha_isam.cc: update for handler::info() now returning int sql/ha_isam.h: update for handler::info() now returning int sql/ha_isammrg.cc: update for handler::info() now returning int sql/ha_isammrg.h: update for handler::info() now returning int sql/item_sum.cc: update for handler::info() now returning int. return error to user if info call fails sql/sql_delete.cc: update for handler::info() now returning int. return error to user if info call fails sql/sql_select.cc: update for handler::info() now returning int. return error to user if info call fails sql/sql_union.cc: update for handler::info() now returning int. return error to user if info call fails
-
- 07 Sep, 2006 1 commit
-
-
unknown authored
- Change 'get_unit_column_type" to return the field list for the procedure sql/sql_union.cc: Change 'get_unit_column_type' to return the procedure field list if this is the execution of a procedure. tests/mysql_client_test.c: Add test case for using "procedure" in cursor.
-
- 21 Apr, 2006 2 commits
-
-
unknown authored
-
unknown authored
The bug caused wrong result sets for union constructs of the form (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2. For such queries order lists were concatenated and limit clause was completely neglected. mysql-test/r/order_by.result: Added a test case for bug #18767. mysql-test/t/order_by.test: Added a test case for bug #18767. sql/sql_lex.h: Fixed bug #18767. Placed the code the created a fake SELECT_LEX into a separate function. sql/sql_parse.cc: Fixed bug #18767. Placed the code the created a fake SELECT_LEX into a separate function. sql/sql_select.cc: Fixed bug #18767. Changed the condition on which a SELECT is treated as part of a UNION. The SELECT in (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2 now is handled in the same way as the first SELECT in a UNION sequence. sql/sql_union.cc: Fixed bug #18767. Changed the condition at which a SELECT is treated as part of a UNION. The SELECT in (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2 now is handled in the same way as the first SELECT in a UNION sequence. sql/sql_yacc.yy: Fixed bug #18767. Changed the condition at which a SELECT is treated as part of a UNION. The SELECT in (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2 now is handled in the same way as the first SELECT in a UNION sequence. In the same way is handled the SELECT in (SELECT ... LIMIT n) ORDER BY order list. Yet if there is neither ORDER BY nor LIMIT in the single-select union construct (SELECT ...) ORDER BY order_list then it is still handled as simple select with an order clause.
-
- 13 Oct, 2005 1 commit
-
-
unknown authored
The bug was in JOIN::join_free which was wrongly determining that all joins have been already executed and therefore all used tables can be closed. mysql-test/r/subselect_innodb.result: - test results fixed (Bug#12736 "Server crash during a select mysql-test/t/subselect_innodb.test: - a test case for Bug#12736 "Server crash during a select": test that ha_index_or_rnd_end and mysql_unlock_tables are called for all used tables in proper order. sql/item_subselect.cc: - implement subselect_union_engine::is_executed sql/item_subselect.h: - implement Item_subselect::is_evaluated. This function is used to check whether we can clean up a non-correlated join of a subquery when cleaning up the join of the outer query sql/sql_lex.h: - declare st_select_lex::cleanup_all_joins sql/sql_select.cc: - remove an argument from JOIN::join_free, it's now not used - reimplement JOIN::join_free to not unlock tables if there is a subquery that has not yet been evaluated. Make sure that the new implementation calls ha_index_or_rnd_end for every table in the join and inner joins, because all table cursors must be closed before mysql_unlock_tables. sql/sql_select.h: - JOIN::join_free signature changed sql/sql_union.cc: - implement a helper method st_select_lex::cleanup_all_joins, which recursively walks over a tree of joins and calls cleanup() for each join.
-
- 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.
-
- 02 Sep, 2005 1 commit
-
-
unknown authored
- current_arena to stmt_arena: the thread may have more than one 'current' arenas: one for runtime data, and one for the parsed tree of a statement. Only one of them is active at any moment. - set_item_arena -> set_query_arena, because Item_arena was renamed to Query_arena a while ago - set_n_backup_item_arena -> set_n_backup_active_arena; the active arena is the arena thd->mem_root and thd->free_list are currently pointing at. - restore_backup_item_arena -> restore_active_arena (with the same rationale) - change_arena_if_needed -> activate_stmt_arena_if_needed; this method sets thd->stmt_arena active if it's not done yet. sql/item.cc: Rename. sql/item_cmpfunc.cc: Rename. sql/item_func.cc: Rename. sql/item_subselect.cc: Rename. sql/item_subselect.h: Remove an unused forward declaration. sql/item_sum.h: Remove an unused forward declaration. sql/mysql_priv.h: Remove an unused forward declaration. sql/sp.cc: Rename. sql/sp_head.cc: Rename. sql/sql_base.cc: Rename. sql/sql_class.cc: Rename. sql/sql_class.h: Rename. sql/sql_lex.cc: Rename. sql/sql_parse.cc: Rename. sql/sql_prepare.cc: Rename. sql/sql_select.cc: Rename. sql/sql_show.cc: Rename. sql/sql_union.cc: Rename. sql/sql_view.cc: Rename. sql/table.cc: Rename.
-
- 12 Aug, 2005 1 commit
-
-
unknown authored
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong sql/ha_berkeley.cc: Removed not used variable (and options) sql/ha_berkeley.h: Removed not used argument sql/ha_ndbcluster.cc: Remove compiler warning sql/init.cc: Simplify code sql/item_sum.cc: Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong sql/mysql_priv.h: Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong sql/mysqld.cc: Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong sql/sql_class.h: Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong sql/sql_delete.cc: Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong sql/sql_derived.cc: Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong sql/sql_lex.h: Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong sql/sql_parse.cc: Indentation fixes sql/sql_select.cc: Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong sql/sql_select.h: Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong sql/sql_show.cc: Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong sql/sql_union.cc: Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong sql/sql_update.cc: Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong sql/sql_yacc.yy: Changed variable name i to more descriptive name Removed compiler warning
-
- 11 Aug, 2005 1 commit
-
-
unknown authored
mysql-test/r/bigint.result: fix test after merge mysql-test/r/query_cache.result: fix test after merge mysql-test/r/type_datetime.result: fix test after merge
-
- 08 Aug, 2005 1 commit
-
-
unknown authored
- Fixed some error condtion when handling dates with 'T' - Added extra test for bug #11867 (Wrong result with "... WHERE ROW( a, b ) IN ( SELECT DISTINCT a, b WHERE ...)" to show it's not yet fixed - Safety fixes and cleanups mysql-test/r/subselect.result: Added extra test case to test case for bug #11867 (Result shows that current code is not yet right and needs to be fixed) mysql-test/r/type_datetime.result: More tests for dates of type CCYYMMDDTHHMMSS mysql-test/t/subselect.test: Added extra test case to test case for bug #11867 mysql-test/t/type_datetime.test: More tests for dates of type CCYYMMDDTHHMMSS sql-common/my_time.c: Fixed handling of dates of type CCYYMMDDTHHMMSS (Old code couldn't handle 2003-0304 or 2003-0003-02) sql/slave.cc: Indentation cleanup sql/sql_parse.cc: Added test of return value of get_system_var() sql/sql_select.cc: Removed unnecessary call to field->table->maybe_null sql/sql_union.cc: Indentation fixes
-
- 07 Aug, 2005 2 commits
-
-
unknown authored
We're out of bits in st_select_lex->options so make TMP_TABLE_FORCE_MYISAM == OPTION_FOUND_COMMENT (the latter is not used by create_tmp_table). mysql-test/r/create.result: Updated the test result mysql-test/r/fulltext_order_by.result: Drop all tables this test uses mysql-test/t/fulltext_order_by.test: Drop all tables this test uses
-
unknown authored
In init_prepare_fake_select_lex() don't empty ftfunc_list. UNION's ORDER BY clause may contain MATCH(...), for which fix_index() should be called. mysql-test/r/fulltext_order_by.result: BUG#11869 part2 : added another test case mysql-test/t/fulltext_order_by.test: BUG#11869 part2 : added another test case
-
- 06 Aug, 2005 1 commit
-
-
unknown authored
When creating temporary table for UNION, pass TMP_TABLE_FORCE_MYISAM flag to create_tmp_table if we will be using fulltext function(s) when reading from the temp. table. mysql-test/r/fulltext_order_by.result: Testcase for BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error) mysql-test/t/fulltext_order_by.test: Testcase for BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error) sql/mysql_priv.h: BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error): Added TMP_TABLE_FORCE_MYISAM flag sql/sql_select.cc: BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error): In create_tmp_table(), honor the TMP_TABLE_FORCE_MYISAM flag
-
- 30 Jul, 2005 1 commit
-
-
unknown authored
Item_type_holder doesn't store information about length and exact type of original item which results in redefining length to max_length and geometry type to longtext. Changed the way derived tables except unions are built. Now they are created from original field list instead of list of Item_type_holder. mysql-test/r/subselect.result: Fixed wrong test case result. bug#11335 mysql-test/r/view_grant.result: Fixed wrong test case result. bug#11335 mysql-test/r/view.result: Added test case for bug #11335. Fixed wrong test case result. mysql-test/t/view.test: Test case for bug #11335 View redefines TinyInt(1) column definition. sql/sql_union.cc: Fix bug #11335 View redefines TinyInt(1) column definition. Changed the way derived tables except unions are built. Now they are created from original field list instead of list of Item_type_holders. sql/sql_select.cc: Fix bug #11335 View redefines TinyInt(1) column definition. Added special handling of DATE/TIME fields to preserve field's type in tmp field creation. In create_tmp_field() for Item_field added special handling of case when item have to be able to store NULLs but underlaid field is NOT NULL. sql/item_sum.cc: Fix bug #11335 View redefines TinyInt(1) column definition. Added special handling of DATE/TIME fields to preserve field's type while tmp field created in Item_sum_hybrid::create_tmp_field().
-
- 04 Jul, 2005 1 commit
-
-
unknown authored
- Mostly indentation fixes - Added missing test - Ensure that Item_func_case() checks for stack overruns - Use real_item() instead of (Item_ref*) item - Fixed wrong error handling myisam/mi_unique.c: Improved comments myisam/myisampack.c: Updated version number mysql-test/r/group_by.result: Added test that was lost during earlier merge mysql-test/r/information_schema.result: Safety fix: Drop procedures before used mysql-test/t/group_by.test: Added test that was lost during earlier merge mysql-test/t/information_schema.test: Safety fix: Drop procedures before used mysys/hash.c: Updated comment sql/field.cc: false -> FALSE sql/ha_ndbcluster.cc: Fix some style issues - No () around argument to 'case' - Space before ( in switch and if - Removed 'goto' - Added {} - Added () to make expressions easier to read - my_snprintf -> strmov sql/handler.cc: if( -> if ( sql/item.cc: Indentation changes sql/item.h: false -> FALSE sql/item_cmpfunc.cc: Ensure that Item_func_case() check for stack overrun properly sql/item_cmpfunc.h: Ensure that Item_func_case() check for stack overrun properly sql/item_func.cc: Indentation fixes Fixed wrong goto label sql/mysqld.cc: Remove test for opt_disable_networking as this flag can never be set here sql/opt_range.cc: Simplify code sql/sql_class.h: Move define out from middle of class definition sql/sql_parse.cc: Remove extra empty lines sql/sql_select.cc: use real_item() instead of (Item_ref*) item Modifed function comment to be align with others Simple optimization sql/sql_union.cc: Portability fix: Don't use 'bool_variable|=...' sql/sql_view.cc: Move List_iterator_fast out from loops (rewind is faster than creating a new itearator) strings/ctype-utf8.c: if( -> if ( strings/ctype.c: Remove disabled code strings/decimal.c: Indentation fixes strings/xml.c: Indentation fixes
-
- 01 Jul, 2005 1 commit
-
-
unknown authored
include/my_bitmap.h: new bitmap operation mysql-test/r/view.result: added warnings Correct inserting data check (absence of default value) for view underlying tables (BUG#6443) mysql-test/t/view.test: Correct inserting data check (absence of default value) for view underlying tables (BUG#6443) mysys/my_bitmap.c: new bitmap operation sql/field.h: index of field in table added sql/item.cc: Name resolution context added table list removed from fix_fields() arguments sql/item.h: Name resolution context added table list removed from fix_fields() arguments sql/item_cmpfunc.cc: table list removed from fix_fields() arguments sql/item_cmpfunc.h: table list removed from fix_fields() arguments sql/item_func.cc: table list removed from fix_fields() arguments sql/item_func.h: table list removed from fix_fields() arguments sql/item_row.cc: table list removed from fix_fields() arguments sql/item_row.h: table list removed from fix_fields() arguments sql/item_strfunc.cc: fixed server crash on NULL argument sql/item_strfunc.h: table list removed from fix_fields() arguments sql/item_subselect.cc: table list removed from fix_fields() arguments sql/item_subselect.h: table list removed from fix_fields() arguments sql/item_sum.cc: table list removed from fix_fields() arguments sql/item_sum.h: table list removed from fix_fields() arguments sql/item_timefunc.cc: table list removed from fix_fields() arguments sql/item_timefunc.h: table list removed from fix_fields() arguments sql/item_uniq.h: table list removed from fix_fields() arguments sql/log_event.cc: Name resolution context added sql/log_event.h: Name resolution context added sql/mysql_priv.h: Name resolution context added sql/set_var.cc: table list removed from fix_fields() arguments sql/share/errmsg.txt: new error message sql/sp.cc: Name resolution context added sql/sp_head.cc: table list removed from fix_fields() arguments sql/sp_head.h: Name resolution context added sql/sql_base.cc: table list removed from fix_fields() arguments Name resolution context added sql/sql_class.cc: renamed variable sql/sql_delete.cc: Name resolution context added sql/sql_derived.cc: Name resolution context added sql/sql_do.cc: table list removed from fix_fields() arguments sql/sql_handler.cc: Name resolution context added sql/sql_help.cc: Name resolution context added sql/sql_insert.cc: Name resolution context added table list removed from fix_fields() arguments sql/sql_lex.cc: Name resolution context added sql/sql_lex.h: removed resolve mode (information stored into name resolution context) sql/sql_load.cc: table list removed from fix_fields() arguments sql/sql_olap.cc: Name resolution context added sql/sql_parse.cc: Name resolution context added sql/sql_prepare.cc: table list removed from fix_fields() arguments sql/sql_select.cc: table list removed from fix_fields() arguments sql/sql_show.cc: Name resolution context added sql/sql_trigger.cc: table list removed from fix_fields() arguments sql/sql_udf.h: table list removed from fix_fields() arguments sql/sql_union.cc: Name resolution context added sql/sql_update.cc: Name resolution context added sql/sql_view.cc: Name resolution context added sql/sql_view.h: table list removed from fix_fields() arguments sql/sql_yacc.yy: Name resolution context added sql/table.cc: Name resolution context added merged view processing moved sql/table.h: merged view processing moved
-
- 29 Jun, 2005 1 commit
-
-
unknown authored
sql/sp_head.cc: execute parameters in statement mem_root sql/sql_union.cc: additional assert
-
- 24 Jun, 2005 1 commit
-
-
unknown authored
The reason it happened was that both, JOIN::cleanup() and JOIN::join_free(), went over all nested joins and called cleanup/join_free for them. For that: - split recursive and non-recursive parts of JOIN::cleanup() and JOIN::join_free() - rename JOIN::cleanup to JOIN::destroy, as it actually destroys its argument - move the recursive part of JOIN::cleanup to st_select_lex::cleanup - move the non-recursive part of JOIN::join_free to the introduced method JOIN::cleanup(). sql/sql_lex.h: Add st_select_lex::cleanup, a counterpart of st_select_lex_unit::cleanup() sql/sql_select.cc: - remove two unused arguments from return_zero_rows - split JOIN::join_free and JOIN::cleanup to recursive and non-recursive parts. - note, the assert in JOIN::join_free _does_ fail in having.test. We have two options: a) propagate `full' flag to the nested joins. We did it before, and this patch didn't change it. If so, we can end up cleaning up an uncacheable JOIN (that is, the join that we might need again). b) evaluate own 'full' flag on every level. In this case, we might end up with tables freed in mysql_unlock_read_tables, but not cleaned up properly, and this may be even worse. The test suite passes with both approaches, but not with the assert. sql/sql_select.h: - declarations for JOIN::cleanup() and JOIN::join_free() sql/sql_union.cc: Add st_select_lex::cleanup, a counterpart of st_select_lex_unit::cleanup(): move the recursive part of JOIN::cleanup to it.
-
- 17 Jun, 2005 1 commit
-
-
unknown authored
VC++Files/sql/mysqld.dsp: Link debug server against debug yassl sql/examples/ha_archive.cc: Fix type for variables used to store number of rows Add cast when reading current position sql/examples/ha_archive.h: Fix variables used to store rows to ha_rows sql/ha_federated.cc: Remove unused variables, fix type of variable used to store query id sql/item_strfunc.cc: Remove unused variables sql/sql_acl.cc: Remove unused variables sql/sql_lex.cc: Add casts to fix type used for counting number of rows sql/sql_lex.h: Fix size of options to be ulong again sql/sql_insert.cc: Fix type of query id value sql/sql_union.cc: Cast value for number of rows to ha_rows sql/sql_yacc.yy: Remove unused variable sql/table.cc: Add casts for handling key_part lengths
-
- 15 Jun, 2005 1 commit
-
-
unknown authored
Item_buff -> Cached_item Item_arena -> Query_arena TEST_ASSERT -> YYERROR_UNLESS sql/item.h: renamed: Item_buff -> Cached_item sql/item_buff.cc: renamed: Item_buff -> Cached_item sql/item_func.cc: renamed: Item_arena -> Query_arena sql/item_subselect.cc: renamed: Item_arena -> Query_arena sql/sp_head.cc: renamed: Item_arena -> Query_arena sql/sp_head.h: renamed: Item_arena -> Query_arena sql/sql_base.cc: renamed: Item_arena -> Query_arena sql/sql_class.cc: renamed: Item_arena -> Query_arena sql/sql_class.h: renamed: Item_arena -> Query_arena sql/sql_lex.cc: renamed: Item_arena -> Query_arena sql/sql_prepare.cc: renamed: Item_arena -> Query_arena sql/sql_select.cc: renamed: Item_arena -> Query_arena sql/sql_select.h: renamed: Item_buff -> Cached_item Item_arena -> Query_arena sql/sql_union.cc: renamed: Item_arena -> Query_arena sql/sql_view.cc: renamed: Item_arena -> Query_arena sql/sql_yacc.yy: renamed: TEST_ASSERT -> YYERROR_UNLESS sql/table.cc: renamed: Item_arena -> Query_arena
-
- 07 Jun, 2005 1 commit
-
-
unknown authored
error for LIMIT placeholder". The patch adds grammar support for LIMIT ?, ? and changes the type of ST_SELECT_LEX::select_limit,offset_limit from ha_rows to Item*, so that it can point to Item_param. mysql-test/include/ps_modify.inc: Fix existing tests: now LIMIT can contain placeholders. mysql-test/include/ps_query.inc: Fix existing tests: now LIMIT can contain placeholders. mysql-test/r/ps.result: Add basic test coverage for LIMIT ?, ? and fix test results. mysql-test/r/ps_2myisam.result: Fix test results: now LIMIT can contain placeholders. mysql-test/r/ps_3innodb.result: Fix test results: now LIMIT can contain placeholders. mysql-test/r/ps_4heap.result: Fix test results: now LIMIT can contain placeholders. mysql-test/r/ps_5merge.result: Fix test results: now LIMIT can contain placeholders. mysql-test/r/ps_6bdb.result: Fix test results: now LIMIT can contain placeholders. mysql-test/r/ps_7ndb.result: Fix test results: now LIMIT can contain placeholders. mysql-test/t/ps.test: Add basic test coverage for LIMIT ?, ?. sql/item.h: Add a short-cut for (ulonglong) val_int() to Item. Add a constructor to Item_int() that accepts ulonglong. Simplify Item_uint constructor by using the c-tor above. sql/item_subselect.cc: Now select_limit has type Item *. We can safely create an Item in Item_exists_subselect::fix_length_and_dec(): it will be allocated in runtime memory root and freed in the end of execution. sql/sp_head.cc: Add a special initalization state for stored procedures to be able to easily distinguish the first execution of a stored procedure from prepared statement prepare. sql/sql_class.h: Introduce new state 'INITIALIZED_FOR_SP' to be able to easily distinguish the first execution of a stored procedure from prepared statement prepare. sql/sql_derived.cc: - use unit->set_limit() to set unit->select_limit_cnt, offset_limit_cnt evreryplace. Add a warning about use of set_limit in mysql_derived_filling. sql/sql_error.cc: - use unit->set_limit() to set unit->select_limit_cnt, offset_limit_cnt evreryplace. - this change is also aware of bug#11095 "show warnings limit 0 returns all rows instead of zero rows", so the one who merges the bugfix from 4.1 can use local version of sql_error.cc. sql/sql_handler.cc: - use unit->set_limit() to initalize unit->select_limit_cnt,offset_limit_cnt everyplace. sql/sql_lex.cc: Now ST_SELECT_LEX::select_limit, offset_limit have type Item * sql/sql_lex.h: Now ST_SELECT_LEX::select_limit, offset_limit have type Item * sql/sql_parse.cc: - use unit->set_limit() to initalize unit->select_limit_cnt,offset_limit_cnt everyplace. - we can create an Item_int to set global limit of a statement: it will be created in the runtime mem root and freed in the end of execution. sql/sql_repl.cc: Use unit->set_limit to initialize limits. sql/sql_select.cc: - select_limit is now Item* so the proper way to check for default value is to compare it with NULL. sql/sql_union.cc: Evaluate offset_limit_cnt using the new type of ST_SELECT_LEX::offset_limit sql/sql_view.cc: Now ST_SELECT_LEX::select_limit, offset_limit have type Item * sql/sql_yacc.yy: Add grammar support for LIMIT ?, ? clause.
-
- 02 Jun, 2005 1 commit
-
-
unknown authored
the code that is active for SP as well in 5.0) sql/item.cc: Rename of an Item_arena method. sql/item_subselect.cc: Rename of an Item_arena method. sql/sql_class.h: Rename of an Item_arena method. sql/sql_parse.cc: Rename of an Item_arena method. sql/sql_union.cc: Rename of an Item_arena method.
-
- 30 May, 2005 2 commits
-
-
unknown authored
-
unknown authored
"the server side preparedStatement error for LIMIT placeholder", which moves all uses of LIMIT clause from PREPARE to OPTIMIZE and later steps. After-review fixes. mysql-test/r/group_min_max.result: Test results fixed for EXPLAINs when using GROUP_MIN_MAX access plan. sql/item_subselect.cc: Move setting of the internal LIMIT used for IN/ALL/ANY/EXISTS subqueries to one place: Item_exists_subselect::fix_length_and_dec(). This implies that unit->select_limit_cnt is not set until the item is fixed. This is OK, as now LIMIT values are not used until JOIN::optimize. sql/mysql_priv.h: setup_tables no longer needs a special flag for the case when it's called from JOIN::reinit() (we don't need to call setup_tables between two executions of a correlated subquery). sql/opt_range.cc: Fix a glitch in GROUP_MIN_MAX access plan: we should use table metadata, not field data, to evaluate max_used_key_length, which is then used for explain. sql/sp.cc: - setup_tables signature changed. sql/sql_base.cc: - setup_tables no longer needs a special mode for subqueries. Unused checks were removed. sql/sql_delete.cc: - setup_tables signature changed sql/sql_help.cc: - setup_tables signature changed sql/sql_insert.cc: - setup_tables signature changed sql/sql_lex.cc: Consolidate setting of internal LIMIT for IN/ALL/ANY/EXISTS subqeries in one place, and hence remove it from st_select_lex::test_limit(). sql/sql_lex.h: Cleanup signature of st_select_lex_unit::init_prepare_fake_select_lex(). sql/sql_load.cc: - setup_tables signature changed sql/sql_olap.cc: - setup_tables signature changed sql/sql_parse.cc: - st_select_lex_unit::set_limit() signature changed sql/sql_select.cc: Move setting of JOIN::select_limit from JOIN::prepare to JOIN::optimize. At prepare, limit is unknown yet. Remove excessive cleanups from JOIN::reinit which were overwriting join->join_tab[i]->table->used_keys. This fixes the bug which was triggered by the change in item_subselect.cc. sql/sql_union.cc: Class st_select_lex_unit was changed to avoid calls to st_select_lex_unit::set_limit from places where it may be unknown. Now unit->select_limit_cnt is set at ::exec(). st_select_lex_unit::init_prepare_fake_select_lex(): - move out set_limit functionality - remove a few lines of dead code. st_select_lex_unit::prepare(): - now we don't call set_limit at the time of prepare, so the value of unit->select_limit_cnt may be unknown here. Use sl->select_limit instead. st_select_lex_unit::exec(): - cleanup - call set_limit explicitly as it has been moved out of init_prepare_fake_select_lex. sql/sql_update.cc: - setup_tables signature changed
-
- 23 Mar, 2005 2 commits
-
-
unknown authored
corrected number of fields for --enable_metadata sql/sql_union.cc fixed a apparent typo in assert client/mysqltest.c: corrected number of fields for --enable_metadata mysql-test/r/metadata.result: corrected number of fields for --enable_metadata mysql-test/r/ps_1general.result: corrected number of fields for --enable_metadata mysql-test/r/ps_2myisam.result: corrected number of fields for --enable_metadata mysql-test/r/ps_3innodb.result: corrected number of fields for --enable_metadata mysql-test/r/ps_4heap.result: corrected number of fields for --enable_metadata mysql-test/r/ps_5merge.result: corrected number of fields for --enable_metadata mysql-test/r/type_enum.result: corrected number of fields for --enable_metadata sql/sql_union.cc: fixed a apparent typo in assert
-
unknown authored
mysql-test/r/func_group.result: new result mysql-test/r/metadata.result: new result test of metadata of variables, unions and derived tables mysql-test/r/union.result: new results test of union of enum mysql-test/t/metadata.test: test of metadata of variables, unions and derived tables mysql-test/t/union.test: test of union of enum sql/field.cc: Field type merging rules added Fixed table name/alias returting for field made from temporary tables sql/field.h: removed unned field type reporting sql/item.cc: fixed bug in NEW_DATE type field creartion replaced mechanism of merging types of UNION sql/item.h: replaced mechanism of merging types of UNION sql/item_func.h: new item type to make correct field type detection possible sql/item_subselect.cc: added table name parameter to prepare() to show right table alias for derived tables sql/sql_derived.cc: added table name parameter to prepare() to show right table alias for derived tables sql/sql_lex.h: added table name parameter to prepare() to show right table alias for derived tables sql/sql_parse.cc: made function for enum/set pack length calculation sql/sql_prepare.cc: added table name parameter to prepare() to show right table alias for derived tables sql/sql_select.cc: new temporary table field creation by Item_type_holder fixed table alias for temporary table sql/sql_union.cc: added table name parameter to prepare() to show right table alias for derived tables
-
- 02 Mar, 2005 1 commit
-
-
unknown authored
sql/sql_union.cc: a fix for --ps-protocol (bug #6089: FOUND_ROWS returns wrong values when no table/view is used) Don't touch options as itit's not needed.
-
- 25 Feb, 2005 1 commit
-
-
unknown authored
(Found during build process) extra/comp_err.c: Remove compiler warnings extra/perror.c: Remove compiler warnings innobase/dict/dict0dict.c: Remove compiler warnings innobase/dict/dict0load.c: Remove compiler warnings innobase/pars/pars0sym.c: Remove compiler warnings innobase/row/row0row.c: Remove compiler warnings innobase/row/row0sel.c: Remove compiler warnings libmysqld/lib_sql.cc: Remove not used variables myisam/mi_key.c: Remove compiler warnings regex/engine.c: Added comment sql/derror.cc: Remove not used variables sql/examples/ha_archive.cc: Fixed bug in blob handling Removed not used variable sql/field.cc: Remove compiler warnings Remove not used variables sql/filesort.cc: Remove compiler warnings sql/ha_heap.cc: Remove not used variable sql/ha_innodb.cc: Remove not used variables Remove compiler warnings sql/handler.cc: Remove compiler warnings and remove not used variables sql/item.cc: Remove compiler warnings and remove not used variables sql/item_subselect.cc: Remove compiler warnings sql/item_sum.cc: Remove compiler warnings sql/item_sum.h: Remove compiler warnings and remove not used variables sql/log.cc: Remove compiler warnings and remove not used variables sql/log_event.cc: Remove compiler warnings sql/mysqld.cc: Remove compiler warnings and remove not used variables sql/opt_range.cc: Remove compiler warnings and remove not used variables sql/slave.cc: Remove compiler warnings and remove not used variables sql/sp_pcontext.cc: Remove compiler warnings and remove not used variables sql/sql_acl.cc: Remove compiler warnings and remove not used variables sql/sql_analyse.cc: Remove compiler warnings and remove not used variables sql/sql_base.cc: Remove compiler warnings and remove not used variables sql/sql_db.cc: Remove compiler warnings and remove not used variables sql/sql_help.cc: Remove compiler warnings and remove not used variables sql/sql_insert.cc: Remove compiler warnings and remove not used variables sql/sql_load.cc: Remove compiler warnings and remove not used variables sql/sql_parse.cc: Remove compiler warnings and remove not used variables sql/sql_prepare.cc: Remove compiler warnings and remove not used variables sql/sql_select.cc: Remove compiler warnings and remove not used variables sql/sql_show.cc: Remove compiler warnings and remove not used variables sql/sql_table.cc: Remove compiler warnings sql/sql_union.cc: Remove compiler warnings sql/sql_update.cc: Remove compiler warnings and remove not used variables sql/sql_yacc.yy: Remove compiler warnings and remove not used variables sql/strfunc.cc: Remove compiler warnings and remove not used variables strings/ctype-ucs2.c: Remove compiler warnings tests/mysql_client_test.c: Remove compiler warnings and remove not used variables tools/mysqlmanager.c: Remove compiler warnings and remove not used variables
-
- 24 Feb, 2005 1 commit
-
-
unknown authored
Previously we only stored the first given error (the error sent to the client) include/mysys_err.h: Moved ER_FILENOTFOUND last to avoid getting 'error 0' mysql-test/r/backup.result: More warnings from in case of errors mysql-test/r/innodb.result: More warnings from in case of errors mysql-test/r/key_cache.result: More warnings from in case of errors mysql-test/r/myisam.result: More warnings from in case of errors mysql-test/r/preload.result: More warnings from in case of errors mysql-test/r/repair.result: More warnings from in case of errors mysql-test/r/rpl_failed_optimize.result: More warnings from in case of errors mysql-test/r/subselect.result: More warnings from in case of errors mysql-test/t/backup.test: Portability fix mysql-test/t/innodb.test: Avoid some warnings mysql-test/t/myisam.test: Portability fix mysql-test/t/rpl_rotate_logs.test: Portablitiy fix mysys/errors.c: Move ER_FILENOTFOUND last to avoid error 0 sql/mysql_priv.h: Indentation change sql/mysqld.cc: Save all given errors for SHOW ERRORS sql/protocol.cc: Store new errors for SHOW ERROR (Ignore those that are already reported with my_error()) sql/sql_class.cc: More errors with SHOW ERROR sql/sql_class.h: More errors with SHOW ERROR sql/sql_error.cc: More errors with SHOW ERROR sql/sql_parse.cc: Temporary fix: Don't give error for the to-be-removed 'pre-open tables code' sql/sql_show.cc: More debugging Don't register errors while populating schema tables. (If we do, we get a LOT of warnings from information_schema.test) sql/sql_table.cc: Don't register errors from handler in drop table (as we already do it the upper level DROP TABLE code) Don't register errors for 'restore_table' as in most cases the table doesn't exists sql/sql_union.cc: Use file->write_row() instead of 'write_record'. This gives us easer to handle error messages and is faster than the old version
-
- 04 Feb, 2005 1 commit
-
-
unknown authored
bug#7833: Wrong datatype of aggregate column is returned mysql-test/r/func_group.result: Test case for bug 7833: Wrong datatype of aggregate column is returned mysql-test/r/union.result: Test case for bug 6931: Date Type column problem when using UNION-Table. mysql-test/t/func_group.test: Test case for bug 7833: Wrong datatype of aggregate column is returned mysql-test/t/union.test: Test case for bug 6931: Date Type column problem when using UNION-Table.
-
- 18 Jan, 2005 1 commit
-
-
unknown authored
mysql-test/r/union.result: result for a test case for the wrong examined rows with UNION's mysql-test/t/union.test: test case for the wrong examined rows with UNION's sql/sql_union.cc: a patch for the wrong examined rows with UNION's
-
- 06 Jan, 2005 1 commit
-
-
unknown authored
Split TABLE to TABLE and TABLE_SHARE (TABLE_SHARE is still allocated as part of table, will be fixed soon) Created Field::make_field() and made Field_num::make_field() to call this Added 'TABLE_SHARE->db' that points to database name; Changed all usage of table_cache_key as database name to use this instead Changed field->table_name to point to pointer to alias. This allows us to change alias for a table by just updating one pointer. Renamed TABLE_SHARE->real_name to table_name Renamed TABLE->table_name to alias Renamed TABLE_LIST->real_name to table_name include/myisam.h: Added const before names mysql-test/r/group_min_max.result: Make results repeatable mysql-test/t/group_min_max.test: Make results repeatable sql/field.cc: Created Field::make_field() and made Field_num::make_field() to call this Use TABLE_SHARE Use sql_strmake() instead of sql_memdup() to simplify code sql/field.h: Changed table_name to be pointer to table_name. This allows us to change alias for all fields by just changing one pointer. Use TABLE_SHARE sql/field_conv.cc: Use TABLE_SHARE sql/filesort.cc: Use TABLE_SHARE sql/ha_berkeley.cc: Use TABLE_SHARE sql/ha_heap.cc: Use TABLE_SHARE sql/ha_innodb.cc: Use TABLE_SHARE sql/ha_myisam.cc: Use TABLE_SHARE sql/ha_myisammrg.cc: Use TABLE_SHARE Change some pointer handling to use const char* sql/ha_ndbcluster.cc: Use TABLE_SHARE sql/handler.cc: Use TABLE_SHARE sql/item.cc: Use TABLE_SHARE sql/item_func.cc: Use TABLE_SHARE sql/item_subselect.cc: Use TABLE_SHARE sql/item_sum.cc: Use TABLE_SHARE sql/key.cc: Use TABLE_SHARE sql/lock.cc: Use TABLE_SHARE sql/log_event.cc: real_name -> table_name sql/mysql_priv.h: Use TABLE_SHARE sql/opt_range.cc: Use TABLE_SHARE sql/opt_sum.cc: Use TABLE_SHARE sql/records.cc: Use TABLE_SHARE sql/repl_failsafe.cc: real_name -> table_name sql/slave.cc: Use TABLE_SHARE sql/sp.cc: Use TABLE_SHARE sql/sp_head.cc: real_name -> table_name sql/sql_acl.cc: Use TABLE_SHARE removed unnecessary assert fixed indentation changed some char * -> const char* sql/sql_acl.h: changed some char* -> const char* sql/sql_base.cc: Use TABLE_SHARE sql/sql_cache.cc: Use TABLE_SHARE sql/sql_class.cc: Use TABLE_SHARE sql/sql_db.cc: real_name -> table_name sql/sql_delete.cc: Use TABLE_SHARE sql/sql_derived.cc: Use TABLE_SHARE sql/sql_handler.cc: Use TABLE_SHARE sql/sql_help.cc: Use TABLE_SHARE sql/sql_insert.cc: Use TABLE_SHARE sql/sql_load.cc: Use TABLE_SHARE sql/sql_parse.cc: Use TABLE_SHARE sql/sql_rename.cc: real_name -> table_name sql/sql_select.cc: Use TABLE_SHARE table->blob_fields now points to field offsets, not fields tmp_table->table_name now points to alias name sql/sql_show.cc: Use TABLE_SHARE sql/sql_table.cc: Use TABLE_SHARE sql/sql_test.cc: Use TABLE_SHARE sql/sql_trigger.cc: Use TABLE_SHARE sql/sql_udf.cc: Use TABLE_SHARE sql/sql_union.cc: real_name -> table_name sql/sql_update.cc: Use TABLE_SHARE sql/sql_view.cc: Use TABLE_SHARE sql/table.cc: Split TABLE to TABLE and TABLE_SHARE Changed blob_field to be field offsets instead of pointer to fields Only initialize table->s->default_values with default record (not all table->record[#]) Some indentation changes sql/table.h: Split TABLE to TABLE and TABLE_SHARE sql/tztime.cc: real_name -> table_name sql/unireg.cc: Use TABLE_SHARE sql/unireg.h: Use TABLE_SHARE
-
- 03 Jan, 2005 1 commit
-
-
unknown authored
This fixed a bug in prepared statements when used with outher joins Fixed a bug in SUM(DISTINCT) when used with prepared statements. Some safety fixes in test scripts to ensure that previous test failures shouldn't affect other tests mysql-test/r/mysqldump.result: Safety fix if a previous test would fail mysql-test/r/show_check.result: Safety fix if a previous test would fail mysql-test/r/sp.result: Fix for --ps-protocol mysql-test/r/synchronization.result: Safety fix if a previous test would fail mysql-test/r/system_mysql_db.result: Safety fix if a previous test would fail mysql-test/t/mysqldump.test: Safety fix if a previous test would fail mysql-test/t/select.test: Safety fix if a previous test would fail mysql-test/t/show_check.test: Safety fix if a previous test would fail mysql-test/t/sp.test: fix for --ps-protocol mysql-test/t/strict.test: Fix for --ps-protocol mysql-test/t/synchronization.test: Safety fix if a previous test would fail mysql-test/t/system_mysql_db.test: Safety fix if a previous test would fail sql/item_sum.cc: Fix bug in SUM(DISTINCT...) when using with prepared statements sql/item_sum.h: Fix bug in SUM(DISTINCT...) when using with prepared statements sql/mysql_priv.h: Better handling of ensuring that setup_tables() are not called twice sql/sql_base.cc: Better handling of ensuring that setup_tables() are not called twice sql/sql_insert.cc: Better handling of ensuring that setup_tables() are not called twice sql/sql_parse.cc: Better handling of ensuring that setup_tables() are not called twice sql/sql_prepare.cc: Better handling of ensuring that setup_tables() are not called twice sql/sql_select.cc: Better handling of ensuring that setup_tables() are not called twice sql/sql_union.cc: Better handling of ensuring that setup_tables() are not called twice sql/sql_update.cc: Better handling of ensuring that setup_tables() are not called twice sql/table.h: Better handling of ensuring that setup_tables() are not called twice
-
- 31 Dec, 2004 1 commit
-
-
unknown authored
This allows use to use INSERT IGNORE ... ON DUPLICATE ... mysql-test/r/drop.result: safety fix mysql-test/t/drop.test: safety fix mysql-test/t/multi_update.test: ensure we cover all possible errors sql/log_event.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/log_event.h: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/mysql_priv.h: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_class.h: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_delete.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_insert.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_lex.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_lex.h: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_load.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_parse.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_repl.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_repl.h: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_select.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_table.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_union.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_update.cc: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag sql/sql_yacc.yy: Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
-
- 18 Nov, 2004 1 commit
-
-
unknown authored
fixed null processing in NOT operation used in ALL subquery (Bug #6247) mysql-test/r/subselect.result: new tests of ALL/ANY wiews mysql-test/t/subselect.test: new tests of ALL/ANY wiews sql/item_cmpfunc.cc: fixed special NOT ALL processing fixed processing max/min optimized subqueries with empty results (added methods to detect empty results) and special NOP operation to process them for SOME/ANY sobqueries sql/item_cmpfunc.h: fixed processing max/min optimized subqueries with empty results (added methods to detect empty results) and special NOP operation to process them for SOME/ANY sobqueries sql/item_subselect.cc: reporting empty result added for max/min subqueries sql/item_subselect.h: reporting empty result added for max/min subqueries sql/item_sum.cc: reporting empty result added fox max/min aggregate functions sql/item_sum.h: reporting empty result added fox max/min aggregate functions sql/sql_class.cc: reporting empty result added for max/min subqueries sql/sql_parse.cc: reporting empty result added for max/min subqueries sql/sql_union.cc: reporting empty result added for max/min subqueries
-
- 12 Nov, 2004 1 commit
-
-
unknown authored
mysql-test/r/rpl_rotate_logs.result: removed host dependence in error messages mysql-test/t/rpl_rotate_logs.test: removed host dependence in error messages mysys/my_error.c: comment about using my_error family functions sql/filesort.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/ha_innodb.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/handler.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/item.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/item_cmpfunc.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/item_func.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/item_strfunc.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/item_subselect.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/item_sum.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/lock.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/log.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/mysql_priv.h: error check moved to fill_record sql/mysqld.cc: fixed error messages sql/parse_file.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/protocol.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/protocol_cursor.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/repl_failsafe.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/set_var.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/slave.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sp.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sp_head.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sp_rcontext.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_acl.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_analyse.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_base.cc: changing my_error on my_message and my_printf_error where if they are prefered error check moved to fill_record sql/sql_class.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_class.h: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_db.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_delete.cc: changing my_error on my_message and my_printf_error where if they are prefered error check moved to fill_record sql/sql_handler.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_help.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_insert.cc: changing my_error on my_message and my_printf_error where if they are prefered error check moved to fill_record sql/sql_lex.cc: layout fixed sql/sql_load.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_map.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_parse.cc: error check moved to fill_record changing my_error on my_message and my_printf_error where if they are prefered sql/sql_prepare.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_rename.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_repl.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_select.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_show.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_table.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_trigger.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_udf.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_union.cc: error check moved to fill_record sql/sql_update.cc: error check moved to fill_record sql/sql_view.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/sql_yacc.yy: changing my_error on my_message and my_printf_error where if they are prefered sql/table.cc: changing my_error on my_message and my_printf_error where if they are prefered sql/unireg.cc: changing my_error on my_message and my_printf_error where if they are prefered
-
- 09 Nov, 2004 1 commit
-
-
unknown authored
Added push_back(void *, MEM_ROOT *) to make some list-handling code easier that needs to be allocated in a different mem-root (Before one had to change thd->mem_root ; push_back(); restore mem_root. mysql-test/t/range.test: After merge fixRecR sql/item_func.cc: After merge fix sql/item_sum.cc: After merge fix sql/opt_range.cc: After merge fix sql/parse_file.cc: After merge fix sql/sp.cc: After merge fix sql/sp_head.cc: After merge fix sql/sp_head.h: After merge fix sql/sql_base.cc: After merge fix sql/sql_class.h: After merge fix sql/sql_list.h: Added push_back(void *, MEM_ROOT *) to make some list-handling code easier that needs to be allocated in a different mem-root (Before one had to change thd->mem_root ; push_back(); restore mem_root. sql/sql_prepare.cc: After merge fix sql/sql_select.cc: After merge fix sql/sql_table.cc: After merge fix Fixed problem with OPTIMIZE on INNODB tables sql/sql_trigger.cc: After merge fix sql/sql_union.cc: After merge fix sql/sql_view.cc: After merge fix sql/sql_yacc.yy: After merge fix sql/table.cc: After merge fix
-
- 07 Nov, 2004 1 commit
-
-
unknown authored
Now thd->mem_root is a pointer to thd->main_mem_root and THR_MALLOC is a pointer to thd->mem_root. This gives us the following benefits: - Allow us to easily detect if arena has already been swapped before (this fixes a bug in setup_conds() where arena was swaped twice in some cases) - Faster swaps of arenas (as we don't have to copy the whole MEM_ROOT) - We don't anymore have to call my_pthread_setspecific_ptr(THR_MALLOC,...) to change where memory is alloced. Now it's enough to set thd->mem_root client/mysqltest.c: Remove some not needed defines (Things like this should be done in config-win.h) include/config-win.h: Added popen() and pclose() compatibility macros mysql-test/t/rpl_failed_optimize-master.opt: Portability fix sql/ha_berkeley.cc: New thd->memroot handling sql/item_cmpfunc.cc: Simpler arena swapping code sql/item_func.cc: Simpler arena swapping code sql/item_subselect.cc: Simpler arena swapping code New thd->mem_root handling sql/item_sum.cc: New thd->mem_root handling sql/item_timefunc.cc: Fixed not-initalized usage errors found by valgrind sql/log_event.cc: New thd->mem_root handling sql/mysql_priv.h: New thd->mem_root handling sql/mysqld.cc: New thd->mem_root handling sql/opt_range.cc: New thd->mem_root handling sql/repl_failsafe.cc: New thd->mem_root handling sql/set_var.cc: New thd->mem_root handling sql/sql_acl.cc: New thd->mem_root handling sql/sql_base.cc: Simpler arena swapping code New thd->mem_root handling sql/sql_class.cc: New thd->mem_root handling sql/sql_class.h: Simpler arena swapping code New thd->mem_root handling sql/sql_db.cc: New thd->mem_root handling sql/sql_error.cc: New thd->mem_root handling sql/sql_help.cc: New thd->mem_root handling sql/sql_insert.cc: New thd->mem_root handling sql/sql_parse.cc: New thd->mem_root handling Added some extra checking of return value of new sql/sql_prepare.cc: New thd->mem_root handling sql/sql_select.cc: New thd->mem_root handling sql/sql_select.h: New thd->mem_root handling sql/sql_union.cc: Simpler arena swapping code sql/sql_yacc.yy: New thd->mem_root handling sql/table.cc: New thd->mem_root handling sql/thr_malloc.cc: New thd->mem_root handling tests/client_test.c: Added drop table to some tests Changed some table names to 't1'
-
- 26 Oct, 2004 1 commit
-
-
unknown authored
New mysqltest that can run mysqltest with PS Added support for ZEROFILL in PS Fixed crash when one called mysql_stmt_store_result() without a preceding mysql_stmt_bind_result() Updated test cases to support --ps-protocol (Some tests are still run using old protocol) Fixed crash in PS when using SELECT * FROM t1 NATURAL JOIN t2... Fixed crash in PS when using sub queries Create table didn't signal when table was created. This could cause a "DROP TABLE created_table" in another thread to wait "forever" Fixed wrong permissions check in PS and multi-table updates (one could get permission denied for legal quries) Fix for PS and SELECT ... PROCEDURE Reset all warnings when executing a new PS query group_concat(...ORDER BY) didn't work with PS Fixed problem with test suite when not using innodb BitKeeper/deleted/.del-innodb-lock-master.opt~f76a4a1999728f87: Delete: mysql-test/t/innodb-lock-master.opt client/Makefile.am: mysqltest now uses regex client/mysqltest.c: Added support for testing of prepared statements (with --ps-protocol) Main code was done by Kent, I did mainly some cleanups and minor bug fixes New test commands: --disable_ps_protocol --enable_ps_protocol NOTE: new code still has some things that needs to be cleaned up. For example run_query_stmt_handle_error() should be made more general so that same code can be used also by 'normal' queries configure.in: mysqltest now uses regex libmysql/libmysql.c: Reset warning_count after prepare (safety). In the future we should also provide warnings on prepare integer -> string conversion now handles ZEROFILL double -> string conversion is now closer to the one in the server Fixed crash when one called mysql_stmt_store_result() without preceding mysql_stmt_bind_result() libmysqld/examples/Makefile.am: mysqltest now uses regex mysql-test/include/have_query_cache.inc: Fixes for --ps-protocol mysql-test/include/ps_conv.inc: Fixes for --ps-protocol mysql-test/mysql-test-run.sh: Added options --ps-protocol mysql-test/r/ctype_utf8.result: Fixed test case mysql-test/r/fulltext_cache.result: Changed output of MATCH to use round() to get same numbers with --ps-protocol mysql-test/r/fulltext_left_join.result: Changed output of MATCH to use round() to get same numbers with --ps-protocol mysql-test/r/fulltext_multi.result: Changed output of MATCH to use round() to get same numbers with --ps-protocol mysql-test/r/innodb-lock.result: Fixed test to work even if Innodb is not compiled in. mysql-test/t/create.test: Fixes for --ps-protocol mysql-test/t/ctype_utf8.test: Remove warnings mysql-test/t/date_formats.test: Fixes for --ps-protocol mysql-test/t/fulltext_cache.test: Changed output of MATCH to use round() to get same numbers with --ps-protocol mysql-test/t/fulltext_left_join.test: Changed output of MATCH to use round() to get same numbers with --ps-protocol mysql-test/t/fulltext_multi.test: Changed output of MATCH to use round() to get same numbers with --ps-protocol mysql-test/t/func_group.test: Fixes for --ps-protocol mysql-test/t/func_sapdb.test: Fixes for --ps-protocol mysql-test/t/innodb-lock.test: Fixed test to work even if Innodb is not compiled in. mysql-test/t/insert.test: Fixes for --ps-protocol mysql-test/t/insert_select.test: Fixes for --ps-protocol mysql-test/t/insert_update.test: Fixes for --ps-protocol mysql-test/t/metadata.test: Fixes for --ps-protocol mysql-test/t/multi_statement.test: Fixes for --ps-protocol mysql-test/t/ps_1general.test: Fixes for --ps-protocol mysql-test/t/rollback.test: Fixes for --ps-protocol mysql-test/t/rpl_redirect.test: Fixes for --ps-protocol mysql-test/t/rpl_user_variables.test: Fixes for --ps-protocol mysql-test/t/select.test: Fixes for --ps-protocol mysql-test/t/status.test: Fixes for --ps-protocol mysql-test/t/type_blob.test: Fixes for --ps-protocol mysql-test/t/type_float.test: Fixes for --ps-protocol mysql-test/t/union.test: Fixes for --ps-protocol mysql-test/t/warnings.test: Fixes for --ps-protocol mysys/my_alloc.c: More debugging information sql-common/client.c: More debugging information sql-common/my_time.c: TIME didn't support full range with PS sql/field.cc: TIME didn't support full range with PS sql/item_cmpfunc.cc: IN(constants,...) didn't work with PS sql/item_subselect.cc: Some subqueries didn't work with PS sql/item_sum.cc: group_concat(...ORDER BY) didn't work with PS Removed variable warning_available as 'warning' can be used for this. sql/item_sum.h: Removed not needed variable sql/protocol.cc: TIME didn't support full range with PS sql/set_var.cc: Style fix sql/sql_base.cc: setup_wild() didn't properly restore old arena, which caused core dump in PS when using SELECT * FROM t1 NATURAL JOIN t2... sql/sql_class.cc: Style fix sql/sql_error.cc: Style fix sql/sql_insert.cc: Create table didn't signal when table was created. This could cause a "DROP TABLE created_table" in another thread to wait "forever" sql/sql_lex.h: Fix for PS and procedures sql/sql_parse.cc: More debugging information Make a copy of 'db' in PS as this may change Fixed wrong permissions check in PS and multi-table updates sql/sql_prepare.cc: Fix for PS and SELECT ... PROCEDURE Reset all warnings when executing a new query sql/sql_union.cc: Fixes for PS and SELECT ... PROCEDURE Reset 'with_wild' as 'wild' is resolved on prepare
-
- 22 Oct, 2004 1 commit
-
-
unknown authored
prepared statements when LIMIT is used" and post-review comments. The fix changes the approach we calculate the need for ORDER BY in UNION: the previous was not PS friendly, as it damaged SELECT_LEX options in case of single select. mysql-test/r/ps.result: Test results fixed: the test case for Bug#6088 mysql-test/r/subselect.result: Test results fixed: now we don't perform ORDER BY for parts of UNION if there is no LIMIT clause. mysql-test/t/ps.test: A test case for Bug#6088 "FOUND_ROWS returns wrong values for prepared statements when LIMIT is used". sql/sql_union.cc: The actual fix for Bug#6088: - don't modify SELECT_LEX'es - use boolean variable can_skip_order_by to check if we can skip ORDER BY in UNION
-