summaryrefslogtreecommitdiff
path: root/mysys
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-5829: STOP SLAVE resets global status variablesMichael Widenius2014-03-141-1/+1
| | | | | | | | | | | | | | | | | | Reason for the bug was an optimization for higher connect speed where we moved when global status was updated, but forgot to update states when slave thread dies. Fixed by adding thd->add_status_to_global() before deleting slave thread's thd. mysys/my_delete.c: Added missing newline sql/mysqld.cc: Use add_status_to_global() sql/slave.cc: Added missing add_status_to_global() sql/sql_class.cc: Use add_status_to_global() sql/sql_class.h: Simplify adding local status to global by adding add_status_to_global()
* MDEV-5613 m_string.h exports generic function names without a namespace ↵Sergei Golubchik2014-02-171-0/+1
| | | | | | prefix, like str2int don't include m_string. in my_valgrind.h
* MySQL-5.5.36 mergeSergei Golubchik2014-02-1730-39/+53
|\ | | | | | | (without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
| * Updated/added copyright headersMurthy Narkedimilli2014-01-0627-27/+43
| |
| * Bug#16316074 RFE: MAKE TMPDIR A BUILD-TIME CONFIGURABLE OPTIONTor Didriksen2013-12-182-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#68338 RFE: make tmpdir a build-time configurable option Background: Some distributions use tmpfs for mounting /tmp by default, which has some advantages, but brings also new issues. Fedora started using tmpfs on /tmp in version 18 for example. If not configured otherwise in my.cnf, MySQL uses system's constant P_tmpdir expanded to /tmp on Linux. This can introduce some problems with limited space in /tmp and also some data loss in case of replication slave [1]. In case distributions would like to use /var/tmp, which should be better for MySQL purposes, then we have to patch the source or change tmpdir option in my.cnf, which is however not updated in case it has already existed. Thus, it would be useful to be able to specify default tmpdir path using a configure option, while using P_tmpdir in case it is not defined explicitly. Based on a contribution from Honza Horak
| * Bug#17702677 WRONG INSTRUMENTATION INTERFACE FOR MYSQL_COND_TIMEDWAITChristopher Powers2013-11-071-2/+2
| | | | | | | | Fix Windows build break
* | MySQL-5.5.35 mergeSergei Golubchik2014-01-222-2/+6
|\ \ | |/
| * Bug 13878021 - WINDOWS PACKAGE THAT INCLUDES .PDB FILES FOR INTERMEDIATE ↵Sreedhar.S2013-10-091-0/+5
| | | | | | | | LIBRARIES USED
| * Bug #16978278 : BUFFER OVERFLOW WHEN PRINTING A LARGE 64-BIT INTEGERmithun2013-09-101-2/+2
| |\ | | | | | | | | | | | | | | | | | | WITH MY_B_VPRINTF() [Merge from 5.1]
| | * Bug #16978278 : BUFFER OVERFLOW WHEN PRINTING A LARGE 64-BIT INTEGERmithun2013-09-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WITH MY_B_VPRINTF() Issue : In LP 64 machine max long value can be 20 digit decimal value. But in my_b_vprintf() the intermediate buffer storage used is 17 bytes length. This will lead to buffer overflow. Solution : Increased the buffer storage from 17 to 32 bytes. code is backported from 5.6 mysys/mf_iocache2.c: In function my_b_vprintf increased the size of local buff from 17 to 32 bytes.
* | | Fix for MDEV-5547: Bad error message when moving very old .frm files to ↵Michael Widenius2014-01-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MariaDB 5.5. mysql_upgrade --help now also prints out --default options and variable values. mysql_upgrade now prints permission errors. mysql_upgrade doesn't print some non essential info if --silent is used. Added handler error message about incompatible versions Fixed that mysqlbug and mysql_install_db have the executable flag set. Removed executable flag for some non executable files. Changed in mysql_install_db askmonty.org to mariadb.com. Ensured that all client executables prints --default options the same way. Allow REPAIR ... USE_FRM for old .frm files if the are still compatible. Extended shown error for storage engine messages. client/mysql.cc: print_defaults() should be first (as in all other programs) client/mysql_upgrade.c: --help now also prints out --default options and variable values Print out error if wrong permissions Don't print info if --silent client/mysqladmin.cc: print_defaults() should be first (as in all other programs) client/mysqlbinlog.cc: Added print_defaults() to --help client/mysqlcheck.c: Added empty line in --help client/mysqlimport.c: Added empty line in --help client/mysqlshow.c: Made --help compatible client/mysqlslap.c: Made --help compatible client/mysqltest.cc: Added print_defaults() to --help include/handler_ername.h: Added handler error message include/my_base.h: Added handler error message mysql-test/r/mysql_upgrade.result: Updated results mysql-test/r/repair.result: Added test case for better error messages mysql-test/std_data/host_old.MYD: Added test case for better error messages mysql-test/std_data/host_old.MYI: Added test case for better error messages mysql-test/std_data/host_old.frm: Added test case for better error messages mysql-test/t/repair.test: Added test case for better error messages mysys/my_handler_errors.h: Added handler error message scripts/CMakeLists.txt: Fixed that mysqlbug and mysql_install_db have the executable flag set scripts/mysql_install_db.sh: askmonty.org -> mariadb.com sql/ha_partition.cc: Sometimes table_type() can be called for errors even if partition didn't manage to open any files sql/handler.cc: Write clear text for not handled, but defined error messages. sql/share/errmsg-utf8.txt: Extended shown error for storage engine messages sql/sql_admin.cc: Allow REPAIR ... USE_FRM for old .frm files if the are still compatible storage/myisam/ha_myisam.cc: Use new error message
* | | my_addr_resolve: don't resolve unknown addresses to ??:0(??), but return an ↵Sergei Golubchik2013-12-121-0/+4
| | | | | | | | | | | | | | | | | | error instead (better to have an address in the output than ??:0)
* | | Fix for a compiler warning.Nirbhay Choubey2013-11-251-3/+0
| | |
* | | mysql-5.5.34 mergeSergei Golubchik2013-11-191-2/+4
|\ \ \ | |/ / | | | | | | (some patches reverted, test case added)
| * | Bug#16865959 - PLEASE BACKPORT BUG 14749800.Praveenkumar Hulakund2013-07-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since log_throttle is not available in 5.5. Logging of error message for failure of thread to create new connection in "create_thread_to_handle_connection" is not backported. Since, function "my_plugin_log_message" is not available in 5.5 version and since there is incompatibility between sql_print_XXX function compiled with g++ and alog files with gcc to use sql_print_error, changes related to audit log plugin is not backported.
* | | Allow unique prefix for command line options, like any GNU program.Michael Widenius2013-09-231-6/+0
| | |
* | | MDEV-4941 make: AIX fails with 'Identifier not allowed in cast'; syntax ↵Sergei Golubchik2013-09-091-3/+6
| | | | | | | | | | | | | | | | | | error in include/my_global.h C++ comments in C files, and a typo in my_global.h
* | | MDEV-4472 Audit-plugin. Server-related part of the task.Alexey Botchkov2013-09-093-1/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | file_logger became the service. Data like query_id now are sent to the audit plugin. Fix for MDEV-4770 ported from 10.0. Fix added for the read_maria_plugin_info(). Log rotation can be disabled with 'set rotations=0'.
* | | mysql-5.5.33 mergeSergei Golubchik2013-09-062-7/+55
|\ \ \ | |/ /
| * | merge back to the 5.5 tree and fix indentationGeorgi Kodinov2013-06-281-1/+11
| |\ \
| | * | Bug #16996656: UNIQUE OPTION PREFIXES NOT DEPRECATED IN 5.5+Georgi Kodinov2013-06-261-1/+11
| |/ / | | | | | | | | | Backported the deprecation warnings from WL#6978 to 5.5
| * | Bug#16729109: FIX COMPILATION WARNINGS WITH GCC 4.8Tor Didriksen2013-06-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport to 5.5 (external Bug#69407 Build warnings with mysql) support-files/build-tags: Run etags on sql_yacc.yy, ignore other .yy files unittest/mysys/explain_filename-t.cc: NO_PLAN seems to fail on some platforms, use the actual number instead.
| * | Bug#16194302: SUPPORT FOR FLOATING-POINT SYSTEM VARIABLESAshish Agarwal2013-05-191-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | USING THE PLUGIN INTERFACE. ISSUE: No support for floating-point plugin system variables. SOLUTION: Allowing plugins to define and expose floating-point system variables of type double. MYSQL_SYSVAR_DOUBLE and MYSQL_THDVAR_DOUBLE are added. ISSUE: Fractional part of the def, min, max values of system variables are ignored. SOLUTION: Adding functions that are used to store the raw representation of a double in the raw bits of unsigned longlong in a way that the binary representation remains the same.
* | | MDEV-4165 [PATCH] RFE: make tmpdir a build-time configurable optionSergei Golubchik2013-08-172-2/+2
| | | | | | | | | | | | | | | | | | support -DTMPDIR=/path in CMakeLists.txt Patch by Honza Horak.
* | | fix a commentSergei Golubchik2013-08-141-1/+1
| | |
* | | Merge from 5.3Alexander Barkov2013-08-121-9/+18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: mysql-test/r/dyncol.result mysql-test/r/type_time.result mysql-test/t/dyncol.test mysql-test/t/type_time.test mysys/ma_dyncol.c sql/item.cc sql/item_func.cc pending merges: Alexander Barkov 2013-08-12 MDEV-4652 Wrong result for CONCAT(GREATEST(T... sanja@montyprogr... 2013-08-01 MDEV-4811 Assertion `offset < 0x1f' f...
| * | | MDEV-4811 Assertion `offset < 0x1f' fails in type_and_offset_store on COLUMN_ADDunknown2013-08-011-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | MDEV-4812 Valgrind warnings (Invalid write) in dynamic_column_update_many on COLUMN_ADD Fixed problem of working on wrong data (do not allow offset to out of string length).
* | | | MDEV-4815 - allow multiple mysql_server_init() / mysql_server_end() in the ↵Vladislav Vaintroub2013-07-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | same process, for embedded library. - Reset static variables that are used to signal "init done" for DBUG, in dbug_end() - Set string server variables to NULL after memory for the value is freed - avoids double free() - fix DBUG_ASSERTs that happened during reinitialization.
* | | | mysql-5.5.32 mergeSergei Golubchik2013-07-1631-31/+42
|\ \ \ \ | | |/ / | |/| |
| * | | Bug#16626742 IN MY_MD5FINAL IN MYSYS/MD5.C, CTX IS NOT PROPERLY ZEROED AS ↵Tor Didriksen2013-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | INTENDED Zero out the entire struct, rather than the first sizeof(void*) bytes.
| * | | Merge from mysql-5.1 to mysql-5.5Sujatha Sivakumar2013-03-282-2/+13
| |\ \ \ | | | |/ | | |/|
| | * | Bug#14324766:PARTIALLY WRITTEN INSERT STATEMENT IN BINLOGSujatha Sivakumar2013-03-282-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NO ERRORS REPORTED Problem: ======= Errors from my_b_fill are ignored. MYSQL_BIN_LOG::write_cache code assumes that 0 returned from my_b_fill always means end-of-cache, but that is incorrect. It can result in error and the error is ignored. Other callers of my_b_fill don't check for error: my_b_copy_to_file, maybe my_b_gets. Fix: === An error handler is already present to check the "cache" error that is reported during "MYSQL_BIN_LOG::write_cache" call. Hence error handlers are added for "my_b_copy_to_file" and "my_b_gets". During my_b_fill() function call, when the cache read fails info->error= -1 is set. Hence a check for "info->error" is added for the above to callers upon their return. mysys/mf_iocache2.c: Added a check for "cache->error" and simulation of cache read failure mysys/my_read.c: Simulation of read failure sql/log_event.cc: Added debug simulation sql/sql_repl.cc: Added a check for cache error
| | * | Bug 16395495 - OLD FSF ADDRESS IN GPL HEADERMurthy Narkedimilli2013-03-1975-75/+75
| | | |
| | * | Updated/added copyright headers.Murthy Narkedimilli2013-02-2581-85/+81
| | | |
| * | | Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADERMurthy Narkedimilli2013-03-1929-29/+29
| | | |
* | | | 5.3 mergeSergei Golubchik2013-07-161-23/+14
|\ \ \ \ | | |_|/ | |/| |
| * | | 5.2 mergeSergei Golubchik2013-07-151-23/+14
| |\ \ \
| | * | | MDEV-4409 - Fix deadlock in MySQL key cache code, that can happen if there ↵Vladislav Vaintroub2013-07-091-23/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is a key cache resize running in parallel with an update. If there is a key cache resize,a thread writing to key cache, will pause waiting until resize finishes. However this thread is won't be woken, because resize does not signaling waiters anymore. This is a regression introduced in WL#86(segmented MyISAM key cache) The fix is to unconditionally release threads waiting on resize_queue when resize finishes, as in pre-WL#86 code.
* | | | | MDEV-4503 : Installation fails if TEMP directory contains "~" subdirectory.Vladislav Vaintroub2013-06-171-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Remove special handling for ~ in the middle of the path in cleanup_dir_name() - according to Monty, this was ancient code that tried to emulate Emacs behavior
* | | | | MDEV-4576 : Aria storage engine's temporary files might not be deleted ↵Vladislav Vaintroub2013-06-162-70/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Errcode : 13) See also MySQL Bug #39750 and similar ones. Fix my_delete() on Windows, to safely remvoe files on Windows, including files that are opened by another threads in the same process, antiviruses and backup applications. If file to be deleted is also opened by another thread, the file is renamed to unique name prior to deletion - this makes it possible to create file with the same name right after deletion. With this patch my_delete_allow_opened() becomes obsolete and is replaced with my_delete(). This patch is rework of the patch http://lists.mysql.com/commits/59327 for MySQL bug#39750.
* | | | | MDEV-4601 : Allow MariaDB to be build without non-blocking client.Vladislav Vaintroub2013-06-151-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | Non-blocking client currently can be build on Windows, GCC on i386 and x64, or any OS wth ucontext.h header. Prior to this patch, build failed if neither of these conditions is true. Fix to avoid compiler errors in these case - non-blocking API would not be useful on , but otherwise everything will work as before.
* | | | | mysql-5.5.31 mergeSergei Golubchik2013-05-077-22/+22
|\ \ \ \ \ | | |_|/ / | |/| | |
| * | | | BUG#11753923-SQL THREAD CRASHES ON DISK FULLVenkatesh Duggirala2013-03-012-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing post push issue Simulator name used needs to be changed to make it work properly. Analysis: Debug control list addition (ListAddDel function dbug.c file) code was written in such a way that if new element is subset of already existing element, then the new element is not added. i.e., set @@global.debug = '+d,abcd', is existing in the list then you cannot add "a" or "ab" or "abc" in the list.
| * | | | Bug #11752803 SERVER CRASHES IF MAX_CONNECTIONS DECREASED BELOW Venkata Sidagam2013-01-241-14/+8
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | CERTAIN LEVEL Merging from 5.1 to 5.5
| | * | | Bug #11752803 SERVER CRASHES IF MAX_CONNECTIONS DECREASED BELOW Venkata Sidagam2013-01-241-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CERTAIN LEVEL Problem description: mysqld crashes when we update the max_connections variable to lesser value than the number of currently open connections. Analysis: The "alarm_queue.max_elements" size will be decided at the server start time and it will get modified if we change max_connections value. In the current scenario the value of "alarm_queue.max_elements" is decremented when the max_connections is set to 2. When updating the "alarm_queue.max_elements" value we are not updating "max_used_alarms" value. Hence, instead of getting the warning "thr_alarm queue is full" it is ending up in asserting the server at the time of inserting new elements in the queue. Fix: the fix is to dynamically increase the size of the alarm_queue. In order to do that, queue_insert_safe() should be used instead if queue_insert().
| * | | | Bug#11757464:SERVER CRASH IN RECURSIVE CALL WHEN OOMNisha Gopalakrishnan2013-01-154-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Analysis: --------- When the server is out of memory, an error is raised to indicate the same. Handling the error requires more memory to be allocated which fails, hence the error handling loops in a recursion and causes the server to crash. Fix: --- a) Prevents pushing the 'out of memory' error condition to the diagnostic area as it requires memory allocation. GET DIAGNOSTICS, SHOW WARNINGS and SHOW ERRORS statements will not show information about this error. However the 'out of memory' error is returned to the client. b) It sets the ME_FATALERROR flag when 'out of memory' errors are reported (for places where the flag is not already set). This flag prevents activation of SP error handlers which also require memory allocation and therefore are likely to fail.
* | | | | strmake_buf(X,Y) helper, equivalent to strmake(X,Y,sizeof(X)-1)Sergei Golubchik2013-04-172-2/+2
| | | | | | | | | | | | | | | | | | | | with a bit of lame protection against abuse.
* | | | | MDEV-4243 Warnings/errors while compiling with clangSergei Golubchik2013-03-281-1/+1
| | | | |
* | | | | 5.3->5.5 mergeSergei Golubchik2013-02-283-7/+13
|\ \ \ \ \ | | |_|/ / | |/| | |
| * | | | 5.2 -> 5.3Sergei Golubchik2013-02-284-12/+16
| |\ \ \ \ | | | |_|/ | | |/| |