includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
- Changed output to be error "error-text" instead of error - error-text
extra/perror.c:
Move my_handler_errors.h into include
include/my_handler_errors.h:
Move my_handler_errors.h into include
mysql-test/r/errors.result:
Updated result
mysql-test/r/innodb_mysql_sync.result:
Updated result
mysql-test/r/myisam-system.result:
Updated result
mysql-test/r/myisampack.result:
Updated result
mysql-test/r/partition_innodb_plugin.result:
Updated result
mysql-test/r/ps_1general.result:
Updated result
mysql-test/r/trigger.result:
Updated result
mysql-test/r/type_bit.result:
Updated result
mysql-test/r/type_bit_innodb.result:
Updated result
mysql-test/r/type_blob.result:
Updated result
mysql-test/suite/archive/archive.result:
Updated result
mysql-test/suite/binlog/r/binlog_index.result:
Updated result
mysql-test/suite/binlog/r/binlog_ioerr.result:
Updated result
mysql-test/suite/csv/csv.result:
Updated result
mysql-test/suite/engines/iuds/r/type_bit_iuds.result:
Updated result
mysql-test/suite/federated/federated_bug_35333.result:
Updated result
mysql-test/suite/innodb/r/innodb-create-options.result:
Updated result
mysql-test/suite/innodb/r/innodb-index.result:
Updated result
mysql-test/suite/innodb/r/innodb-zip.result:
Updated result
mysql-test/suite/innodb/r/innodb.result:
Updated result
mysql-test/suite/innodb/r/innodb_bug13635833.result:
Updated result
mysql-test/suite/innodb/r/innodb_bug21704.result:
Updated result
mysql-test/suite/innodb/r/innodb_bug46000.result:
Updated result
mysql-test/suite/parts/r/partition_bit_innodb.result:
Updated result
mysql-test/suite/parts/r/partition_bit_myisam.result:
Updated result
mysql-test/suite/percona/percona_innodb_fake_changes.result:
Updated result
mysql-test/suite/perfschema/r/misc.result:
Updated result
mysql-test/suite/perfschema/r/privilege.result:
Updated result
mysql-test/suite/rpl/r/rpl_EE_err.result:
Updated result
mysql-test/suite/rpl/r/rpl_binlog_errors.result:
Updated result
mysql-test/suite/rpl/r/rpl_drop_db.result:
Updated result
sql/share/errmsg-utf8.txt:
Removed 'column' from error text that was used in different context
strings/my_vsnprintf.c:
Move my_handler_errors.h into include
Minor cleanups
Changed output of %M to be error "error-text" instead of error - error-text
unittest/mysys/my_vsnprintf-t.c:
Updated error text
- Adding %M my_sprintf() modifier that prints error number - system-error-text
- Modified mysys, mysql_client and SQL error messages to use %M instead of %d
- Added my_strerror()
Updated handler errors to 5.6 error numbers
Updated text for a few error messages (to match 5.6)
Increased length of command name in error output
extra/comp_err.c:
Added support for %M
include/my_base.h:
Updated handler errors to 5.6 error numbers
include/my_sys.h:
Added my_strerror()
libmysql/errmsg.c:
Updated error messages to use %M
mysql-test/r/errors.result:
Updated result as error message have changed
mysql-test/r/innodb_mysql_sync.result:
Updated result with text for errno
mysql-test/r/myisam-system.result:
Updated result with text for errno
mysql-test/r/myisam.result:
Updated result as error message have changed
mysql-test/r/myisampack.result:
Updated result with text for errno
mysql-test/r/mysql.result:
Updated result with text for errno
mysql-test/r/mysql_upgrade.result:
Updated result with text for errno
mysql-test/r/partition_datatype.result:
Updated result as error message have changed
mysql-test/r/partition_innodb_plugin.result:
Updated result with text for errno
mysql-test/r/ps_1general.result:
Updated result with text for errno
mysql-test/r/trigger.result:
Updated result with text for errno
mysql-test/r/type_bit.result:
Updated result as error message have changed
mysql-test/r/type_bit_innodb.result:
Updated result as error message have changed
mysql-test/r/type_blob.result:
Updated result as error message have changed
mysql-test/suite/archive/archive.result:
Updated result with text for errno
mysql-test/suite/binlog/r/binlog_index.result:
Updated result with text for errno
mysql-test/suite/binlog/r/binlog_ioerr.result:
Updated result with text for errno
mysql-test/suite/csv/csv.result:
Updated result with text for errno
mysql-test/suite/federated/federated_bug_35333.result:
Updated result with text for errno
mysql-test/suite/innodb/r/innodb-create-options.result:
Updated result with text for errno
mysql-test/suite/innodb/r/innodb-index.result:
Updated result with text for errno
mysql-test/suite/innodb/r/innodb-zip.result:
Updated result as error message have changed
mysql-test/suite/innodb/r/innodb.result:
Updated result with text for errno
mysql-test/suite/innodb/r/innodb_bug21704.result:
Updated result with text for errno
mysql-test/suite/innodb/r/innodb_bug46000.result:
Updated result with text for errno
mysql-test/suite/innodb/r/innodb_bug53591.result:
Updated result as error message have changed
mysql-test/suite/innodb/r/innodb_corrupt_bit.result:
New error numbers
mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result:
Updated result as error message have changed
mysql-test/suite/innodb/t/innodb-create-options.test:
Added regexp to avoid system error text
mysql-test/suite/innodb/t/innodb-zip.test:
Added regexp to avoid system error text
mysql-test/suite/maria/maria-recovery2.result:
Updated supression rule
mysql-test/suite/maria/maria-recovery2.test:
Updated supression rule
mysql-test/suite/maria/maria.result:
Updated result as error message have changed
mysql-test/suite/parts/r/partition_bit_innodb.result:
Updated result as error message have changed
mysql-test/suite/parts/r/partition_bit_myisam.result:
Updated result as error message have changed
mysql-test/suite/percona/percona_innodb_fake_changes.result:
Updated result with text for errno
mysql-test/suite/perfschema/r/dml_cond_instances.result:
Updated result as error message have changed
mysql-test/suite/perfschema/r/dml_events_waits_current.result:
Updated result as error message have changed
mysql-test/suite/perfschema/r/dml_events_waits_history.result:
Updated result as error message have changed
mysql-test/suite/perfschema/r/dml_events_waits_history_long.result:
Updated result as error message have changed
mysql-test/suite/perfschema/r/dml_ews_by_instance.result:
Updated result as error message have changed
mysql-test/suite/perfschema/r/dml_ews_by_thread_by_event_name.result:
Updated result as error message have changed
mysql-test/suite/perfschema/r/dml_ews_global_by_event_name.result:
Updated result as error message have changed
mysql-test/suite/perfschema/r/dml_file_instances.result:
Updated result as error message have changed
mysql-test/suite/perfschema/r/dml_file_summary_by_event_name.result:
Updated result as error message have changed
mysql-test/suite/perfschema/r/dml_file_summary_by_instance.result:
Updated result as error message have changed
mysql-test/suite/perfschema/r/dml_mutex_instances.result:
Updated result as error message have changed
mysql-test/suite/perfschema/r/dml_performance_timers.result:
Updated result as error message have changed
mysql-test/suite/perfschema/r/dml_rwlock_instances.result:
Updated result as error message have changed
mysql-test/suite/perfschema/r/dml_threads.result:
Updated result as error message have changed
mysql-test/suite/perfschema/r/misc.result:
Updated result with text for errno
mysql-test/suite/perfschema/r/privilege.result:
Updated result with text for errno
mysql-test/suite/rpl/r/rpl_EE_err.result:
Updated result with text for errno
mysql-test/suite/rpl/r/rpl_binlog_errors.result:
Updated result with text for errno
mysql-test/suite/rpl/r/rpl_drop_db.result:
Updated result with text for errno
mysys/errors.c:
Updated error messages to use %M
Changed all errors to use Errcode: consistenly
mysys/my_handler_errors.h:
Updated handler errors to 5.6 error numbers
sql/share/errmsg-utf8.txt:
Updated error messages to use %M
sql/sys_vars.cc:
Added error number to ER_EVENT_SET_VAR_ERROR
strings/my_vsnprintf.c:
Added %M my_sprintf() modifier that prints error number - system-error-text
Simplify code
Movied common code to function
Removed some casts that was not necessary when reading integer/unsigned int stored in longlong
Added my_strerror()
unittest/mysys/my_vsnprintf-t.c:
Added testing of %M
* rename all debugging related command-line options
and variables to start from "debug-", and made them all
OFF by default.
* replace "MySQL" with "MariaDB" in error messages
* "Cast ... converted ... integer to it's ... complement"
is now a note, not a warning
* @@query_cache_strip_comments now has a session scope,
not global.
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
- Set the default
- Adjust the testcases so that 'new' tests are run with optimizations turned on.
- Pull out relevant tests from "irrelevant" tests and run them with optimizations on.
- Run range.test and innodb.test with both mrr=on and mrr=off
- "Using MRR" is no longer shown with range access.
- Instead, both range and BKA accesses will show one of the following:
= "Rowid-ordered scan"
= "Key-ordered scan"
= "Key-ordered Rowid-ordered scan"
depending on whether DS-MRR implementation will do scan keys in order, rowids in order,
or both.
- The patch also introduces a way for other storage engines/MRR implementations to
pass information to EXPLAIN output about the properties of employed MRR scans.
The task is to
(a) add a comment on indexes and
(b) increase the maximum length of column, table and the new index comments.
The patch committed on behalf of Yoshinori Matsunobu (Yoshinori.Matsunobu@Sun.COM).
WL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface"
WL#2475 "Batched range read functions for MyISAM/InnoDb"
"Index condition pushdown for MyISAM/InnoDB"
Igor's fix from sp1r-igor@olga.mysql.com-20080330055902-07614:
There could be observed the following problems:
1. EXPLAIN did not mention pushdown conditions from on expressions in the
'extra' column. As a result if a query had no where conditions pushed
down to a table, but had on conditions pushed to this table the 'extra'
column in the EXPLAIN for the table missed 'using where'.
2. Conditions for ref access were not eliminated from on expressions
though such conditions were eliminated from the where condition.
Text conflict in mysql-test/collections/default.experimental
Text conflict in mysql-test/r/show_check.result
Text conflict in mysql-test/r/sp-code.result
Text conflict in mysql-test/suite/binlog/r/binlog_tmp_table.result
Text conflict in mysql-test/suite/rpl/t/disabled.def
Text conflict in mysql-test/t/show_check.test
Text conflict in mysys/my_delete.c
Text conflict in sql/item.h
Text conflict in sql/item_cmpfunc.h
Text conflict in sql/log.cc
Text conflict in sql/mysqld.cc
Text conflict in sql/repl_failsafe.cc
Text conflict in sql/slave.cc
Text conflict in sql/sql_parse.cc
Text conflict in sql/sql_table.cc
Text conflict in sql/sql_yacc.yy
Text conflict in storage/myisam/ha_myisam.cc
Corrected results for
stm_auto_increment_bug33029.reject 2009-12-01
20:01:49.000000000 +0300
<andrei> @@ -42,9 +42,6 @@
<andrei> RETURN i;
<andrei> END//
<andrei> CALL p1();
<andrei> -Warnings:
<andrei> -Note 1592 Statement may not be safe to log in statement
format.
<andrei> -Note 1592 Statement may not be safe to log in statement
format.
There should be indeed no Note present because there is in fact autoincrement
top-level query in sp() that triggers inserting in yet another auto-inc table.
(todo: alert DaoGang to improve the test).
To-number conversion warnings work differenly with CHAR
and VARCHAR sp variables.
The original revision-IDs are:
staale.smedseng@sun.com-20081124095339-2qdvzkp0rn1ljs30staale.smedseng@sun.com-20081125104611-rtxic5d12e83ag2o
The patch provides ER_TRUNCATED_WRONG_VALUE warning messages
for conversion of VARCHAR to numberic values, in line with
messages provided for CHAR conversions. Conversions are
checked for success, and the message is emitted in case
failure.
The tests are amended to accept the added warning messages,
and explicit conversion of ON/OFF values is added for
statements checking system variables. In test
rpl.rpl_switch_stm_row_mixed checking for warnings is
temporarily disabled for one statement, as this generates
warning messages for strings that vary between executions.
sql/field.cc:
The pushing of the truncation warning is now done in a
separate static function, and used in various places.
* Finished Monty and Jani's merge
* Some InnoDB tests still fail (because it's old xtradb code run against
newer testsuite). They are expected to go after mergning with the latest
xtradb.
- Added a handler call (prepare_index_scan()) to inform storage engines that an index scan is about to take place.
- Extended the maximun key parts for an index from 16 to 32
- Extended MyISAM and Maria engines to support up to 32 parts
Added checks for return value from ha_index_init()
include/my_handler.h:
Extended number of key parts for MyISAM and Maria from 16 to 32
include/my_pthread.h:
Ensure we always have 256M of stack.
(Required to be able to handle the current number of keys and key parts in MyISAM)
mysql-test/r/create.result:
Extended to test for 32 key parts
mysql-test/r/myisam.result:
Test that we can create 32 but not 33 key parts
mysql-test/r/ps_1general.result:
Length of ref is now 2048 as we can have more key parts
mysql-test/r/ps_2myisam.result:
Length of ref is now 2048 as we can have more key parts
mysql-test/r/ps_3innodb.result:
Length of ref is now 2048 as we can have more key parts
mysql-test/r/ps_4heap.result:
Length of ref is now 2048 as we can have more key parts
mysql-test/r/ps_5merge.result:
Length of ref is now 2048 as we can have more key parts
mysql-test/suite/maria/r/maria.result:
Max key length is now 1208 bytes
mysql-test/suite/maria/r/maria3.result:
Max key length is now 1208 bytes
mysql-test/suite/maria/r/ps_maria.result:
Max key length is now 1208 byte
mysql-test/t/create.test:
Extended to test for 32 key parts
mysql-test/t/myisam.test:
Test that we can create 32 but not 33 key parts
sql/handler.cc:
Check return value from ha_index_init()
sql/handler.h:
Added a handler call (prepare_index_scan()) to inform storage engines that an index scan is about to take place.
sql/sql_select.cc:
Checks all return values from ha_index_init()
Call prepare_index_scan()) to inform storage engines that an index scan is about to take place.
Fixed indentation
sql/table.cc:
Fixed wrong types for key_length (rest of code assumed this was 32 bit)
sql/unireg.h:
Extended the maximun key parts for an index from 16 to 32
storage/maria/ha_maria.cc:
Don't allocate HA_CHECK on the stack in functions where we call repair() as HA_CHECK is HUGE and will overflow stack
storage/myisam/ha_myisam.cc:
Don't allocate HA_CHECK on the stack in functions where we call repair() as HA_CHECK is HUGE and will overflow stack
storage/myisam/mi_check.c:
Fixed wrong check if value overflow
tests/mysql_client_test.c:
Added fflush() to fix output in case of error
Fixed wrong check of 'ref' length in EXPLAIN
Length value is the length of the field,
Max_length is the length of the field value.
So Max_length can not be more than Length.
The fix: fixed calculation of the Item_empty_string item length
(Patch applied and queued on demand of Trudy/Davi.)
sql/item.h:
fixed calculation of the item length
sql/sql_show.cc:
removed unnecessary code
WL#4165 Prepared statements: validation
WL#4166 Prepared statements: automatic re-prepare
Fixes
Bug#27430 Crash in subquery code when in PS and table DDL changed after PREPARE
Bug#27690 Re-execution of prepared statement after table was replaced with a view crashes
Bug#27420 A combination of PS and view operations cause error + assertion on shutdown
The basic idea of the patch is to keep track of table metadata between
prepared statement prepare and execute. If some table used in the statement
has changed, the prepared statement is re-prepared before execution.
See WL#4165 and WL#4166 contents and comments in the code for details
of the implementation.
include/my_global.h:
Remove 'register' keyword to avoid warnings when swapping large structures
that don't fit into a register. Any modern compiler is capable of placing
a variable in a register when that would benefit performance.
mysql-test/r/ps_1general.result:
Update test results: since now we re-prepare automatically,
more correct results are produced in prepare-ddl-execute scenario.
mysql-test/r/query_cache_merge.result:
Ensure that the table definition cache is large enough for
the test to pass in --ps-protocol
mysql-test/r/trigger.result:
Update test results to reflect automatic statement reprepare.
mysql-test/t/disabled.def:
Enable ps_ddl.test, which now passes.
mysql-test/t/ps_1general.test:
Since now we re-execute prepared statements after DDL successfully,
change the test to produce repeatable results. Remove expectancy of
an error in one place where now we automatically reprepare the prepared
statement.
mysql-test/t/query_cache_merge.test:
Ensure the table definition cache is large enough for the test to pass
in --ps-protocol
mysql-test/t/trigger.test:
Sinc
sql/item.cc:
Implement Item_param "copy" functionality, used at re-prepare of
a prepared statement.
We copy the type of the original parameter, and move the assigned value,
if any. Sic, the value is "moved", since it can be quite big --
e.g. in case we deal with a LONG DATA parameter.
It's essential to move the value from the old parameter since
at the time of re-prepare the client packet with the necessary information
may be not available.
sql/item.h:
Declare a new method used for reprepare.
sql/my_decimal.h:
Implement "swap()" functionality of class my_decimal to be
able to easily swap two decimal values.
sql/mysql_priv.h:
Declare enum_metadata_type.
sql/mysqld.cc:
Implement a status variable for the number of reprepared statements.
sql/sql_base.cc:
Implement metadata version validation.
sql/share/errmsg.txt:
Add two new error messages: ER_NEED_REPREPARE and ER_PS_REBIND.
The first error (theoretically) never reaches the user.
It is issued by the metadata validation framework when a metadata version
has changed between prepare and execute. Later on it's intercepted
and the statement is automatically re-prepared. Only if the error
has occurred repeatedly MAX_REPREPARE_ATTEMTS (3) times do we
return it to the user.
The second error is issued when after re-prepare we discover
that the metadata we sent over to the client using the binary
protocol differs drammatically from the new result set metadata
that the reprepared statement produces (e.g. number of result
set columns is different).
sql/sql_class.cc:
Implement metadata version validation framework.
sql/sql_class.h:
Declarations for metadata version validation framework.
sql/sql_parse.cc:
Mark commands for which we must invalidate and reprepare a prepared
statement when metadata has changed.
sql/sql_prepare.cc:
Implement WL#4165 and WL#4166 (limited support of metadata validation
and re-prepare).
sql/table.h:
Implement metadata validation.
tests/mysql_client_test.c:
Add a test case for WL#4166
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
mysql-test/r/alter_table.result:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/ctype_collate.result:
Auto merged
mysql-test/r/ctype_recoding.result:
Auto merged
mysql-test/r/default.result:
Auto merged
mysql-test/r/gis.result:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/key.result:
Auto merged
mysql-test/r/mysql.result:
Auto merged
mysql-test/r/ps_1general.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/type_enum.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/r/show_check.result:
manual merge
mysql-test/t/information_schema.test:
manual merge
sql/sql_show.cc:
manual merge
added get_field_default_value() function which obtains default value from the field
(used in store_create_info() & get_schema_column_record() functions)
mysql-test/r/alter_table.result:
result fix
mysql-test/r/create.result:
result fix
mysql-test/r/ctype_collate.result:
result fix
mysql-test/r/ctype_recoding.result:
result fix
mysql-test/r/default.result:
result fix
mysql-test/r/gis.result:
result fix
mysql-test/r/grant.result:
result fix
mysql-test/r/information_schema.result:
result fix
mysql-test/r/key.result:
result fix
mysql-test/r/mysql.result:
result fix
mysql-test/r/ps_1general.result:
result fix
mysql-test/r/show_check.result:
result fix
mysql-test/r/sp.result:
result fix
mysql-test/r/type_enum.result:
result fix
mysql-test/r/type_ranges.result:
result fix
mysql-test/t/information_schema.test:
test case
into bodhi.(none):/opt/local/work/mysql-5.1-runtime
mysql-test/r/ps_1general.result:
Auto merged
mysql-test/r/ps_2myisam.result:
Auto merged
mysql-test/r/ps_3innodb.result:
Auto merged
mysql-test/r/ps_4heap.result:
Auto merged
mysql-test/r/ps_5merge.result:
Auto merged
BitKeeper/deleted/.del-ps_6bdb.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
sql/handler.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_error.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/show_check.result:
Manual merge.
mysql-test/t/show_check.test:
Manual merge.
sql/item.h:
Manual merge.
sql/sp.cc:
Manual merge.
sql/sql_trigger.cc:
Manual merge.
tests/mysql_client_test.c:
Manual merge.
mysql-test/r/ps_1general.result:
Update result file.
mysql-test/r/ps_2myisam.result:
Update result file.
mysql-test/r/ps_3innodb.result:
Update result file.
mysql-test/r/ps_4heap.result:
Update result file.
mysql-test/r/ps_5merge.result:
Update result file.
tests/mysql_client_test.c:
Fix test -- after field changing character set to utf8 in the server,
length should be calculated differently.
into adventure.(none):/home/thek/Development/cpp/bug28846/my51-bug28846
mysql-test/r/ps_1general.result:
Auto merged
mysql-test/r/sp-dynamic.result:
Auto merged
mysql-test/r/sp-error.result:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
mysql-test/t/sp-error.test:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Manual merge 5.0->5.1
ALTER VIEW is currently not supported as a prepared statement
and should be disabled as such as they otherwise could cause server crashes.
ALTER VIEW is currently not supported when called from stored
procedures or functions for related reasons and should also be disabled.
This patch disables these DDL statements and adjusts the appropriate test
cases accordingly.
Additional tests has been added to reflect on the fact that we do support
CREATE/ALTER/DROP TABLE for Prepared Statements (PS), Stored Procedures (SP)
and PS within SP.
mysql-test/r/ps_1general.result:
- Updated test to reflect on the new policy to disallow ALTER VIEW within SP.
mysql-test/r/sp-dynamic.result:
- Added PS ALTER TABLE test from within SP-context to demonstrate that CREATE/ALTER/DROP
TABLE statements is working.
- Added PS CREATE/ALTER/DROP VIEW tests from within SP-context to show that
ALTER VIEW is not supported, CREATE VIEW/DROP VIEW are supported.
mysql-test/r/sp-error.result:
- Updated test to reflect on the new policy to disallow VIEW DDL within SP.
mysql-test/t/ps_1general.test:
- Updated test to reflect on the new policy to disallow VIEW DDL within SP.
mysql-test/t/sp-dynamic.test:
- Add PS ALTER TABLE test from within SP to demonstrate that CREATE/ALTER/DROP
TABLE statements are supported.
mysql-test/t/sp-error.test:
- Updated test to reflect on the new policy to disallow ALTER VIEW
within SP-context.
- Changed error code 1314 to the more abstract ER_SP_BADSTATEMENT.
sql/sql_class.h:
- Added comment for clarity
sql/sql_parse.cc:
- Added comment for clarity
sql/sql_prepare.cc:
- Disallow ALTER VIEW as prepared statements until they are
properly supported. Note that SQLCOM_CREATE_VIEW also handles ALTER VIEW
statements.
sql/sql_view.cc:
- converted to doxygen comments
- Added comment for clarity
sql/sql_yacc.yy:
- Disallow ALTER VIEW statements within a SP.
If the parser is operating within the SP context, this is shown
on the sp->sphead pointer. If this flag is set for view DDL operations
we stop parsing with the error 'ER_SP_BAD_STATEMENT'.
into vajra.(none):/opt/local/work/mysql-5.1-runtime
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/ps_1general.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
sql/sql_insert.cc:
SCCS merged
into vajra.(none):/opt/local/work/mysql-5.1-runtime
mysql-test/r/ps.result:
Auto merged
mysql-test/r/ps_1general.result:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/sql_prepare.cc:
Manual merge.
by moving yet another relevant flag to it from struct LEX.
mysql-test/r/ps.result:
Update result.
mysql-test/r/ps_1general.result:
Update result.
mysql-test/t/ps.test:
New error code.
mysql-test/t/ps_1general.test:
New error code.
sql/sql_lex.cc:
Move stmt_prepare_mode to Lex_input_stream.
sql/sql_lex.h:
Move stmt_prepare_mode to class Lex_input_stream
sql/sql_prepare.cc:
Move stmt_prepare_mode to Lex_input_stream
sql/sql_yacc.yy:
Remove dead code.
"Server Variables for Plugins"
Implement support for plugins to declare server variables.
Demonstrate functionality by removing InnoDB specific code from sql/*
New feature for HASH - HASH_UNIQUE flag
New feature for DYNAMIC_ARRAY - initializer accepts preallocated ptr.
Completed support for plugin reference counting.
include/hash.h:
New flag for HASH
HASH_UNIQUE
include/my_getopt.h:
New data types for options: ENUM and SET.
Use typelib to enumerate possible values.
New flag variable:
my_getopt_skip_unknown
include/my_sys.h:
change to DYNAMIC_ARRAY init functions to support pre-allocated buffers
include/mysql.h:
relocate inclusion of typelib due to longlong requirement
include/mysql/plugin.h:
wl2936
New declarations for plugin server variable support.
New functions for use by plugins
include/mysys_err.h:
new my_getopt return value: EXIT_ARGUMENT_INVALID
include/typelib.h:
new typelib function: find_typeset(), returns an int which is a SET of
the elements in the typelib
mysql-test/r/im_utils.result:
change to more specific command line settings
--skip-innodb => --skip-plugin-innodb
etc.
mysql-test/r/log_tables.result:
set default storage engine to MEMORY so that test will succeed even
when some of the other named storage engines are not present
mysql-test/r/ndb_dd_basic.result:
change in error message
mysql-test/r/partition_innodb.result:
change in results
mysql-test/r/ps_1general.result:
bdb doesn't exist, use myisam for a non-transactional engine
mysql-test/r/variables.result:
information schema doesn't sort row results for server variables.
mysql-test/t/log_tables.test:
set default storage engine to MEMORY so that test will succeed even
when some of the other named storage engines are not present
mysql-test/t/ndb_dd_basic.test:
ALTER LOGFILE GROUP no longer silently fail here
mysql-test/t/partition_innodb.test:
ALTER TABLE no longer silently fails for unknown storage engine
mysql-test/t/ps_1general.test:
remove unneccessary parts
use myisam as it is an always present non-transactional engine
mysql-test/t/variables.test:
information schema doesn't sort row results for server variables.
mysql-test/t/warnings_engine_disabled-master.opt:
use the new style command line option
mysys/array.c:
change to DYNAMIC_ARRAY init functions to support pre-allocated buffers
mysys/hash.c:
New flag for HASH
HASH_UNIQUE
Implement HASH_UNIQUE functionality by performing a hash_search
mysys/my_getopt.c:
New data types for options: ENUM and SET.
Use typelib to enumerate possible values.
New flag variable:
my_getopt_skip_unknown
mysys/typelib.c:
new typelib function: find_typeset(), returns an int which is a SET of
the elements in the typelib
sql/ha_ndbcluster.cc:
use ha_statistic_increment() method instead of
statistic_increment() function
ha_ndbcluster variable has gone away.
sql/ha_partition.cc:
fix for reference counting
sql/ha_partition.h:
fix for reference counting
sql/handler.cc:
fixes for reference counting
sql/handler.h:
fixes for reference counting
some new methods to aid storage engine writers
sql/item_func.cc:
find_sys_var() function now requires thd
sql/item_sum.cc:
fixes for ref counting
sql/mysql_priv.h:
remove unneccessary globals.
new lock: LOCK_system_variables_hash
sql/mysqld.cc:
Remove InnoBase specific code.
Support plugin command line processing.
sql/set_var.cc:
Remove InnoBase specific declarations
Remove redundant declarations
changes to permit new variables at run time
changes for ref counting
sql/set_var.h:
changes to permit new variables at run time
changes for ref counting
sql/sql_base.cc:
changes for ref counting
sql/sql_cache.cc:
mark code as needing work in the future
sql/sql_class.cc:
new functions to aid plugin authors
initialize variables for dynamic plugin variables
sql/sql_class.h:
remove InnoBase specific declarations
New declarations for plugin variables.
sql/sql_connect.cc:
initialization and cleanup of plugin variables
sql/sql_delete.cc:
change for ref counting
sql/sql_insert.cc:
change for ref counting
sql/sql_lex.cc:
changes for ref counting and plugin variables
sql/sql_lex.h:
add properties for plugin ref counting,
add to distructor to clean up
sql/sql_partition.cc:
changes for ref counting
sql/sql_plugin.cc:
WL2936
Plugin Variables
New methods and code to support server variables for plugins.
New code to complete plugin reference counting
Debug code adds further indirection so that malloc debugging can be
used to aid finding plugin ref count leaks
sql/sql_plugin.h:
WL2936
Plugin Variables
New methods and code to support server variables for plugins.
New code to complete plugin reference counting
Debug code adds further indirection so that malloc debugging can be
used to aid finding plugin ref count leaks
sql/sql_repl.cc:
replication system variables moved here from set_var.cc
sql/sql_repl.h:
new function to initialise replication server variables
sql/sql_select.cc:
changes for ref counting
sql/sql_show.cc:
changes for ref counting
sql/sql_table.cc:
changes for ref counting
sql/sql_tablespace.cc:
use supplied functions instead of digging into data structures manually
sql/sql_yacc.yy:
changes for ref counting
find_sys_var() now requires thd parameter
changes on reporting errors to keep user-visible behaviour the same.
sql/structs.h:
changes for ref counting
sql/table.cc:
changes for ref counting
sql/table.h:
changes for ref counting
storage/federated/ha_federated.cc:
use ha_statistic_increment() method instead of statistic_increment()
function
storage/heap/ha_heap.cc:
use ha_statistic_increment() method instead of statistic_increment()
function
storage/innobase/handler/ha_innodb.cc:
use ha_statistic_increment() method instead of statistic_increment()
function
WL2936
Move InnoBase specific code out of mysqld.cc and into here
Declare all required server variables for InnoBase
storage/innobase/include/trx0trx.h:
store a bit more state so that InnoBase does not have to dig into
mysqld internal data structures.
storage/myisam/ha_myisam.cc:
use ha_statistic_increment() method instead of statistic_increment()
function
storage/myisammrg/ha_myisammrg.cc:
use ha_statistic_increment() method instead of statistic_increment()
function
Before this fix, the command SHOW ENGINE <name> STATUS would:
- print a warning if the engine name is unknown,
- proceed and implement the same behavior as SHOW ENGINE ALL STATUS,
and list the status of all the storage engines registered.
In particular, this behavior caused confusion about the command :
SHOW ENGINE MUTEX STATUS, which as a side effect would print the status
of the innodb engine when that engine is registered.
Also, before this fix, every time an unknown engine name was substituted by
the default engine (which happen unless SQL_MODE NO_ENGINE_SUBSTITUTION is
set), a malformed warning was raised.
For example, the command ALTER TABLE T1 ENGINE = X would print :
Warnings:
Error 1286 Unknown table engine 'X'
With this fix:
SHOW ENGINE <name> STATUS|LOGS|MUTEX
always fails with an error when the engine <name> is unknown.
For other commands, warnings about unknown engines are raised as:
Warnings:
Warning 1286 Unknown table engine 'X'
In other words, engine substitution never affect the SHOW ENGINE command,
since this would lead to very confusing results.
mysql-test/r/ndb_dd_basic.result:
Warnings for unknown engines.
mysql-test/r/partition_innodb.result:
Warnings for unknown engines.
mysql-test/r/ps_1general.result:
Fixed SHOW ENGINE <name> STATUS|LOGS|MUTEX
mysql-test/r/show_check.result:
Fixed SHOW ENGINE <name> STATUS|LOGS|MUTEX
mysql-test/t/ps_1general.test:
Fixed SHOW ENGINE <name> STATUS|LOGS|MUTEX
mysql-test/t/show_check.test:
Fixed SHOW ENGINE <name> STATUS|LOGS|MUTEX
sql/sql_yacc.yy:
Fixed SHOW ENGINE <name> STATUS|LOGS|MUTEX
Moved .progress files into the log directory
Moved 'cluster' database tables into the MySQL database, to not have 'cluster' beeing a reserved database name
Fixed bug where mysqld got a core dump when trying to use a table created by MySQL 3.23
Fixed some compiler warnings
Fixed small memory leak in libmysql
Note that this doesn't changeset doesn't include the new mysqldump.c code required to run some tests. This will be added when I merge 5.0 to 5.1
client/client_priv.h:
Added OPT_DEBUG_INFO and OPT_COLUMN_TYPES
client/mysql.cc:
Split --debug-info into --debug-info and --column-type-info
client/mysql_upgrade.c:
Give only error info at end if using --debug-info
client/mysqladmin.cc:
Added --debug-info to detect memory leaks in mysqltest
client/mysqlbinlog.cc:
Added --debug-info to detect memory leaks in mysqltest
client/mysqlcheck.c:
Added --debug-info to detect memory leaks in mysqltest
client/mysqlimport.c:
Added --debug-info to detect memory leaks in mysqltest
client/mysqlshow.c:
Added --debug-info to detect memory leaks in mysqltest
client/mysqltest.c:
Added --debug-info to detect memory leaks in mysqltest
Added option --logdir to force .progress files in a specific directory
libmysql/libmysql.c:
Fixed memory leak
mysql-test/include/ndb_setup_slave.inc:
Moved cluster tables under 'mysql'
mysql-test/include/query_cache.inc:
Added more tests for query cache
mysql-test/lib/init_db.sql:
Move cluster.binlog_index -> mysql.binlog_index
mysql-test/lib/mtr_report.pl:
Find memory leaks
mysql-test/mysql-test-run-shell.sh:
Added --debug-info to programs to detect memory leaks
mysql-test/mysql-test-run.pl:
Added --debug-info to programs to detect memory leaks
Force log files to var/log
cluster tables moved under 'mysql'
mysql-test/r/cache_innodb.result:
New query cache test with innodb
mysql-test/r/connect.result:
binlog_index is now in mysql
mysql-test/r/drop.result:
Removed 'cluster' database
mysql-test/r/information_schema.result:
Removed 'cluster' database
mysql-test/r/mysqlcheck.result:
cluster.binlog_index -> mysql.binlog_index
mysql-test/r/ndb_binlog_basic.result:
cluster.binlog_index -> mysql.binlog_index
mysql-test/r/ndb_binlog_ddl_multi.result:
cluster -> mysql
mysql-test/r/ndb_binlog_discover.result:
cluster -> mysql
mysql-test/r/ndb_binlog_multi.result:
cluster -> mysql
mysql-test/r/ndb_restore_compat.result:
cluster -> mysql
mysql-test/r/ps_1general.result:
Removed cluster database
mysql-test/r/rpl_create_database.result:
Removed cluster database
mysql-test/r/rpl_load_from_master.result:
Removed cluster database
mysql-test/r/rpl_loaddata_m.result:
Removed cluster database
mysql-test/r/rpl_ndb_bank.result:
cluster -> mysql
mysql-test/r/rpl_ndb_dd_advance.result:
cluster -> mysql
mysql-test/r/rpl_ndb_dd_basic.result:
cluster -> mysql
mysql-test/r/rpl_ndb_idempotent.result:
cluster -> mysql
mysql-test/r/rpl_ndb_log.result:
cluster -> mysql
mysql-test/r/rpl_ndb_multi.result:
cluster -> mysql
mysql-test/r/rpl_ndb_sync.result:
cluster -> mysql
mysql-test/r/rpl_row_basic_11bugs.result:
Removed cluster database
mysql-test/r/rpl_truncate_7ndb.result:
Position have changed
mysql-test/r/rpl_truncate_7ndb_2.result:
cluster -> mysql
mysql-test/r/schema.result:
Removed cluster database
mysql-test/r/show_check.result:
Removed cluster database
mysql-test/r/system_mysql_db.result:
binlog_index moved under mysql
mysql-test/r/upgrade.result:
More tests
mysql-test/t/information_schema.test:
cluster -> mysql
mysql-test/t/mysqldump.test:
More test to detect memory leaks
mysql-test/t/ndb_binlog_basic.test:
cluster -> mysql
mysql-test/t/ndb_binlog_multi.test:
cluster -> mysql
mysql-test/t/ndb_restore_compat.test:
cluster -> mysql
mysql-test/t/rpl_ndb_bank.test:
cluster -> mysql
mysql-test/t/rpl_ndb_dd_advance.test:
cluster -> mysql
mysql-test/t/rpl_ndb_idempotent.test:
cluster -> mysql
mysql-test/t/rpl_ndb_multi.test:
cluster -> mysql
mysql-test/t/rpl_ndb_sync.test:
cluster -> mysql
mysql-test/t/system_mysql_db_fix.test:
Drop also binlog_index
mysql-test/t/upgrade.test:
Check that tables created with 3.23 works
mysys/my_error.c:
Remove all registered errors (to avoid memory leaks)
mysys/my_init.c:
call my_error_unregister_all() to avoid some possible memory leaks
mysys/mysys_priv.h:
Added prototype
scripts/mysql_create_system_tables.sh:
cluster -> mysql
scripts/mysql_fix_privilege_tables.sql:
Changed -- to #
Create binlog_index table if it dosesn't exist
sql/field.cc:
Made offset() inline
sql/field.h:
Changed prototype of offset() to not make it depending on TABLE structure
sql/field_conv.cc:
Removed some usage of current_thd
sql/ha_ndbcluster_tables.h:
cluster -> mysql
sql/item_sum.cc:
Usage of new 'offset' parameters
sql/key.cc:
Changed 'find_ref_key' to not be dependent on field->table
(This fixed a crash when using a table created in MySQL 3.23)
sql/mysql_priv.h:
Changed find_ref_key() to not use field->table
sql/mysqld.cc:
Fix that plugin_init() works properly on bootstrap
(Previously we got warnings from plugin_init)
sql/sql_class.cc:
new 'field->offset()'
sql/sql_select.cc:
New field->offset()
sql/table.cc:
We don't need field->table to be set in find_ref_key() or find_field() anymore.
storage/archive/ha_archive.cc:
New field->offset()
storage/federated/ha_federated.cc:
New field->offset()
storage/innobase/handler/ha_innodb.cc:
Fixed compiler warnings
storage/myisam/ha_myisam.cc:
Fixed compiler warnings (Wrong paramter to sprintf())
New field->offset()
storage/myisam/ha_myisam.h:
Fixed wrong type of table_flags
storage/ndb/tools/restore/Restore.cpp:
Fixed compiler warning
mysql-test/r/1st.result:
New BitKeeper file ``mysql-test/r/1st.result''
mysql-test/std_data/old_table-323.frm:
New BitKeeper file ``mysql-test/std_data/old_table-323.frm''
mysql-test/t/1st.test:
New BitKeeper file ``mysql-test/t/1st.test''
should work in Prepared Statements. Post-review changeset.
Problem: There are some commands which are avaiable to be executed in SP
but cannot be prepared. This patch fixes this and makes it possible
prepare these statements.
Changes: The commands later are made available in PS. RESET has been forbidden
in SF/Trigger.
Solution: All current server commands where checked and those missing (see later)
we added. Tests for all of the commands with repeated executions were
added - testing with SP, SF and PS.
SHOW BINLOG EVENTS
SHOW (MASTER | SLAVE) STATUS
SHOW (MASTER | BINARY) LOGS
SHOW (PROCEDURE | FUNCTION) CODE (parsable only in debug builds)
SHOW CREATE (PROCEDURE | FUNCTION | EVENT | TABLE | VIEW)
SHOW (AUTHORS | CONTRIBUTORS | WARNINGS | ERRORS)
CHANGE MASTER
RESET (MASTER | SLAVE | QUERY CACHE)
SLAVE (START | STOP)
CHECKSUM (TABLE | TABLES)
INSTALL PLUGIN
UNINSTALL PLUGIN
CACHE INDEX
LOAD INDEX INTO CACHE
GRANT
REVOKE
KILL
(CREATE | RENAME | DROP) DATABASE
(CREATE | RENAME | DROP) USER
FLUSH (TABLE | TABLES | TABLES WITH READ LOCK | HOSTS | PRIVILEGES |
LOGS | STATUS | MASTER | SLAVE | DES_KEY_FILE | USER_RESOURCES)
mysql-test/r/ps.result:
update result
mysql-test/r/ps_1general.result:
update result
mysql-test/r/ps_grant.result:
update result
mysql-test/r/sp-dynamic.result:
update result
mysql-test/t/ps.test:
Add more statements, probably all currently missing which are possible in
a SP but not preparable.
Every statement is tested in a SP, in a SF and attempted to prepare.
mysql-test/t/ps_1general.test:
- Enable some of the statements, which are already possible in SP.
- 1295 -> ER_UNSUPPORTED_PS
mysql-test/t/ps_grant.test:
Enable statements already possible in SP.
sql/sp_head.cc:
- Reorder to keep some alphabet order.
- Add missing SHOW_SCHEDULER_STATUS.
sql/sql_prepare.cc:
Add possibility to prepare statements, which are already allowed in SP.
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-merge
client/mysql.cc:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
mysys/my_open.c:
Auto merged
BitKeeper/deleted/.del-make_win_src_distribution.sh~f80d8fca44e4e5f1:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/time.cc:
Auto merged
client/mysqltest.c:
Manual merge.
mysql-test/r/ps_1general.result:
Manual merge.
running)
I decided to make ps_1general test independent from actual number of
threads running
mysql-test/r/ps_1general.result:
result fixed
mysql-test/t/ps_1general.test:
as i think we don't really care about the number of threads running
i just replace the number with '#'
drop users at the end of events_stress
mysql-test/r/ps_1general.result:
update result
mysql-test/r/skip_name_resolve.result:
update result
mysql-test/r/sp_notembedded.result:
update result
mysql-test/r/status.result:
update result
mysql-test/t/events_stress.test:
drop users created in the test
into mysql.com:/home/dlenev/mysql-5.1-merges
VC++Files/mysql.sln:
Auto merged
VC++Files/mysys/mysys.vcproj:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/r/ps_1general.result:
Auto merged
mysql-test/r/timezone2.result:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/tztime.cc:
Auto merged
sql/tztime.h:
Auto merged
tests/Makefile.am:
Auto merged
tests/mysql_client_test.c:
Auto merged
supported in SP but not in PS": just enable them in prepared
statements, the supporting functionality was implemented when
they were enabled in stored procedures.
mysql-test/r/ps.result:
Bug#19308: test results fixed.
mysql-test/r/ps_1general.result:
Adjust existing test cases (ANALYZE/OPTIMIZE/REPAIR are now
allowed in prepared statements.
mysql-test/r/sp-dynamic.result:
Adjust existing test cases (ANALYZE/OPTIMIZE/REPAIR are now
allowed in prepared statements.
mysql-test/t/ps.test:
Add a test case for Bug#19308 "REPAIR/OPTIMIZE/ANALYZE supported
in SP but not in PS"
mysql-test/t/ps_1general.test:
Adjust existing test cases (ANALYZE/OPTIMIZE/REPAIR are now
allowed in prepared statements.
sql/sql_prepare.cc:
Enable ANALYZE, OPTIMIZE, REPAIR in prepared statements.