SHOW CREATE PROCEDURE and SHOW CREATE FUNCTION are fixed as well as
INFORMATION_SCHEMA.ROUTINES.ROUTINE_NAME.
mysql-test/r/information_schema.result:
Add result for bug#20230.
mysql-test/t/information_schema.test:
Add test case for bug#20230.
sql/sp_head.cc:
Return NULL for routine definition if the user doesn't have enough
privilege to see it.
sql/sql_show.cc:
Make INFORMATION_SCHEMA.ROUTINES.ROUTINE_NAME NULL-able. Return
NULL if the user doesn't have enough privilege to see routine
definition.
Re-apply a patch by Knielsen in the 5.0.23 build clone: Replace port number by "SLAVE_PORT".
mysql-test/r/federated.result:
Re-apply a patch by Knielsen in the 5.0.23 build clone: Replace port number by "SLAVE_PORT".
mysql-test/t/federated.test:
Re-apply a patch by Knielsen in the 5.0.23 build clone: Replace port number by "SLAVE_PORT".
into mysql.com:/opt/local/work/mysql-5.0-merge
mysql-test/r/func_sapdb.result:
Auto merged
mysql-test/t/func_sapdb.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
mysql-test/r/func_time.result:
Manual merge.
mysql-test/t/func_time.test:
Manual merge.
Table comment: issue a warning(error in traditional mode) if length of comment > 60 symbols
Column comment: issue a warning(error in traditional mode) if length of comment > 255 symbols
Table 'comment' is changed from char* to LEX_STRING
mysql-test/r/strict.result:
test case
mysql-test/t/strict.test:
test case
sql/handler.h:
Table 'comment' is changed from char* to LEX_STRING
sql/sql_show.cc:
Table 'comment' is changed from char* to LEX_STRING
sql/sql_table.cc:
Table 'comment' is changed from char* to LEX_STRING
sql/sql_yacc.yy:
Table 'comment' is changed from char* to LEX_STRING
sql/table.cc:
Table 'comment' is changed from char* to LEX_STRING
sql/table.h:
Table 'comment' is changed from char* to LEX_STRING
sql/unireg.cc:
Fix for bug#13934 Silent truncation of table comments
Table comment: issue a warning(error in traditional mode) if length of comment > 60 symbols
Column comment: issue a warning(error in traditional mode) if length of comment > 255 symbols
user name is calculated on function execution stage instead of parse stage
mysql-test/r/sp_notembedded.result:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
test case
mysql-test/t/sp_notembedded.test:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
test case
sql/mysql_priv.h:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
new get_current_user(THD *thd, LEX_USER *user) function
sql/sql_acl.cc:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
user name is calculated using get_current_user() function
sql/sql_parse.cc:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
new get_current_user() function
user name is calculated using get_current_user() function
sql/sql_yacc.yy:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
empty LEX_USER struct for CURRENT USER,
user name is calculated on function execution stage
mysql-test/t/trigger.test:
Replace all numeric error code with symbolic names.
Left are --error 1 for system error, and --error 1100. The
symbolic constant for the latter is ER_TABLE_NOT_LOCKED, but using
it triggers a bug in test driver due to name prefix collision with
1099 ER_TABLE_NOT_LOCKED_FOR_WRITE. This bug is fixed in 5.1.
mysql-test/t/federated.test:
Use --replace_result to make test work on non-standard ports.
mysql-test/r/federated.result:
Use --replace_result to make test work on non-standard ports.
into mysql.com:/home/mydev/mysql-5.0-bug11824
myisam/mi_key.c:
Auto merged
mysql-test/r/func_sapdb.result:
Auto merged
mysql-test/r/gis-rtree.result:
Auto merged
mysql-test/r/symlink.result:
Auto merged
mysql-test/t/func_sapdb.test:
Auto merged
mysql-test/t/gis-rtree.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
myisam/mi_check.c:
Manual merge
mysql-test/r/func_time.result:
Manual merge
mysql-test/t/func_time.test:
Manual merge
into mysql.com:/home/mydev/mysql-5.0-bug11824
configure.in:
Auto merged
mysql-test/r/federated.result:
Auto merged
mysql-test/t/federated.test:
Auto merged
sql/ha_federated.cc:
Auto merged
sql/mysqld.cc:
Auto merged
Mark events_stress.test as 'big' as it's very slow on some machines
BitKeeper/etc/ignore:
added server-tools/instance-manager/net_serv.cc
mysql-test/t/events_stress.test:
Slow test: only run when using --big
mysql-test/t/rpl_ndb_auto_inc.test:
Fix failing test
into mysql.com:/home/tomash/src/mysql_ab/mysql-5.0-bug10946
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/sql_trigger.cc:
Auto merged
It was hard to distinguish case, when one was unable to create trigger
on the table because trigger with same action time and event already
existed for this table, from the case, when one tried to create trigger
with name which was already occupied by some other trigger, since in
both these cases we emitted ER_TRG_ALREADY_EXISTS error and message.
Now we emit ER_NOT_SUPPORTED_YET error with appropriate additional
message in the first case. There is no sense in introducing separate
error for this situation since we plan to get rid of this limitation
eventually.
mysql-test/r/trigger.result:
Update result for new error message.
mysql-test/t/trigger.test:
Update test for new error code.
sql/sql_trigger.cc:
If there is already a trigger with the same activation time, report an
"Unsupported yet" error.
Pushbuild fixes to result file, test, and header file for federated.
mysql-test/r/federated.result:
BUG #19773
Pushbuild fixes - result file had hard-coded port
mysql-test/t/federated.test:
BUG #19773
Pushbuild fixes Test was missing --replace_result
sql/ha_federated.h:
BUG #19773
HPUX and Windows failed with variable named row and *row in method declaration
into mysql.com:/home/my/mysql-5.1
BitKeeper/etc/ignore:
auto-union
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/r/insert_select.result:
Auto merged
mysql-test/r/key.result:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
mysql-test/t/key.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
sql/field.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
into mysql.com:/users/lthalmann/bk/mysql-5.1-new-rpl
BitKeeper/deleted/.del-mysys.vcproj~40a49d09c4184822:
Auto merged
mysql-test/t/rpl_openssl.test:
Auto merged
sql/log.cc:
Auto merged
BitKeeper/deleted/.del-mysql.sln~76a9ff1e793b3547:
Deleted file in 5.1 (removed)
BitKeeper/deleted/.del-mysqld.vcproj~6aa7b3f9c3e28fcb:
Deleted file in 5.1 (removed)
include/my_sys.h:
Manual merge
mysql-test/mysql-test-run.pl:
Manual merge
CHECK TABLE could complain about a fully intact spatial index.
A wrong comparison operator was used for table checking.
The result was that it checked for non-matching spatial keys.
This succeeded if at least two different keys were present,
but failed if only the matching key was present.
I fixed the key comparison.
myisam/mi_check.c:
Bug#17877 - Corrupted spatial index
Fixed the comparison operator for checking a spatial index.
Using MBR_EQUAL | MBR_DATA to compare for equality and
include the data pointer in the comparison. The latter
finds the index entry that points to the current record.
This is necessary for non-unique indexes.
The old operator, SEARCH_SAME, is unknown to the rtree
search functions and handled like MBR_DISJOINT.
myisam/mi_key.c:
Bug#17877 - Corrupted spatial index
Added a missing DBUG_RETURN.
myisam/rt_index.c:
Bug#17877 - Corrupted spatial index
Included the data pointer in the copy of the search key.
This is necessary for searching the index entry that points
to a specific record if the search_flag contains MBR_DATA.
myisam/rt_mbr.c:
Bug#17877 - Corrupted spatial index
Extended the RT_CMP() macro with an assert for an
unexpected comparison operator.
mysql-test/r/gis-rtree.result:
Bug#17877 - Corrupted spatial index
The test result.
mysql-test/t/gis-rtree.test:
Bug#17877 - Corrupted spatial index
The test case.
(Found by dgcov)
mysql-test/r/show_check.result:
Test SHOW PLUGIN.
(Was not covered by test suite before)
mysql-test/t/show_check.test:
Test SHOW PLUGIN.
(Was not covered by test suite before)
mysys/my_handler.c:
Added purecov comment for new, not executed code
sql/filesort.cc:
Added purecov comment for new, not executed code
Removed 'purecov: inspected' from code covered by current testsuite
sql/ha_ndbcluster_binlog.cc:
Added purecov comment for new, not executed code
sql/log_event.cc:
Added purecov comment for new, not executed code
sql/mysqld.cc:
Added purecov comment for new, not executed code
sql/sql_parse.cc:
Added purecov comment for new, not executed code
sp_grant_privileges(), the function that GRANTs EXECUTE + ALTER privs on a SP,
did so creating a user-entry with not password; mysql_routine_grant() would then
write that "change" to the user-table.
mysql-test/r/sp-security.result:
prove that creating a stored procedure will not destroy the creator's password
mysql-test/t/sp-security.test:
prove that creating a stored procedure will not destroy the creator's password
sql/sql_acl.cc:
get password from ACLs, convert to correct format, and use it when
forcing GRANTS for SPs
Final-review fixes per Monty, pre-push. OK'd for
push. Please see each file's comments.
mysql-test/r/federated.result:
BUG #19773
Results for multi-table deletes, updates
mysql-test/t/federated.test:
BUG #19773
Test multi table update and delete. Added drop table to end of previous test.
sql/ha_federated.cc:
BUG #19773
Post-review changes, per Monty. 3rd patch, OK'd for push.
- Added index_read_idx_with_result_set, which uses the result set passed to it
- Hash by entire connection scheme
- Protected store_result result set for table scan by adding a method result set
to index_read_idx and index_read which is passed to index_read_with_result, which
in turn iterates over the single record via read_next.
This is a change from having two result sets in the first two patches.
This keeps the code clean and avoids the need for yet another result set.
- Rewrote ::position and ::rnd_pos to store position - if primary key use
primary key, if not, use record buffer.
- Rewrote get_share to store hash with connect string vs. table name
- delete_row added subtration of "records" by affected->rows
- Added read_next to handle what rnd_next used to do (converting raw record
to query and vice versa)
- Removed many DBUG_PRINT lines
- Removed memset initialisation since subsequent loop accomplishes
- Removed un-necessary mysql_free_result lines
sql/ha_federated.h:
BUG #19773
Fixed "SET " to " SET " to make sure built statements are built with
"UPDATE `t1` SET .." instead of "UPDATE `t1`SET"
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new
sql/ha_ndbcluster.cc:
Auto merged
storage/ndb/include/ndbapi/NdbDictionary.hpp:
Auto merged
storage/ndb/include/ndbapi/NdbScanOperation.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/suma/Suma.cpp:
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbDictionary.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp:
Auto merged
storage/ndb/src/ndbapi/ndberror.c:
Auto merged
storage/ndb/tools/restore/consumer_restore.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp:
SCCS merged
Bug #18361: Triggers on mysql.user table cause server crash
Because they do not work, we do not allow creating triggers on tables
within the 'mysql' schema.
(They may be made to work and re-enabled at some later date, but not
in 5.0 or 5.1.)
mysql-test/r/trigger.result:
Add new results
mysql-test/t/trigger.test:
Add new regression test for creating triggers on system schema
sql/share/errmsg.txt:
Add new error message
sql/sql_trigger.cc:
Disallow creating triggers on tables in the 'mysql' schema
The problem was that we restored SQL_CACHE, SQL_NO_CACHE flags in SELECT
statement from internal structures based on value set later at runtime, not
the original value set by the user.
The solution is to remember that original value.
mysql-test/r/auto_increment.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_compress.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_math.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_system.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_time.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/information_schema.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/query_cache.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/rpl_get_lock.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/rpl_master_pos_wait.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/show_check.result:
Add result for bug#17203.
mysql-test/r/subselect.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/type_blob.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/variables.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/view.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/t/show_check.test:
Add test case for bug#17203.
sql/sql_lex.cc:
Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
sql/sql_lex.h:
Add SELECT_LEX::sql_cache field to store original user setting.
sql/sql_select.cc:
Output SQL_CACHE and SQL_NO_CACHE depending on stored original user setting.
sql/sql_yacc.yy:
Make effect of SQL_CACHE and SQL_NO_CACHE mutually exclusive. Ignore
SQL_CACHE if SQL_NO_CACHE was used. Remember what was set by the user.
Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
new file
mysql-test/r/rpl_ndb_dd_partitions.result:
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/t/rpl_ndb_dd_partitions.test:
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
new file
mysql-test/t/ndb_partition_error.test:
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/t/ndb_partition_key.test:
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/t/ndb_partition_list.test:
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/t/ndb_partition_range.test:
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/t/ndb_blob_partition.test:
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/t/ndb_dd_backuprestore.test:
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/r/ndb_partition_error.result:
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/r/ndb_partition_key.result:
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/r/ndb_partition_list.result:
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/r/ndb_partition_range.result:
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/r/ndb_blob_partition.result:
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/r/ndb_dd_backuprestore.result:
Adding back ndb partition tests from mysql-test-extra per tomas and clavin
mysql-test/r/func_sapdb.result:
test cases for date range edge cases added
mysql-test/r/func_time.result:
test cases for date range edge cases added
mysql-test/t/func_sapdb.test:
test cases for date range edge cases added
mysql-test/t/func_time.test:
test cases for date range edge cases added
'SELECT DISTINCT a,b FROM t1' should not use temp table if there is unique
index (or primary key) on a.
There are a number of other similar cases that can be calculated without the
use of a temp table : multi-part unique indexes, primary keys or using GROUP BY
instead of DISTINCT.
When a GROUP BY/DISTINCT clause contains all key parts of a unique
index, then it is guaranteed that the fields of the clause will be
unique, therefore we can optimize away GROUP BY/DISTINCT altogether.
This optimization has two effects:
* there is no need to create a temporary table to compute the
GROUP/DISTINCT operation (or the temporary table will be smaller if only GROUP
is removed and DISTINCT stays or if DISTINCT is removed and GROUP BY stays)
* this causes the statement in effect to become updatable in Connector/Java
because the result set columns will be direct reference to the primary key of
the table (instead to the temporary table that it currently references).
Implemented a check that will optimize away GROUP BY/DISTINCT for queries like
the above.
Currently it will work only for single non-constant table in the FROM clause.
mysql-test/r/distinct.result:
Bug #16458: Simple SELECT FOR UPDATE causes "Result Set not updatable" error
- test case
mysql-test/t/distinct.test:
Bug #16458: Simple SELECT FOR UPDATE causes "Result Set not updatable" error
- test case
sql/sql_select.cc:
Bug #16458: Simple SELECT FOR UPDATE causes "Result Set not updatable" error
- disable GROUP BY if contains the fields of a unique index.
Fix a minor issue with Bug#16206 (bdb.test failed if the tree is compiled
without blackhole).
include/my_sys.h:
Change declaration of my_strdup_with_length to accept const char *,
not const byte *: in 5 places out of 6 where this function is used,
it's being passed char *, not byte *
mysql-test/r/bdb.result:
Remove dependency on an optional engine (updated test results).
mysql-test/t/bdb.test:
Remove dependency on an optional engine.
mysys/my_malloc.c:
my_strdup_with_length: const byte * -> const char *
mysys/safemalloc.c:
my_strdup_with_length: const byte * -> const char *
sql/ha_federated.cc:
my_strdup_with_length: const byte * -> const char *
sql/log_event.cc:
my_strdup_with_length: const byte * -> const char *
sql/set_var.cc:
my_strdup_with_length: const byte * -> const char *
sql/sql_class.h:
Change db_length type to uint from uint32 (see also table.h)
sql/table.h:
Change the type of db_length to uint from uint32: LEX_STRING uses uint for
length, we need a small and consistent set of types to store length to
minimize cast and compile failures.
mysql-test/r/type_newdecimal.result:
Fix for bug #18014: data loss caused by altering decimal fields.
- test result
mysql-test/t/type_newdecimal.test:
Fix for bug #18014: data loss caused by altering decimal fields.
- test case
sql/field.cc:
Fix for bug #18014: data loss caused by altering decimal fields.
- Field_new_decimal::is_equal() introduced for proper comparisons of the decimal field definitions.
sql/field.h:
Fix for bug #18014: data loss caused by altering decimal fields.
- Field_new_decimal::is_equal() introduced for proper comparisons of the decimal field definitions.
When building the UPDATE query to send to the remote server, the
federated storage engine built the query incorrectly if it was updating
a field to be NULL.
Thanks to Bjrn Steinbrink for an initial patch for the problem.
mysql-test/r/federated.result:
Add new results
mysql-test/t/federated.test:
Add new regression test
sql/ha_federated.cc:
Fix logic of how fields are added to SET and WHERE clauses of an
UPDATE statement. Fields that were NULL were being handled incorrectly.
Also reorganizes the code a little bit so the update of the two
clauses is consistent.
into mysql.com:/opt/local/work/mysql-5.0-17199
mysql-test/r/create.result:
Auto merged
mysql-test/t/create.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/sp.result:
SCCS merged
mysql-test/t/sp.test:
SCCS merged
Bug#19022 "Memory bug when switching db during trigger execution"
Bug#17199 "Problem when view calls function from another database."
Bug#18444 "Fully qualified stored function names don't work correctly in
SELECT statements"
Documentation note: this patch introduces a change in behaviour of prepared
statements.
This patch adds a few new invariants with regard to how THD::db should
be used. These invariants should be preserved in future:
- one should never refer to THD::db by pointer and always make a deep copy
(strmake, strdup)
- one should never compare two databases by pointer, but use strncmp or
my_strncasecmp
- TABLE_LIST object table->db should be always initialized in the parser or
by creator of the object.
For prepared statements it means that if the current database is changed
after a statement is prepared, the database that was current at prepare
remains active. This also means that you can not prepare a statement that
implicitly refers to the current database if the latter is not set.
This is not documented, and therefore needs documentation. This is NOT a
change in behavior for almost all SQL statements except:
- ALTER TABLE t1 RENAME t2
- OPTIMIZE TABLE t1
- ANALYZE TABLE t1
- TRUNCATE TABLE t1 --
until this patch t1 or t2 could be evaluated at the first execution of
prepared statement.
CURRENT_DATABASE() still works OK and is evaluated at every execution
of prepared statement.
Note, that in stored routines this is not an issue as the default
database is the database of the stored procedure and "use" statement
is prohibited in stored routines.
This patch makes obsolete the use of check_db_used (it was never used in the
old code too) and all other places that check for table->db and assign it
from THD::db if it's NULL, except the parser.
How this patch was created: THD::{db,db_length} were replaced with a
LEX_STRING, THD::db. All the places that refer to THD::{db,db_length} were
manually checked and:
- if the place uses thd->db by pointer, it was fixed to make a deep copy
- if a place compared two db pointers, it was fixed to compare them by value
(via strcmp/my_strcasecmp, whatever was approproate)
Then this intermediate patch was used to write a smaller patch that does the
same thing but without a rename.
TODO in 5.1:
- remove check_db_used
- deploy THD::set_db in mysql_change_db
See also comments to individual files.
mysql-test/r/create.result:
Modify the result file: a database can never be NULL.
mysql-test/r/ps.result:
Update test results (Bug#17199 et al)
mysql-test/r/sp.result:
Update test results (Bug#17199 et al)
mysql-test/t/create.test:
Update the id of the returned error.
mysql-test/t/ps.test:
Add test coverage for prepared statements and current database. In scope of
work on Bug#17199 "Problem when view calls function from another database."
mysql-test/t/sp.test:
Add a test case for Bug#17199 "Problem when view calls function from another
database." and Bug#18444 "Fully qualified stored function names don't work
correctly in SELECT statements". Test a complementary problem.
sql/item_strfunc.cc:
Touch the code that reads thd->db (cleanup).
sql/log_event.cc:
While we are at it, replace direct access to thd->db with a method.
Should simplify future conversion of THD::db to LEX_STRING.
sql/slave.cc:
While we are at it, replace direct access to thd->db with a method.
Should simplify future conversion of THD::db to LEX_STRING.
sql/slave.h:
Remove a declaration for a method that is used only in one module.
sql/sp.cc:
Rewrite sp_use_new_db: this is a cleanup that I needed in order to understand
this function and ensure that it has no bugs.
sql/sp.h:
Add a new declaration for sp_use_new_db (uses LEX_STRINGs) and a comment.
sql/sp_head.cc:
- drop sp_name_current_db_new - a creator of sp_name class that was used
when sp_name was created for an identifier without an explicitly initialized
database. Now we pass thd->db to constructor of sp_name right in the
parser.
- rewrite sp_head::init_strings: name->m_db is always set now
- use the new variant of sp_use_new_db
- we don't need to update thd->db with SP MEM_ROOT pointer anymore when
parsing a stored procedure, as noone will refer to it (yes!)
sql/sp_head.h:
- remove unneded methods and members
sql/sql_class.h:
- introduce 3 THD methods to work with THD::db:
.set_db to assign the current database
.reset_db to reset the current database (temporarily) or set it to NULL
.opt_copy_db_to - to deep-copy thd->db to a pointer if it's not NULL
sql/sql_db.cc:
While we are at it, replace direct access to thd->db with a method.
Should simplify future conversion of THD::db to LEX_STRING.
sql/sql_insert.cc:
- replace checks with asserts: table_list->db must be always set in the parser.
sql/sql_lex.h:
- add a comment
sql/sql_parse.cc:
- implement the invariant described in the changeset comment.
- remove juggling with lex->sphead in SQLCOM_CREATE_PROCEDURE:
now db_load_routine uses its own LEX object and doesn't damage the main
LEX.
- add DBUG_ASSERT(0) to unused "check_db_used"
sql/sql_table.cc:
- replace a check with an assert (table_ident->db)
sql/sql_trigger.cc:
While we are at it, replace direct access to thd->db with a method.
Should simplify future conversion of THD::db to LEX_STRING.
sql/sql_udf.cc:
- use thd->set_db instead of direct modification of to thd->db
sql/sql_view.cc:
- replace a check with an assert (view->db)
sql/sql_yacc.yy:
- make sure that we always copy table->db or name->db or ident->db or
select_lex->db from thd->db if the former is not set. If thd->db
is not set but is accessed, return an error.
sql/tztime.cc:
- be nice, never copy thd->db by pointer.
Addendum fixes after changing the condition variable
for the global read lock.
The stress test suite revealed some deadlocks. Some were
related to the new condition variable (COND_global_read_lock)
and some were general problems with the global read lock.
It is now necessary to signal COND_global_read_lock whenever
COND_refresh is signalled.
We need to wait for the release of a global read lock if one
is set before every operation that requires a write lock.
But we must not wait if we have locked tables by LOCK TABLES.
After setting a global read lock a thread waits until all
write locks are released.
mysql-test/r/lock_multi.result:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Added test results.
mysql-test/t/lock_multi.test:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Added tests for possible deadlocks that did not occur
with the stress test suite.
mysys/thr_lock.c:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Added a protection against an infinite loop that occurs
with the test case for Bug #20662.
sql/lock.cc:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Signal COND_global_read_lock whenever COND_refresh
is signalled by using the new function broadcast_refresh().
Added the definition of a new function that signals
COND_global_read_lock whenever COND_refresh is signalled.
sql/mysql_priv.h:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Added a declaration for a new function that signals
COND_global_read_lock whenever COND_refresh is signalled.
sql/sql_base.cc:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Signal COND_global_read_lock whenever COND_refresh
is signalled by using the new function broadcast_refresh().
sql/sql_handler.cc:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Signal COND_global_read_lock whenever COND_refresh
is signalled by using the new function broadcast_refresh().
sql/sql_insert.cc:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Removed global read lock handling from inside of
INSERT DELAYED. It is handled on a higher level now.
sql/sql_parse.cc:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Wait for the release of a global read lock if one is set
before every operation that requires a write lock.
But don't wait if locked tables exist already.
sql/sql_table.cc:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Removed global read lock handling from inside of
CREATE TABLE. It is handled on a higher level now.
Signal COND_global_read_lock whenever COND_refresh
is signalled by using the new function broadcast_refresh().
into mysql.com:/opt/local/work/mysql-5.1-runtime
mysql-test/r/sp-prelocking.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
storage/ndb/src/ndbapi/ndberror.c:
Auto merged
strings/ctype-mb.c:
Auto merged
mysql-test/t/sp-prelocking.test:
Manual merge.
into mysql.com:/opt/local/work/mysql-5.1-runtime
mysql-test/r/information_schema.result:
Auto merged
sql/CMakeLists.txt:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/events.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/t/events_microsec.test:
SCCS merged
into mysql.com:/home/tnurnberg/mysql-5.0-maint-18462
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
client/mysqldump.c:
SCCS merged
The 250 simultaneous events all accessing the same table caused the
events_stress test to fail due to debug warnings about too many table
waiters. Fixed by using three different tables.
mysql-test/r/events_stress.result:
Use three different MyISAM tables to avoid debug warnings about too many
locks.
mysql-test/t/events_stress.test:
Use three different MyISAM tables to avoid debug warnings about too many
locks.
make sure we can only drop files from correct file group
mysql-test/r/ndb_dd_ddl.result:
add testcase
mysql-test/t/ndb_dd_ddl.test:
add testcase
sql/ha_ndbcluster.cc:
Make sure correct tablespace for dropping datafile
storage/ndb/include/ndbapi/NdbDictionary.hpp:
Cleanup {data/undo}file get{tablespace/logfilegroup}
storage/ndb/src/ndbapi/NdbDictionary.cpp:
Cleanup {data/undo}file get{tablespace/logfilegroup}
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp:
Cleanup {data/undo}file get{tablespace/logfilegroup}
storage/ndb/tools/restore/consumer_restore.cpp:
Cleanup {data/undo}file get{tablespace/logfilegroup}
into lmy004.:/work/mysql-5.1-runtime-bug16992
mysql-test/t/events.test:
Auto merged
mysql-test/t/events_grant.test:
Auto merged
sql/sql_show.cc:
Auto merged
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
sql/ha_ndbcluster.cc:
Auto merged
storage/ndb/src/kernel/blocks/ERROR_codes.txt:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
support-files/mysql.spec.sh:
Auto merged
into mysql.com:/home/emurphy/src/bk-clean/mysql-5.1
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/valgrind.supp:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/insert_select.result:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/myisam.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysys/Makefile.am:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_select.cc:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
storage/ndb/src/ndbapi/ndberror.c:
Auto merged
include/Makefile.am:
manual merge
mysql-test/r/func_time.result:
manual merge
mysql-test/r/select.result:
manual merge
Start test case with a dummy table create and drop. This ensures that
NDB event subscription is properly set up before the real test starts,
which otherwise could sometimes cause INSERT events to be lost.
mysql-test/r/ndb_binlog_multi.result:
Start test with dummy table create/drop to avoid a race.
mysql-test/t/ndb_binlog_multi.test:
Start test with dummy table create/drop to avoid a race.
Sometimes the helper connection (that is watching for the main connection
to time out) would itself time out first, causing the test to fail.
mysql-test/t/wait_timeout.test:
Increase connection timeout in connection wait_con so we will not loose
the connection that is watching for the real wait_timeout to trigger.
alter event rename".
ALTER EVENT ... RENAME statement hasn't checked privileges
for the target database. It also caused server crashes when
target database was not specified explicitly and there was
no current database.
This fix adds missing privilege check and check for the case
when target database is not specified explicitly or implicitly.
mysql-test/r/events_bugs.result:
update result
mysql-test/t/events_bugs.test:
add test case for bug 18897 Events: unauthorized action possible with alter event
rename:
- test rename to db the user does not have access to
- test rename when there is no selected db
sql/sql_parse.cc:
Additional check for the situation when no db is selected.
CREATE EVENT abc and ALTER EVENT db.abc RENAME TO xyz,
and DROP EVENT abc
won't work if there is no selected DB.
Problem:
mysqld --collation-server=xxx --character-set-server=yyy
didn't work as expected: collation_server was set not to xxx,
but to the default collation of character set "yyy".
With different argument order it worked as expected:
mysqld --character-set-server=yyy --collation-server=yyy
Fix:
initializate default_collation_name to 0
when processing --character-set-server
only if --collation-server has not been specified
in command line.
mysql-test/r/ctype_ucs2_def.result:
Adding test case
mysql-test/t/ctype_ucs2_def-master.opt:
Specifying variables in reverse order, to cover the bug.
mysql-test/t/ctype_ucs2_def.test:
Adding test case
sql/mysqld.cc:
Don't clear default_collation_name when processing
--character-set-server if collation has already
been specified using --collation-server
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
mysql-test/r/key.result:
Auto merged
mysql-test/t/key.test:
Auto merged
sql/table.cc:
Auto merged
support-files/mysql.spec.sh:
Auto merged
An UNIQUE KEY consisting of NOT NULL columns
was displayed as PRIMARY KEY in "DESC t1".
According to the code, that was intentional
behaviour for some reasons unknown to me.
This code was written before bitkeeper time,
so I cannot check who and why made this.
After discussing on dev-public, a decision
was made to remove this code
mysql-test/r/key.result:
Adding test case.
mysql-test/t/key.test:
Adding test case.
sql/table.cc:
Removing old wrong code
(fix for bug#20290 Event mechanism incompatible with embedded server, but tests tried)
mysql-test/t/events.test:
disable test in embedded
mysql-test/t/events_bugs.test:
disable test in embedded
mysql-test/t/events_grant.test:
disable test in embedded
mysql-test/t/events_logs_tests.test:
disable test in embedded
mysql-test/t/events_microsec.test:
disable test in embedded
mysql-test/t/events_scheduling.test:
disable test in embedded
mysql-test/t/events_stress.test:
disable test in embedded
This was another manifestation of the problems fixed in the
patch for bug 16674.
Wrong calculation of length of the search prefix in the pattern
string led here to a wrong result set for a query in 4.1.
The bug could be demonstrated for any multi-byte character set.
mysql-test/r/ctype_utf8.result:
Added a test case for bug #18359.
mysql-test/t/ctype_utf8.test:
Added a test case for bug #18359.
Server crashed in some cases when a query required a MIN/MAX
agrregation for a 'ucs2' field.
In these cases the aggregation caused calls of the function
update_tmptable_sum_func that indirectly invoked
the method Item_sum_hybrid::min_max_update_str_field()
containing a call to strip_sp for a ucs2 character set.
The latter led directly to the crash as it used my_isspace
undefined for the ucs2 character set.
Actually the call of strip_sp is not needed at all in this
situation and has been removed by the fix.
mysql-test/r/ctype_ucs.result:
Added a test case for bug #20076.
mysql-test/t/ctype_ucs.test:
Added a test case for bug #20076.
mysqldump.test calls my_print_defaults in a way that includes the systemwide
my.cnf, so the results will be beyond our control and depend on whatever the
user has in their my.cnf, namely the [mysqldump] section.
call my_print_defaults with --config-file rather than --defaults-extra-file
to prevent inclusion of system-wide defaults and use our config-file only.
mysql-test/t/mysqldump.test:
call my_print_defaults with our setup only, do not include the systemwide
my.cnf as that would make the results unpredictable.
is_injective -> table_flag() HA_HAS_OWN_BINLOGGING
(Faster and easier to understand)
Allow cluster_binlogging also in mixed replication mode.
mysql-test/t/rpl_truncate_7ndb.test:
Ensure that test is only run with mixed or row based replication
sql/ha_ndbcluster.cc:
Enforce row based replication if a cluster table is used
sql/ha_ndbcluster.h:
Remove is_injective() (Is now a table flag)
sql/ha_ndbcluster_binlog.cc:
Use cluster binlogging also in mixed binary logging
(Using a cluster table will enforce row based replication in mixed mode, so this should be ok)
sql/handler.cc:
is_injective -> HA_HAS_OWN_BINLOGGING
sql/handler.h:
is_injective -> HA_HAS_OWN_BINLOGGING
mysql-test/include/have_binlog_format_mixed_or_row.inc:
New BitKeeper file ``mysql-test/include/have_binlog_format_mixed_or_row.inc''
mysql-test/r/rpl_truncate_7ndb_2.result:
New BitKeeper file ``mysql-test/r/rpl_truncate_7ndb_2.result''
mysql-test/t/rpl_truncate_7ndb_2-master.opt:
New BitKeeper file ``mysql-test/t/rpl_truncate_7ndb_2-master.opt''
mysql-test/t/rpl_truncate_7ndb_2.test:
New BitKeeper file ``mysql-test/t/rpl_truncate_7ndb_2.test''
- The setting of "ENV{'TZ'}" doesn't affect the timezone
used by MySQL Server on Windows.
- Explicitly set timezone in test cases before doing UTC/localtime
conversions so tests produce deterministic results
mysql-test/r/func_timestamp.result:
Update test results
mysql-test/r/type_timestamp.result:
Update test results
mysql-test/t/func_timestamp.test:
Specifically set timezone to make tests that do localtime/UTC conversions deterministic
mysql-test/t/type_timestamp.test:
Specifically set timezone to make tests that do localtime/UTC conversions deterministic
- The setting of "ENV{'TZ'}" doesn't affect the timezone
used by MySQL Server on Windows.
- Explicitly set timezone to "+03:00" in test case before
doing the calculatiosn to check that there is three hours
difference between utc and local time.
(Magnus' fix)
mysql-test/r/func_time.result:
Update test results
mysql-test/t/func_time.test:
Set timezone to GMT-3, to make it possible to use "interval 3 hour"
The AsBinary function returns VARCHAR data type with binary collation.
It can cause problem for clients that treat that kind of data as
different from BLOB type.
So now AsBinary returns BLOB.
mysql-test/r/gis.result:
result fixed
mysql-test/t/gis.test:
test case added
sql/item_geofunc.h:
Now we return MYSQL_TYPE_BLOB for asBinary function
with PREPARE fails with weird error".
More generally, re-executing a stored procedure with a complex SP cursor query
could lead to a crash.
The cause of the problem was that SP cursor queries were not optimized
properly at first execution: their parse tree belongs to sp_instr_cpush,
not sp_instr_copen, and thus the tree was tagged "EXECUTED" when the
cursor was declared, not when it was opened. This led to loss of optimization
transformations performed at first execution, as sp_instr_copen saw that the
query is already "EXECUTED" and therefore either not ran first-execution
related blocks or wrongly rolled back the transformations caused by
first-execution code.
The fix is to update the state of the parsed tree only when the tree is
executed, as opposed to when the instruction containing the tree is executed.
Assignment if i->state is moved to reset_lex_and_exec_core.
mysql-test/r/sp.result:
Test results fixed (Bug#15217)
mysql-test/t/sp.test:
Add a test case for Bug#15217
sql/sp_head.cc:
Move assignment of stmt_arena->state to reset_lex_and_exec_core
into mysql.com:/mnt/raid/alik/MySQL/devel/5.1-rt-bug20294
mysql-test/t/disabled.def:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
im_instance_conf fails randomly.
mysql-test/r/im_options.result:
Updated result file.
mysql-test/t/im_instance_conf.imtest:
Added a note about specific of CREATE INSTANCE usage in IM-tests.
mysql-test/t/im_options.imtest:
1. Specify socket-file-name for new instance so that the test
does not depend on another running test-suite on the same box.
2. Added a note about specific of CREATE INSTANCE usage in IM-tests.
mysql-test/r/partition.result:
New test case
mysql-test/t/partition.test:
New test case
sql/ha_partition.cc:
Ensure index_last always uses ordered index scan
sys_var_insert_id returned LAST_INSERT_ID instead of INSERT_ID,
as Guilhem suggested.
mysql-test/r/variables.result:
Additional test
mysql-test/t/variables.test:
Additional test
into dator5.(none):/home/pappa/bug17138
mysql-test/r/partition.result:
Auto merged
mysql-test/t/partition.test:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_table.cc:
Auto merged
(this is a change to a faulty test file)
mysql-test/r/events_logs_tests.result:
update result
mysql-test/t/events_logs_tests.test:
fix the test file, so TRUNCATE should not land into the slow_log
This happens on loaded machines, for example when running few suites
in parallel.
fix for bug #20624: events_logs_tests.test fails randomly
sys_var_insert_id returned LAST_INSERT_ID instead of INSERT_ID.
mysql-test/r/variables.result:
Adding test case
mysql-test/t/variables.test:
Adding test case
sql/set_var.cc:
Fixed that sys_var_insert_id returned last_indert_id instead of insert_id.
mysql-test/r/ndb_dd_ddl.result:
fix so that result file is not dependant on local filesystem
mysql-test/t/ndb_dd_ddl.test:
fix so that result file is not dependant on local filesystem
Introduced EVENTS.EVENT_DEFINITION, like ROUTINES.ROUTINE_DEFINITION
Hence, the contents of the current EVENTS.EVENT_BODY become the contents
of EVENT_DEFINITION. EVENT_BODY will contain always, for now, "SQL" (wo
quotes).
mysql-test/r/events.result:
update result
event_body -> event_definition
event_body -> SQL
mysql-test/r/events_grant.result:
update result
event_body -> event_definition
event_body -> SQL
mysql-test/r/information_schema.result:
update result
event_body -> event_definition
mysql-test/t/events.test:
update result
event_body -> event_definition
event_body -> SQL
mysql-test/t/events_grant.test:
update result
event_body -> event_definition
event_body -> SQL
sql/sql_show.cc:
Introduce enum_i_s_events_fields, because I hate recounting
all the time a field is changed.
Rename EVENT_BODY to EVENT_DEFINITION
Introduce EVENT_BODY after that to be "SQL"
(final fix for bug#16992 Events: Information schema troubles ) ?
into mysql.com:/home/my/mysql-5.1
mysql-test/extra/rpl_tests/rpl_log.test:
Auto merged
mysql-test/r/rpl_ndb_log.result:
Auto merged
mysql-test/r/rpl_row_log.result:
Auto merged
mysql-test/r/rpl_row_log_innodb.result:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/mysql_priv.h:
SCCS merged
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
sql/ha_ndbcluster.cc:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp:
Auto merged
create tablespace/logfile group should "back out changes"
mysql-test/r/ndb_dd_ddl.result:
add testcase for bug#16341
mysql-test/t/ndb_dd_ddl.test:
add testcase for bug#16341
sql/ha_ndbcluster.cc:
If create data/undo file fails, check if filegroup is same version, and if it is drop it (wo/ checking error)
storage/ndb/include/kernel/signaldata/CreateFilegroup.hpp:
add version to createfileconf
storage/ndb/include/ndbapi/NdbDictionary.hpp:
Add NdbDictionary::ObjectId, that can be used to get [ id, version ] during create (only for DD object so far)
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
add version to createfileconf
storage/ndb/src/ndbapi/NdbDictionary.cpp:
Add NdbDictionary::ObjectId, that can be used to get [ id, version ] during create (only for DD object so far)
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
Add NdbDictionary::ObjectId, that can be used to get [ id, version ] during create (only for DD object so far)
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp:
Add NdbDictionary::ObjectId, that can be used to get [ id, version ] during create (only for DD object so far)
into rurik.mysql.com:/home/igor/mysql-5.0-opt
mysql-test/t/ctype_utf8.test:
Auto merged
strings/ctype-mb.c:
Auto merged
mysql-test/r/ctype_utf8.result:
SCCS merged
Review comments
mysql-test/t/partition.test:
Changed procedure names ensured procedures were dropped
sql/ha_ndbcluster.h:
Improved name of method
sql/ha_partition.h:
Improved name of method
sql/handler.h:
Improved name of method
Removed deprecated constants
sql/item_sum.cc:
Improved name of method
sql/sql_acl.cc:
Improved name of method
sql/sql_insert.cc:
Removed use of HA_WRITE_SKIP and introduced is_fatal_error instead
sql/sql_select.cc:
Improved name of method
sql/sql_table.cc:
Improved name of method
Reintroduced dead code for future possible use
sql/sql_union.cc:
Improved name of method
sql/sql_update.cc:
Improved name of method
into bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
mysql-test/r/partition_error.result:
Auto merged
sql/mysql_priv.h:
Auto merged
mysql-test/r/partition.result:
Auto merged
This bug in Field_string::cmp resulted in a wrong comparison
with keys in partial indexes over multi-byte character fields.
Given field a is declared as a varchar(16) collate utf8_unicode_ci
INDEX(a(4)) gives us an example of such an index.
Wrong key comparisons could lead to wrong result sets if
the selected query execution plan used a range scan by
a partial index over a utf8 character field.
This also caused wrong results in many other cases.
mysql-test/t/ctype_utf8.test:
Added test cases for bug #14896.
mysql-test/r/ctype_utf8.result:
Added test cases for bug #14896.
sql/field.cc:
Fixed bug #14896.
This bug in Field_string::cmp resulted in a wrong comparison
with keys in partial indexes over multi-byte character fields.
Given field a is declared as a varchar(16) collate utf8_unicode_ci
INDEX(a(4)) gives us an example of such an index.
Wrong key comparisons could lead to wrong result sets if
the selected query execution plan used a range scan by
a partial index over a utf8 character field.
This also caused wrong results in many other cases.
into bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
mysql-test/r/show_check.result:
Auto merged
sql/log.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_delete.cc:
Auto merged
into may.pils.ru:/home/svoj/devel/mysql/BUG20357/mysql-5.0
mysql-test/r/myisam.result:
Auto merged
mysql-test/t/myisam.test:
Auto merged
sql/opt_sum.cc:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
functions in queries
Using MAX()/MIN() on table with disabled indexes (by ALTER TABLE)
results in error 124 (wrong index) from storage engine.
The problem was that optimizer use disabled index to optimize
MAX()/MIN(). Normally it must skip disabled index and perform
table scan.
This patch skips disabled indexes for min/max optimization.
mysql-test/r/myisam.result:
Test case for BUG#20357.
mysql-test/t/myisam.test:
Test case for BUG#20357.
sql/opt_sum.cc:
Skip disabled/ignored indexes for min/max optimization.
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
mysql-test/r/sql_mode.result:
Auto merged
mysql-test/t/sql_mode.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
client/mysqldump.c:
Manual merge
mysql-test/r/mysqldump.result:
Manual merge
mysql-test/t/mysqldump.test:
Manual merge
fails randomly.
The problem is that the test was affected by other running
test-suites on the same box. The fix affects the test only,
no code touched.
mysql-test/r/im_instance_conf.result:
Updated result file.
mysql-test/t/disabled.def:
Enable IM tests.
mysql-test/t/im_instance_conf.imtest:
Modify the test so that it does not depend on running
test-suites on the same box.
schemas
The function check_one_table_access() called to check access to tables in
SELECT/INSERT/UPDATE was doing additional checks/modifications that don't hold
in the context of setup_tables_and_check_access().
That's why the check_one_table() was split into two : the functionality needed by
setup_tables_and_check_access() into check_single_table_access() and the rest of
the functionality stays in check_one_table_access() that is made to call the new
check_single_table_access() function.
mysql-test/r/view_grant.result:
Bug #20482: failure on Create join view with sources views/tables in different
schemas
- test suite for the bug
mysql-test/t/view_grant.test:
Bug #20482: failure on Create join view with sources views/tables in different
schemas
- test suite for the bug
sql/mysql_priv.h:
Bug #20482: failure on Create join view with sources views/tables in different
schemas
- check_one_table_access split into 2
sql/sql_base.cc:
Bug #20482: failure on Create join view with sources views/tables in different
schemas
- the new sub-function called
sql/sql_parse.cc:
Bug #20482: failure on Create join view with sources views/tables in different
schemas
- check_one_table_access() split into two : check_single_table_access() to
actually check access to the table(ro) and check_one_table_access() that calls
check_single_table_access() and checks also the tables belonging to sub selects
or implicitly opened tables.
The problem appeared because the same values produced different hash
during INSERT and SELECT for VARCHAR data type.
Fix:
VARCHAR required special treatment to avoid hashing of length bytes
(leftmost one or two bytes) as well as trailing bytes beyond real length,
which could contain garbage. Fix is done by introducing hash() - new method
in the Field class.
mysql-test/r/partition_innodb.result:
Adding test case
mysql-test/r/partition_pruning.result:
Fixing test results (results differ due to changes in hash function)
mysql-test/t/partition_innodb.test:
Adding test case
sql/field.cc:
Adding generic hash() method, and a special
method for VARCHAR.
sql/field.h:
Adding prototypes for new methods
sql/key.cc:
Mark columns for write before executinf of set_key_image().
Thanks for Mikael for suggesting this fix.
sql/sql_partition.cc:
Removing old hash code.
Using new methid field->hash() instead.
into mysql.com:/usr/home/ram/work/mysql-5.0
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
mysql-test/r/func_time.result:
SCCS merged
The length of the prefix of the pattern string in the LIKE predicate that
determined the index range to be scanned was calculated incorrectly for
multi-byte character sets.
As a result of this in 4. 1 the the scanned range was wider then necessary
if the prefix contained not only one-byte characters.
In 5.0 additionally it caused missing some rows from the result set.
mysql-test/r/ctype_utf8.result:
Added test cases for bug #16674.
mysql-test/t/ctype_utf8.test:
Added test cases for bug #16674.
strings/ctype-mb.c:
Fixed bug #16674.
The length of the prefix of the pattern string in the LIKE predicate that
determined the index range to be scanned was calculated incorrectly for
multi-byte character sets.
As a result of this in 4. 1 the the scanned range was wider then necessary
if the prefix contained not only one-byte characters.
In 5.0 additionally it caused missing some rows from the result set.
The function my_like_range_mb was fixed to calculate the length of
the prefix in a pattern string correctly in all cases.
function crashes server".
Attempts to execute prepared multi-delete statement which involved trigger or
stored function caused server crashes (the same happened for such statements
included in stored procedures in cases when one tried to execute them more
than once).
The problem was caused by yet another incorrect usage of check_table_access()
routine (the latter assumes that table list which it gets as argument
corresponds to value LEX::query_tables_own_last). We solve this problem by
juggling with LEX::query_tables_own_last value when we call
check_table_access() for LEX::auxilliary_table_list (better solution is too
intrusive and should be done in 5.1).
mysql-test/r/sp-prelocking.result:
Added test for bug#19634 "Re-execution of multi-delete which involve trigger/
stored function crashes server".
mysql-test/t/sp-prelocking.test:
Added test for bug#19634 "Re-execution of multi-delete which involve trigger/
stored function crashes server".
sql/sql_parse.cc:
To call safely check_table_access() for LEX::auxilliary_table_list we have
to juggle with LEX::query_tables_own_last value.
into zippy.(none):/home/cmiller/work/mysql/mysql-5.0-maint
client/mysqldump.c:
Auto merged
BitKeeper/etc/ignore:
Added BitKeeper/etc/RESYNC_TREE to the ignore list
mysql-test/r/mysqldump.result:
Manual merge.
mysql-test/t/mysqldump.test:
Manual merge.
Additional fix for #16377 for bigendian platforms
sql_select.cc, select.result, select.test:
After merge fix
mysql-test/t/select.test:
After merge fix
mysql-test/r/select.result:
After merge fix
sql/sql_select.cc:
After merge fix
sql/field.h:
Additional fix for #16377 for bigendian platforms
sql/field.cc:
Additional fix for #16377 for bigendian platforms
New test cases
mysql-test/r/partition_error.result:
New test cases
mysql-test/r/partition_mgm.result:
New test cases
mysql-test/t/partition_error.test:
New test cases
mysql-test/t/partition_mgm.test:
New test cases
Added test case for bug#18759 Incorrect string to numeric conversion.
select.test:
Added test case for bug#18759 Incorrect string to numeric conversion.
item_cmpfunc.cc:
Cleanup after fix for bug#18360 removal
sql/item_cmpfunc.cc:
Cleanup after fix for bug#18360 removal
mysql-test/t/select.test:
Added test case for bug#18759 Incorrect string to numeric conversion.
mysql-test/r/select.result:
Added test case for bug#18759 Incorrect string to numeric conversion.
Fixes bug#17264, for alter table on win32 for successfull operation completion
it is used TL_WRITE(=10) lock instead of TL_WRITE_ALLOW_READ(=6), however here
in innodb handler TL_WRTIE is lifted to TL_WRITE_ALLOW_WRITE, which causes
race condition when several clients do alter table simultaneously.
mysql-test/r/lock_multi.result:
Test case for bug#17264.
mysql-test/t/lock_multi.test:
Test case for bug#17264
into may.pils.ru:/home/svoj/devel/mysql/BUG18036/mysql-5.1
configure.in:
Auto merged
include/my_global.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/myisam.result:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_update.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/t/myisam.test:
Manual merge.
SHOW STATUS are not anymore put in slow query log because of no index usage.
Implemntation done by removing orig_sql_command and moving logic of SHOW STATUS to mysql_excute_command()
This simplifies code and allows us to remove some if statements all over the code.
Upgraded uc_update_queries[] to sql_command_flags and added more bitmaps to better categorize commands.
This allowed some overall simplifaction when testing sql_command.
Fixes bugs:
Bug#10210: running SHOW STATUS increments counters it shouldn't
Bug#19764: SHOW commands end up in the slow log as table scans
mysql-test/r/grant_cache.result:
Fixed results after SHOW STATUS doesn't anymore affect status variables
mysql-test/r/information_schema.result:
Added extra test to cover more code
mysql-test/r/query_cache.result:
Remove resuts from previous tests
mysql-test/r/status.result:
Added more tests for testing of last_query_cost and how SHOW STATUS affects status variables.
(Bug#10210)
mysql-test/r/temp_table.result:
Fixed results after SHOW STATUS doesn't anymore affect status variables
mysql-test/r/union.result:
Fixed results after SHOW STATUS is not logged to slow query log
(Bug#19764)
mysql-test/t/events_microsec.test:
Disable warnings at init
mysql-test/t/information_schema.test:
Added extra test to cover more code
mysql-test/t/query_cache.test:
Remove resuts from previous tests
mysql-test/t/status.test:
Added more tests for testing of last_query_cost and how SHOW STATUS affects status variables.
(Bug #10210)
sql/mysql_priv.h:
Added 'sql_command_flags'
sql/sql_class.cc:
New function add_diff_to_status(), used to update global status variables when using SHOW STATUS
sql/sql_class.h:
New function 'fill_information_schema_tables()'
(One could not anymore use fill_derived_tables() for this as only_view_structures() is not relevant for information schema tables)
Added defines for bit flags in sql_command_flags[]
sql/sql_lex.cc:
Remove orig_sql_command
sql/sql_lex.h:
Remove orig_sql_command
sql/sql_parse.cc:
Rename uc_update_queries -> sql_command_flags.
Enhanced 'sql_command_flags' to better classify SQL commands
uc_update_queries[] != 0 is changed to (sql_command_flags[] & CF_CHANGES_DATA)
lex->orig_sql_command == SQLCOM_END is changed to (sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND) == 0)
Simplify incrementing of thd->status_var.com_stat[] as we don't have to do special handling for SHOW commands.
Split SQLCOM_SELECT handling in mysql_execute_command() to a separate function.
Added special handling of SHOW STATUS commands in mysql_execute_command() and call common SQLCOM_SELECT handling.
These changes allows us to easily fix that we save and restore status variables during execution of a SHOW STATUS command.
Don't log SHOW STATUS commands to slow query log.
This fixes Bug#10210 and Bug#19764 without adding additional 'if' code.
(The new code is faster than the original as we now have fewer if's than before)
sql/sql_prepare.cc:
Clean up prepare-check handling of SQLCOM commands by using sql_command_flags[]
This simplifes code and ensures that code works even if someone forgets to put a new status commands into the switch statement.
sql/sql_select.cc:
Remove special handling of SHOW STATUS.
(This is now done in SQLCOM_SHOW_STATUS part in mysql_execute_command())
sql/sql_show.cc:
Remove orig_sql_command
Only change sql_command during 'open_normal_and_derived_tables()' (for views) and not for the full duration of generating data.
Changed 'show status' to use thd->initial_status_var to ensure that the current statement is not affecting the to-be-used values.
Use thd->fill_information_schema_tables() instead of 'thd->fill_derived_tables()' as the later wrongly checks the value of sql_command.
sql/sql_yacc.yy:
Remove usage of orig_sql_command.
One side effect of this is that we need to test for cursors if the current command is a SELECT or a SHOW command.
sql/structs.h:
Updated comment
though unneeded". It's indeed unneeded, as slave is only interested in
permanent tables, and permanent tables don't depend on temporary tables
when in row-based binlogging mode. And other CREATE TEMPORARY TABLE
(referring no table or with LIKE) already don't write the CREATE to
binlog in row-based mode.
mysql-test/r/rpl_row_create_table.result:
result update (note that no lines appear in SHOW BINLOG EVENTS further below, which is how we
see the bug is fixed)
mysql-test/t/rpl_row_create_table.test:
testing if a CREATE TEMPORARY TABLE SELECT goes to binlog (it should not)
when in row-based binlogging mode. A few lines after, there is a SHOW
BINLOG EVENTS; before the bugfix it showed the CREATE TEMPORARY TABLE.
sql/sql_class.h:
a method to access select_create::create_info from outside of select_create
("read-only" access). Making get_thd() "read-only" too.
sql/sql_insert.cc:
The function (hook) which writes CREATE TABLE to binlog when in row-based
binlogging mode, for CREATE TABLE SELECT, now does nothing if the table
is temporary (as in row-based mode, temp tables are not replicated).
This is consistent with CREATE TEMPORARY TABLE LIKE and
CREATE TEMPORARY TABLE, which don't write any CREATE to binlog in row-based
mode.
into dator5.(none):/home/pappa/bug17138
mysql-test/t/partition.test:
Auto merged
sql/handler.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_table.cc:
Auto merged
a fatal error. New handling of ignore error in place.
mysql-test/t/partition.test:
New test case
sql/ha_ndbcluster.h:
New handler method to check if error can be ignored
sql/ha_partition.h:
New handler method to check if error can be ignored
sql/handler.h:
New handler method to check if error can be ignored
sql/sql_acl.cc:
Use new handler method
sql/sql_insert.cc:
Use new handler method
sql/sql_table.cc:
Use new handler method
sql/sql_union.cc:
Use new handler method
sql/sql_update.cc:
Use new handler method
Reverted fix for bug#18360
mysql-test/t/func_in.test:
Reverted fix for bug#18360
mysql-test/r/func_in.result:
Reverted fix for bug#18360
sql/item_cmpfunc.cc:
Reverted fix for bug#18360
into bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
mysql-test/r/join.result:
Auto merged
mysql-test/t/join.test:
Auto merged
sql/log.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_show.cc:
Auto merged
There was an incomplete reset of the name resolution context, that caused
INSERT ... SELECT ... JOIN statements to resolve not by joint row type calculated
for the join.
Removed the redundant re-initialization of the context, because
mysql_insert_select_prepare() now correctly saves/restores the context.
mysql-test/r/insert_select.result:
Bug #18080: INSERT ... SELECT ... JOIN results in ambiguous field list error
- testsuite for the bug
mysql-test/t/insert_select.test:
Bug #18080: INSERT ... SELECT ... JOIN results in ambiguous field list error
- testsuite for the bug
sql/sql_parse.cc:
Bug #18080: INSERT ... SELECT ... JOIN results in ambiguous field list error
- remove an incomplete reset of the context because the mentioned function
correctly saves/restores the context.
mysql-test/r/mysqldump.result:
Changed to other database (BUG#20531 hinders usage of 'test' database)
mysql-test/t/mysqldump.test:
Changed to other database (BUG#20531 hinders usage of 'test' database)
1. Removed '-P' command line option;
2. Renamed '--passwd' command line option to '--print-password-line'.
mysql-test/t/im_cmd_line.imtest:
Renamed "--passwd" to "--print-password-line".
server-tools/instance-manager/options.cc:
1. Removed '-P' option;
2. Renamed '--passwd' to '--print-password-line'.
server-tools/instance-manager/user_management_commands.cc:
Renamed class Passwd_cmd to Print_password_line_cmd.
server-tools/instance-manager/user_management_commands.h:
Renamed class Passwd_cmd to Print_password_line_cmd.
tables
Currently in INSERT ... SELECT ... LIMIT ... the compiler uses a
temporary table to store the results of SELECT ... LIMIT .. and then
uses that table as a source for INSERT. The problem is that in some cases
it actually skips the LIMIT clause in doing that and materializes the
whole SELECT result set regardless of the LIMIT.
This fix is limiting the process of filling up the temp table with only
that much rows that will be actually used by propagating the LIMIT value.
mysql-test/r/insert_select.result:
* Bug #9676: INSERT INTO x SELECT .. FROM x LIMIT 1; slows down with big
tables
- a test demonstrating the code path
mysql-test/t/insert_select.test:
* Bug #9676: INSERT INTO x SELECT .. FROM x LIMIT 1; slows down with big
tables
- a test demonstrating the code path
sql/sql_select.cc:
* Bug #9676: INSERT INTO x SELECT .. FROM x LIMIT 1; slows down with big
tables
- pass through the real LIMIT number if the temp table is created for
buffering results.
- set the counter for all the cases when the temp table is not used for
grouping
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
mysql-test/t/archive.test:
Auto merged
sql/log.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
can be started several times; monitor interval must be > 2sec
mysql-test/r/im_daemon_life_cycle.result:
Updated result file.
mysql-test/r/im_life_cycle.result:
Updated result file.
mysql-test/r/im_utils.result:
Updated result file.
mysql-test/t/im_daemon_life_cycle-im.opt:
Set monitoring interval to 1 second in order to:
- be consistent with 5.1;
- speed up tests;
mysql-test/t/im_daemon_life_cycle.imtest:
1. Use wait_for_start.sh script to minimize chance of race condition.
2. Polishing.
mysql-test/t/im_life_cycle.imtest:
1. Use wait_for_start.sh and wait_for_stop.sh scripts to
minimize chance of race condition;
2. Remove some statements, because there is no way now to
stabilize their output.
3. Polishing;
mysql-test/t/im_utils.imtest:
1. Use wait_for_start.sh script to minimize chance of race condition.
2. Polishing.
mysql-test/t/kill_n_check.sh:
1. Make timeout configurable by command-line argument;
2. Change algorithm of waiting for process to restart to be
more robust.
mysql-test/t/im_life_cycle-im.opt:
Set monitoring interval to 1 second in order to:
- be consistent with 5.1;
- speed up tests;
mysql-test/t/im_utils-im.opt:
Set monitoring interval to 1 second in order to:
- be consistent with 5.1;
- speed up tests;
mysql-test/t/wait_for_process.sh:
A new helper script, intended to be used instead of dummy "sleep"
when waiting for some process to start or stop.
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge
client/mysqldump.c:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
Certain updates of table joined to self results in unexpected
behavior.
The problem was that record cache was mistakenly enabled for
self-joined table updates. Normally record cache must be disabled
for such updates.
Fixed wrong condition in code that determines whether to use
record cache for self-joined table updates.
Only MyISAM tables were affected.
mysql-test/r/myisam.result:
Test case for BUG#18036.
mysql-test/t/myisam.test:
Test case for BUG#18036.
sql/sql_update.cc:
Fixed wrong condition in code that determines whether to use
record cache for self-joined table updates.
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
configure.in:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
configure.in:
Auto merged
client/mysqlbinlog.cc:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/archive.result:
Auto merged
mysql-test/r/auto_increment.result:
Auto merged
mysql-test/r/cast.result:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/multi_update.result:
Auto merged
mysql-test/r/ndb_lock.result:
Auto merged
mysql-test/r/replace.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/t/archive.test:
Auto merged
mysql-test/t/auto_increment.test:
Auto merged
mysql-test/t/delayed.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/multi_update.test:
Auto merged
mysql-test/t/ndb_lock.test:
Auto merged
mysql-test/t/select.test:
Auto merged
sql/field.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/structs.h:
Auto merged
storage/archive/ha_archive.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/archive.result:
Auto merged
mysql-test/r/auto_increment.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/ndb_lock.result:
Auto merged
mysql-test/r/rpl_log.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/t/archive.test:
Auto merged
mysql-test/t/auto_increment.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/ndb_lock.test:
Auto merged
mysql-test/t/rpl_log.test:
Auto merged
mysql-test/t/select.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/sql_lex.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
mysql-test/r/cast.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
configure.in:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged