An error occurred fetching the project authors.
- 02 Apr, 2009 1 commit
-
-
Paul McCullagh authored
-
- 24 Dec, 2008 1 commit
-
-
Sergey Glukhov authored
init user->user struct with thd->security_ctx->priv_user context if user->user is not initializied mysql-test/r/grant.result: test result mysql-test/t/grant.test: test case sql/set_var.cc: init user->user struct with thd->security_ctx->priv_user context if user->user is not initializied
-
- 10 Jul, 2008 1 commit
-
-
Sven Sandberg authored
Problem 1: tests often fail in pushbuild with a timeout when waiting for the slave to start/stop/receive error. Fix 1: Updated the wait_for_slave_* macros in the following way: - The timeout is increased by a factor ten - Refactored the macros so that wait_for_slave_param does the work for the other macros. Problem 2: Tests are often incorrectly written, lacking a source include/wait_for_slave_to_[start|stop].inc. Fix 2: Improved the chance to get it right by adding include/start_slave.inc and include/stop_slave.inc, and updated tests to use these. Problem 3: The the built-in test language command wait_for_slave_to_stop is a misnomer (does not wait for the slave io thread) and does not give as much debug info in case of failure as the otherwise equivalent macro source include/wait_for_slave_sql_to_stop.inc Fix 3: Replaced all calls to the built-in command by a call to the macro. Problem 4: Some, but not all, of the wait_for_slave_* macros had an implicit connection slave. This made some tests confusing to read, and made it more difficult to use the macro in circular replication scenarios, where the connection named master needs to wait. Fix 4: Removed the implicit connection slave from all wait_for_slave_* macros, and updated tests to use an explicit connection slave where necessary. Problem 5: The macros wait_slave_status.inc and wait_show_pattern.inc were unused. Moreover, using them is difficult and error-prone. Fix 5: remove these macros. Problem 6: log_bin_trust_function_creators_basic failed when running tests because it assumed @@global.log_bin_trust_function_creators=1, and some tests modified this variable without resetting it to its original value. Fix 6: All tests that use this variable have been updated so that they reset the value at end of test. mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test: Replaced wait_for_slave_to_stop by include/wait_for_slave_sql_to_stop.inc mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test: Replaced wait_for_slave_to_stop by include/wait_for_slave_sql_to_stop.inc Added connection slave since includ/wait_for_slave_sql_to_stop.inc does not do that anymore. mysql-test/extra/rpl_tests/rpl_log.test: Replaced start slave+wait_slave_status by start_slave.inc mysql-test/include/reset_master_and_slave.inc: replaced start/stop slave by start_slave.inc/stop_slave.inc mysql-test/include/sync_slave_io_with_master.inc: Improved comments and error message. mysql-test/include/wait_for_slave_io_to_stop.inc: Refactored to use wait_for_slave_param.inc. Removed connection slave. mysql-test/include/wait_for_slave_param.inc: - Improved usage instructions - Added more debug info in case of timeout - Added parameters $slave_param_comparison, $slave_timeout, $slave_keep_connection, $slave_error_message mysql-test/include/wait_for_slave_sql_error.inc: Refactored to use wait_for_slave_param.inc. Removed connection slave. mysql-test/include/wait_for_slave_sql_to_start.inc: Refactored to use wait_for_slave_param.inc. Removed connection slave. mysql-test/include/wait_for_slave_sql_to_stop.inc: Refactored to use wait_for_slave_param.inc. Removed connection slave. mysql-test/include/wait_for_slave_to_start.inc: Refactored to use wait_for_slave_param.inc. Removed connection slave. mysql-test/include/wait_for_slave_to_stop.inc: Refactored to use wait_for_slave_param.inc. Removed connection slave. mysql-test/include/wait_show_pattern.inc: Removed unused (and error-prone) file mysql-test/include/wait_slave_status.inc: Removed unused (and error-prone) file mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test: Renamed $keep_connection to $slave_keep_connection. mysql-test/suite/rpl/t/rpl_bug26395.test: Replace stop slave by stop_slave.inc mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test: Replace start/stop slave by start_slave.inc/stop_slave.inc. Replace wait_for_slave_param by wait_for_slave_sql_to_stop.inc. mysql-test/suite/rpl/t/rpl_dual_pos_advance.test: Renamed $keep_connection to $slave_keep_connection. mysql-test/suite/rpl/t/rpl_flushlog_loop.test: Replace wait_slave_status by start_slave.inc mysql-test/suite/rpl/t/rpl_idempotency.test: Added connection slave since wait_for_slave_sql_to_stop.inc does not do that any more. mysql-test/suite/rpl/t/rpl_incident.test: Replaced wait_for_slave_to_stop by wait_for_slave_sql_to_stop.inc mysql-test/suite/rpl/t/rpl_init_slave.test: Replaced start/stop slave by start_slave.inc/stop_slave.inc. Replaced save_master_pos;connection slave;sync_with_master by sync_slave_with_master. mysql-test/suite/rpl/t/rpl_log_pos.test: Replaced start/stop slave by start_slave.inc/stop_slave.inc. Replaced wait_for_slave_param by other wait_for_slave_* macros. mysql-test/suite/rpl/t/rpl_packet.test: Replaced start/stop slave by start_slave.inc/stop_slave.inc. mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test: Replaced start/stop slave by start_slave.inc/stop_slave.inc. mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test: Replaced start/stop slave by start_slave.inc/stop_slave.inc. mysql-test/suite/rpl/t/rpl_row_until.test: Replaced start/stop slave by start_slave.inc/stop_slave.inc. Replaced save_master_pos;connection slave;sync_with_master by sync_slave_with_master. mysql-test/suite/rpl/t/rpl_server_id1.test: Replaced start/stop slave by start_slave.inc/stop_slave.inc. mysql-test/suite/rpl/t/rpl_slave_grp_exec.test: Replaced start/stop slave by start_slave.inc/stop_slave.inc. mysql-test/suite/rpl/t/rpl_slave_skip.test: Replaced start/stop slave by start_slave.inc/stop_slave.inc. mysql-test/suite/rpl/t/rpl_slave_status.test: Replaced start/stop slave by start_slave.inc/stop_slave.inc. mysql-test/suite/rpl/t/rpl_sp.test: Restore @@global.log_bin_trust_function_creators at end of test. mysql-test/suite/rpl/t/rpl_sp_effects.test: Restore @@global.log_bin_trust_function_creators at end of test. mysql-test/suite/rpl/t/rpl_stm_until.test: Replaced start/stop slave by start_slave.inc/stop_slave.inc. Replaced save_master_pos;connection slave;sync_with_master by sync_slave_with_master. mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test: Replaced start slave by start_slave.inc. Added explicit connection slave since wait_for_slave_sql_to_stop.inc does not do that anymore. mysql-test/t/disabled.def: Disabled failing test. mysql-test/t/func_time.test: Restore @@global.log_bin_trust_function_creators at end of test. mysql-test/t/grant.test: Restore @@global.log_bin_trust_function_creators at end of test. mysql-test/t/grant2.test: Restore @@global.log_bin_trust_function_creators at end of test. mysql-test/t/innodb_notembedded.test: Restore @@global.log_bin_trust_function_creators at end of test. mysql-test/t/log_bin_trust_function_creators_func.test: Restore @@global.log_bin_trust_function_creators at end of test. Clean up at end of test by dropping the created user. mysql-test/t/query_cache.test: Restore @@global.log_bin_trust_function_creators at end of test. mysql-test/t/query_cache_notembedded.test: Restore @@global.log_bin_trust_function_creators at end of test. mysql-test/t/rpl_init_slave_func.test: Replaced start/stop slave by start_slave.inc/stop_slave.inc. mysql-test/t/timezone2.test: Restore @@global.log_bin_trust_function_creators at end of test.
-
- 27 Mar, 2008 1 commit
-
-
unknown authored
Fixed interference between tests: Users were added but not properly removed. This caused later tests to fail. mysql-test/r/grant.result: Fixed interference between tests: Users were added but not properly removed. This caused later tests to fail. mysql-test/t/grant.test: Fixed interference between tests: Users were added but not properly removed. This caused later tests to fail.
-
- 25 Mar, 2008 1 commit
-
-
unknown authored
When creating a temporary table that uses the same name as the mysql privs table the server would crash on FLUSH PRIVILEGES. This patches corrects the problem by setting a flag to ignore any temporary table when trying to reload the privileges. mysql-test/r/grant.result: Test for checking shadowing of privilege tables mysql-test/t/grant.test: Test for checking shadowing of privilege tables sql/sql_acl.cc: Set flag for ignoring temporary tables when trying to reload privileges.
-
- 05 Mar, 2008 1 commit
-
-
unknown authored
grant warnings on embedded server. mysql-test/r/drop.result: Move test that has more to do with grants than DROP. mysql-test/r/grant.result: Move test that has more to do with grants than DROP. mysql-test/t/drop.test: Move test that has more to do with grants than DROP. mysql-test/t/grant.test: Move test that has more to do with grants than DROP.
-
- 04 Feb, 2008 1 commit
-
-
unknown authored
Fixed interference between tests: Users were added but not properly removed. This caused later tests to fail. mysql-test/r/grant.result: Fixed interference between tests: Users were added but not properly removed. This caused later tests to fail. mysql-test/t/grant.test: Fixed interference between tests: Users were added but not properly removed. This caused later tests to fail.
-
- 01 Feb, 2008 1 commit
-
-
unknown authored
When issuing a column level grant on a table which require pre-locking the server crashed. The reason behind the crash was that data structures used by the lock api wasn't properly reinitialized in the case of a column level grant. mysql-test/r/grant.result: * Added test case mysql-test/t/grant.test: * Added test case sql/sql_acl.cc: * The lock api is dending on the thd->lex object and this variable needs to be re-initialized when opened with a new set of tables than specified in the original statement.
-
- 12 Dec, 2007 1 commit
-
-
unknown authored
cause ROLLBACK of statement", part 1. Review fixes. Do not send OK/EOF packets to the client until we reached the end of the current statement. This is a consolidation, to keep the functionality that is shared by all SQL statements in one place in the server. Currently this functionality includes: - close_thread_tables() - log_slow_statement(). After this patch and the subsequent patch for Bug#12713, it shall also include: - ha_autocommit_or_rollback() - net_end_statement() - query_cache_end_of_result(). In future it may also include: - mysql_reset_thd_for_next_command(). include/mysql_com.h: Rename now unused members of NET: no_send_ok, no_send_error, report_error. These were server-specific variables related to the client/server protocol. They have been made obsolete by this patch. Previously the same members of NET were used to store the error message both on the client and on the server. The error message was stored in net.last_error (client: mysql->net.last_error, server: thd->net.last_error). The error code was stored in net.last_errno (client: mysql->net.last_errno, server: thd->net.last_errno). The server error code and message are now stored elsewhere (in the Diagnostics_area), thus NET members are no longer used by the server. Rename last_error to client_last_error, last_errno to client_last_errno to avoid potential bugs introduced by merges. include/mysql_h.ic: Update the ABI file to reflect a rename. Renames do not break the binary compatibility. libmysql/libmysql.c: Rename last_error to client_last_error, last_errno to client_last_errno. This is necessary to ensure no unnoticed bugs introduced by merged changesets. Remove net.report_error, net.no_send_ok, net.no_send_error. libmysql/manager.c: Rename net.last_errno to net.client_last_errno. libmysqld/lib_sql.cc: Rename net.last_errno to net.client_last_errno. Update the embedded implementation of the client-server protocol to reflect the refactoring of protocol.cc. libmysqld/libmysqld.c: Rename net.last_errno to net.client_last_errno. mysql-test/r/events.result: Update to reflect the change in mysql_rm_db(). Now we drop stored routines and events for a given database name only if there is a directory for this database name. ha_drop_database() and query_cache_invalidate() are called likewise. Previously we would attempt to drop routines/events even if database directory was not found (it worked, since routines and events are stored in tables). This fixes Bug 29958 "Weird message on DROP DATABASE if mysql.proc does not exist". The change was done because the previous code used to call send_ok() twice, which led to an assertion failure when asserts against it were added by this patch. mysql-test/r/grant.result: Fix the patch for Bug 16470, now FLUSH PRIVILEGES produces an error if mysql.procs_priv is missing. This fixes the assert that send_ok() must not called after send_error() (the original patch for Bug 16470 was prone to this). mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result: Produce a more detailed error message. mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result: Produce a more detailed error message. mysql-test/t/grant.test: Update the test, now FLUSH PRIVILEGES returns an error if mysql.procs_priv is missing. server-tools/instance-manager/mysql_connection.cc: Rename net.last_errno to net.client_last_errno. sql/ha_ndbcluster_binlog.cc: Add asserts. Use getters to access statement status information. Add a comment why run_query() is broken. Reset the diagnostics area in the end of run_query() to fulfill the invariant that the diagnostics_area is never assigned twice per statement (see the comment in the code when this can happen). We still do not clear thd->is_fatal_error and thd->is_slave_error, which may lead to bugs, I consider the whole affair as something to be dealt with separately. sql/ha_partition.cc: fatal_error() doesn't set an error by itself. Perhaps we should remove this method altogether and instead add a flag to my_error to set thd->is_fatal_error property. Meanwhile, this change is a part of inspection made to the entire source code with the goal to ensure that fatal_error() is always accompanied by my_error(). sql/item_func.cc: There is no net.last_error anymore. Remove the obsolete assignment. sql/log_event.cc: Use getters to access statement error status information. sql/log_event_old.cc: Use getters to access statement error status information. sql/mysqld.cc: Previously, if a continue handler for an error was found, my_message_sql() would not set an error in THD. Since the current statement must be aborted in any case, find_handler() had a hack to assign thd->net.report_error to 1. Remove this hack. Set an error in my_message_sql() even if the continue handler is found. The error will be cleared anyway when the handler is executed. This is one action among many in this patch to ensure the invariant that whenever thd->is_error() is TRUE, we have a message in thd->main_da.message(). sql/net_serv.cc: Use a full-blown my_error() in net_serv.cc to report an error, instead of just setting net->last_errno. This ensures the invariant that whenever thd->is_error() returns TRUE, we have a message in thd->main_da.message(). Remove initialization of removed NET members. sql/opt_range.cc: Use my_error() instead of just raising thd->net.report_error. This ensures the invariant that whenever thd->is_error() returns TRUE, there is a message in thd->main_da.message(). sql/opt_sum.cc: Move invocation of fatal_error() right next to the place where we set the error message. That makes it easier to track that whenever fatal_error() is called, there is a message in THD. sql/protocol.cc: Rename send_ok() and send_eof() to net_send_ok() and net_send_eof() respectively. These functions write directly to the network and are not for use anywhere outside the client/server protocol code. Remove the code that was responsible for cases when either there is no error code, or no error message, or both. Instead the calling code ensures that they are always present. Asserts are added to enforce the invariant. Instead of a direct access to thd->server_status and thd->total_warn_count use function parameters, since these from now on don't always come directly from THD. Introduce net_end_statement(), the single-entry-point replacement API for send_ok(), send_eof() and net_send_error(). Implement Protocol::end_partial_result_set to use in select_send::abort() when there is a continue handler. sql/protocol.h: Update declarations. sql/repl_failsafe.cc: Use getters to access statement status information in THD. Rename net.last_error to net.client_last_error. sql/rpl_record.cc: Set an error message in prepare_record() if there is no default value for the field -- later we do print this message to the client. sql/rpl_rli.cc: Use getters to access statement status information in THD. sql/slave.cc: In create_table_from_dump() (a common function that is used in LOAD MASTER TABLE SQL statement and COM_LOAD_MASTER_DATA), instead of hacks with no_send_ok, clear the diagnostics area when mysql_rm_table() succeeded. Update has_temporary_error() to work correctly when no error is set. This is the case when Incident_log_event is executed: it always returns an error but does not set an error message. Use getters to access error status information. sql/sp_head.cc: Instead of hacks with no_send_error, work through the diagnostics area interface to suppress sending of OK/ERROR packets to the client. Move query_cache_end_of_result before log_slow_statement(), similarly to how it's done in dispatch_command(). sql/sp_rcontext.cc: Remove hacks with assignment of thd->net.report_error, they are not necessary any more (see the changes in mysqld.cc). sql/sql_acl.cc: Use getters to access error status information in THD. sql/sql_base.cc: Access thd->main_da.sql_errno() only if there is an error. This fixes a bug when auto-discovery, that was effectively disabled under pre-locking. sql/sql_binlog.cc: Remove hacks with no_send_ok/no_send_error, they are not necessary anymore: the caller is responsible for network communication. sql/sql_cache.cc: Disable sending of OK/ERROR/EOF packet in the end of dispatch_command if the response has been served from the query cache. This raises the question whether we should store EOF packet in the query cache at all, or generate it anew for each statement (we should generate it anew), but this is to be addressed separately. sql/sql_class.cc: Implement class Diagnostics_area. Please see comments in sql_class.h for details. Fix a subtle coding mistake in select_send::send_data: when on slave, an error in Item::send() was ignored. The problem became visible due to asserts that the diagnostics area is never double assigned. Remove initialization of removed NET members. In select_send::abort() do not call select_send::send_eof(). This is not inheritance-safe. Even if a stored procedure continue handler is found, the current statement is aborted, not succeeded. Instead introduce a Protocol API to send the required response, Protocol::end_partial_result_set(). This simplifies implementation of select_send::send_eof(). No need to add more asserts that there is no error, there is an assert inside Diagnostics_area::set_ok_status() already. Leave no trace of no_send_* in the code. sql/sql_class.h: Declare class Diagnostics_area. Remove the hack with no_send_ok from Substatement_state. Provide inline implementations of send_ok/send_eof. Add commetns. sql/sql_connect.cc: Remove hacks with no_send_error. Since now an error in THD is always set if net->error, it's not necessary to check both net->error and thd->is_error() in the do_command loop. Use thd->main_da.message() instead of net->last_errno. Remove the hack with is_slave_error in sys_init_connect. Since now we do not reset the diagnostics area in net_send_error (it's reset at the beginning of the next statement), we can access it safely even after execute_init_command. sql/sql_db.cc: Update the code to satisfy the invariant that the diagnostics area is never assigned twice. Incidentally, this fixes Bug 29958 "Weird message on DROP DATABASE if mysql.proc does not exist". sql/sql_delete.cc: Change multi-delete to abort in abort(), as per select_send protocol. Fixes the merge error with the test for Bug 29136 sql/sql_derived.cc: Use getters to access error information. sql/sql_insert.cc: Use getters to access error information. sql-common/client.c: Rename last_error to client_last_error, last_errno to client_last_errno. sql/sql_parse.cc: Remove hacks with no_send_error. Deploy net_end_statement(). The story of COM_SHUTDOWN is interesting. Long story short, the server would become on its death's door, and only no_send_ok/no_send_error assigned by send_ok()/net_send_error() would hide its babbling from the client. First of all, COM_QUIT does not require a response. So, the comment saying "Let's send a response to possible COM_QUIT" is not only groundless (even mysqladmin shutdown/mysql_shutdown() doesn't send COM_QUIT after COM_SHUTDOWN), it's plainly incorrect. Secondly, besides this additional 'OK' packet to respond to a hypothetical COM_QUIT, there was the following code in dispatch_command(): if (thd->killed) thd->send_kill_message(); if (thd->is_error() net_send_error(thd); This worked out really funny for the thread through which COM_SHUTDOWN was delivered: we would get COM_SHUTDOWN, say okay, say okay again, kill everybody, get the kill signal ourselves, and then attempt to say "Server shutdown in progress" to the client that is very likely long gone. This all became visible when asserts were added that the Diagnostics_area is not assigned twice. Move query_cache_end_of_result() to the end of dispatch_command(), since net_send_eof() has been moved there. This is safe, query_cache_end_of_result() is a no-op if there is no started query in the cache. Consistently use select_send interface to call abort() or send_eof() depending on the operation result. Remove thd->fatal_error() from reset_master(), it was a no-op. in hacks with no_send_error woudl save us from complete breakage of the client/server protocol. Consistently use select_send::abort() whenever there is an error, and select_send::send_eof() in case of success. The issue became visible due to added asserts. sql/sql_partition.cc: Always set an error in THD whenever there is a call to fatal_error(). sql/sql_prepare.cc: Deploy class Diagnostics_area. Remove the unnecessary juggling with the protocol in Select_fetch_protocol_binary::send_eof(). EOF packet format is protocol-independent. sql/sql_select.cc: Call fatal_error() directly in opt_sum_query. Call my_error() whenever we call thd->fatal_error(). sql/sql_servers.cc: Use getters to access error information in THD. sql/sql_show.cc: Use getters to access error information in THD. Add comments. Call my_error() whenever we call fatal_error(). sql/sql_table.cc: Replace hacks with no_send_ok with the interface of the diagnostics area. Clear the error if ENOENT error in ha_delete_table(). sql/sql_update.cc: Introduce multi_update::abort(), which is the proper way to abort a multi-update. This fixes the merge conflict between this patch and the patch for Bug 29136. sql/table.cc: Use a getter to access error information in THD. sql/tztime.cc: Use a getter to access error information in THD.
-
- 07 Dec, 2007 2 commits
-
-
unknown authored
mysql-test/r/grant.result: Update test results to .test changes mysql-test/t/grant.test: Drop users when done with them, to avoid skewing results of later tests. For example, running some test which examines the cardinality of the mysql.user table would fail if run right after this test, due to the extra users.
-
unknown authored
testing embedded server works correctly. mysql-test/r/create.result: Move one test from create.test to grant.test, because it actually tests privileges (and thus doesn't work with embedded server). mysql-test/r/grant.result: Move one test from create.test to grant.test, because it actually tests privileges (and thus doesn't work with embedded server). mysql-test/t/create.test: Move one test from create.test to grant.test, because it actually tests privileges (and thus doesn't work with embedded server). mysql-test/t/grant.test: Move one test from create.test to grant.test, because it actually tests privileges (and thus doesn't work with embedded server).
-
- 26 Nov, 2007 1 commit
-
-
unknown authored
Loading 4.1 into 5.0 or 5.1 failed silently because procs_priv table missing. This caused the server to crash on any attempt to store new grants because of uninitialized structures. This patch breaks up the grant loading function into two phases to allow for procs_priv table to fail with an warning instead of crashing the server. mysql-test/r/grant.result: Test case mysql-test/t/grant.test: Test case making sure that FLUSH PRIVILEGES doesn't crash the server if procs_priv is removed. sql/sql_acl.cc: - Refactored grant_reload into two phases: 1. open and lock tables_priv and columns_priv tables, read the data, close tables. 2. open and lock procs_priv, read data, close table. Since the tables are independant of each other there will be no race conditions and it will be possible to handle situations where the procs_priv table isn't present. - Refactored the helper function grant_load into new grant_load (without procs_priv table) and grant_load_procs_priv. sql/sql_parse.cc: - Changed comment style to doxygen style.
-
- 23 Oct, 2007 1 commit
-
-
unknown authored
CREATE TABLE IF NOT EXISTS ... SELECT let you insert into an existing table as long as you had the CREATE privilege. CREATE ... SELECT variants now always require INSERT privilege on target table. mysql-test/r/create.result: Show that CREATE...SELECT requires INSERT privilege on target table. mysql-test/r/grant.result: Sort output for a defined state. mysql-test/t/create.test: Show that CREATE...SELECT requires INSERT privilege on target table. mysql-test/t/grant.test: Sort output for a defined state. sql/sql_parse.cc: Require INSERT privilege on target table for CREATE ... SELECT.
-
- 20 Sep, 2007 1 commit
-
-
unknown authored
clean up SHOW GRANTS so it will show host-names with case as entered. make REVOKE and friends case-sensitive to make things more intuitive. Patch by Martin Friebe. mysql-test/r/grant.result: Bug#19828: Case sensitivity in hostname leads to inconsistent behavior clean up after test so random order of tests is possible mysql-test/r/grant3.result: Bug#19828: Case sensitivity in hostname leads to inconsistent behavior Show that REVOKE, SHOW GRANTS etc. are now consistently case-sensitive. mysql-test/t/grant.test: Bug#19828: Case sensitivity in hostname leads to inconsistent behavior clean up after test so random order of tests is possible mysql-test/t/grant3.test: Bug#19828: Case sensitivity in hostname leads to inconsistent behavior Show that REVOKE, SHOW GRANTS etc. are now consistently case-sensitive.
-
- 26 Jun, 2007 1 commit
-
-
unknown authored
Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/backup.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/events_bugs.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/events_trans.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/ndb_dd_basic.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/ndb_dd_ddl.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/ndb_gis.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/ndb_row_format.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_extraCol_innodb.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_extraCol_myisam.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_incident.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_ndb_extraCol.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_row_tabledefs_2myisam.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_row_tabledefs_3innodb.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_sp.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/select.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/show_check.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/sp.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/sp_gis.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/sp_trans.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/type_timestamp.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/warnings.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/xml.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/t/grant.test: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/t/partition_grant.test: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 sql/mysql_priv.h: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 sql/share/errmsg.txt: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1
-
- 01 Jun, 2007 2 commits
- 11 May, 2007 2 commits
-
-
unknown authored
Corrected test case for the bug#27878. mysql-test/t/grant.test: Corrected test case for the bug#27878. mysql-test/r/grant.result: Corrected test case for the bug#27878.
-
unknown authored
database. If a user has a right to update anything in the current database then the access was granted and further checks of access rights for underlying tables wasn't done correctly. The check is done before a view is opened and thus no check of access rights for underlying tables can be carried out. This allows a user to update through a view a table from another database for which he hasn't enough rights. Now the mysql_update() and the mysql_test_update() functions are forces re-checking of access rights after a view is opened. mysql-test/t/grant.test: Added a test case for the bug#27878: Unchecked privileges on a view referring to a table from another database. mysql-test/r/grant.result: Added a test case for the bug#27878: Unchecked privileges on a view referring to a table from another database. sql/sql_update.cc: Bug#27878: Unchecked privileges on a view referring to a table from another database. Now the mysql_update() function forces re-checking of access rights after the view is opened. sql/sql_prepare.cc: Bug#27878: Unchecked privileges on a view referring to a table from another database. Now the mysql_test_update() function forces re-checking of access rights after the view is opened.
-
- 24 Apr, 2007 1 commit
-
-
unknown authored
-
- 17 Apr, 2007 1 commit
-
-
unknown authored
Added missed DROP privilege check on the original table for RENAME TABLE command. mysql-test/r/grant.result: Fix for bug #27515: DROP previlege is not required anymore for RENAME TABLE - test result. mysql-test/t/grant.test: Fix for bug #27515: DROP previlege is not required anymore for RENAME TABLE - test case. sql/sql_parse.cc: Fix for bug #27515: DROP previlege is not required anymore for RENAME TABLE - added DROP privilege check on the original table for RENAME TABLE command.
-
- 13 Apr, 2007 1 commit
-
-
unknown authored
-
- 03 Apr, 2007 2 commits
-
-
unknown authored
client/mysqldump.c: fixed typo include/mysql_com.h: added new constants SYSTEM_CHARSET_MBMAXLEN, NAME_CHAR_LEN, USERNAME_CHAR_LENGTH increased NAME_LEN, USERNAME_LENGTH mysql-test/r/create.result: result fix mysql-test/r/grant.result: result fix mysql-test/r/mysql.result: result fix mysql-test/r/sp.result: result fix mysql-test/t/create.test: test case mysql-test/t/grant.test: test case sql/events.cc: NAME_LEN is replaced with NAME_CHAR_LEN sql/item_strfunc.h: fixed calculation of max_length sql/mysql_priv.h: check_string_length function is replaced with check_string_byte_length added new function check_string_char_length sql/sp.cc: NAME_LEN is replaced with NAME_CHAR_LEN sql/sp_head.cc: NAME_LEN is replaced with NAME_CHAR_LEN sql/sp_head.h: changed parameter of 'check_routine_name' function sql/sql_class.cc: NAME_LEN is replaced with NAME_CHAR_LEN sql/share/errmsg.txt: increased argument lengths according to new constants sql/sql_parse.cc: removed unnecessary checks added function 'check_string_char_length' sql/sql_plugin.cc: check that name is not longer than NAME_CHAR_LEN symbols sql/sql_show.cc: NAME_LEN is replaced with NAME_CHAR_LEN sql/sql_table.cc: check that key name is not longer than NAME_LEN symbols sql/sql_udf.cc: check that udf name is not longer than NAME_CHAR_LEN symbols sql/sql_yacc.yy: check that user name is not longer than USERNAME_CHAR_LENGTH symbols sql/table.cc: check that db or table or column name is not longer than NAME_LEN symbols storage/innobase/handler/ha_innodb.cc: removed unnecessary multiplication tests/mysql_client_test.c: NAME_LEN is replaced with NAME_CHAR_LEN
-
unknown authored
The problem was that THD::db_access variable was not restored after database switch in stored-routine-execution code. The fix is to restore THD::db_access in this case. Unfortunately, this fix requires additional changes, because in prepare_schema_table(), called on the parsing stage, we checked privileges. That was wrong according to our design, but this flaw haven't struck so far, because it was masked. All privilege checkings must be done on the execution stage in order to be compatible with prepared statements and stored routines. So, this patch also contains patch for prepare_schema_table(), which moves the checkings to the execution phase. mysql-test/r/grant.result: Updated result file. mysql-test/t/grant.test: Added test case for BUG#27337. sql/mysql_priv.h: Added function declaration. sql/sql_db.cc: Fix for BUG#27337 -- set THD::db_access even if we're called from stored-routine-execution code. sql/sql_parse.cc: Split prepare_schema_table() into two functions: - prepare_schema_table(), which is called from the parser (parsing stage); - check_show_access(), which is called on the execution stage. sql/sql_show.cc: Ignore schema_select_lex member if its table is NULL.
-
- 23 Mar, 2007 1 commit
-
-
unknown authored
make 'use database' okay. The problem was that we didn't check stored-routine privileges in check_grant_db(). The patch adds this check. mysql-test/r/grant.result: Update result file. mysql-test/r/sp-security.result: Update result fil. mysql-test/t/grant.test: Added test case for BUG#9504. mysql-test/t/sp-security.test: Update test. sql/sql_acl.cc: Check stored routines privileges.
-
- 24 Jan, 2007 1 commit
-
-
unknown authored
Added a test case for bug #6774 "Replication fails with Wrong usage of DB GRANT and GLOBAL PRIVILEGES"
-
- 04 Dec, 2006 1 commit
-
-
unknown authored
with other alterations causes lost tables Using RENAME clause combined with other clauses of ALTER TABLE led to data loss (the data was there but not accessible). This could happen if the changes do not change the table much. Adding and droppping of fields and indices was safe. Renaming a column with MODIFY or CHANGE was unsafe operation, if the actual column didn't change (changing from int to int, which is a noop) Depending on the storage engine (SE) the behavior is different: 1)MyISAM/MEMORY - the ALTER TABLE statement completes without any error but next SELECT against the new table fails. 2)InnoDB (and every other transactional table) - The ALTER TABLE statement fails. There are the the following files in the db dir - `new_table_name.frm` and a temporary table's frm. If the SE is file based, then the data and index files will be present but with the old names. What happens is that for InnoDB the table is not renamed in the internal DDIC. Fixed by adding additional call to mysql_rename_table() method, which should not include FRM file rename, because it has been already done during file names juggling. mysql-test/r/alter_table.result: update result mysql-test/r/grant.result: update result mysql-test/t/alter_table.test: 2006/11/29 11:46:23+01:00 andrey@example.com +44 -9 Error to bug number Added test case for #22369: Alter table rename combined with other alterations causes lost tables mysql-test/t/grant.test: add test for bug#22369 - alter table was missing check for DROP_ACL when ALTER_RENAME clause is specified. Synchronise with RENAME TABLE DDL. sql/mysql_priv.h: Add a new flag for mysql_rename_table() sql/sql_parse.cc: To be consistent with SQLCOM_RENAME_TABLE, SQLCOM_ALTER_TABLE has to check for DROP_ACL if there is ALTER_RENAME flag set. sql/sql_table.cc: ALTER_RENAME, the data and index files weren't renamed in the engine but only the FRM was new, when the tables old and new tables are compatible. In the chain of FRM renames we add a call to mysql_rename_table() which should instruct the engine to rename the table but not rename the FRM. This bug was there only in 5.1 branch. 4.1 and 5.0 always do copy data on RENAME if there are more clauses than just rename.
-
- 21 Nov, 2006 1 commit
-
-
unknown authored
- TRUNCATE requires DROP privilege, not DELETE mysql-test/r/grant.result: Bug #23556: TRUNCATE TABLE still maps to DELETE - test case mysql-test/r/trigger-grant.result: Bug #23556: TRUNCATE TABLE still maps to DELETE - updated test case mysql-test/t/grant.test: Bug #23556: TRUNCATE TABLE still maps to DELETE - test case mysql-test/t/trigger-grant.test: Bug #23556: TRUNCATE TABLE still maps to DELETE - updated test case
-
- 20 Nov, 2006 1 commit
-
-
unknown authored
(Mostly in DBUG_PRINT() and unused arguments) Fixed bug in query cache when used with traceing (--with-debug) Fixed memory leak in mysqldump Removed warnings from mysqltest scripts (replaced -- with #) BitKeeper/etc/ignore: added mysql-test/r/*.warnings BUILD/SETUP.sh: Don't build with BDB as default client/client_priv.h: Added OPT_DEBUG_INFO client/mysqlbinlog.cc: Fixed compiler warning client/mysqldump.c: Removed compiler warnings Added option --debug-info to detect memory leaks Fixed memory leak Don't backup cluster replication tables (if used with 5.1) cmd-line-utils/readline/bind.c: Fixed compiler warning cmd-line-utils/readline/chardefs.h: Fixed compiler warning cmd-line-utils/readline/complete.c: Fixed compiler warning cmd-line-utils/readline/display.c: Fixed compiler warning cmd-line-utils/readline/histexpand.c: Fixed compiler warning cmd-line-utils/readline/input.c: Fixed compiler warning cmd-line-utils/readline/isearch.c: Fixed compiler warning cmd-line-utils/readline/kill.c: Fixed compiler warning cmd-line-utils/readline/macro.c: Fixed compiler warning cmd-line-utils/readline/misc.c: Fixed compiler warning cmd-line-utils/readline/nls.c: Fixed compiler warning cmd-line-utils/readline/readline.c: Fixed compiler warning cmd-line-utils/readline/rltty.c: Fixed compiler warning cmd-line-utils/readline/search.c: Fixed compiler warning cmd-line-utils/readline/terminal.c: Fixed compiler warning cmd-line-utils/readline/text.c: Fixed compiler warning cmd-line-utils/readline/tilde.c: Fixed compiler warning cmd-line-utils/readline/undo.c: Fixed compiler warning cmd-line-utils/readline/util.c: Fixed compiler warning cmd-line-utils/readline/vi_mode.c: Fixed compiler warning dbug/dbug_analyze.c: Fixed compiler warning extra/yassl/src/ssl.cpp: Fixed compiler warning extra/yassl/testsuite/testsuite.cpp: Fixed compiler warning heap/_check.c: Fixed compiler warning heap/hp_delete.c: Fixed compiler warning heap/hp_hash.c: Fixed compiler warning heap/hp_open.c: Fixed compiler warning heap/hp_rkey.c: Fixed compiler warning heap/hp_rrnd.c: Fixed compiler warning heap/hp_write.c: Fixed compiler warning libmysql/libmysql.c: Fixed compiler warning libmysqld/libmysqld.c: Fixed compiler warning myisam/mi_close.c: Fixed compiler warning myisam/mi_delete.c: Fixed compiler warning myisam/mi_dynrec.c: Fixed compiler warning myisam/mi_keycache.c: Fixed compiler warning myisam/mi_page.c: Fixed compiler warning myisam/mi_statrec.c: Fixed compiler warning myisam/mi_test2.c: Fixed compiler warning myisam/mi_write.c: Fixed compiler warning myisam/myisampack.c: Fixed compiler warning myisammrg/myrg_extra.c: Fixed compiler warning mysql-test/mysql-test-run.pl: Remove .reject, .progress, .log and .warnings flag at start cluster -> mysql database (for 5.1) mysql-test/include/federated.inc: Remove mysqltest warnings mysql-test/include/sp-vars.inc: Remove mysqltest warnings mysql-test/mysql-test-run.sh: Fix so that 'make test' works again Remove .reject, .progress .log and .warnings files at startup mysql-test/r/ctype_cp1250_ch.result: Drop used tables at startup mysql-test/t/create.test: Remove mysqltest warnings mysql-test/t/csv.test: Remove mysqltest warnings mysql-test/t/ctype_collate.test: Remove mysqltest warnings mysql-test/t/ctype_cp1250_ch.test: Drop used tables at startup mysql-test/t/ctype_ucs.test: Remove mysqltest warnings mysql-test/t/func_sapdb.test: Remove mysqltest warnings mysql-test/t/func_str.test: Remove mysqltest warnings mysql-test/t/grant.test: Remove mysqltest warnings mysql-test/t/greedy_optimizer.test: Remove mysqltest warnings mysql-test/t/group_min_max.test: Remove mysqltest warnings mysql-test/t/innodb.test: Remove mysqltest warnings mysql-test/t/join.test: Remove mysqltest warnings mysql-test/t/limit.test: Remove mysqltest warnings mysql-test/t/null.test: Remove mysqltest warnings mysql-test/t/select.test: Remove mysqltest warnings mysql-test/t/sp-prelocking.test: Remove mysqltest warnings mysql-test/t/strict.test: Remove mysqltest warnings mysql-test/t/subselect.test: Remove mysqltest warnings mysql-test/t/type_newdecimal.test: Remove mysqltest warnings mysql-test/t/view_grant.test: Remove mysqltest warnings mysys/default.c: Fixed compiler warning mysys/hash.c: Fixed compiler warning mysys/list.c: Fixed compiler warning mysys/mf_iocache.c: Fixed compiler warning mysys/mf_keycache.c: Fixed compiler warning mysys/mf_keycaches.c: Fixed compiler warning mysys/my_alloc.c: Fixed compiler warning mysys/my_dup.c: Fixed compiler warning mysys/my_fopen.c: Fixed compiler warning mysys/my_fstream.c: Fixed compiler warning mysys/my_getwd.c: Fixed compiler warning mysys/my_handler.c: Fixed compiler warning Added missing enums in switch mysys/my_lib.c: Fixed compiler warning mysys/my_lread.c: Fixed compiler warning mysys/my_lwrite.c: Fixed compiler warning mysys/my_malloc.c: Fixed compiler warning mysys/my_pread.c: Fixed compiler warning mysys/my_read.c: Fixed compiler warning mysys/my_realloc.c: Fixed compiler warning mysys/my_seek.c: Fixed compiler warning mysys/my_write.c: Fixed compiler warning mysys/safemalloc.c: Fixed compiler warning mysys/thr_lock.c: Fixed compiler warning mysys/tree.c: Fixed compiler warning mysys/typelib.c: Fixed compiler warning ndb/include/logger/LogHandler.hpp: Changed SetErrorStr() to take const char* to remove compiler warnings (as many arguments to this are const strings) ndb/include/ndb_global.h.in: Added LINT_SET_PTR macro to be able to remove some compiler warnings ndb/include/util/InputStream.hpp: Fixed compiler warning ndb/include/util/OutputStream.hpp: Fixed compiler warning ndb/include/util/SimpleProperties.hpp: Fixed compiler warning ndb/src/common/debugger/EventLogger.cpp: remove if on 'signal' as this is a function pointer and is always true ndb/src/common/debugger/signaldata/BackupSignalData.cpp: Add missing enums ndb/src/common/logger/LogHandler.cpp: Changed SetErrorStr() to take const char* to remove compiler warnings (as many arguments to this are const strings) ndb/src/common/portlib/NdbMutex.c: Fixed compiler warning ndb/src/common/portlib/NdbThread.c: Fixed compiler warning ndb/src/common/transporter/Transporter.cpp: Swapped arguments to remove compiler warnings ndb/src/cw/cpcd/CPCD.hpp: Fixed compiler warning ndb/src/kernel/blocks/backup/Backup.cpp: Fixed compiler warning ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp: Fixed compiler warning ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Fixed compiler warning ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: Fixed compiler warning ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp: Added missing enums ndb/src/kernel/blocks/qmgr/QmgrMain.cpp: Fixed compiler warning ndb/src/kernel/error/ErrorReporter.cpp: Fixed compiler warning ndb/src/kernel/error/ErrorReporter.hpp: Fixed compiler warning ndb/src/kernel/error/ndbd_exit_codes.c: Fixed compiler warning ndb/src/kernel/vm/TransporterCallback.cpp: Fixed compiler warning ndb/src/mgmapi/mgmapi.cpp: Fixed compiler warning ndb/src/mgmclient/CommandInterpreter.cpp: Fixed compiler warning ndb/src/mgmsrv/MgmtSrvr.cpp: Fixed compiler warning ndb/src/mgmsrv/Services.cpp: Fixed compiler warning ndb/src/ndbapi/ClusterMgr.cpp: Fixed compiler warning ndb/src/ndbapi/DictCache.cpp: Fixed compiler warning ndb/src/ndbapi/Ndb.cpp: Fixed compiler warning ndb/src/ndbapi/NdbOperationDefine.cpp: Fixed compiler warning ndb/src/ndbapi/NdbOperationExec.cpp: Fixed compiler warning ndb/src/ndbapi/NdbOperationInt.cpp: Fixed compiler warning ndb/src/ndbapi/NdbOperationSearch.cpp: Fixed compiler warning ndb/src/ndbapi/NdbTransaction.cpp: Fixed compiler warning ndb/src/ndbapi/Ndbif.cpp: Fixed compiler warning ndb/src/ndbapi/Ndbinit.cpp: Fixed compiler warning ndb/src/ndbapi/ndb_cluster_connection.cpp: Fixed compiler warning ndb/tools/drop_index.cpp: Fixed compiler warning ndb/tools/drop_tab.cpp: Fixed compiler warning ndb/tools/ndb_config.cpp: Fixed compiler warning regex/regexec.c: Fixed compiler warning server-tools/instance-manager/mysql_connection.cc: Fixed compiler warning sql/Makefile.am: Fix for bison 1.875, which adds an attribute statement that gcc 4.1.0 can't parse sql/filesort.cc: Fixed compiler warning sql/ha_archive.cc: Fixed compiler warning sql/ha_federated.cc: Fixed compiler warning sql/ha_federated.h: Fixed compiler warning sql/ha_innodb.cc: Fixed compiler warning sql/ha_myisam.cc: Fixed compiler warning sql/ha_myisammrg.cc: Fixed compiler warning sql/ha_ndbcluster.cc: Fixed compiler warning sql/handler.cc: Fixed compiler warning sql/item_cmpfunc.cc: Fixed compiler warning sql/item_subselect.cc: Fixed compiler warning sql/item_timefunc.cc: Fixed compiler warning sql/log_event.cc: Fixed compiler warning sql/mysqld.cc: Fixed compiler warning sql/net_serv.cc: Fixed compiler warning sql/opt_range.cc: Fixed compiler warning Formated DBUG statements to be as rest of code sql/slave.cc: Fixed compiler warning sql/sql_acl.cc: Fixed compiler warning sql/sql_cache.cc: Fixed compiler warning Fixed bug in query cache when used with DBUG traceing sql/sql_class.cc: Fixed compiler warning sql/sql_class.h: Fixed compiler warning sql/sql_delete.cc: Fixed compiler warning sql/sql_parse.cc: Fixed compiler warning Hack to fix my_sprintf() strings with %b sql/sql_prepare.cc: Fixed compiler warning Hack to fix my_sprintf() strings with %b sql/sql_repl.cc: Fixed compiler warning sql/sql_select.cc: Fixed compiler warning sql/sql_update.cc: Fixed compiler warning sql/sql_view.cc: Fixed compiler warning sql/strfunc.cc: Fixed compiler warning sql-common/client.c: Fixed compiler warning sql-common/my_time.c: Fixed compiler warning sql/table.cc: Fixed compiler warning sql/tztime.cc: Fixed compiler warning sql/unireg.cc: Fixed compiler warning strings/decimal.c: Fixed compiler warning tests/mysql_client_test.c: Fixed compiler warning vio/viosocket.c: Fixed compiler warning vio/viossl.c: Fixed compiler warning vio/viosslfactories.c: Fixed compiler warning
-
- 30 Aug, 2006 1 commit
-
-
unknown authored
mysql-test/lib/mtr_process.pl: Apply manually the merge from 5.0 mysql-test/mysql-test-run.pl: Apply manually the merge from 5.0 mysql-test/r/grant.result: A post-merge fix. mysql-test/r/im_cmd_line.result: A post-merge fix. mysql-test/r/im_instance_conf.result: A post-merge fix. mysql-test/r/sp.result: A post-merge fix. mysql-test/t/grant.test: A post-merge fix. mysql-test/t/im_cmd_line.imtest: A post-merge fix. mysql-test/t/im_instance_conf.imtest: A post-merge fix. sql/field.cc: A post-merge fix. sql/item_cmpfunc.cc: A post-merge fix. sql/sp_head.cc: A post-merge fix. sql/sp_head.h: A post-merge fix.
-
- 29 Aug, 2006 2 commits
-
-
unknown authored
mysql-test/r/view.result: A post-merge fix. mysql-test/t/grant.test: A post-merge fix. mysql-test/t/view.test: A post-merge fix.
-
unknown authored
length limit", it's superseded by the fix for Bug#16899 "Possible buffer overflow in handling of DEFINER-clause". Update test results. mysql-test/r/grant.result: A post-merge fix. mysql-test/t/grant.test: A new error is returned, use the default database after drop database. sql/sql_acl.cc: Remove an unneeded check.
-
- 24 Aug, 2006 1 commit
-
-
unknown authored
User name (host name) has limit on length. The server code relies on these limits when storing the names. The problem was that sometimes these limits were not checked properly, so that could lead to buffer overflow. The fix is to check length of user/host name in parser and if string is too long, throw an error. mysql-test/r/grant.result: Updated result file. mysql-test/r/sp.result: Updated result file. mysql-test/r/trigger.result: Updated result file. mysql-test/r/view.result: Updated result file. mysql-test/t/grant.test: Added test for BUG#16899. mysql-test/t/sp.test: Added test for BUG#16899. mysql-test/t/trigger.test: Added test for BUG#16899. mysql-test/t/view.test: Added test for BUG#16899. sql/mysql_priv.h: Added prototype for new function. sql/sql_acl.cc: Remove outdated checks. sql/sql_parse.cc: Add a new function for checking string length. sql/share/errmsg.txt: Added new resources. sql/sql_yacc.yy: Check length of user/host name.
-
- 23 Aug, 2006 1 commit
-
-
unknown authored
User name (host name) has limit on length. The server code relies on these limits when storing the names. The problem was that sometimes these limits were not checked properly, so that could lead to buffer overflow. The fix is to check length of user/host name in parser and if string is too long, throw an error. mysql-test/r/grant.result: Updated result file. mysql-test/r/sp.result: Updated result file. mysql-test/r/trigger.result: Updated result file. mysql-test/r/view.result: Updated result file. mysql-test/t/grant.test: Added test for BUG#16899. mysql-test/t/sp.test: Added test for BUG#16899. mysql-test/t/trigger.test: Added test for BUG#16899. mysql-test/t/view.test: Added test for BUG#16899. sql/mysql_priv.h: Added prototype for new function. sql/share/errmsg.txt: Added new resources. sql/sql_acl.cc: Remove outdated checks. sql/sql_parse.cc: Add a new function for checking string length. sql/sql_yacc.yy: Check length of user/host name.
-
- 11 Aug, 2006 1 commit
-
-
unknown authored
-
- 03 Aug, 2006 2 commits
-
-
unknown authored
"A SELECT privilege on a view is required for SHOW CREATE VIEW and it will stay that way because of compatibility reasons." (see #20136) a test case to illustrate how the ACLs work in this case (and ensure they will continue to do so in the future) mysql-test/r/grant.result: Bug#20214: Incorrect error when user calls SHOW CREATE VIEW on non privileged view a test case to illustrate how the ACLs work in this case (and ensure they will continue to do so in the future) mysql-test/t/grant.test: Bug#20214: Incorrect error when user calls SHOW CREATE VIEW on non privileged view a test case to illustrate how the ACLs work in this case (and ensure they will continue to do so in the future)
-
unknown authored
privileges This problem is 4.1 specific. It doesn't affect 4.0 and was fixed in 5.x before. Having any mysql user who is allowed to issue multi table update statement and any column/table grants, allows this user to update any table on a server (mysql grant tables are not exception). check_grant() accepts number of tables (in table list) to be checked in 5-th param. While checking grants for multi table update, number of tables must be 1. It must never be 0 (actually we have DBUG_ASSERT(number > 0) in 5.x in grant_check() function). mysql-test/r/grant.result: Addition to test case for bug#7391: - Added grant statement to trigger this problem in 4.1. - Fixed error messages. mysql-test/t/grant.test: Addition to test case for bug#7391: - Added grant statement to trigger this problem in 4.1. - Fixed error messages. sql/sql_update.cc: check_grant() accepts number of tables (in table list) to be checked in 5-th param. For this particular check number of tables must be 1. It must never be 0 (actually we have DBUG_ASSERT(number > 0) in 5.x in grant_check() function).
-
- 24 Jul, 2006 1 commit
-
-
unknown authored
This appears to have just been an oversight -- CREATE USER was not enforcing the existing username limitations. mysql-test/r/grant.result: Add new results mysql-test/t/grant.test: Add new regression test sql/sql_acl.cc: Enforce the user and host name limits in mysql_create_user().
-
- 06 Jun, 2006 1 commit
-
-
unknown authored
Add define YASSL_PREFIX when compiling yassl Import patch from yaSSL - avoid allocating memory for each call to 'EVP_md5' and 'EVP_des_ede3_cbc' which were not released until server was stopped - Those functions are used from the SQL function 'des_encrypt' and 'des_decrypt'. Add new define YASSL_PREFIX beforee including ssl.h to activate inclusion of prefix_*.h files Bug#20022 mysql-test-run can't be run with secure connections turned on for all testcases - Part 1, fixes rpl- and federated-tests where connection is made to 127.0.0.1 - Include prefix files that renames all public functions in yaSSLs OpenSSL API to ya<function_name>. They will otherwise conflict with OpenSSL functions if loaded by an application that uses OpenSSL as well as libmysqlclient with yaSSL support. Bug#18235: assertion/crash when windows mysqld is ended with ctrl-c Two threads both try a shutdown sequence which creates a race to the de-init/free of certain resources. This exists in similar form in the client as 17926: "mysql.exe crashes when ctrl-c is pressed in windows." Update after merge to 5.0 BUG#18669: Session COM_STATISTICS breaks mysqladmin status. Changed COM_STATISTICS to display the global status, instead of thead status, for slow queries and table opens. - In function 'handle_grant_struct' when searching the memory structures for an entry to modify, convert all entries here host.hostname is NULL to "" and compare that with the host passed in argument "user_from". - A user created with hostname "" is stored in "mysql.user" table as host="" but when loaded into memory it'll be stored as host.hostname NULL. Specifiying "" as hostname means that "any host" can connect. Thus is's correct to turn on allow_all_hosts when such a user is found. - Review and fix other places where host.hostname may be NULL. BUG#19394 OPT_INNODB_THREAD_CONCURRENCY duplicated Removed duplication (not a user-visible change) client/Makefile.am: Remove $yassl_includes client/mysqltest.c: Turn on ssl_verify_server_cert only if host is "localhost" extra/yassl/include/openssl/crypto.h: Add prefix file for ssl.h extra/yassl/include/openssl/ssl.h: Add include file "prefix_crypto.h" to rename SSL_* functions to yaSSL_* extra/yassl/include/yassl_int.hpp: Import patch yassl.diff extra/yassl/src/Makefile.am: Add defined YASSL_PREFIX when building yassl/testsuite extra/yassl/src/ssl.cpp: Import patch yassl.diff extra/yassl/src/template_instnt.cpp: Import patch yassl.diff extra/yassl/src/yassl_int.cpp: Import patch yassl.diff extra/yassl/testsuite/Makefile.am: Add defined YASSL_PREFIX when building yassl/testsuite extra/yassl/yassl.vcproj: Add define YASSL_PREFIX when compiling yassl include/violite.h: Add new define YASSL_PREFIX beforee including ssl.h to activate inclusion of prefix_*.h files libmysql/Makefile.am: Remove yassl_includes libmysql_r/Makefile.am: Remove yassl_includes libmysqld/Makefile.am: Remove yassl_includes libmysqld/examples/Makefile.am: Remove yassl_includes mysql-test/r/analyze.result: Add missing drop table mysql-test/r/grant.result: Reorder test result Add test cases for users with hostname "" mysql-test/r/ps.result: Add missing drop table mysql-test/t/analyze.test: Add missing drop table mysql-test/t/grant.test: Add "use test" Add test cases for users with hostname "" - Test create, grant and drop as well as connecting as the user with hostname "". mysql-test/t/ps.test: Add missing drop table server-tools/instance-manager/Makefile.am: Remove yassl_includes sql/Makefile.am: Remove yassl_includes sql/mysqld.cc: We have three potential ways of hitting the iceberg: - unireg_end() has basic de-init - unireg_abort() has extended de-init - main() has a de-init sequence similar to unireg_abort() In the Windows version of the server, Control-C is handled in a different thread from the one main() is in. The main loop is told to end, then unireg_abort() is called. Its de-init and that of main() will then race each other for mutex- and cond-var-destroys, free(), and finally exit(). This patch introduces a special case for Windows that will eliminate the race by ending the signal-handler via unireg_end() instead if SIGINT is signalled. This seems the least intrusive fix that still fixes user-visible behaviour. Two of the startup options for mysqld, innodb_commit_concurrency and innodb_thread_concurrency, were using the same enumeration value. Changed to give innodb_commit_concurrency it's own value. sql/sql_acl.cc: Add check if host is NULL Add check if grant_name->host.hostname is null Convert places where host.hostname is NULL to "" before using it. sql/sql_parse.cc: Calculate and display the global statistics. vio/Makefile.am: Remove yassl_includes extra/yassl/include/openssl/generate_prefix_files.pl: New BitKeeper file ``extra/yassl/include/openssl/generate_prefix_files.pl'' extra/yassl/include/openssl/prefix_crypto.h: New BitKeeper file ``extra/yassl/include/openssl/prefix_crypto.h'' extra/yassl/include/openssl/prefix_ssl.h: New BitKeeper file ``extra/yassl/include/openssl/prefix_ssl.h''
-
- 29 May, 2006 1 commit
-
-
unknown authored
mysql-test/r/grant.result: Reorder test result mysql-test/t/grant.test: Add "use test" sql/sql_acl.cc: Add check if host is NULL Add check if grant_name->host.hostname is null
-