An error occurred fetching the project authors.
- 15 Jul, 2005 2 commits
-
-
unknown authored
-
unknown authored
correct value of CURRENT_USER() in SP with "security definer" (BUG#7291) BitKeeper/etc/config: switch off open logging mysql-test/r/sp-security.result: correct value from current_user() in function run from "security definer" mysql-test/r/view.result: evaluation constant functions in WHERE (BUG#4663) mysql-test/t/sp-security.test: correct value from current_user() in function run from "security definer" mysql-test/t/view.test: evaluation constant functions in WHERE (BUG#4663) sql/item.cc: Item_static_string_func creation if it is need sql/item.h: support of Item_static_string_func creation sql/item_cmpfunc.cc: do not evaluate items during view creation sql/item_create.cc: create Item_func_user sql/item_strfunc.cc: Item_func_sysconst in case of converting value still have to correctly print itself => use Item_static_string_func instead of Item_string Item_func_user return USER() or CURRENT_USER() sql/item_strfunc.h: support of correct charset conversion procedure in Item_func_sysconst sql/sql_class.h: new method sql/sql_yacc.yy: Item_func_user now support both USER() and CURRENT_USER(), so we have to pass parametr what it is
-
- 14 Jul, 2005 1 commit
-
-
unknown authored
After merge fix. sql/item.cc: After merge fix.
-
- 13 Jul, 2005 3 commits
-
-
unknown authored
binary). mysql-test/r/ps.result: Test results fixed (Bug#9379) mysql-test/t/ps.test: A test case for Bug#9379 (collation of a parameter marker is binary) sql/item.cc: - set Item_param::collation to str_value collation, if Item_param is assigned a string. Reset it to default in Item_param::reset() (on the next execution it can be assigned a number). sql/item_func.cc: - now that item collation can change between executions (if this item is Item_param), we need to register the change of the execution tree in the rollback list.
-
unknown authored
data": remove the fix for another bug (8807) that added OUTER_REF_TABLE_BIT to all subqueries that used a placeholder to prevent their evaluation at prepare. As this bit hanged in Item_subselect::used_tables_cache for ever, a constant subquery with a placeholder was never evaluated as such, which caused wrong choice of the execution plan for the statement. - to fix Bug#8807 backport a better fix from 5.0 - post-review fixes. mysql-test/r/ps.result: Bug#11458: test results fixed mysql-test/t/ps.test: - add a test case for Bug#11458 "Prepared statement with subselects return random data" sql/item.cc: - remove unnecessary Item_param::fix_fields - fix Item_param::set_null to set item_type accordingly (safety: Item_param should behave like a basic constant). sql/item.h: Remove Item_param::fix_fields sql/item_subselect.h: Remove no more existing friend. sql/mysql_priv.h: Add UNCACHEABLE_PREPARE to mark all subqueries as uncacheable if in statement prepare (backport from 5.0). sql/sql_lex.h: Comment fixed. sql/sql_parse.cc: If in statement prepare, mark all subqueries as uncacheable (backport from 5.0) sql/sql_prepare.cc: Switch off the uncacheable flag from all subqueries after statement prepare is done (backport from 5.0)
-
unknown authored
adding test case sql_table.cc: sql_table.cc: - do not create a new item when charsets are the same - return ER_INVALID_DEFAULT if default value cannot be converted into the column character set. item.cc: - Allow conversion not only to Unicode, but also to and from "binary". - Adding safe_charset_converter() for Item_num and Item_varbinary, returning a fixed const Item. sql/item.cc: - Allow conversion not only to Unicode, but also to and from "binary". - Adding safe_charset_converter() for Item_num and Item_varbinary, returning a fixed const Item. sql/sql_table.cc: sql_table.cc: - do not create a new item when charsets are the same - return ER_INVALID_DEFAULT if default value cannot be converted into the column character set. mysql-test/r/ctype_utf8.result: adding test case
-
- 12 Jul, 2005 3 commits
-
-
unknown authored
When searching column to sort on, item was compared to field under view column, but not the column itself. Because names of view column and underlaid field may differ, it leads to possibly choosing wrong column for sorting on. This patch makes Item_direct_view_ref::eq(Item *item,...) compare item's name with it's own name proir to comparing to *ref item. sql/item.cc: Fix bug #11709 View was ordered by wrong column sql/item.h: Fix bug #11709 View was ordered by wrong column mysql-test/t/view.test: Test case for bug #11709 View was ordered by wrong column. mysql-test/r/view.result: Test case for bug #11709 View was ordered by wrong column.
-
unknown authored
MAX(field). mysql-test/r/subselect.result: Testcase for BUG#11821 mysql-test/t/subselect.test: Testcase for BUG#11821
-
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
-
- 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
-
- 02 Jul, 2005 1 commit
-
-
unknown authored
sql/item.cc: new argument of find_field_in_tables() sql/mysql_priv.h: new argument of find_field_in_tables() sql/sp.cc: new argument of find_field_in_tables() sql/sql_base.cc: new argument of find_field_in_tables() sql/sql_help.cc: new argument of find_field_in_tables()
-
- 01 Jul, 2005 2 commits
-
-
unknown authored
-
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
-
- 30 Jun, 2005 1 commit
-
-
unknown authored
bug #10617: Insert from same table to same table give incorrect result for bit(4) column. bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs mysql-test/r/type_bit.result: test case. bug #10617: Insert from same table to same table give incorrect result for bit(4) column. bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs mysql-test/t/type_bit.test: test case. bug #10617: Insert from same table to same table give incorrect result for bit(4) column. bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs sql/field.h: a fix. bug #10617: Insert from same table to same table give incorrect result for bit(4) column. bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs - max_length() returns length in bits. - introduced set_bit_ptr() function, which sets bit_ptr and bit_ofs. sql/item.cc: a fix. bug #10617: Insert from same table to same table give incorrect result for bit(4) column. bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs - create Field_bit_as_char in case of MYSQL_TYPE_BIT in the Item::tmp_table_field_from_field_type() (we cannot create Field_bit here because of lack of information: bit_ptr, bit_ofs) sql/mysql_priv.h: a fix. bug #10617: Insert from same table to same table give incorrect result for bit(4) column. bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs - table_cant_handle_bit_fields parameter added to the create_tmp_field() sql/sql_select.cc: a fix. bug #10617: Insert from same table to same table give incorrect result for bit(4) column. bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs - create_tmp_field() changes to return create_tmp_field_from_item() result (actually, Field_bit_as_char) if table_cant_handle_bit_fields=1 for bit fields. - create_tmp_field() calls accordingly changed - call set_bit_ptr() for bit fields after the move_field() call during temporary table creation. sql/sql_table.cc: a fix. bug #10617: Insert from same table to same table give incorrect result for bit(4) column. bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs - changed the create_tmp_field() call
-
- 29 Jun, 2005 1 commit
-
-
unknown authored
sql/item.cc: a fix (bug #11215: BIGINT: can't set DEFAULT to minimum end-range) Pass unsig=1 to the constructor.
-
- 27 Jun, 2005 1 commit
-
-
unknown authored
#9728 'Decreased functionality in "on duplicate key update #8147 'a column proclaimed ambigous in INSERT ... SELECT .. ON DUPLICATE' This ensures fields are uniquely qualified and also that one can't update other tables in the ON DUPLICATE KEY UPDATE part mysql-test/r/insert_select.result: More tests for bug #9728 and #8147 mysql-test/r/insert_update.result: Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works mysql-test/t/insert_select.test: More tests for bug #9728 and #8147 mysql-test/t/insert_update.test: Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works mysys/my_access.c: Cleanup (shorter loop variable names) sql/ha_ndbcluster.cc: Indentation fixes sql/item.cc: Remove item_flags sql/item.h: Remove item_flags sql/mysql_priv.h: New arguments to mysql_prepare_insert sql/sql_base.cc: Remove old fix for bug #8147 sql/sql_insert.cc: Extend mysql_prepare_insert() with new field list for tables that can be used in the values port of ON DUPLICATE KEY UPDATE sql/sql_parse.cc: Revert fix for #9728 Allow one to use other tables in ON DUPLICATE_KEY for INSERT ... SELECT if there is no GROUP BY clause sql/sql_prepare.cc: New arguments to mysql_prepare_insert sql/sql_yacc.yy: Revert bug fix for #9728
-
- 22 Jun, 2005 3 commits
-
-
unknown authored
Fix GCC 4.0 link failure. Better CXX_VERSION guessing. config/ac-macros/misc.m4: Better CXX_VERSION guessing. configure.in: CXX_VERSION guessing moved to misc.m4. HAVE_EXPLICIT_TEMPLATE_INSTANTIATION moved to config.h. Use compiler AR with MIPSpro and Forte instead of instantiating templates explicitly. extra/yassl/src/crypto_wrapper.cpp: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. extra/yassl/src/template_instnt.cpp: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. extra/yassl/src/yassl_int.cpp: GCC 4.0 link fix. This file needs __cxa_pure_virtual. extra/yassl/taocrypt/include/runtime.hpp: Fix GCC 4.0 link failure. Instruct compiler to always emit __cxa_pure_virtual even if it seems to be never used. extra/yassl/taocrypt/include/types.hpp: Include config.h. extra/yassl/taocrypt/src/algebra.cpp: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. extra/yassl/taocrypt/src/dh.cpp: GCC 4.0 link fix. This file needs __cxa_pure_virtual. extra/yassl/taocrypt/src/dsa.cpp: GCC 4.0 link fix. This file needs __cxa_pure_virtual. extra/yassl/taocrypt/src/integer.cpp: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. extra/yassl/taocrypt/src/rsa.cpp: GCC 4.0 link fix. This file needs __cxa_pure_virtual. extra/yassl/taocrypt/src/template_instnt.cpp: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. sql/field.cc: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. sql/item.cc: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. sql/item_buff.cc: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. sql/mysqld.cc: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. sql/opt_range.cc: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. sql/set_var.cc: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. sql/slave.cc: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. sql/sql_acl.cc: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. sql/sql_class.cc: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. sql/sql_insert.cc: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. sql/sql_map.cc: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. sql/sql_select.cc: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. sql/sql_show.cc: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION. sql/table.cc: EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
-
unknown authored
Remove changes made by bug fix #8147. They strips list of insert_table_list to only insert table, which results in error reported in bug #9728. Added flag to Item to resolve ambigous fields reported in bug #8147. sql/item.h: Fix bug#9728 decreased functionality in "on duplicate key update". sql/item.cc: Fix bug#9728 decreased functionality in "on duplicate key update" sql/sql_parse.cc: Fix bug#9728 decreased functionality in "on duplicate key update" sql/sql_base.cc: Fix bug#9728 decreased functionality in "on duplicate key update". sql/sql_yacc.yy: Fix bug#9728 decreased functionality in "on duplicate key update" mysql-test/t/insert_select.test: Test case for bug#9728 Decreased functionality in "on duplicate key update". mysql-test/r/insert_select.result: Test case for bug#9728 Decreased functionality in "on duplicate key update".
-
unknown authored
when using ORDER BY Insert were inserting data from last record fetched instead of inserting from temporary table. Make Item_ref to save data from result_field if it's available rather then from *ref on save_in_field() call. sql/item.h: Fix bug#11298 insert into select from VIEW produces incorrect result when using ORDER BY sql/item.cc: Fix bug#11298 insert into select from VIEW produces incorrect result when using ORDER BY mysql-test/r/view.result: Test case for bug#11298 insert into select from VIEW produces incorrect result when using ORDER BY mysql-test/t/view.test: Test case for bug#11298 insert into select from VIEW produces incorrect result when using ORDER BY
-
- 21 Jun, 2005 1 commit
-
-
unknown authored
fixed view fields names check and generation (changed after Trudy review: underlying field names treat as user set ones) (BUG#7448) mysql-test/r/view.result: test of view field names generation mysql-test/t/view.test: test of view field names generation sql/item.cc: add a flag that indicates that the name of the item was an auto-generated one and so can be changed in a view sql/item.h: add a flag that indicates that the name of the item was an auto-generated one and so can be changed in a view layout fixed sql/item_func.cc: line made less then 80 columns sql/sql_view.cc: fixed checking of duplicates of view fields: 1) case-insensitive system charset/collation is used now to compare view filds 2) in case if the duplicate field name was of an auto-generated one, we create another unique name for it sql/sql_yacc.yy: add a flag that indicates that the name of the item was an auto-generated one and so can be changed in a view
-
- 19 Jun, 2005 1 commit
-
-
unknown authored
Fix for yaSSL link failures with Forte Developer 7, MIPSpro Compilers, Compaq C++. These compilers have problem with implicit template instantiation in archives (libyassl.a, libtaocrypt.a). Instantiate templates explicitly. Fix for yaSSL link failure on powermacg5 (gcc 3.3). When -O3 is specified gcc inlines __cxa_pure_virtual. This is wrong behavior, __cxa_pure_virtual must never be inlined. configure.in: Better CXX_VERSION guessing. EXPLICIT_TEMPLATE_INSTANTIATION macro indicates whether to instantiate templates explicitly. Instantiate templates explicitly on MIPSpro, Compaq, Forte. extra/yassl/src/crypto_wrapper.cpp: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. extra/yassl/src/template_instnt.cpp: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. More portable templates instantiation. extra/yassl/src/yassl_int.cpp: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. More portable templates instantiation. extra/yassl/taocrypt/include/runtime.hpp: Fix for link failure on powermacg5 (gcc 3.3). __cxa_pure_virtual must never be inlined. extra/yassl/taocrypt/src/algebra.cpp: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. extra/yassl/taocrypt/src/integer.cpp: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. extra/yassl/taocrypt/src/template_instnt.cpp: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/field.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/item.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/item_buff.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/mysqld.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/opt_range.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/set_var.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/slave.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/sql_acl.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/sql_class.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/sql_insert.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/sql_map.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/sql_select.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/sql_show.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION. sql/table.cc: Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
-
- 14 Jun, 2005 2 commits
- 13 Jun, 2005 1 commit
-
-
unknown authored
heap/hp_hash.c: fix for windows 64-bit compiler warnings heap/hp_update.c: fix for windows 64-bit compiler warnings mysys/default.c: fix for windows 64-bit compiler warnings mysys/default_modify.c: fix for windows 64-bit compiler warnings mysys/mf_iocache.c: fix for windows 64-bit compiler warnings mysys/mf_keycache.c: fix for windows 64-bit compiler warnings mysys/my_alloc.c: fix for windows 64-bit compiler warnings mysys/my_getopt.c: fix for windows 64-bit compiler warnings mysys/my_mmap.c: fix for windows 64-bit compiler warnings mysys/my_once.c: fix for windows 64-bit compiler warnings mysys/string.c: fix for windows 64-bit compiler warnings sql-common/client.c: fix for windows 64-bit compiler warnings sql/field.cc: fix for windows 64-bit compiler warnings sql/gstream.cc: fix for windows 64-bit compiler warnings sql/ha_myisam.cc: fix for windows 64-bit compiler warnings sql/ha_myisammrg.cc: fix for windows 64-bit compiler warnings sql/item.cc: fix for windows 64-bit compiler warnings sql/item.h: fix for windows 64-bit compiler warnings sql/item_cmpfunc.cc: fix for windows 64-bit compiler warnings sql/password.c: fix for windows 64-bit compiler warnings sql/set_var.h: fix for windows 64-bit compiler warnings strings/ctype-big5.c: fix for windows 64-bit compiler warnings strings/ctype-bin.c: fix for windows 64-bit compiler warnings strings/ctype-cp932.c: fix for windows 64-bit compiler warnings strings/ctype-eucjpms.c: fix for windows 64-bit compiler warnings strings/ctype-mb.c: fix for windows 64-bit compiler warnings strings/ctype-simple.c: fix for windows 64-bit compiler warnings strings/ctype-sjis.c: fix for windows 64-bit compiler warnings strings/ctype-uca.c: fix for windows 64-bit compiler warnings strings/ctype-ucs2.c: fix for windows 64-bit compiler warnings strings/ctype-ujis.c: fix for windows 64-bit compiler warnings strings/ctype-utf8.c: fix for windows 64-bit compiler warnings strings/ctype.c: fix for windows 64-bit compiler warnings strings/decimal.c: fix for windows 64-bit compiler warnings strings/xml.c: fix for windows 64-bit compiler warnings
-
- 07 Jun, 2005 1 commit
-
-
unknown authored
mysql-test/r/innodb.result: Update results mysql-test/r/warnings.result: Update results sql/item.cc: Simple optimization sql/item_func.cc: After merge fix sql/item_sum.cc: Fixes for group_concat and rollup (From Ramil) sql/sql_parse.cc: Remove compiler warning sql/sql_select.cc: Fixed problem with rollup
-
- 05 Jun, 2005 1 commit
-
-
unknown authored
'#pragma interface' (that comes with the #include'd header file)
-
- 03 Jun, 2005 1 commit
-
-
unknown authored
Ensure that 'null_value' is not accessed before val() is called in FIELD() functions Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable mysql-test/r/func_gconcat.result: Move innodb specific test to innodb.test Changed table name r2 -> t2 More test to see how ROLLUP was optimized mysql-test/r/innodb.result: Moved test here form func_gconcat mysql-test/r/olap.result: New test results after optimization mysql-test/t/func_gconcat.test: Move innodb specific test to innodb.test Changed table name r2 -> t2 More test to see how ROLLUP was optimized mysql-test/t/innodb.test: Moved test here form func_gconcat sql/field.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_berkeley.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_blackhole.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_heap.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_innodb.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_isam.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_isammrg.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_myisam.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_myisammrg.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/ha_ndbcluster.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/handler.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/hash_filo.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item_cmpfunc.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item_func.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place Ensure that 'null_value' is not accessed before val() is called sql/item_geofunc.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item_strfunc.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item_subselect.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item_sum.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item_timefunc.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/item_uniq.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/log_event.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/mysql_priv.h: Change key_map_full to not be const as we are giving it a proper value on startup sql/mysqld.cc: Move key_map variables here and initialize key_map_full properly sql/opt_range.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/opt_range.h: Fix that test_quick_select() works with any ammount of keys sql/procedure.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/protocol.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/protocol_cursor.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/set_var.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_analyse.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_class.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_crypt.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_insert.cc: Fixed that max_rows is ulong sql/sql_list.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_map.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_olap.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_select.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place Fixed that ROLLUP don't have to always create a temporary table Added new argument to remove_const() to make above possible Fixed some errors that creapt up when we don't always do a temporary table for ROLLUP sql/sql_string.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_table.cc: Simple optimizations Fixed wrong checking of build_table_path() in undef-ed code sql/sql_udf.cc: Move USE_PRAGMA_IMPLEMENTATION to proper place sql/sql_yacc.yy: removed extra {}
-
- 02 Jun, 2005 2 commits
-
-
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.
-
unknown authored
Set #pragma implementation" earlier Many files: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION client/sql_string.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION mysys/raid.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/field.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_berkeley.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_blackhole.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_heap.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_innodb.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_isam.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_isammrg.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_myisam.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_myisammrg.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_ndbcluster.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/handler.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/hash_filo.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_cmpfunc.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_func.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_geofunc.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_strfunc.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_subselect.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_sum.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_timefunc.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_uniq.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/log_event.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/opt_range.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/procedure.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/protocol.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/protocol_cursor.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/set_var.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_analyse.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_class.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_crypt.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_list.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_map.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_olap.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/examples/ha_archive.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_select.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_string.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_udf.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/examples/ha_example.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/examples/ha_tina.cc: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION sql/tztime.cc: Set #pragma implementation" earlier
-
- 01 Jun, 2005 1 commit
-
-
unknown authored
Ensure we get error if INSERT IGNORE ... SELECT fails Fixed wrong key_part->key_length usage in index_merge client/mysql.cc: Code cleanups & simply optimizations mysql-test/r/information_schema.result: Safety mysql-test/t/information_schema.test: Safety sql/ha_ndbcluster.cc: Code cleanups sql/item.cc: Code cleanups sql/item_subselect.cc: Code cleanups sql/item_sum.cc: Code cleanups sql/opt_range.cc: Made get_index_only_read_time() static (instad of inline) to increase portability (function was not declared before use) Simple optimization Fixed wrong key_part->key_length usage in index_merge Removed not used variable n_used_covered Indentation fixes & comment cleanups sql/parse_file.cc: Code cleanups sql/sql_base.cc: Code cleanups sql/sql_bitmap.h: Added missing return sql/sql_insert.cc: Ensure we get error if INSERT IGNORE ... SELECT fails sql/sql_select.cc: Code cleanups sql/sql_show.cc: Safety fix if a LOT of errors are ignored sql/sql_update.cc: Code cleanups sql/table.cc: Code cleanups sql/table.h: Code cleanups sql/uniques.cc: Code cleanups strings/decimal.c: Simple optimization Code cleanups
-
- 31 May, 2005 2 commits
-
-
unknown authored
Fixed bug #10982. item.cc: Fixed bug #10982. In the function Item_ref::val_decimal by mistake the method Item_ref::val_decimal was used instead of Item_ref::val_decimal_result. sql/item.cc: Fixed bug #10982. In the function Item_ref::val_decimal by mistake the method Item_ref::val_decimal was used instead of Item_ref::val_decimal_result. mysql-test/r/olap.result: Fixed bug #10982.
-
unknown authored
sql/item.cc: Get the size before trashing (in debug mode only).
-
- 26 May, 2005 2 commits
-
-
unknown authored
mysql-test/r/union.result: test for Bug #10025 mysql-test/t/union.test: test for Bug #10025 sql/item.cc: set HA_OPTION_PACK_RECORD and change type to MYSQL_TYPE_STRING, to allow correct field creation in case of length more then 255 (creation STRING field with length more then 255)
-
unknown authored
Added some more ifdefs for "#pragma interface" client/sql_string.cc: USE_PRAGMA_IMPLEMENTATION client/sql_string.h: USE_PRAGMA_INTERFACE include/my_global.h: Use pragma implementation for gcc pre version 3 mysys/raid.cc: USE_PRAGMA_IMPLEMENTATION sql/field.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_berkeley.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_blackhole.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_heap.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_innodb.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_isam.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_isammrg.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_myisam.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_myisammrg.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_ndbcluster.cc: USE_PRAGMA_IMPLEMENTATION sql/handler.cc: USE_PRAGMA_IMPLEMENTATION sql/hash_filo.cc: USE_PRAGMA_IMPLEMENTATION sql/item.cc: USE_PRAGMA_IMPLEMENTATION sql/item_cmpfunc.cc: USE_PRAGMA_IMPLEMENTATION sql/item_func.cc: USE_PRAGMA_IMPLEMENTATION sql/item_geofunc.cc: USE_PRAGMA_IMPLEMENTATION sql/item_strfunc.cc: USE_PRAGMA_IMPLEMENTATION sql/item_subselect.cc: USE_PRAGMA_IMPLEMENTATION sql/item_sum.cc: USE_PRAGMA_IMPLEMENTATION sql/item_timefunc.cc: USE_PRAGMA_IMPLEMENTATION sql/item_uniq.cc: USE_PRAGMA_IMPLEMENTATION sql/item_uniq.h: USE_PRAGMA_INTERFACE sql/log_event.cc: USE_PRAGMA_IMPLEMENTATION sql/log_event.h: USE_PRAGMA_INTERFACE sql/opt_range.cc: USE_PRAGMA_IMPLEMENTATION sql/procedure.cc: USE_PRAGMA_IMPLEMENTATION sql/protocol.cc: USE_PRAGMA_IMPLEMENTATION sql/protocol_cursor.cc: USE_PRAGMA_IMPLEMENTATION sql/set_var.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_analyse.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_analyse.h: USE_PRAGMA_INTERFACE sql/sql_class.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_crypt.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_crypt.h: USE_PRAGMA_IMPLEMENTATION sql/sql_list.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_map.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_map.h: USE_PRAGMA_INTERFACE sql/sql_olap.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_select.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_string.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_udf.cc: USE_PRAGMA_IMPLEMENTATION sql/tztime.cc: USE_PRAGMA_IMPLEMENTATION
-
- 25 May, 2005 1 commit
-
-
unknown authored
sql/item.cc: Move function to make it easier to debug sql/item.h: Move function to make them easier to debug
-
- 24 May, 2005 2 commits
-
-
unknown authored
#5860 "Multi-table UPDATE does not activate update triggers" #6812 "Triggers are not activated for INSERT ... SELECT" #8755 "Trigger is not activated by LOAD DATA". This patch also implements proper handling of triggers for special forms of insert like REPLACE or INSERT ... ON DUPLICATE KEY UPDATE. Also now we don't call after trigger in case when we have failed to inserted/update or delete row. Trigger failure should stop statement execution. I have not properly tested handling of errors which happen inside of triggers in this patch, since it is simplier to do this once we will be able to access tables from triggers. mysql-test/r/trigger.result: Added tests for triggers behavior for various non-standard forms of INSERT such as REPLACE and INSERT ... ON DUPLICATE KEY UPDATE. Also added tests for bugs #5860 "Multi-table UPDATE does not activate update triggers", #6812 "Triggers are not activated for INSERT ... SELECT" and #8755 "Trigger is not activated by LOAD DATA". mysql-test/t/trigger.test: Added tests for triggers behavior for various non-standard forms of INSERT such as REPLACE and INSERT ... ON DUPLICATE KEY UPDATE. Also added tests for bugs #5860 "Multi-table UPDATE does not activate update triggers", #6812 "Triggers are not activated for INSERT ... SELECT" and #8755 "Trigger is not activated by LOAD DATA". sql/item.cc: Since it turned out that at trigger loading time we can't say in which buffer TABLE::record[0] or record[1] old version of row will be stored we have to change our approach to binding of Item_trigger_field to Field instances. Now after trigger parsing (in Item_trigger_field::setup_table()) we only find index of proper Field in the TABLE::field array. Then before trigger is invoked we set Table_triggers_list::old_field/new_field so they point to arrays holding Field instances bound to buffers with proper row versions. And as last step in Item_trigger_field::fix_fields() we get pointer to Field from those arrays using saved field index. Item_trigger_field::setup_field()/fix_fields() were changed to implement this approach. sql/item.h: Since it turned out that at trigger loading time we can't say in which buffer TABLE::record[0] or record[1] old version of row will be stored we have to change our approach to binding of Item_trigger_field to Field instances. Now after trigger parsing (in Item_trigger_field::setup_table()) we only find index of proper Field in the TABLE::field array. Then before trigger is invoked we set Table_triggers_list::old_field/new_field so they point to arrays holding Field instances bound to buffers with proper row versions. And as last step in Item_trigger_field::fix_fields() we get pointer to Field from those arrays using saved field index. Item_trigger_field: - Added field_idx member to store index of Field object corresponding to this Item in TABLE::field array. - Added triggers member to be able to access to parent Table_trigger_list object from fix_fields() method. - setup_field() no longer needs to know for which type of event this trigger is, since it does not make decision Field for which buffer (record[0] or record[1] is appropriate for this Item_trigger_field) sql/mysql_priv.h: Added fill_record_n_invoke_before_triggers() methods. They are simple wrappers around fill_record() which invoke proper before trigger right after filling record with values. sql/sql_base.cc: Added fill_record_n_invoke_before_triggers() methods. They are simple wrappers around fill_record() which invoke proper before trigger right after filling record with values. sql/sql_delete.cc: mysql_delete(): Now we stop statement execution if one of triggers failed, we also don't execute after delete trigger if we failed to delete row from the table (We also pass information about which buffer contains old version of row to process_triggers()). multi_delete::send_data()/do_deletes(): Now we also invoke triggers in case of multi-delete. sql/sql_insert.cc: mysql_insert(): Moved invocation of before triggers to fill_record_n_invoke_before_triggers() method. After triggers are now executed as part of write_record(). (as nice side effect now we also stop statement execution if one of triggers fail). write_record(): Invoke after insert trigger after performing insert. Also invoke proper triggers if insert is converted to update or conflicting row is deleted. Cleaned up error handling a bit - no sense to report error via handler::print_error if it was not generated by handler method and was reported before. Also now we will execute after trigger only if we really have written row to the table. select_insert::send_data()/store_values(): We should also execute INSERT triggers for INSERT ... SELECT statement. sql/sql_load.cc: read_fixed_length()/read_sep_field(): We should execute INSERT triggers when processing LOAD DATA statement. Small cleanup in auto-increment related code. Also moved check for thd->killed which is used to abort LOAD DATA in case of problems in 'traditional' mode to better place.. sql/sql_trigger.cc: Since it turned out that at trigger loading time we can't say in which buffer TABLE::record[0] or record[1] old version of row will be stored we have to change our approach to binding of Item_trigger_field to Field instances. Now after trigger parsing (in Item_trigger_field::setup_table()) we only find index of proper Field in the TABLE::field array. Then before trigger is invoked we set Table_triggers_list::old_field/new_field so they point to arrays holding Field instances bound to buffers with proper row versions. And as last step in Item_trigger_field::fix_fields() we get pointer to Field from those arrays using saved field index. Table_triggers_list methods were changed to implement this approach (see also comments for sql_trigger.h). sql/sql_trigger.h: Since it turned out that at trigger loading time we can't say in which buffer TABLE::record[0] or record[1] old version of row will be stored we have to change our approach to binding of Item_trigger_field to Field instances. Now after trigger parsing (in Item_trigger_field::setup_table()) we only find index of proper Field in the TABLE::field array. Then before trigger is invoked we set Table_triggers_list::old_field/new_field so they point to arrays holding Field instances bound to buffers with proper row versions. And as last step in Item_trigger_field::fix_fields() we get pointer to Field from those arrays using saved field index. Changed Table_triggers_list to implement this new approach: - Added record1_field member to store array of Field objects bound to TABLE::record[1] buffer (instead of existing old_field member) - Added new_field member and changed meaning of old_field member. During trigger execution they should point to arrays of Field objects bound to buffers holding new and old versions of row respectively. - Added 'table' member to be able to get access to TABLE instance (for which this trigger list object was created) from process_triggers() method. - Now process_triggers() method sets old_field and new_field members properly before executing triggers body (basing on new old_row_is_record1 parameter value). - Renamed prepare_old_row_accessors_method() to prepare_record1_accessors() Also added has_before_update_triggers() method which allows to check whenever any before update triggers exist for table. sql/sql_update.cc: mysql_update(): Now we invoke before triggers in fill_record_n_invoke_before_triggers() method. Also now we abort statement execution when one of triggers fail. safe_update_on_fly(): When we are trying to understand if we can update first table in multi update on the fly we should take into account that BEFORE UPDATE trigger can change field values. multi_update::send_data()/do_updates() We should execute proper triggers when doing multi-update (in both cases when we do it on the fly and using temporary tables).
-
unknown authored
sql/item.cc: Fixed Bug#8009.
-
- 23 May, 2005 1 commit
-
-
unknown authored
Memory leak in locally evalutated expressions during SP execution fixed by reusing allocated item slots when possible. Note: No test case added, since the test is a stress test that tries to make the machine to run out of memory. Second attempt, now tested with debug build, valgrind build, max (optimized) build, with and without --debug, --vagrind and --ps-protocol. Errors in trigger and view test with --debug in debug build where present before this patch, and likewise for valgrind warnings for view test in valgrind build with --ps-protocol. sql/item.cc: Init rsize in Item (for SP item reusal). sql/item.h: Addes special new operator for reuse of Items, for SP internal use only. sql/sp_head.cc: Reuse items assigned internally in SPs when possible. sql/sp_rcontext.cc: Reuse items assigned internally in SPs when possible. Moved the local variable assignment here (from sp_head) to avoid duplicated code. sql/sp_rcontext.h: New arg to sp_rcontext::set_item_eval() (and some coding style). sql/sql_class.cc: Adjusted call to new set_item_eval().
-
- 19 May, 2005 1 commit
-
-
unknown authored
sql/item.cc: Revert changes sql/item.h: Revert changes sql/sp_head.cc: Revert changes sql/sp_rcontext.cc: Revert changes
-
- 18 May, 2005 1 commit
-
-
unknown authored
Memory leak in locally evalutated expressions during SP execution fixed by reusing allocated item slots when possible. Note: No test case added, since the test is a stress test that tries to make the machine to run out of memory. sql/item.cc: Make it possible to reuse allocated item slots (for use in SP execution). sql/item.h: Make it possible to reuse allocated item slots (for use in SP execution). sql/sp_head.cc: Reuse allocated item slots for expression evalutation during SP execution. sql/sp_rcontext.cc: Updated sp_eval_func_item() call, and prevent item reuse in reused frames (for handlers).
-