summaryrefslogtreecommitdiff
path: root/sql/udf_example.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'mysql/5.5' into bb-5.5-merge @ mysql-5.5.42Sergei Golubchik2015-02-111-1/+4
|\
| * Bug #19688008 CREATE_ASYMMETRIC_PUB_KEY: CRASHES IN OPENSSLVamsikrishna Bhagi2014-12-091-8/+0
| | | | | | | | | | | | | | CODE Fixed a failure on pb2 caused by the patch previously pushed.
| * Bug #19688008 CREATE_ASYMMETRIC_PUB_KEY: CRASHES IN OPENSSLVamsikrishna Bhagi2014-12-031-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | CODE Problem: UDF doesn't handle the arguments properly when they are of string type due to a misplaced break. The length of arguments is also not set properly when the argument is NULL. Solution: Fixed the code by putting the break at right place and setting the argument length to zero when the argument is NULL.
| * Updated/added copyright headersKent Boortz2011-06-301-2/+2
| |\
| | * Updated/added copyright headersKent Boortz2011-06-301-2/+4
| | |\
| | | * Updated/added copyright headersKent Boortz2011-06-301-2/+3
| | | |
| * | | Auto-merge from mysql-trunk-merge.Alexander Nozdrin2010-07-291-1/+1
| |\ \ \
| | * \ \ Merge of mysql-5.1-bugteam into mysql-trunk-merge.Davi Arnaut2010-07-201-1/+1
| | |\ \ \ | | | |/ /
| | | * | Bug#45288: pb2 returns a lot of compilation warnings on linuxDavi Arnaut2010-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings flagged by the new warning option -Wunused-but-set-variable that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The option causes a warning whenever a local variable is assigned to but is later unused. It also warns about meaningless pointer dereferences.
| * | | | WL#5498: Remove dead and unused source codeDavi Arnaut2010-07-231-2/+1
| |/ / / | | | | | | | | Remove workarounds for ancient systems.
| * | | Merge of mysql-5.1-bugteam into mysql-trunk-merge.Davi Arnaut2010-07-021-0/+2
| |\ \ \ | | |/ /
| | * | Bug#53445: Build with -Wall and fix warnings that it generatesDavi Arnaut2010-07-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apart strict-aliasing warnings, fix the remaining warnings generated by GCC 4.4.4 -Wall and -Wextra flags. One major source of warnings was the in-house function my_bcmp which (unconventionally) took pointers to unsigned characters as the byte sequences to be compared. Since my_bcmp and bcmp are deprecated functions whose only difference with memcmp is the return value, every use of the function is replaced with memcmp as the special return value wasn't actually being used by any caller. There were also various other warnings, mostly due to type mismatches, missing return values, missing prototypes, dead code (unreachable) and ignored return values.
| * | | Merge in fix for bug#42589Magnus Blåudd2010-03-151-1/+1
| |\ \ \
| | * | | Bug#42589 mysql_fix_privilege_tables.sh to be deprecatedMagnus Blåudd2009-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | - Remove remnants of "mysql_fix_privilege_tables.sh"(again)
| * | | | Backport of:Konstantin Osipov2009-11-241-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---------------------------------------------------------------------- ChangeSet@1.2571, 2008-04-08 12:30:06+02:00, vvaintroub@wva. +122 -0 Bug#32082 : definition of VOID in my_global.h conflicts with Windows SDK headers VOID macro is now removed. Its usage is replaced with void cast. In some cases, where cast does not make much sense (pthread_*, printf, hash_delete, my_seek), cast is ommited.
| * | | | Manual merge from mysql-trunk-merge.Alexander Nozdrin2009-10-141-2/+2
| |\ \ \ \ | | | |/ / | | |/| |
| | * | | Merge from 5.0Staale Smedseng2009-09-171-2/+2
| | |\ \ \ | | | |/ / | | |/| / | | | |/
| | | * Bug #43414 Parenthesis (and other) warnings compiling MySQLStaale Smedseng2009-09-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with gcc 4.3.2 This is the fifth patch cleaning up more GCC warnings about variables used before initialized using the new macro UNINIT_VAR().
| * | | Backport http://lists.mysql.com/commits/57778Vladislav Vaintroub2009-09-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2677 Vladislav Vaintroub 2008-11-04 CMakeLists.txt files cleanup - remove SAFEMALLOC and SAFE_MUTEX definitions that were present in *each* CMakeLists.txt. Instead, put them into top level CMakeLists.txt, but disable on Windows, because a) SAFEMALLOC does not add any functionality that is not already present in Debug C runtime ( and 2 safe malloc one on top of the other only unnecessarily slows down the server) b)SAFE_MUTEX does not work on Windows and have been explicitely disabled on Windows with #undef previously. Fortunately, ntdll does pretty good job identifying l problems with CRITICAL_SECTIONs. DebugBreak()s on using uninited critical section, unlocking unowned critical section) -Also, remove occationally used -D_DEBUG (added by compiler anyway)
| * | | Backport of the patch Vladislav Vaintroub2009-09-301-0/+5
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://lists.mysql.com/commits/57725 Vladislav Vaintroub 2008-11-03 Cleanup CMakeLists.txt(s) - remove winsock2 (ws2_32) from TARGET_LINK_LIBRARIES. Every exe or dll linked with mysys needs ws2_32, because mysys uses winsock function WSAStartup in my_init(). However, there is no need to explicitely add ws2_32 to the list of TARGET_LINK_LIBRARIES multiple times. Visual Studio comes with a handy pragma that tells linker to add library. So patch replaces bunch of ws2_32 in CMakeLists with single pragma comment(lib,"ws2_32") in my_init.c Additionally, reference to non-existing "debug" library has been removed from TARGET_LINK_LIBRARIES. The correct name of the library is "dbug".
| * | Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-131-2/+2
| |\ \ | | |/ | | | | | | | | | | | | - Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
| | * Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-101-2/+2
| | | | | | | | | | | | | | | - Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
| * | Merge magare.gmz:/home/kgeorge/mysql/work/B30355-5.0-optgkodinov/kgeorge@magare.gmz2007-11-271-6/+4
| |\ \ | | |/ | | | | | | into magare.gmz:/home/kgeorge/mysql/work/B30355-5.1-opt
| | * Bug #30355: Incorrect ordering of UDF resultsgkodinov/kgeorge@magare.gmz2007-11-271-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's currently no way of knowing the determinicity of an UDF. And the optimizer and the sequence() UDFs were making wrong assumptions about what the is_const member means. Plus there was no implementation of update_system_tables() causing the optimizer to overwrite the information returned by the <udf>_init function. Fixed by equating the assumptions about the semantics of is_const and providing a implementation of update_used_tables(). Added a TODO item for the UDF API change needed to make a better implementation.
| * | Merge shellback.(none):/home/msvensson/mysql/mysql-5.0-maintmsvensson@shellback.(none)2007-09-221-2/+2
| |\ \ | | |/ | | | | | | into shellback.(none):/home/msvensson/mysql/my51-bug30843
| | * Bug #29804 UDF parameters don't contain correct string lengthdkatz@damien-katzs-computer.local2007-09-051-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | Previously, UDF *_init functions were passed constant strings with erroneous lengths. The length came from the containing variable's size, not the length of the value itself. Now the *_init functions get the constant as a null terminated string with the correct length supplied too.
| * | Bug#29804 UDF parameters don't contain correct string lengthmsvensson@pilot.(none)2007-08-091-3/+3
| | | | | | | | | | | | | | | - Fix warnings - Export 'check_const_len' from udf_example.dll
| * | Bug #29804 UDF parameters don't contain correct string lengthdkatz@damien-katzs-computer.local2007-08-051-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | Previously, UDF *_init functions were passed constant strings with erroneous lengths. The length came from the containing variable's size, not the length of the value itself. Now the *_init functions get the constant as a null terminated string with the correct length supplied.
| * | Merge olga.mysql.com:/home/igor/mysql-5.0-optigor@olga.mysql.com2007-06-041-1/+2
| |\ \ | | |/ | | | | | | into olga.mysql.com:/home/igor/mysql-5.1-opt-merge
| | * bug#27741: udf test fails on AIX < 5.3mhansson@dl145s.mysql.com2007-05-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | problem #1: udf_example.so does not get built on AIX solution#1: build it yourself using cd sql; gcc -g -I ../include/ -I /usr/include/ -lpthread \ -shared -o udf_example.so udf_example.c; mv udf_example.so \ .libs/ problem#2 (the bug): udf_example fails because it does not recognize the variable LD_LIBRARY_PATH when doing dl_open(), it looks at LIBPATH solution#2: add the library path to LIBPATH problem#3: udf_example returns the wrong result length since it relies on strmov to return a pointer to the end of the string that it copies. On AIX builds, where m_string.h is not included (m_string defines a macro expanding strmov to stpcpy), there is a macro expanding strmov to strcpy, which returns a pointer to the first character. solution#3: define strmov as stpcpy. problem#4: #2 applies on hp-ux as well, but this platform looks at SHLIB_PATH solution#4: added the library path to SHLIB_PATH
| * | Fixed compilations problems and warnings on windowsmonty@mysql.com/narttu.mysql.fi2007-02-231-1/+1
| |/
| * Many files:kent@mysql.com/kent-amd64.(none)2006-12-231-2/+1
| | | | | | | | Changed header to GPL version 2 only
| * Remove warnings by castingtsmith/tim@siva.hindu.god2006-12-191-1/+1
| |
| * Fix netware compile failuremsvensson@neptunus.(none)2006-11-231-3/+4
| | | | | | | | Remove other warnings about unused variables
| * Bug#18761: constant expression as UDF parameters not passed in as constantcmiller@zippy.cornsilk.net2006-11-131-0/+30
| | | | | | | | | | | | | | | | | | The code that set up data to be passed to user-defined functions was very old and analyzed the "Type" of the data that was passed into the UDF, when it really should analyze the "return_type", which is hard-coded for simple Items and works correctly for complex ones like functions. --- Added test at Sergei's behest.
| * Fix for bug #19121: Windows incompatible udf_examplegeorg@lmy002.wdf.sap.corp2006-09-221-0/+11
| |
| * Fix a compilation failiure on QNXkostja@bodhi.local2006-08-021-1/+1
| |
| * udf_example.c, udf.test, Makefile.am:kent@mysql.com/c-4b4072d5.010-2112-6f72651.cust.bredbandsbolaget.se2006-07-291-0/+1067
| | | | Converted "udf_example.cc" to C, avoids C++ runtime lib dependency (bug#21336)
* 5.3 mergeSergei Golubchik2012-01-131-1/+2
|\
| * Initail merge with MySQL 5.1 (XtraDB still needs to be merged)Michael Widenius2011-11-211-2/+4
| |\ | | | | | | | | | Fixed up copyright messages.
* | \ mysql-5.5.18 mergeSergei Golubchik2011-11-031-2/+2
|\ \ \
| * \ \ Updated/added copyright headersKent Boortz2011-06-301-2/+2
| |\ \ \ | | | |/ | | |/|
| | * | Updated/added copyright headersKent Boortz2011-06-301-2/+4
| | |\ \
| | | * | Updated/added copyright headersKent Boortz2011-06-301-2/+3
| | | | |
* | | | | merge.Sergei Golubchik2010-11-251-1/+1
|\ \ \ \ \ | |/ / / / |/| | | / | | |_|/ | |/| | | | | | checkpoint. does not compile.
| * | | Merge with MySQL 5.1.50Michael Widenius2010-08-271-1/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Changed to still use bcmp() in certain cases becasue - Faster for short unaligneed strings than memcmp() - Bettern when using valgrind - Changed to use my_sprintf() instead of sprintf() to get higher portability for old systems - Changed code to use MariaDB version of select->skip_record() - Removed -%::SCCS/s.% from Makefile.am:s to remove automake warnings
| * | | Merge with MySQL 5.1, with following additions:unknown2009-11-161-2/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Moved some code from innodb_plugin to xtradb, to ensure that all tests runs - Did changes in pbxt and maria storage engines becasue of changes in thd->query - Reverted wrong code in sql_table.cc for how ROW_FORMAT is used. This is a re-commit of Monty's merge to eliminate an extra commit from MySQL-5.1.42 that was accidentally included in the merge. This is a merge of the MySQL 5.1.41 clone-off (clone-5.1.41-build). In case there are any extra changes done before final MySQL 5.1.41 release, these will need to be merged later before MariaDB 5.1.41 release.
| * \ \ \ Automatic merge with maria-mergeMichael Widenius2009-10-261-1/+1
| |\ \ \ \
| | * | | | Typo fixes for "usefull" -> "useful".Peter Lieverdink2009-10-011-1/+1
| | | | | |
| * | | | | Fixed compiler warning messageMichael Widenius2009-10-261-0/+2
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added checking of return value for system(), freopen(), fgets() and chown() - Ensure that calls that require a format strings gets a format string - Other trivial things Updated test suite results (especially for pbxt and embedded server) Removed warning for "Invalid (old?) table or database name 'mysqld.1'" from pbxt tests Speed up some pbxt tests by inserting begin ; commit; around "while loops with inserts" Added mysqld startup option '--debug-flush' Create maria_recovery.trace in data directory instead of current directory client/mysql.cc: Check return value from system() client/mysql_upgrade.c: Check return value from fgets() client/mysqladmin.cc: Check return value from fgets() client/mysqlslap.c: Check return value from system() (but ignore it, as it's not critical) extra/yassl/src/crypto_wrapper.cpp: Check return value from fgets() (but ignore it, as it's internal file) extra/yassl/taocrypt/src/aes.cpp: Added extra {} to remove compiler warning extra/yassl/taocrypt/src/blowfish.cpp: Added extra {} to remove compiler warning extra/yassl/taocrypt/src/misc.cpp: Ifdef not used code include/mysys_err.h: Added error message for failing chown() mysql-test/mysql-test-run.pl: Don't give warning for skipping ndbcluster (never enabled in MariaDB) mysql-test/suite/funcs_1/r/is_columns_is_embedded.result: Update with new information schema information mysql-test/suite/funcs_1/r/is_tables_is_embedded.result: New test mysql-test/suite/funcs_1/r/is_tables_myisam_embedded.result: Update test results (has not been tested for a long time) mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result: Update test results (has not been tested for a long time) mysql-test/suite/funcs_1/t/is_tables_is.test: Don't run with embedded server (as results differ) I added a new test for embedded server mysql-test/suite/funcs_1/t/is_tables_is_embedded.test: New test mysql-test/suite/pbxt/my.cnf: Allow one to run pbxt tests without having to specify --mysqld=--default-storage-engine=pbxt mysql-test/suite/pbxt/t/count_distinct3.test: Speed up test by inserting begin; ... commit; mysql-test/suite/pbxt/t/subselect.test: Speed up test by inserting begin; ... commit; mysys/errors.c: Added error message for failing chown() mysys/my_copy.c: Added error message for failing chown() mysys/my_redel.c: Added error message for failing chown() mysys/safemalloc.c: Added cast to get rid of compiler warning sql/ha_partition.cc: Fixed wrong argument to sql_print_error() (it requires a format string) sql/log.cc: Test return value of freopen() sql/mysqld.cc: Test return value of freopen() Added startup option '--debug-flush' to be used when one gets a core dump (easy to explain to people on IRC) sql/rpl_rli.cc: Fixed wrong argument to sql_print_error() (it requires a format string) sql/set_var.cc: Added {} to get rid of compiler warnings sql/slave.cc: Fixed wrong argument to mi->report() and sql_print...() (they require a format string) sql/sql_cache.cc: Fixed wrong argument to sql_printinformation() (it requires a format string) sql/sql_parse.cc: Test return value of fgets() sql/sql_plugin.cc: Fixed wrong argument to sql_print_error() (it requires a format string) sql/sql_select.cc: Use unique table name for internal temp tables instead of full path (Simple speed & space optimization) sql/udf_example.c: Removed compiler warning about not used variable storage/maria/ha_maria.cc: Fixed wrong argument to sql_print_error() and ma_check_print_error() (they require a format string) storage/maria/ma_recovery.c: Create maria_recovery.trace in data directory instead of current directory storage/maria/unittest/ma_test_loghandler-t.c: Fixed wrong argument to ok(); Requires a format string storage/pbxt/src/strutil_xt.cc: Detect temporary tables by checking if that path for the table is in the mysql data directory. The database for temporary tables is after this patch, from PBXT point of view, "" This is needed to stop PBXT from calling filename_to_tablename() with the base directory as an argument, which caused ERROR: Invalid (old?) table or database name 'mysqld.1'" in the log when running the test suite. tests/mysql_client_test.c: Fixed compiler warnings unittest/mysys/base64-t.c: Fixed wrong argument to diag() (it requires a format string) Added a comment that the current 'print' of differing buffers doesn't print the right thing, but didn't fix this as it's not important (unless we find a bug in the real code)