mysql-test/r/profiling.result:
Remove unnecessary verbosity.
Remove section of test that is impossible to test with PS protocol.
mysql-test/t/profiling.test:
Remove unnecessary verbosity.
Remove section of test that is impossible to test with PS protocol.
sql/sql_profile.h:
Make bit flags unsigned ints.
be profiled separately.
Expand the time formats in i_s.profiling to wide enough for larger
numbers.
mysql-test/r/profiling.result:
Show that each query inside a procedure is profiled separately.
mysql-test/t/profiling.test:
Show that each query inside a procedure is profiled separately.
sql/sp_head.cc:
Poke profiling into stored-procedure code. For statement parts only
of routines, process them as profilable discrete queries.
sql/sql_profile.cc:
Encode decimal size correctly.
read.
Do not store profiling information when there is no query text. We
don't wish to capture non-COM_QUERY packets.
sql/sql_parse.cc:
Start profiling immediately after a command packet is read from
the network.
sql/sql_profile.cc:
Do not store items for which there is no query, i.e., protocol API
calls (non-COM_QUERY) and such.
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-forcollapseandmerge
sql/ha_ndbcluster.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
sql/sql_parse.cc:
Manual merge.
sql/sql_select.cc:
Manual merge.
Between 5.0 and 5.1, the step of incrementing the global query id
changed, which broke how the profiler noticed when a new query had
started. That reset the state list and caused all but the last
five (or so) states to be thrown away.
Now, don't watch for query_id changes in the lower level.
Add a bogus state change at the end of profiling so that the last
real state change is timed.
Emit source reference for the start of the span of time instead of
the end of it.
mysql-test/r/profiling.result:
Add a test that shows continuation of execution with multi-statement
packets.
mysql-test/t/profiling.test:
Add a test that shows continuation of execution with multi-statement
packets.
sql/sql_parse.cc:
Insert profiling calls at beginnings and ends of each query.
Remove the old way of keeping or discarding profiles, and flipping
to new query profiles.
sql/sql_profile.cc:
No longer use the thread's query_id to determine when we flip
to a new statement.
Some status statements are set to be NULL in the server. We don't
log those, as it doesn't fit this style of profiling yet.
Rewrite the parser code to be more active and legible.
Relying on passive/lazy discovery of new queries was buggy.
Add a bogus status change before ending a profile, so that the
previous real status has a endpoint.
Emit source reference of the start of the span-of-time instead of
the end of it.
sql/sql_profile.h:
Store the server_query_id at instantiation time for a new query.
Rewrite the parser code to be more active. Relying on passive/lazy
discovery of new queries was buggy.
Name first state to more honestly describe the state. We don't
really know of initialization that will follow.
sql/sql_show.cc:
Update comment to note the decidedly weird field_length behavior
on Decimal types in information_schema.
loose index scan enabled for subqueries
mysql-test/r/group_min_max.result:
Bug #31974: test case updates
loose index scan enabled for subqueries
mysql-test/r/index_merge_myisam.result:
Bug #31974: test case updates
loose index scan enabled for subqueries
into lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-rt-merge
sql/handler.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/sql_update.cc:
Auto merged
The fix for bug 31148 is not correct. It does not
have a relation to the problem described in this bug.
And removing the fix will not make the bug to re-appear.
Fixed the bug #31974 by removing the fix for bug 31148
and adding a test case.
mysql-test/r/key.result:
Bug #31974: test case
mysql-test/t/key.test:
Bug #31974: test case
sql/sql_select.cc:
Bug #31974: revert the fix for bug 31148
Adding check that the user executing a BINLOG statement has SUPER
privileges and aborting execution of the statement with an error
otherwise.
mysql-test/r/mysqlbinlog.result:
Result change.
mysql-test/t/mysqlbinlog.test:
Adding test that generates a BINLOG command for inserting data into a
table and feed the BINLOG statement into the database as an untrusted
user. Also checking that insertion into the table fails for that user
and that the table only contain a single line: the original one inserted.
sql/sql_binlog.cc:
Adding a check that the executor of the BINLOG command has
SUPER privileges and give an error and abort execution if not.
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1
CMakeLists.txt:
Auto merged
configure.in:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
that affect profiling.
mysql-test/r/information_schema.result:
Merge fixed. This result moved to a new file.
sql/sql_parse.cc:
Include profiling in statistics.
Add hook for SHOW_PROFILE in execution.
sql/sql_profile.cc:
Move/add the FEATURE_DISABLED warning to the I_S filling func.
Fix merge, where a new member was added to ST_FIELD_INFO.
orig_sql_command method was removed from Lex structure.
sql/sql_show.cc:
Fix merge problem.
sql/sql_yacc.yy:
orig_sql_command member removed from Lex structure in 5.1 .
error evaluating WHERE"
DELETE with a subquery in WHERE clause would sometimes ignore subquery
evaluation error and proceed with deletion.
The fix is to check for an error after evaluation of the WHERE clause
in DELETE.
Addressed review comments.
mysql-test/r/group_min_max.result:
Update the test results to reflect the fix for Bug#32030.
mysql-test/r/ps.result:
Update test results (Bug#32030)
mysql-test/t/group_min_max.test:
Update the test case to reflect the fix for Bug#32030
mysql-test/t/ps.test:
Add a test case for Bug#32030
sql/sql_delete.cc:
Check for an error before calling send_ok(). Two different places are
covered because the subquery code has slightly different execution
paths depending on ps-protocol/old-protocol
If a stored function that contains a drop temporary table statement
is invoked by a create temporary table of the same name may cause
a server crash. The problem is that when dropping a table no check
is done to ensure that table is not being used by some outer query
(or outer statement), potentially leaving the outer query with a
reference to a stale (freed) table.
The solution is when dropping a temporary table, always check if
the table is being used by some outer statement as a temporary
table can be dropped inside stored procedures.
The check is performed by looking at the TABLE::query_id value for
temporary tables. To simplify this check and to solve a bug related
to handling of temporary tables in prelocked mode, this patch changes
the way in which this member is used to track the fact that table is
used/unused. Now we ensure that TABLE::query_id is zero for unused
temporary tables (which means that all temporary tables which were
used by a statement should be marked as free for reuse after it's
execution has been completed).
mysql-test/include/handler.inc:
Add test case for side effect of Bug#30882
mysql-test/r/handler_innodb.result:
Add test case result for side effect of Bug#30882
mysql-test/r/handler_myisam.result:
Add test case result for side effect of Bug#30882
mysql-test/r/sp-error.result:
Add test case result for Bug#30882
mysql-test/t/sp-error.test:
Add test case for Bug#30882
sql/event_db_repository.cc:
Update close_thread_tables call, no more default values.
sql/mysql_priv.h:
Remove implicit default parameters values of the close_thread_tables
function as no callers are using it.
sql/slave.cc:
Update close_thread_tables call, no more default values
sql/sp_head.cc:
Update close_thread_tables call, no more default values
sql/sql_base.cc:
Changed the approach to distinguishing currently unused temporary tables.
Now we ensure that such tables always have TABLE::query_id set to 0 and
use this fact to perform checks during opening and dropping of temporary
tables. This means that we have to call close_thread_tables() even for
statements which use only temporary tables. To make this call cheaper,
we re-factored close_thread_tables() to not take LOCK_open unless there
are open base tables.
sql/sql_handler.cc:
Properly close temporary tables associated with a handler.
sql/sql_insert.cc:
close_temporary_table is now merged into drop_temporary_table.
sql/sql_parse.cc:
Now the condition doesn't cover all cases because close_thread_tables()
must be called even for statements that use only temporary tables.
sql/sql_table.cc:
Use drop_temporary_table which perform checks to verify if
the table is not being used. Error path problem is due to
a handler tables issue and is going to be addressed in bug
31397.
sql/table.h:
Rename previously unused clear_query_id and document the usage of
query_id and open_by_handler.
The mysql_change_user command fails to properly update the database pointer
when no database is selected, leading to "use after free" errors. The same
happens on the user privilege pointer in the thread security context.
The solution is to properly reset and update the database name. Also update
the user_priv pointer so that it doesn't point to freed memory.
sql/sql_connect.cc:
After a successful call to check_user() without specifying a new
database name, the previous database thd->db) is freed but the
pointer is not updated to NULL.
sql/sql_parse.cc:
Update the security_ctx->priv_user pointer as it is a alias for
the user security_ctx->user pointer. Also remove unneeded cast,
the x_free macro casts the argument.
there is nothing to recover.
Discovered while working on Bug#12713
sql/sql_table.cc:
Use MYF(0) in my_open() in read_ddl_log_header() called from
execute_ddl_log_recovery() called during the server start up to not
generate an error if no ddl log exists. This is not an erroneous situation,
in fact it's the case in any server statrtup. The error was lost
anyway, since it was pushed into the stack of the artificial thd.
error in mysql_create_frm instead of
direct access to my_error() members.
This is a pre-requisite for the patch for Bug#12713.
sql/unireg.cc:
Use Internal_error_handler mechanism to silence ER_TOO_MANY_FIELDS
error in mysql_create_frm instead of
direct access to my_error() members.
in evaluate_join_record().
A minor cleanup required for the fix for Bug#12713.
sql/sql_select.cc:
Use thd->is_error() instead of direct access to thd->net.report_error
in evaluate_join_record()
Fix uninitialized variable causing failures for some interpreted update
operations on gcc 4.2.1.
ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
Fix uninitialized variable causing failures for some interpreted update
operations on gcc 4.2.1.
storage/ndb/test/include/dbutil.hpp:
Hearder file for SQL Database Utilities class for adding MySQL SQL abilities to NDB API tests cases.
storage/ndb/test/src/dbutil.cpp:
Implementation file for SQL Database Utilities class for adding MySQL SQL abilities to NDB API tests cases.
storage/ndb/test/src/Makefile.am:
Updated to include dbutil