summaryrefslogtreecommitdiff
path: root/sql/sql_plugin.cc
Commit message (Collapse)AuthorAgeFilesLines
* merge with 5.3Sergei Golubchik2011-10-191-19/+30
|\ | | | | | | | | | | | | | | | | | | | | | | | | sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
| * Merge 5.2 -> 5.3 Sergey Petrunya2011-06-241-16/+24
| |\ | | | | | | | | | (testcase for #798597 now crashes)
| | * Merge with 5.1Michael Widenius2011-06-241-16/+24
| | |\
| | | * lp:790513 MariaDB crashes on startupSergei Golubchik2011-06-211-16/+24
| | | | | | | | | | | | | | | | initialize plugins earlier, to support, for example, non-MyISAM mysql.plugin table.
| * | | Fixed that mysqld --no-defaults --help --verbose doesn't give a lot of ↵Michael Widenius2011-06-071-2/+5
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | irrelevant error messages. sql/mysql_priv.h: Make opt_help global sql/mysqld.cc: Don't give (double) warnings about lower case file systems if --help is given. Don't give warning about non existing data directory if --help is given. sql/sql_plugin.cc: Give a better warning if --help is used and plugin table doesn't exists
| * | Merge with 5.1 to get in changes from MySQL 5.1.55Michael Widenius2011-02-281-1/+23
| |\ \ | | |/
| | * Merge with MySQL 5.1.55Michael Widenius2011-02-201-1/+23
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria" - Fixed wrong assert in Aria Now need to merge with latest xtradb before pushing sql/ha_partition.cc: Ensure that m_ordered_rec_buffer is not freed before close. sql/mysqld.cc: Changed to use opt_stack_trace instead of opt_pstack. Removed references to pstack sql/partition_element.h: Ensure that connect_string is initialized storage/maria/ma_key_recover.c: Fixed wrong assert
| * | | Change TABLE->alias to String for less memory reallocationMichael Widenius2011-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed some String.ptr() -> String.c_ptr() for String that are not guaranteed to end with \0 Removed some c_ptr() usage from parameters to functions that takes ptr & length Use preallocate buffers to avoid calling malloc() for most operations. sql/event_db_repository.cc: alias is now a String sql/event_scheduler.cc: c_ptr -> c_ptr_safe() to avoid warnings from valgrind. sql/events.cc: c_ptr -> c_ptr_safe() to avoid warnings from valgrind. c_ptr -> ptr() as function takes ptr & length sql/field.cc: alias is now a String sql/field.h: alias is now a String sql/ha_partition.cc: alias is now a String sql/handler.cc: alias is now a String ptr() -> c_ptr() as string is not guaranteed to be \0 terminated sql/item.cc: Store error parameter in separarte buffer to ensure correct error message sql/item_func.cc: ptr() -> c_ptr_safe() as string is not guaranteed to be \0 terminated sql/item_sum.h: Use my_strtod() instead of my_atof() to not have to make string \0 terminated sql/lock.cc: alias is now a String sql/log.cc: c_ptr() -> ptr() as function takes ptr & length sql/log_event.cc: c_ptr_quick() -> ptr() as we only want to get the pointer to String buffer sql/opt_range.cc: ptr() -> c_ptr() as string is not guaranteed to be \0 terminated sql/opt_table_elimination.cc: alias is now a String sql/set_var.cc: ptr() -> c_ptr() as string is not guaranteed to be \0 terminated c_ptr() -> c_ptr_safe() to avoid warnings from valgrind. c_ptr() -> ptr() as function takes ptr & length Simplify some code. sql/sp.cc: c_ptr() -> ptr() as function takes ptr & length sql/sp_rcontext.cc: alias is now a String sql/sql_base.cc: alias is now a String. Here we win a realloc() for most alias usage. sql/sql_class.cc: Use size descriptor for printf() to avoid accessing bytes outside of buffer sql/sql_insert.cc: Change allocation of TABLE as it's now contains a String _ptr() -> ptr() as function takes ptr & length sql/sql_load.cc: Use preallocate buffers to avoid calling malloc() for most operations. sql/sql_parse.cc: Use c_ptr_safe() to ensure string is \0 terminated. sql/sql_plugin.cc: c_ptr_quick() -> ptr() as function takes ptr & length sql/sql_select.cc: alias is now a String sql/sql_show.cc: alias is now a String sql/sql_string.h: Added move() function to change who owns the string (owner does the free) sql/sql_table.cc: alias is now a String c_ptr() -> c_ptr_safe() to avoid warnings from valgrind. sql/sql_test.cc: c_ptr() -> c_ptr_safe() to avoid warnings from valgrind. alias is now a String sql/sql_trigger.cc: c_ptr() -> c_ptr_safe() to avoid warnings from valgrind. Use field->init() to setup pointers to alias. sql/sql_update.cc: alias is now a String sql/sql_view.cc: ptr() -> c_ptr_safe() as string is not guaranteed to be \0 terminated sql/sql_yacc.yy: r() -> c_ptr() as string is not guaranteed to be \0 terminated sql/table.cc: alias is now a String sql/table.h: alias is now a String storage/federatedx/ha_federatedx.cc: Remove extra 1 byte alloc that is automaticly done by strmake() Ensure that error message ends with \0 storage/maria/ha_maria.cc: alias is now a String storage/myisam/ha_myisam.cc: alias is now a String
* | | | sys_vars changes and cleanupsSergei Golubchik2011-07-111-1/+1
| | | |
* | | | adding DBUG_ENTER/DBUG_RETURN tags that were useful when fixing memory leaksSergei Golubchik2011-07-101-3/+4
| | | |
* | | | fix memory leaks and other problems found by safemallocSergei Golubchik2011-07-101-22/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | client/mysql_upgrade.c: missing DBUG_RETURN client/mysqladmin.cc: client plugin memory wasn't freed client/mysqlcheck.c: client plugin memory, defaults, a result set, a command-line option value were not freed. missing DBUG_RETURN. client/mysqldump.c: client plugin memory wasn't freed client/mysqlslap.c: client plugin memory wasn't freed client/mysqltest.cc: hopeless. cannot be fixed. mysql-test/valgrind.supp: Bug#56666 is now fixed. mysys/array.c: really, don't allocate if the caller didn't ask to. mysys/my_init.c: safemalloc checks must be done at the very end mysys/my_thr_init.c: not needed anymore sql-common/client.c: memory leak sql/log.cc: log_file was not closed, memory leak. sql/mysqld.cc: fix bug#56666 (causing many P_S related memory leaks). close_active_mi() not called for --bootstrap, memory leak. sql/sql_lex.cc: redo Lex->mi handling sql/sql_lex.h: redo Lex->mi handling sql/sql_plugin.cc: plugins having PLUGIN_VAR_MEMALLOC string variables have this variables allocated in every THD. The memory was freed in ~THD but only if plugin was still active. If plugin was unloaded the variable was not found and the memory was lost. By loading and unloading plugins an arbitrary amount of memory can be lost. sql/sql_repl.cc: redo Lex->mi handling sql/sql_yacc.yy: completely wrong handling of Lex->mi - run-time memory leak, by repeating the statement arbitrary amount of memory can be lost. Lex->mi.repl_ignore_server_ids_opt was allocated when parsing CHANGE MASTER, and freed after executing the statement. if parser failed on syntax (or another) error the statement was never executed. Lex->mi was simply bzero-ed for the next CHANGE MASTER statement. sql/table.cc: didn't compile storage/perfschema/pfs_lock.h: Bug#56666 is fixed
* | | | post-merge fixes.Sergei Golubchik2011-07-021-2/+2
| | | | | | | | | | | | | | | | | | | | most tests pass. 5.3 merge is next
* | | | 5.5-mergeSergei Golubchik2011-07-021-25/+64
|\ \ \ \
| * \ \ \ Merge from 5.1.Guilhem Bichot2011-05-211-5/+8
| |\ \ \ \
| | * | | | Fix for BUG#11755168 '46895: test "outfile_loaddata" fails (reproducible)'.Guilhem Bichot2011-05-161-8/+13
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In sql_class.cc, 'row_count', of type 'ha_rows', was used as last argument for ER_TRUNCATED_WRONG_VALUE_FOR_FIELD which is "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld". So 'ha_rows' was used as 'long'. On SPARC32 Solaris builds, 'long' is 4 bytes and 'ha_rows' is 'longlong' i.e. 8 bytes. So the printf-like code was reading only the first 4 bytes. Because the CPU is big-endian, 1LL is 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 so the first four bytes yield 0. So the warning message had "row 0" instead of "row 1" in test outfile_loaddata.test: -Warning 1366 Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 1 +Warning 1366 Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 0 All error-messaging functions which internally invoke some printf-life function are potential candidate for such mistakes. One apparently easy way to catch such mistakes is to use ATTRIBUTE_FORMAT (from my_attribute.h). But this works only when call site has both: a) the format as a string literal b) the types of arguments. So: func(ER(ER_BLAH), 10); will silently not be checked, because ER(ER_BLAH) is not known at compile time (it is known at run-time, and depends on the chosen language). And func("%s", a va_list argument); has the same problem, as the *real* type of arguments is not known at this site at compile time (it's known in some caller). Moreover, func(ER(ER_BLAH)); though possibly correct (if ER(ER_BLAH) has no '%' markers), will not compile (gcc says "error: format not a string literal and no format arguments"). Consequences: 1) ATTRIBUTE_FORMAT is here added only to functions which in practice take "string literal" formats: "my_error_reporter" and "print_admin_msg". 2) it cannot be added to the other functions: my_error(), push_warning_printf(), Table_check_intact::report_error(), general_log_print(). To do a one-time check of functions listed in (2), the following "static code analysis" has been done: 1) replace my_error(ER_xxx, arguments for substitution in format) with the equivalent my_printf_error(ER_xxx,ER(ER_xxx), arguments for substitution in format), so that we have ER(ER_xxx) and the arguments *in the same call site* 2) add ATTRIBUTE_FORMAT to push_warning_printf(), Table_check_intact::report_error(), general_log_print() 3) replace ER(xxx) with the hard-coded English text found in errmsg.txt (like: ER(ER_UNKNOWN_ERROR) is replaced with "Unknown error"), so that a call site has the format as string literal 4) this way, ATTRIBUTE_FORMAT can effectively do its job 5) compile, fix errors detected by ATTRIBUTE_FORMAT 6) revert steps 1-2-3. The present patch has no compiler error when submitted again to the static code analysis above. It cannot catch all problems though: see Field::set_warning(), in which a call to push_warning_printf() has a variable error (thus, not replacable by a string literal); I checked set_warning() calls by hand though. See also WL 5883 for one proposal to avoid such bugs from appearing again in the future. The issues fixed in the patch are: a) mismatch in types (like 'int' passed to '%ld') b) more arguments passed than specified in the format. This patch resolves mismatches by changing the type/number of arguments, not by changing error messages of sql/share/errmsg.txt. The latter would be wrong, per the following old rule: errmsg.txt must be as stable as possible; no insertions or deletions of messages, no changes of type or number of printf-like format specifiers, are allowed, as long as the change impacts a message already released in a GA version. If this rule is not followed: - Connectors, which use error message numbers, will be confused (by insertions/deletions of messages) - using errmsg.sys of MySQL 5.1.n with mysqld of MySQL 5.1.(n+1) could produce wrong messages or crash; such usage can easily happen if installing 5.1.(n+1) while /etc/my.cnf still has --language=/path/to/5.1.n/xxx; or if copying mysqld from 5.1.(n+1) into a 5.1.n installation. When fixing b), I have verified that the superfluous arguments were not used in the format in the first 5.1 GA (5.1.30 'bteam@astra04-20081114162938-z8mctjp6st27uobm'). Had they been used, then passing them today, even if the message doesn't use them anymore, would have been necessary, as explained above. include/my_getopt.h: this function pointer is used only with "string literal" formats, so we can add ATTRIBUTE_FORMAT. mysql-test/collections/default.experimental: test should pass now sql/derror.cc: by having a format as string literal, ATTRIBUTE_FORMAT check becomes effective. sql/events.cc: Change justified by the following excerpt from sql/share/errmsg.txt: ER_EVENT_SAME_NAME eng "Same old and new event name" ER_EVENT_SET_VAR_ERROR eng "Error during starting/stopping of the scheduler. Error code %u" sql/field.cc: ER_TOO_BIG_SCALE 42000 S1009 eng "Too big scale %d specified for column '%-.192s'. Maximum is %lu." ER_TOO_BIG_PRECISION 42000 S1009 eng "Too big precision %d specified for column '%-.192s'. Maximum is %lu." ER_TOO_BIG_DISPLAYWIDTH 42000 S1009 eng "Display width out of range for column '%-.192s' (max = %lu)" sql/ha_ndbcluster.cc: ER_OUTOFMEMORY HY001 S1001 eng "Out of memory; restart server and try again (needed %d bytes)" (sizeof() returns size_t) sql/ha_ndbcluster_binlog.cc: Too many arguments for: ER_GET_ERRMSG eng "Got error %d '%-.100s' from %s" Patch by Jonas Oreland. sql/ha_partition.cc: print_admin_msg() is used only with a literal as format, so ATTRIBUTE_FORMAT works. sql/handler.cc: ER_OUTOFMEMORY HY001 S1001 eng "Out of memory; restart server and try again (needed %d bytes)" (sizeof() returns size_t) sql/item_create.cc: ER_TOO_BIG_SCALE 42000 S1009 eng "Too big scale %d specified for column '%-.192s'. Maximum is %lu." ER_TOO_BIG_PRECISION 42000 S1009 eng "Too big precision %d specified for column '%-.192s'. Maximum is %lu." 'c_len' and 'c_dec' are char*, passed as %d !! We don't know their value (as strtoul() failed), but they are likely big, so we use INT_MAX. 'len' is ulong. sql/item_func.cc: ER_WARN_DATA_OUT_OF_RANGE 22003 eng "Out of range value for column '%s' at row %ld" ER_CANT_FIND_UDF eng "Can't load function '%-.192s'" sql/item_strfunc.cc: ER_TOO_BIG_FOR_UNCOMPRESS eng "Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)" max_allowed_packet is ulong. sql/mysql_priv.h: sql_print_message_func is a function _pointer_. sql/sp_head.cc: ER_SP_RECURSION_LIMIT eng "Recursive limit %d (as set by the max_sp_recursion_depth variable) was exceeded for routine %.192s" max_sp_recursion_depth is ulong sql/sql_acl.cc: ER_PASSWORD_NO_MATCH 42000 eng "Can't find any matching row in the user table" ER_CANT_CREATE_USER_WITH_GRANT 42000 eng "You are not allowed to create a user with GRANT" sql/sql_base.cc: ER_NOT_KEYFILE eng "Incorrect key file for table '%-.200s'; try to repair it" ER_TOO_MANY_TABLES eng "Too many tables; MySQL can only use %d tables in a join" MAX_TABLES is size_t. sql/sql_binlog.cc: ER_UNKNOWN_ERROR eng "Unknown error" sql/sql_class.cc: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld" WARN_DATA_TRUNCATED 01000 eng "Data truncated for column '%s' at row %ld" sql/sql_connect.cc: ER_HANDSHAKE_ERROR 08S01 eng "Bad handshake" ER_BAD_HOST_ERROR 08S01 eng "Can't get hostname for your address" sql/sql_insert.cc: ER_WRONG_VALUE_COUNT_ON_ROW 21S01 eng "Column count doesn't match value count at row %ld" sql/sql_parse.cc: ER_WARN_HOSTNAME_WONT_WORK eng "MySQL is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work" ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT eng "Too high level of nesting for select" ER_UNKNOWN_ERROR eng "Unknown error" sql/sql_partition.cc: ER_OUTOFMEMORY HY001 S1001 eng "Out of memory; restart server and try again (needed %d bytes)" sql/sql_plugin.cc: ER_OUTOFMEMORY HY001 S1001 eng "Out of memory; restart server and try again (needed %d bytes)" sql/sql_prepare.cc: ER_OUTOFMEMORY HY001 S1001 eng "Out of memory; restart server and try again (needed %d bytes)" ER_UNKNOWN_STMT_HANDLER eng "Unknown prepared statement handler (%.*s) given to %s" length value (for '%.*s') must be 'int', per the doc of printf() and the code of my_vsnprintf(). sql/sql_show.cc: ER_OUTOFMEMORY HY001 S1001 eng "Out of memory; restart server and try again (needed %d bytes)" sql/sql_table.cc: ER_TOO_BIG_FIELDLENGTH 42000 S1009 eng "Column length too big for column '%-.192s' (max = %lu); use BLOB or TEXT instead" sql/table.cc: ER_NOT_FORM_FILE eng "Incorrect information in file: '%-.200s'" ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE eng "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use mysql_upgrade to fix this error." table->s->mysql_version is ulong. sql/unireg.cc: ER_TOO_LONG_TABLE_COMMENT eng "Comment for table '%-.64s' is too long (max = %lu)" ER_TOO_LONG_FIELD_COMMENT eng "Comment for field '%-.64s' is too long (max = %lu)" ER_TOO_BIG_ROWSIZE 42000 eng "Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some columns to TEXT or BLOBs"
| * | | | merge from 5.1-bugteamTor Didriksen2010-12-021-1/+2
| |\ \ \ \ | | |/ / /
| | * | | BUG#58246 post-push fix broken DBG build.Tor Didriksen2010-12-021-1/+2
| | | | |
| * | | | Merging patch for BUG#58246 into mysql-5.5-bugteam.Mats Kindahl2010-12-011-1/+22
| |\ \ \ \ | | |/ / /
| | * | | BUG#58246: INSTALL PLUGIN not secure & crashableMats Kindahl2010-12-011-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When installing plugins, there is a missing check for slash (/) in the path on Windows. Note that on Windows, both / and \ can be used to separate directories. This patch fixes the issue by: - Adding a FN_DIRSEP symbol for all platforms consisting of a string of legal directory separators. - Adding a charset-aware version of strcspn(). - Adding a check_valid_path() function that uses my_strcspn() to check if any FN_DIRSEP character is in the supplied string. - Using the check_valid_path() function in sql_plugin.cc and sql_udf.cc (which means replacing the existing test there). include/config-netware.h: Adding FN_DIRSEP ****** Adding FN_DIRSEP include/config-win.h: Adding FN_DIRSEP ****** Adding FN_DIRSEP include/m_ctype.h: Adding my_strspn() and my_strcspn(). ****** Adding my_strspn() and my_strcspn(). include/my_global.h: Adding FN_DIRSEP ****** Adding FN_DIRSEP mysql-test/t/plugin_not_embedded.test: Adding test that file names containing / is disallowed on *all* platforms. ****** Adding test that file names containing / is disallowed on *all* platforms. sql/sql_plugin.cc: Introducing check_if_path() function for checking if filename is a path to include / on Windows. ****** Introducing check_if_path() function for checking if filename is a path to include / on Windows. sql/sql_udf.cc: Switching to use check_if_path() function. ****** Switching to use check_if_path() function. strings/my_strchr.c: Adding my_strspn() and my_strcspn(). ****** Adding my_strspn() and my_strcspn().
| * | | | BUG#57108: mysqld crashes when I attempt to install pluginMats Kindahl2010-11-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a relative path is supplied to option --defaults-file or --defaults-extra-file, the server will crash when executing an INSTALL PLUGIN command. The reason is that the defaults file is initially read relative the current working directory when the server is started, but when INSTALL PLUGIN is executed, the server has changed working directory to the data directory. Since there is no check that the call to my_load_defaults() inside mysql_install_plugin(), the subsequence call to free_defaults() will crash the server. This patch fixes the problem by: - Prepending the current working directory to the file name when a relative path is given to the --defaults-file or --defaults- extra-file option the first time my_load_defaults() is called, which is just after the server has started in main(). - Adding a check of the return value of my_load_defaults() inside mysql_install_plugin() and aborting command (with an error) if an error is returned. - It also adds a check of the return value for load_defaults in lib_sql.cc for the embedded server since that was missing. To test that the relative files for the options --defaults-file and --defaults-extra-file is handled properly, mysql-test-run.pl is also changed to not add a --defaults-file option if one is provided in the tests *.opt file.
| * | | | Merge WL#5496 and WL#5341 to 5.5-bugteam.Sergey Vojtovich2010-10-071-15/+24
| |\ \ \ \
| | * | | | WL#5341 - Sticky pluginsSergey Vojtovich2010-09-271-15/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements "permanent" load option for plugins as specified by WL#5341. mysql-test/r/plugin_load_option.result: A test case for WL#5341. mysql-test/t/plugin_load_option-master.opt: A test case for WL#5341. mysql-test/t/plugin_load_option.test: A test case for WL#5341. sql/share/errmsg-utf8.txt: An error message for WL#5341. sql/sql_plugin.cc: Added FORCE_PLUS_PERMANENT plugin load option. sql/sql_plugin.h: Expose and use plugin load option instead of is_mandatory flag. This is a requirement for to-be-implemented WL5496.
| * | | | | mergeGeorgi Kodinov2010-10-041-1/+1
| |\ \ \ \ \
| * \ \ \ \ \ merge of mysql-5.5 into mysql-5.5-wl1054Georgi Kodinov2010-09-201-10/+58
| |\ \ \ \ \ \ | | | |/ / / / | | |/| | | |
| * | | | | | WL#1054: Pluggable authentication supportGeorgi Kodinov2010-08-091-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merged the implementation to a new base tree.
* | | | | | | lots of post-merge changesSergei Golubchik2011-04-251-5/+5
| | | | | | |
* | | | | | | merge.Sergei Golubchik2010-11-251-97/+325
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | / / | | |_|_|/ / | |/| | | | | | | | | | checkpoint. does not compile.
| * | | | | mergedSergei Golubchik2010-09-211-2/+1
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |
| | * | | | fix for MySQL Bug#44797 - plugins w/o command-line options have no disabling ↵Sergei Golubchik2010-09-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | option in --help
| * | | | | Merge with MariaDB 5.1.49Michael Widenius2010-08-051-13/+47
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | Removed references to HA_END_SPACE_KEY (which has been 0 for a long time)
| | * | | | Merge with MySQL 5.1.49Michael Widenius2010-08-021-13/+47
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | Fixed Bug#52005 'JOIN_TAB->dependent' may be incorrectly propageted for multilevel outer joins' in a better way (patch from Sergey Petrunya)
| * | | | | | Fix for LP#588251: doStartTableScan() result not checked.Michael Widenius2010-07-171-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue was that we didn't always check result of ha_rnd_init() which caused a problem for handlers that returned an error in this code. - Changed prototype of ha_rnd_init() to ensure that we get a compile warning if result is not checked. - Added ha_rnd_init_with_error() that prints error on failure. - Checked all usage of ha_rnd_init() and ensure we generate an error message on failures. - Changed init_read_record() to return 1 on failure. sql/create_options.cc: Fixed wrong printf sql/event_db_repository.cc: Check result from init_read_record() sql/events.cc: Check result from init_read_record() sql/filesort.cc: Check result from ha_rnd_init() sql/ha_partition.cc: Check result from ha_rnd_init() sql/ha_partition.h: Fixed compiler warning sql/handler.cc: Added ha_rnd_init_with_error() Check result from ha_rnd_init() sql/handler.h: Added ha_rnd_init_with_error() Changed prototype of ha_rnd_init() to ensure that we get a compile warning if result is not checked sql/item_subselect.cc: Check result from ha_rnd_init() sql/log.cc: Check result from ha_rnd_init() sql/log_event.cc: Check result from ha_rnd_init() sql/log_event_old.cc: Check result from ha_rnd_init() sql/mysql_priv.h: init_read_record() now returns error code on failure sql/opt_range.cc: Check result from ha_rnd_init() sql/records.cc: init_read_record() now returns error code on failure Check result from ha_rnd_init() sql/sql_acl.cc: Check result from init_read_record() sql/sql_cursor.cc: Print error if ha_rnd_init() fails sql/sql_delete.cc: Check result from init_read_record() sql/sql_help.cc: Check result from init_read_record() sql/sql_plugin.cc: Check result from init_read_record() sql/sql_select.cc: Check result from ha_rnd_init() Print error if ha_rnd_init() fails. sql/sql_servers.cc: Check result from init_read_record() sql/sql_table.cc: Check result from init_read_record() sql/sql_udf.cc: Check result from init_read_record() sql/sql_update.cc: Check result from init_read_record() storage/example/ha_example.cc: Don't return error on rnd_init() storage/ibmdb2i/ha_ibmdb2i.cc: Removed not relevant comment
| * | | | | | --plugin_maturity command-line optionSergei Golubchik2010-06-161-0/+23
| | | | | | |
| * | | | | | bug in converting st_mysql_plugin to st_maria_plugin - all but the last ↵Sergei Golubchik2010-06-161-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | plugin in a dl were lost
| * | | | | | merge 5.1->5.2Sergei Golubchik2010-06-011-2/+16
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge with MySQL 5.1.47Michael Widenius2010-05-261-5/+26
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed some bugs introduced in 5.1.47 Disabled some tests until we have merged with latest Xtradb configure.in: Added testing if valgrind/memcheck.h exists storage/pbxt/src/ha_pbxt.cc: LOCK_plugin is not anymore locked in init
| | * \ \ \ \ \ Merge MySQL 5.1.46 into MariaDB.unknown2010-04-281-0/+2
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Still two test failures to be solved: main.myisam and main.subselect.
| * | | | | | | | fixes for buildbot:Sergei Golubchik2010-04-081-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | update test results fix compilation failure on windows fix for ps-protocol mysql-test/r/plugin.result: make sure the PS handle is closed mysql-test/t/plugin.test: make sure the PS handle is closed sql/mysqld.cc: compilation failure: lable without a statement. sql/sql_plugin.cc: make plugin lock and plugin unlock use the same format of the dbug info string. print the ref_count *after* the lock and *after* the unlock.
| * | | | | | | | Merge with 5.1Michael Widenius2010-04-081-3/+4
| |\ \ \ \ \ \ \ \ | | |/ / / / / / /
| | * | | | | | | Removed compiler warningsMichael Widenius2010-04-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed random failures from test suite mysql-test/extra/rpl_tests/rpl_insert_id_pk.test: Make test predicatable. mysql-test/include/maria_empty_logs.inc: We can't use 'Threads_connected' for syncronization, as the 'check_warnings' thread that just quit may still be counted in 'Threads_connected' Now we just wait until MySQLD answers again, which should be good enough for our purposes mysql-test/suite/binlog/r/binlog_index.result: Updated results file mysql-test/suite/binlog/t/binlog_index-master.opt: Added option file to not get stack traces in .err file. mysql-test/suite/binlog/t/binlog_index.test: Added 'flush tables' to remove warning about crashed suppression file from logs mysql-test/suite/pbxt/r/multi_statement.result: Updated results mysql-test/suite/pbxt/t/multi_statement-master.opt: Added options so that slow query testing makes sense sql/events.cc: Don't write Event Scheduler startup message if warnings are turned off. sql/handler.cc: Removed compiler warning sql/log.cc: Removed compiler warning sql/mysqld.cc: Added option 'test-expect-abort'; If this is set, we don't write message to log in case of 'DBUG_ABORT'. (Gives us smaller, easier to read log files) sql/set_var.cc: Removed compiler warning sql/slave.cc: Removed compiler warning sql/sql_plugin.cc: Don't write warnings about disabled plugin if using --log_warnings=0 storage/xtradb/include/ut0lst.h: Removed compiler warning support-files/compiler_warnings.supp: Supress warning from xtradb
| * | | | | | | | Fixed compiler warningMichael Widenius2010-04-081-1/+1
| | | | | | | | |
| * | | | | | | | Fied problem with of compilation without dynamic plugin loading.unknown2010-04-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sql/sql_plugin.cc: Fixed #ifdef
| * | | | | | | | Maria WL#61unknown2010-04-011-87/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interface for maria extensions. Alternative plugin interface with additional info (maturity and string version). CMakeLists.txt: Maria plugin interface used. config/ac-macros/plugins.m4: Maria plugin interface used. configure.in: Maria plugin interface used. include/mysql/plugin.h: Maria plugin interface added. include/mysql/plugin_auth.h.pp: Maria plugin interface added. plugin/auth/auth_socket.c: Maria plugin interface added. plugin/auth/dialog.c: Maria plugin interface added. plugin/daemon_example/daemon_example.cc: Maria plugin interface added. plugin/fulltext/plugin_example.c: Maria plugin interface added. sql/ha_ndbcluster.cc: Maria plugin interface added. sql/ha_partition.cc: Maria plugin interface added. sql/log.cc: Maria plugin interface added. sql/sql_acl.cc: Maria plugin interface added. sql/sql_builtin.cc.in: Maria plugin interface used. sql/sql_plugin.cc: Maria plugin interface added. sql/sql_plugin.h: Maria plugin interface used. sql/sql_show.cc: Maria plugin interface added. storage/archive/ha_archive.cc: Maria plugin interface added. storage/blackhole/ha_blackhole.cc: Maria plugin interface added. storage/csv/ha_tina.cc: Maria plugin interface added. storage/example/ha_example.cc: Maria plugin interface added. storage/federated/ha_federated.cc: Maria plugin interface added. storage/federatedx/ha_federatedx.cc: Maria plugin interface added. storage/heap/ha_heap.cc: Maria plugin interface added. storage/ibmdb2i/ha_ibmdb2i.cc: Maria plugin interface added. storage/innobase/handler/ha_innodb.cc: Maria plugin interface added. storage/innodb_plugin/handler/i_s.cc: Maria plugin interface added. storage/maria/ha_maria.cc: Maria plugin interface added. storage/myisam/ha_myisam.cc: Maria plugin interface added. storage/myisammrg/ha_myisammrg.cc: Maria plugin interface added. storage/pbxt/src/ha_pbxt.cc: Maria plugin interface added. storage/xtradb/handler/ha_innodb.cc: Maria plugin interface added. storage/xtradb/handler/i_s.cc: Maria plugin interface added. storage/xtradb/handler/i_s.h: Maria plugin interface added.
| * | | | | | | | pluggable auth with plugin examplesSergei Golubchik2010-03-291-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makefile.am: add new API files to the check_abi rule, remove duplicates client/CMakeLists.txt: now a client can use dlopen too client/Makefile.am: be csh-friendly include/my_global.h: add dummy plugs for dlopen and co. for the code that needs them to work in static builds mysys/Makefile.am: be csh-friendly plugin/auth/dialog.c: typo fixed
| * | | | | | | | mergedSergei Golubchik2010-03-151-35/+54
| |\ \ \ \ \ \ \ \ | | |/ / / / / / /
| | * | | | | | | 1. don't crash on failing to load a plugin with newer ↵Sergei Golubchik2010-03-121-26/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MYSQL_PLUGIN_INTERFACE_VERSION 2. don't copy st_mysql_plugin structure unnecessary (sizeof hasn't changed)
| | * | | | | | | Automerge MySQL 5.1.44 merge into MariaDB trunk.unknown2010-03-091-1/+1
| | |\ \ \ \ \ \ \
| | | * \ \ \ \ \ \ Merge MySQL 5.1.44 into MariaDB.unknown2010-03-041-1/+1
| | | |\ \ \ \ \ \ \
| | * | | | | | | | | do not take LOCK_plugin for built-in pluginsSergei Golubchik2010-03-081-1/+24
| | | | | | | | | | |
| | * | | | | | | | | small code cleanup - "good ifdef is no ifdef"Sergei Golubchik2010-03-081-10/+2
| | |/ / / / / / / /