summaryrefslogtreecommitdiff
path: root/sql/item_xmlfunc.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit '6b8802e8dd5467556a024d807a1df23940b00895' into bb-10.3-fix_len_decbb-10.3-fix_len_decOleksandr Byelkin2018-06-191-6/+7
|\
| * MDEV-11071: Assertion `thd->transaction.stmt.is_empty()' failed in ↵Oleksandr Byelkin2018-06-151-6/+7
| | | | | | | | | | | | Locked_tables_list::unlock_locked_table fix_length_and_dec now return result (error/OK)
* | Addressing Monty's review suggestions for MDEV-11952 Oracle-style packages ↵Alexander Barkov2018-05-211-0/+4
| | | | | | | | | | | | | | | | | | (partial) - Using array_elements() instead of a constant to iterate through an array - Adding some comments - Adding new-line function comments - Using STRING_WITH_LEN instead of C_STRING_WITH_LEN
* | MDEV-11952 Oracle-style packages: stage#5mariadb-10.3.5bb-10.3-compatibilityAlexander Barkov2018-02-251-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CREATE PACKAGE [BODY] statements are now entirely written to mysql.proc with type='PACKAGE' and type='PACKAGE BODY'. - CREATE PACKAGE BODY now supports IF NOT EXISTS - DROP PACKAGE BODY now supports IF EXISTS - CREATE OR REPLACE PACKAGE [BODY] is now supported - CREATE PACKAGE [BODY] now support the DEFINER clause: CREATE DEFINER user@host PACKAGE pkg ... END; CREATE DEFINER user@host PACKAGE BODY pkg ... END; - CREATE PACKAGE [BODY] now supports SQL SECURITY and COMMENT clauses, e.g.: CREATE PACKAGE p1 SQL SECURITY INVOKER COMMENT "comment" AS ... END; - Package routines are now created from the package CREATE PACKAGE BODY statement and don't produce individual records in mysql.proc. - CREATE PACKAGE BODY now supports package-wide variables. Package variables can be read and set inside package routines. Package variables are stored in a separate sp_rcontext, which is cached in THD on the first packate routine call. - CREATE PACKAGE BODY now supports the initialization section. - All public routines (i.e. declared in CREATE PACKAGE) must have implementations in CREATE PACKAGE BODY - Only public package routines are available outside of the package - {CREATE|DROP} PACKAGE [BODY] now respects CREATE ROUTINE and ALTER ROUTINE privileges - "GRANT EXECUTE ON PACKAGE BODY pkg" is now supported - SHOW CREATE PACKAGE [BODY] is now supported - SHOW PACKAGE [BODY] STATUS is now supported - CREATE and DROP for PACKAGE [BODY] now works for non-current databases - mysqldump now supports packages - "SHOW {PROCEDURE|FUNCTION) CODE pkg.routine" now works for package routines - "SHOW PACKAGE BODY CODE pkg" now works (the package initialization section) - A new package body level MDL was added - Recursive calls for package procedures are now possible - Routine forward declarations in CREATE PACKATE BODY are now supported. - Package body variables now work as SP OUT parameters - Package body variables now work as SELECT INTO targets - Package body variables now support ROW, %ROWTYPE, %TYPE
* | Merge bb-10.2-ext into 10.3Marko Mäkelä2018-02-151-2/+8
|\ \
| * \ Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2018-02-081-2/+8
| |\ \ | | |/
| | * Merge branch 'github/10.1' into 10.2Sergei Golubchik2018-02-061-2/+8
| | |\
| | | * Merge branch 'github/10.0' into 10.1Sergei Golubchik2018-02-021-2/+8
| | | |\
| | | | * MDEV-15118 ExtractValue(xml,something_complex) does not workAlexander Barkov2018-01-301-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Item_xml_str_func::fix_fields() used a local "String tmp" as a buffer for args[1]->val_str(). "tmp" was freed at the end of fix_fields(), while Items created during my_xpath_parse() still pointed to its fragments. Adding a new member Item_xml_str_func::m_xpath_query and store the result of args[1]->val_str() into it.
* | | | | Remove not used mem_root argument from build_clone(), get_copy() and ↵Michael Widenius2017-11-231-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_item_copy() TODO: - Make get_thd_memroot() inline - To do this, we need to reduce dependence of include files, especially so that sql_class.h is not depending in item.h
* | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-11-101-7/+23
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-14269 errors.test fails with valgrind (Conditional jump or move depends ↵Alexander Barkov2017-11-031-7/+23
| | | | | | | | | | | | | | | | | | | | on uninitialised value)
* | | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2017-10-301-13/+13
|\ \ \ \ \ | |/ / / / | | | | | | | | | | TODO: enable MDEV-13049 optimization for 10.3
| * | | | MDEV-14212 Add Field_row for SP ROW variablesAlexander Barkov2017-10-301-1/+1
| | | | |
| * | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-10-181-12/+12
| |\ \ \ \ | | |/ / /
| | * | | Windows : Fix truncation warnings in sql/Vladislav Vaintroub2017-10-101-12/+12
| | | | |
* | | | | Added DBUG_ASSERT_AS_PRINTF compile flagMonty2017-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If compiling a non DBUG binary with -DDBUG_ASSERT_AS_PRINTF asserts will be changed to printf + stack trace (of stack trace are enabled). - Changed #ifndef DBUG_OFF to #ifdef DBUG_ASSERT_EXISTS for those DBUG_OFF that was just used to enable assert - Assert checking that could greatly impact performance where changed to DBUG_ASSERT_SLOW which is not affected by DBUG_ASSERT_AS_PRINTF - Added one extra option to my_print_stacktrace() to get more silent in case of stack trace printing as part of assert.
* | | | | Enusure that my_global.h is included firstMichael Widenius2017-08-241-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added sql/mariadb.h file that should be included first by files in sql directory, if sql_plugin.h is not used (sql_plugin.h adds SHOW variables that must be done before my_global.h is included) - Removed a lot of include my_global.h from include files - Removed include's of some files that my_global.h automatically includes - Removed duplicated include's of my_sys.h - Replaced include my_config.h with my_global.h
* | | | Merge tag 'mariadb-10.2.6' into bb-10.2-extAlexander Barkov2017-05-261-3/+4
|\ \ \ \ | |/ / /
| * | | Merge branch '10.1' into 10.2Sergei Golubchik2017-05-091-3/+4
| |\ \ \ | | |/ / | | | | | | | | | | | | Revert commit db0917f68f, because the fix for MDEV-12696 is coming from 5.5 and 10.1 in this merge.
| | * | Merge branch '10.0' 10.1Sergei Golubchik2017-04-281-3/+4
| | |\ \ | | | |/
| | | * Merge branch '5.5' into 10.0Sergei Golubchik2017-04-211-3/+4
| | | |\
| | | | * Merge remote-tracking branch 'mysql/5.5' into 5.5mariadb-5.5.55Sergei Golubchik2017-04-111-3/+4
| | | | |\
| | | | | * Bug #25111907: XML TEST FAILS WITH UNDEFINED BEHAVIORGeorgi Kodinov2016-12-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XML parser position stack for each level is with a fixed depth. So a bounds check was done to ensure that this depth is not exceeded. But it was off by one (i.e. the size of the array was a valid index). Fixed by decreasing the allowable depth by one to match the maximum number of elements in the position stack.
| | | | | * Updated/added copyright headersMurthy Narkedimilli2014-01-061-1/+1
| | | | | |
| | | | | * Bug#12428404 MYSQLD.EXE CRASHES WHEN EXTRACTVALUE() IS CALLED WITHAnirudh Mangipudi2013-11-251-0/+3
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MALFORMED XPATH EXP Problem: A malformed XPATH expression in the ExtractValue query is causing a server crash. This malformed XPATH expression is resulted when the position attribute in the substring function contains ".." in the beginning. Solution: The original crash is happening because the "../" is being evaluated prematurely. It tries to access XML while it hasn't been parsed yet. The premature evaluation is happening because the val_nodeset function is being set to constant, in which case we proceed to evaluate them in JOIN:prepare stage only. The solution to this is setting the val_nodeset functions as non-constant. This forces us to evaluate the function in the JOIN:exec stage and thus avoid any premature evaluation of the XML strings.
| | | | | | * Bug#12428404 MYSQLD.EXE CRASHES WHEN EXTRACTVALUE() IS CALLED Anirudh Mangipudi2013-11-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WITH MALFORMED XPATH EXP Problem: A malformed XPATH expression in the ExtractValue query is causing a server crash. This malformed XPATH expression is resulted when the position attribute in the substring function contains ".." in the beginning. Solution: The original crash is happening because the "../" is being evaluated prematurely. It tries to access XML while it hasn't been parsed yet. The premature evaluation is happening because the val_nodeset function is being set to constant, in which case we proceed to evaluate them in JOIN:prepare stage only. The solution to this is setting the val_nodeset functions as non-constant. This forces us to evaluate the function in the JOIN:exec stage and thus avoid any premature evaluation of the XML strings.
| | | | | | * Updated/added copyright headers.Murthy Narkedimilli2013-02-251-1/+1
| | | | | | |
| | | | | * | Auto-merge from mysql-5.1.Ramil Kalimullin2012-12-141-1/+5
| | | | | |\ \ | | | | | | |/
| | | | | | * Fix for BUG#15948580 UPDATE_XML() CRASHES THE SERVER.Ramil Kalimullin2012-12-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: tag's buffer overflow leads to a problem. Fix: bound check added.
| | | | | * | Updated/added copyright headersMySQL Build Team2012-02-161-1/+1
| | | | | |\ \ | | | | | | |/
| | | | | * | Merge from mysql-5.5.14-releasehery.ramilison@oracle.com2011-07-061-2/+19
| | | | | |\ \
| | | | | | * | Bug #12375190: UPDATEXML CRASHES ON SIMPLE INPUTS Georgi Kodinov2011-05-031-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XPATH implementation was not handling correctly the XPATH production #19 (http://www.w3.org/TR/1999/REC-xpath-19991116/#node-sets), namely PathExpr ::= | FilterExpr '/' RelativeLocationPath | FilterExpr '//' RelativeLocationPath It was lacking context for the RelativeLocationPath and it was just ignoring the second slash instead of treating it as a different axis specifier. Fixed the above two problems and added a test case.
| | | | | * | | Updated/added copyright headersKent Boortz2011-06-301-1/+1
| | | | | |\ \ \ | | | | | | |/ / | | | | | |/| / | | | | | | |/
| | | | | | * Updated/added copyright headersKent Boortz2011-06-301-2/+4
| | | | | | |
| | | | | * | Merging from mysql-5.1-securityAlexander Barkov2010-11-111-2/+2
| | | | | |\ \ | | | | | | |/
| | | | | | * Bug#57257 Replace(ExtractValue(...)) causes MySQL crashAlexander Barkov2010-11-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#57820 extractvalue crashes Problem: ExtractValue and Replace crashed in some cases due to invalid handling of empty and NULL arguments. Per file comments: @mysql-test/r/ctype_ujis.result @mysql-test/r/xml.result @mysql-test/t/ctype_ujis.test @mysql-test/t/xml.test Adding tests @sql/item_strfunc.cc Make sure Item_func_replace::val_str safely handles empty strings. @sql/item_xmlfunc.cc set null_value if nodeset_func returned NULL, which is possible when the second argument is an unset user variable.
| | | | | * | WL#5030: Split and remove mysql_priv.hMats Kindahl2010-03-311-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch: - Moves all definitions from the mysql_priv.h file into header files for the component where the variable is defined - Creates header files if the component lacks one - Eliminates all include directives from mysql_priv.h - Eliminates all circular include cycles - Rename time.cc to sql_time.cc - Rename mysql_priv.h to sql_priv.h
| | | | | * | WL#2649 Number-to-string conversionsAlexander Barkov2010-02-111-1/+1
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added: include/ctype_numconv.inc mysql-test/include/ctype_numconv.inc mysql-test/r/ctype_binary.result mysql-test/t/ctype_binary.test Adding tests modified: mysql-test/r/bigint.result mysql-test/r/case.result mysql-test/r/create.result mysql-test/r/ctype_cp1251.result mysql-test/r/ctype_latin1.result mysql-test/r/ctype_ucs.result mysql-test/r/func_gconcat.result mysql-test/r/func_str.result mysql-test/r/metadata.result mysql-test/r/ps_1general.result mysql-test/r/ps_2myisam.result mysql-test/r/ps_3innodb.result mysql-test/r/ps_4heap.result mysql-test/r/ps_5merge.result mysql-test/r/show_check.result mysql-test/r/type_datetime.result mysql-test/r/type_ranges.result mysql-test/r/union.result mysql-test/suite/ndb/r/ps_7ndb.result mysql-test/t/ctype_cp1251.test mysql-test/t/ctype_latin1.test mysql-test/t/ctype_ucs.test mysql-test/t/func_str.test Fixing tests @ sql/field.cc - Return str result using my_charset_numeric. - Using real multi-byte aware str_to_XXX functions to handle tricky charset values propely (e.g. UCS2) @ sql/field.h - Changing derivation of non-string field types to DERIVATION_NUMERIC. - Changing binary() for numeric/datetime fields to always return TRUE even if charset is not my_charset_bin. We need this to keep ha_base_keytype() return HA_KEYTYPE_BINARY. - Adding BINARY_FLAG into some fields, because it's not being set automatically anymore with "my_charset_bin to my_charset_numeric" change. - Changing derivation for numeric/datetime datatypes to a weaker value, to make "SELECT concat('string', field)" use character set of the string literal for the result of the function. @ sql/item.cc - Implementing generic val_str_ascii(). - Using max_char_length() instead of direct read of max_length to make "tricky" charsets like UCS2 work. NOTE: in the future we'll possibly remove all direct reads of max_length - Fixing Item_num::safe_charset_converter(). Previously it alligned binary string to character string (for example by adding leading 0x00 when doing binary->UCS2 conversion). Now it just converts from my_charset_numbner to "tocs". - Using val_str_ascii() in Item::get_time() to make UCS2 arguments work. - Other misc changes @ sql/item.h - Changing MY_COLL_CMP_CONV and MY_COLL_ALLOW_CONV to bit operations instead of hard-coded bit masks. - Addding new method DTCollation.set_numeric(). - Adding new methods to Item. - Adding helper functions to make code look nicer: agg_item_charsets_for_string_result() agg_item_charsets_for_comparison() - Changing charset for Item_num-derived items from my_charset_bin to my_charset_numeric (which is an alias for latin1). @ sql/item_cmpfunc.cc - Using new helper functions - Other misc changes @ sql/item_cmpfunc.h - Fixing strcmp() to return max_length=2. Previously it returned 1, which was wrong, because it did not fit '-1'. @ sql/item_func.cc - Using new helper functions - Other minor changes @ sql/item_func.h - Removing unused functions - Adding helper functions agg_arg_charsets_for_string_result() agg_arg_charsets_for_comparison() - Adding set_numeric() into constructors of numeric items. - Using fix_length_and_charset() and fix_char_length() instead of direct write to max_length. @ sql/item_geofunc.cc - Changing class for Item_func_geometry_type and Item_func_as_wkt from Item_str_func to Item_str_ascii_func, to make them return UCS2 result properly (when character_set_connection=ucs2). @ sql/item_geofunc.h - Changing class for Item_func_geometry_type and Item_func_as_wkt from Item_str_func to Item_str_ascii_func, to make them return UCS2 result properly (when @@character_set_connection=ucs2). @ sql/item_strfunc.cc - Implementing Item_str_func::val_str(). - Renaming val_str to val_str_ascii for some items, to make them work with UCS2 properly. - Using new helper functions - All single-argument functions that expect string result now call this method: agg_arg_charsets_for_string_result(collation, args, 1); This enables character set conversion to @@character_set_connection in case of pure numeric input. @ sql/item_strfunc.h - Introducing Item_str_ascii_func - for functions which return pure ASCII data, for performance purposes, as well as for the cases when the old implementation of val_str() was heavily 8-bit oriented and implementing a UCS2-aware version is tricky. @ sql/item_sum.cc - Using new helper functions. @ sql/item_timefunc.cc - Using my_charset_numeric instead of my_charset_bin. - Using fix_char_length(), fix_length_and_charset() and fix_length_and_charset_datetime() instead of direct write to max_length. - Using tricky-charset aware function str_to_time_with_warn() @ sql/item_timefunc.h - Using new helper functions for charset and length initialization. - Changing base class for Item_func_get_format() to make it return UCS2 properly (when character_set_connection=ucs2). @ sql/item_xmlfunc.cc - Using new helper function @ sql/my_decimal.cc - Adding a new DECIMAL to CHAR converter with real multibyte support (e.g. UCS2) @ sql/mysql_priv.h - Introducing a new derivation level for numeric/datetime data types. - Adding macros for my_charset_numeric and MY_REPERTOIRE_NUMERIC. - Adding prototypes for str_set_decimal() - Adding prototypes for character-set aware str_to_xxx() functions. @ sql/protocol.cc - Changing charsetnr to "binary" client-side metadata for numeric/datetime data types. @ sql/time.cc - Adding to_ascii() helper function, to convert a string in any character set to ascii representation. In the future can be extended to understand digits written in various non-Latin word scripts. - Adding real multy-byte character set aware versions for str_to_XXXX, to make these these type of queries work correct: INSERT INTO t1 SET datetime_column=ucs2_expression; @ strings/ctype-ucs2.c - endptr was not calculated correctly. INSERTing of UCS2 values into numeric columns returned warnings about truncated wrong data.
| | | | | * Bug#34384: Slow down on constant conversion.Evgeny Potemkin2009-11-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When values of different types are compared they're converted to a type that allows correct comparison. This conversion is done for each comparison and takes some time. When a constant is being compared it's possible to cache the value after conversion to speedup comparison. In some cases (large dataset, complex WHERE condition with many type conversions) query might be executed 7% faster. A test case isn't provided because all changes are internal and isn't visible outside. The behavior of the Item_cache is changed to cache values on the first request of cached value rather than at the moment of storing item to be cached. A flag named value_cached is added to the Item_cache class. It's set to TRUE when cache holds the value of the last stored item. Function named cache_value() is added to the Item_cache class and derived classes. This function actually caches the value of the saved item. Item_cache_xxx::store functions now only store item to be cached and set value_cached flag to FALSE. Item_cache_xxx::val_xxx functions are changed to call cache_value function prior to returning cached value if value_cached is FALSE. The Arg_comparator::set_cmp_func function now calls cache_converted_constant to cache constants if they need a type conversion. The Item_cache::get_cache function is overloaded to allow setting of the cache type. The cache_converted_constant function is added to the Arg_comparator class. It checks whether a value can and should be cached and if so caches it.
| | | | | * Bug #43414 Parenthesis (and other) warnings compiling MySQLStaale Smedseng2009-09-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with gcc 4.3.2 Cleaning up warnings not present in 5.0.
| | | | | * Bug#43183 ExctractValue() brings result list in missorderSergey Glukhov2009-04-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that XML functions(items) do not reset null_value before their execution and further item excution may use null_value value of the previous result. The fix is to reset null_value.
| | | | | * Bug#42495 updatexml: Assertion failed: xpath->context, file ↵Sergey Glukhov2009-02-041-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .\item_xmlfunc.cc, line 2507 Problem: RelativeLocationPath can appear only after a node-set expression in the third and the fourth branches of this rule: PathExpr :: = LocationPath | FilterExpr | FilterExpr '/' RelativeLocationPath | FilterExpr '//' RelativeLocationPath XPatch code didn't check the type of FilterExpr and crashed. Fix: If FilterExpr is a scalar expression (variable reference, literal, number, scalar function call) return error.
| | | | | * Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.1bar@bar.myoffice.izhnet.ru2007-10-301-36/+24
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/bar/mysql-work/mysql-5.1-new-rpl-merge
| | | | | | * Bug#27287 extractvalue() (and updatexml()) extremely slow for large XMLbar@mysql.com/bar.myoffice.izhnet.ru2007-10-091-36/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Performance improvements made. ExtractValue for large XML values is now much faster (about 2000 times faster of 1Mb-long XML values).
| | | | | * | Fix for bug #31438: updatexml still crashesramil/ram@mysql.com/ramil.myoffice.izhnet.ru2007-10-081-1/+2
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: check missed if the second updatexml() argument is valid. Fix: check it.
| | | | | * Fixed a lot of compiler warnings and errors detected by Forte C++ on Solarismonty@mysql.com/nosik.monty.fi2007-08-131-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Faster thr_alarm() Added 'Opened_files' status variable to track calls to my_open() Don't give warnings when running mysql_install_db Added option --source-install to mysql_install_db I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems index_read() -> index_read_map() index_read_idx() -> index_read_idx_map() index_read_last() -> index_read_last_map()
| | | | | * Fixes Bug#30127: --debug-info no longer prints memory usage in mysqlmonty@mysql.com/nosik.monty.fi2007-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed compiler warnings, errors and link errors Fixed new bug on Solaris with gethrtime() Added --debug-check option to all mysql clients to print errors and memory leaks Added --debug-info to all clients. This now works as --debug-check but also prints memory and cpu usage
| | | | | * Slow query log to file now displays queries with microsecond precissionmonty@mysql.com/nosik.monty.fi2007-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --long-query-time is now given in seconds with microseconds as decimals --min_examined_row_limit added for slow query log long_query_time user variable is now double with 6 decimals Added functions to get time in microseconds Added faster time() functions for system that has gethrtime() (Solaris) We now do less time() calls. Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers set_var.cc and my_getopt() can now handle DOUBLE variables. All time() calls changed to my_time() my_time() now does retry's if time() call fails. Added debug function for stopping in mysql_admin_table() when tables are locked Some trivial function and struct variable renames to avoid merge errors. Fixed compiler warnings Initialization of some time variables on windows moved to my_init()
| | | | | * Merge bk-internal.mysql.com:/home/bk/mysql-5.1kostja@bodhi.(none)2007-06-011-4/+4
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | into bodhi.(none):/opt/local/work/mysql-5.1-runtime