- 02 Jun, 2009 1 commit
-
-
Satya B authored
-
- 01 Jun, 2009 5 commits
-
-
Alexey Kopytov authored
-
Alexey Kopytov authored
-
Alexey Kopytov authored
-
Alexey Kopytov authored
-
Narayanan V authored
Running a SELECT query over an IBMDB2I table with a cp1250 character set was producing an error 2027 (ibmdb2i error 2027: Error converting single-byte sort sequence to UCS-2). The QMY_DESCRIBE_RANGE API was returning error 2027 to the storage engine because the CCSID used for a cp1250 column (870) does not match the CCSID used by the DB2 sort sequences associated with cp1250_* collations (1153). This was because the storage engine relies on a set of system APIs to determine which CCSID value most closely matches a particular MySQL character set. However, in the case of cp1250, the system is returning CCSID 870, which does not have a codepoint for the euro symbol, making it an incorrect match. This patch overrides the selection of a compatible CCSID to always return 1153 for cp1250. storage/ibmdb2i/db2i_charsetSupport.cc: Bug#45197 cp1250 character set with IBMDB2I generates 2027 error override the selection of a compatible CCSID to always return 1153 for cp1250.
-
- 31 May, 2009 6 commits
-
-
He Zhenxing authored
-
He Zhenxing authored
-
He Zhenxing authored
-
He Zhenxing authored
-
He Zhenxing authored
-
He Zhenxing authored
BEGIN/COMMIT/ROLLBACK was subject to replication db rules, and caused the boundary of a transaction not recognized correctly when these queries were ignored by the rules. Fixed the problem by skipping replication db rules for these statements. sql/log_event.cc: Skip checking replication db rules for BEGIN/COMMIT/ROLLBACK statements
-
- 30 May, 2009 2 commits
-
-
Davi Arnaut authored
Bug#34309: '_PC' macro redefinition For reasons that are now a mystery, we had defined a CPP symbol to help ancient compilers work better (in some way that's lost to history). This interferes with at least one modern compiler. Now, don't define the _PC symbol. Those other underscore-leading symbols are suspect also, but at least the names aren't inscrutable. Let's leave them for now.
-
He Zhenxing authored
Make the caller of Query_log_event, Execute_load_log_event constructors and THD::binlog_query to provide the error code instead of having the constructors to figure out the error code. sql/log_event.cc: Changed constructors of Query_log_event and Execute_load_log_event to accept the error code argument instead of figuring it out by itself sql/log_event.h: Changed constructors of Query_log_event and Execute_load_log_event to accept the error code argument
-
- 29 May, 2009 10 commits
-
-
Tatiana A. Nurnberg authored
-
Tatiana A. Nurnberg authored
-
Tatiana A. Nurnberg authored
-
Kristofer Pettersson authored
-
Kristofer Pettersson authored
-
Tatiana A. Nurnberg authored
When doing ALTER TABLE, we forgot to point out that we actually have ROW_FORMAT information (from the original table), so we dropped to "sensible defaults". This affects both ALTER TABLE and OPTIMIZE TABLE which may fall back on ALTER TABLE for InnoDB. We now flag that we do indeed know the row-type, thereby preserving compression-type etc. No .test in 5.1 since we'd need a reasonable new plugin from InnoDB to show this properly; in higher versions, maria can demonstrate this. sql/sql_table.cc: In mysql_alter_table() flag that we have row-type info from old table. In compare_tables(), we must explicitly check whether row-type has changed (rather than rely on the flag which will always be set at this point now).
-
Alexey Kopytov authored
-
Kristofer Pettersson authored
MySQL crashes if a user without proper privileges attempts to create a procedure. The crash happens because more than one error state is pushed onto the Diagnostic area. In this particular case the user is denied to implicitly create a new user account with the implicitly granted privileges ALTER- and EXECUTE ROUTINE. The new account is needed if the original user account contained a host mask. A user account with a host mask is a distinct user account in this context. An alternative would be to first get the most permissive user account which include the current user connection and then assign privileges to that account. This behavior change is considered out of scope for this bug patch. The implicit assignment of privileges when a user creates a stored routine is a considered to be a feature for user convenience and as such it is not a critical operation. Any failure to complete this operation is thus considered non-fatal (an error becomes a warning). The patch back ports a stack implementation of the internal error handler interface. This enables the use of multiple error handlers so that it is possible to intercept and cancel errors thrown by lower layers. This is needed as a error handler already is used in the call stack emitting the errors which needs to be converted. mysql-test/r/grant.result: * Added test case for bug44658 mysql-test/t/grant.test: * Added test case for bug44658 sql/sp.cc: * Removed non functional parameter no_error and my_error calls as all errors from this function will be converted to a warning anyway. * Change function return type from int to bool. sql/sp.h: * Removed non functional parameter no_error and my_error calls as all errors from this function will be converted to a warning anyway. * Changed function return value from int to bool sql/sql_acl.cc: * Removed the non functional no_error parameter from the function prototype. The function is called from two places and in one of the places we now ignore errors through error handlers. * Introduced the parameter write_to_binlog * Introduced an error handler to cancel any error state from mysql_routine_grant. * Moved my_ok() signal from mysql_routine_grant to make it easier to avoid setting the wrong state in the Diagnostic area. * Changed the broken error state in sp_grant_privileges() to a warning so that if "CREATE PROCEDURE" fails because "Password hash isn't a hexidecimal number" it is still clear what happened. sql/sql_acl.h: * Removed the non functional no_error parameter from the function prototype. The function is called from two places and in one of the places we now ignore errors through error handlers. * Introduced the parameter write_to_binlog * Changed return type for sp_grant_privileges() from int to bool sql/sql_class.cc: * Back ported implementation of internal error handler from 6.0 branch sql/sql_class.h: * Back ported implementation of internal error handler from 6.0 branch sql/sql_parse.cc: * Moved my_ok() signal from mysql_routine_grant() to make it easier to avoid setting the wrong state in the Diagnostic area.
-
Narayanan V authored
-
Narayanan V authored
wmemset was being used to fill the row buffers. wmemset was intended to fill the buffer with 16-bit UCS2 pad values. However, the 64-bit version of wmemset uses 32-bit wide characters and thus filled the buffer incorrectly. In some cases, the null byte map would be overwritten, causing ctype_utf8.test and ibmdb2i_rir.test to fail, giving the error message CPF5035. This patch eliminates the use of wmemset to fill the row buffer. wmemset has been replaced with memset16, which always fills memory with 16-bit values. storage/ibmdb2i/db2i_conversion.cc: Bug#44811 Tests with utf8 charset fail with ibmdb2i on 64bit MySQL Eliminate the use of wmemset to fill the row buffer. Replace wmemset with memset16, which always fills memory with 16-bit values. storage/ibmdb2i/db2i_misc.h: Bug#44811 Tests with utf8 charset fail with ibmdb2i on 64bit MySQL Eliminate the use of wmemset to fill the row buffer. Replace wmemset with memset16, which always fills memory with 16-bit values.
-
- 28 May, 2009 5 commits
-
-
Sergey Glukhov authored
-
Sergey Glukhov authored
-
Sergey Glukhov authored
-
Sergey Glukhov authored
The fix is to use case insensitive collation for mysql client command search. client/mysql.cc: The fix is to use case insensitive collation for mysql client command search. mysql-test/r/mysql.result: test result mysql-test/t/mysql.test: test case
-
Alexey Kopytov authored
-
- 27 May, 2009 11 commits
-
-
Georgi Kodinov authored
-
Georgi Kodinov authored
-
Georgi Kodinov authored
-
Georgi Kodinov authored
-
Tatiana A. Nurnberg authored
mysqldump --tab still dumped triggers to stdout rather than to individual tables. We now append triggers to the .sql file for the corresponding table. --events and --routines correspond to a database rather than a table and will still go to stdout with --tab unless redirected with --result-file (-r). client/mysqldump.c: Extend open_sql_file_for_table() so we can open-append. Change dump_triggers_for_table() so it will append its output to the table's .sql-file when --tab is used. mysql-test/r/mysqldump.result: Show that when using --tab, triggers now end up in the .sql file with the corresponding table (after that table), while --routines and --events go to stdout or --result-file. mysql-test/t/mysqldump.test: Show that when using --tab, triggers now end up in the .sql file with the corresponding table (after that table), while --routines and --events go to stdout or --result-file.
-
Georgi Kodinov authored
Added a more detailed error message on calling an ambiguous missing function. mysql-test/r/ps.result: Bug #38159: fixed existing tests mysql-test/r/sp-error.result: Bug #38159: test case mysql-test/t/ps.test: Bug #38159: fixed existing tests mysql-test/t/sp-error.test: Bug #38159: test case sql/item_func.cc: Bug #38159: generate more detailed error message sql/share/errmsg.txt: Bug #38159: add a more detailed error message sql/sql_derived.cc: Bug #38159: treat the detailed error message the same way as the generic one sql/sql_lex.cc: Bug #38159: - detect if the token is ambiguous and print the appropriate error. - backport is_lex_native_function() from 5.1 sql/sql_lex.h: Bug #38159: detect if the token is ambiguous and print the appropriate error. sql/sql_yacc.yy: Bug #38159: generate more detailed error message sql/table.cc: Bug #38159: treat the detailed error message the same way as the generic one
-
Sergey Glukhov authored
-
Sergey Glukhov authored
On 64-bit Windows: querying MERGE table with keys may cause server crash.The problem is generic and may affect any statement accessing MERGE table cardinality values. When MERGE engine was copying cardinality statistics, it was using incorrect size of element in cardinality statistics array (sizeof(ptr)==8 instead of sizeof(ulong)==4), causing access of memory beyond of the allocated bounds. sql/ha_myisam.cc: When copying rec_per_key array (an array of ulong) use proper size of element, that is sizeof(ulong). sql/ha_myisammrg.cc: When copying rec_per_key array (an array of ulong) use proper size of element, that is sizeof(ulong). sql/table.cc: When allocating rec_per_key array (an array of ulong) use proper size of element, that is sizeof(ulong).
-
Alexey Kopytov authored
old_password() functions The PASSWORD() and OLD_PASSWORD() functions could lead to memory reads outside of an internal buffer when used with BLOB arguments. String::c_ptr() assumes there is at least one extra byte in the internally allocated buffer when adding the trailing '\0'. This, however, may not be the case when a String object was initialized with externally allocated buffer. The bug was fixed by adding an additional "length" argument to make_scrambled_password_323() and make_scrambled_password() in order to avoid String::c_ptr() calls for PASSWORD()/OLD_PASSWORD(). However, since the make_scrambled_password[_323] functions are a part of the client library ABI, the functions with the new interfaces were implemented with the 'my_' prefix in their names, with the old functions changed to be wrappers around the new ones to maintain interface compatibility. mysql-test/r/func_crypt.result: Added a test case for bug #44767. mysql-test/t/func_crypt.test: Added a test case for bug #44767. sql/item_strfunc.cc: Use the new my_make_scrambled_password*() to avoid String::c_ptr(). sql/item_strfunc.h: Changed Item_func[_old]_password::alloc() interfaces so that we can use the new my_make_scrambled_password*() functions. sql/mysql_priv.h: Added declarations for the new my_make_scrambled_password*() functions. sql/password.c: Added new my_make_scrambled_password*() functions with an additional "length" argument. Changed ones to be wrappers around the new ones to maintain interface compatibility. sql/sql_yacc.yy: Utilize the new password hashing functions with additional length argument.
-
Alexey Kopytov authored
Dump all connection-related arguments when running mysqlcheck from mysql_upgrade. No test case, since the output depends on the test suite configuration and platform. client/mysql_upgrade.c: Dump all connection-related arguments when running mysqlcheck from mysql_upgrade.
-
Sergey Glukhov authored
The fix is to allow myisamchk to use >4G key_buffer_size on win64 include/myisam.h: use ulonglong instead of ulong for use_buffers storage/myisam/myisamchk.c: use ulonglong instead of ulong for use_buffers
-