The crash mentioned in original bug report is already prevented by one
of previous patches (fix for bug #13343 "CREATE|etc TRIGGER|VIEW|USER
don't commit the transaction (inconsistency)"), this patch only improve
error returning.
mysql-test/r/sp-error.result:
Test that statements which implicitly commit transaction
mysql-test/t/sp-error.test:
Test that statements which implicitly commit transaction
sql/sp_head.cc:
We set the new flag about commit/rollback statements presence
sql/sp_head.h:
The new flag about commit/rollback presence added
A comment fixed
sql/sql_yacc.yy:
Removed commit/rollback-statement-present errors spread by this file, only one check left which check flags of a SP
mysql-test/r/ndb_charset.result:
bug#14007 test [re-commit]
mysql-test/t/ndb_charset.test:
bug#14007 test [re-commit]
ndb/include/kernel/AttributeDescriptor.hpp:
bug#14007 4.1 need getSizeInBytes [re-commit]
ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp:
bug#14007 4.1 *** do not AUTOmerge to 5.0 *** [re-commit]
into mysql.com:/home/mydev/mysql-5.0-5000
mysql-test/r/handler.result:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/t/handler.test:
Auto merged
mysql-test/t/myisam.test:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/mysql_priv.h:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Manual merge.
sql/sql_base.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Manual merge.
sql/sql_handler.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Manual merge.
sql/sql_table.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Manual merge.
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.h:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
field. (Bug #14299)
mysql-test/r/type_binary.result:
Add results
mysql-test/t/type_binary.test:
Add new regression test
sql/field.cc:
Always report truncation of binary and varbinary strings, even if it was
just spaces. (Plus some minor style/comment cleanups.)
Version for 5.0.
It fixes three problems:
1. The cause of the bug was that we did not check the table version for
the HANDLER ... READ commands. We did not notice when a table was
replaced by a new one. This can happen during ALTER TABLE, REPAIR
TABLE, and OPTIMIZE TABLE (there might be more cases). I call the fix
for this problem "the primary bug fix".
2. mysql_ha_flush() was not always called with a locked LOCK_open.
Though the function comment clearly said it must.
I changed the code so that the locking is done when required. I call
the fix for this problem "the secondary fix".
3. In 5.0 (not in 4.1 or 4.0) DROP TABLE had a possible deadlock flaw in
concur with FLUSH TABLES WITH READ LOCK. I call the fix for this
problem "the 5.0 addendum fix".
include/my_pthread.h:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Added a new macro for the 5.0 addendum fix.
mysql-test/r/handler.result:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
The test result.
mysql-test/t/handler.test:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
The test case.
sql/lock.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed a comment which did confuse me and which is not fully
correct anymore after the 5.0 addendum fix.
Added an assertion which would fire without the 5.0 addendum fix.
sql/mysql_priv.h:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed a definition for the secondary fix.
sql/sql_base.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed function calls for the secondary fix.
sql/sql_class.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed a function call for the secondary fix.
sql/sql_handler.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
The first two diffs make the primary bug fix.
The rest is for the secondary fix.
sql/sql_table.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
The first diff (four changed places) make the 5.0 addendum fix.
The other three are changed function calls for the secondary fix.
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug6-5.0
myisam/ft_parser.c:
Auto merged
mysql-test/r/fulltext.result:
Auto merged
mysql-test/t/fulltext.test:
Auto merged
into mysql.com:/home/mydev/mysql-4.1-4100
mysql-test/r/handler.result:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
mysql-test/t/handler.test:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Manual merge.
sql/sql_handler.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Manual merge.
sql/sql_table.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Manual merge.
test_if_order_by_key() expected only Item_fields to be in order->item, thus
failing to find available index on view's field, which results in reported
error.
Now test_if_order_by_key() calls order->item->real_item() to get field for
choosing index.
sql/sql_select.cc:
Fix bug #14816 test_if_order_by_key() expected only Item_fields.
Make test_if_order_by_key() use real_item() to get field.
mysql-test/r/view.result:
Test case for bug#14816 test_if_order_by_key() expected only Item_fields.
mysql-test/t/view.test:
Test case for bug#14816 test_if_order_by_key() expected only Item_fields.
ps_grant.result:
Fixing result order.
grant.result:
Adding test case,
fixing result order.
grant.test:
Adding test case.
sql_acl.cc:
Fixed that my_charset_latin1 was incorrectly used instead of system_charset_info.
This problem was previously fixed by Ingo in 5.0.
This patch is basically a backport of the same changes into 4.1.
sql/sql_acl.cc:
Bug#14406 GRANTS ON objects with non-ascii names borked after FLUSH PRIVILEGES
Fixed that my_charset_latin1 was incorrectly used instead of system_charset_info.
This problem was previously fixed by Ingo in 5.0.
This patch is basically a backport of the same changes into 4.1.
mysql-test/t/grant.test:
Adding test case.
mysql-test/r/grant.result:
Adding test case,
fixing result order.
mysql-test/r/ps_grant.result:
Fixing result order.
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/mysql_priv.h:
Manual merge
myisam/ft_parser.c:
word->len calculation correction.
mysql-test/r/fulltext.result:
Test case for bug#5686.
mysql-test/t/fulltext.test:
Test case for bug#5686.
we changing current db temporarily and restore it when sp is created. however thd->db
in this case becomes empty string rather than NULL and so all checks of thd->db == NULL
will be false. So if after this we'll issue create procedure sp2()... without specifying
db it will succeed and create sp with db=NULL, which causes mysqldto crash on
show procedure status statement.
This patch fixes the problem.
mysql-test/r/sp-error.result:
Result for bug #14569.
mysql-test/t/sp-error.test:
Test for bug #14569.
sql/sql_db.cc:
Fixes bug #14569. When no db is selected as current and we do create procedure db.sp()...
we changing current db temporarily and restore it when sp is created. however thd->db
in this case becomes empty string rather than NULL and so all checks of thd->db == NULL
will be false. This patch fixes this issue.
sql/sql_parse.cc:
Fixes bug #14569. Reverted from initial patch to check thd->db for null values only.
View .frm parser assumes that query string will take only 1 line, with \n in
aliases query stringmay take several lines thus produces bad .frm file.
'query' parameter type changed from 'string' to 'escaped string'
sql/sql_view.cc:
Fix bug #13622 \n in column alias results in broken .frm
'query' parameter type changed to 'escaped string'
mysql-test/r/view.result:
Test case for bug #13622 Wrong view .frm created if some field's alias contain \n
mysql-test/t/view.test:
Test case for bug #13622 Wrong view .frm created if some field's alias contain \n
in the function body
Changed the way the end of query was found from the lex state.
The routine body was not extracted correctly when using the
/*!version ... */ wrapper (in dump files); for some types of routines
(e.g. with a label at the first begin), the trailing "*/" was not skipped.
mysql-test/r/sp.result:
New test case for BUG#14723.
mysql-test/t/sp.test:
New test case for BUG#14723.
sql/sp_head.cc:
Changed the way the end of the definition and body is found from the lex state.
In the case of /*!version */ wrappers we must take the trailing " */" into account.
the same column as an aliased and as a non-aliased column.
The problem was that Item_direct_view_ref::eq() was first comparing view columns
by name, and in this case the name of one of them is different since it is aliased.
mysql-test/r/select.result:
Added test for BUG#14662.
mysql-test/t/select.test:
Added test for BUG#14662.
sql/item.cc:
Changed the way view column refenreces are compared. Two view columns are
equal if they resolve to the same result field of a view.
for invalid view
Permit SHOW CREATE VIEW, SHOW CREATE TABLE, and retrieval of metadata from
information_schema for invalid views
mysql-test/r/information_schema.result:
Fix for bug#13818 SHOW CREATE VIEW / TABLE and information_schema.views fail
for invalid view
test case
mysql-test/t/information_schema.test:
Fix for bug#13818 SHOW CREATE VIEW / TABLE and information_schema.views fail
for invalid view
test case
into mysql.com:/home/alik/MySQL/devel/5.0-wl2818
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
mysql-test/r/rpl_sp.result:
Manual merge.
checks on trigger activation)
mysql-test/r/information_schema.result:
Update result file: a new column DEFINER has been added to
INFORMATION_SCHEMA.TRIGGERS.
mysql-test/r/mysqldump.result:
Update result file: a new column DEFINER has been added to
INFORMATION_SCHEMA.TRIGGERS.
mysql-test/r/rpl_ddl.result:
Update result file: a new column DEFINER has been added to
INFORMATION_SCHEMA.TRIGGERS.
mysql-test/r/rpl_sp.result:
Update result file: a new clause DEFINER has been added to
CREATE TRIGGER statement.
mysql-test/r/rpl_trigger.result:
Results for new test cases were added.
mysql-test/r/skip_grants.result:
Error message has been changed.
mysql-test/r/trigger.result:
Added DEFINER column.
mysql-test/r/view.result:
Error messages have been changed.
mysql-test/r/view_grant.result:
Error messages have been changed.
mysql-test/t/mysqldump.test:
Drop created procedure to not affect further tests.
mysql-test/t/rpl_trigger.test:
Add tests for new column in information schema.
mysql-test/t/skip_grants.test:
Error tag has been renamed.
mysql-test/t/view.test:
Error tag has been renamed.
mysql-test/t/view_grant.test:
Error tag has been changed.
sql/item_func.cc:
Fix typo in comments.
sql/mysql_priv.h:
A try to minimize copy&paste:
- introduce operations to be used from sql_yacc.yy;
- introduce an operation to be used from trigger and
view processing code.
sql/share/errmsg.txt:
- Rename ER_NO_VIEW_USER to ER_MALFORMED_DEFINER in order to
be shared for view and trigger implementations;
- Fix a typo;
- Add a new error code for trigger warning.
sql/sp.cc:
set_info() was split into set_info() and set_definer().
sql/sp_head.cc:
set_info() was split into set_info() and set_definer().
sql/sp_head.h:
set_info() was split into set_info() and set_definer().
sql/sql_acl.cc:
Add a new check: exit from the cycle if the table is NULL.
sql/sql_lex.h:
- Rename create_view_definer to definer, since it is used for views
and triggers;
- Change st_lex_user to LEX_USER, since st_lex_user is a structure.
So, formally, it should be "struct st_lex_user", which is longer
than just LEX_USER;
- Add trigger_definition_begin.
sql/sql_parse.cc:
- Add a new check: exit from the cycle if the table is NULL;
- Implement definer-related functions.
sql/sql_show.cc:
Add DEFINER column.
sql/sql_trigger.cc:
Add DEFINER support for triggers.
sql/sql_trigger.h:
Add DEFINER support for triggers.
sql/sql_view.cc:
Rename create_view_definer to definer.
sql/sql_yacc.yy:
Add support for DEFINER-clause in CREATE TRIGGER statement.
Since CREATE TRIGGER and CREATE VIEW can be similar at the start,
yacc is unable to distinguish between them. So, had to modify both
statements in order to make it parsable by yacc.
mysql-test/r/trigger-compat.result:
Result file for triggers backward compatibility test.
mysql-test/r/trigger-grant.result:
Result file of the test for WL#2818.
mysql-test/t/trigger-compat.test:
Triggers backward compatibility test: check that the server
still can load triggers w/o definer attribute and modify
tables with such triggers (add a new trigger, etc).
mysql-test/t/trigger-grant.test:
Test for WL#2818 -- check that DEFINER support in triggers
works properly
Indeed now that stored procedures CALL is not binlogged, but instead the invoked substatements are,
the restrictions applied by log-bin-trust-routine-creators=0 are superfluous for procedures.
They still need to apply to functions where function calls are written to the binlog (for example as "DO myfunc(3)").
We rename the variable to log-bin-trust-function-creators but allow the old name until some future version (and issue a warning if old name is used).
mysql-test/mysql-test-run.pl:
update to new option name
mysql-test/mysql-test-run.sh:
update to new option name
mysql-test/mysql_test_run_new.c:
update to new option name
mysql-test/r/rpl_sp.result:
result update
mysql-test/t/rpl_sp-slave.opt:
we need to skip this error to not hit BUG#14769
mysql-test/t/rpl_sp.test:
Test update:
1) as log-bin-trust-routine-creators now affects only functions, the testing of this option, which was
mainly done on procedures, is moved to functions
2) cleanup is simplified; and instead of many SHOW BINLOG EVENTS we do a big one in the end, which is more
maintainable.
3) we test a few more function and procedures cases to see how they replicate.
4) removing out-of-date comments
sql/item_func.cc:
This warning is wrong since binlogging of functions was changed in August. If a function fails
in the middle, it will be binlogged with its error code (i.e. properly).
sql/mysql_priv.h:
variable name changed
sql/mysqld.cc:
option name changes. A precision about --read-only.
sql/set_var.cc:
a new class sys_var_trust_routine_creators to be able to issue a "this is a deprecated variable" warning if used.
sql/set_var.h:
new class to be able to issue a "this is a deprecated variable" warning if used.
sql/share/errmsg.txt:
routine -> function
sql/sp.cc:
log-bin-trust-routine-creators now applies only to functions.
sql/sql_parse.cc:
1) sending ER_FAILED_ROUTINE_BREAK_BINLOG is wrong since August as we don't binlog CALL anymore but instead binlog the substatements;
the clear_error() goes away too as it was necessary only when we created a binlog event from the "CALL" statement.
2) log-bin-trust-routine-creators now applies only to functions.
sql/sql_trigger.cc:
comments.
mysql-test/r/ps_1general.result:
Remove binlog from visable engine list.
sql/handler.h:
Added documentation to HTON's
sql/log.cc:
binlog now has hidden flag show that it does now show up in show storage engine list.
sql/sql_show.cc:
Flag removes engines from view in show storage engines
Corrected the syntax for the current_user() case.
(It's "definer = current_user[()]", not just "current_user[()]".)
mysql-test/r/view.result:
New test case for BUG#14719
mysql-test/t/view.test:
New test case for BUG#14719
sql/sql_yacc.yy:
Corrected the CREATE VIEW syntax for the current_user() DEFINER case.
(It's "definer = current_user[()]", not just "current_user[()]".)
into mysql.com:/home/psergey/mysql-5.0-oct08-push
mysql-test/r/create.result:
Auto merged
mysql-test/t/create.test:
Auto merged
sql/sql_table.cc:
Auto merged
initialization crashes server.
Make sure variables are initialized to something (like null) when
the default initialization fails and a continue handler is in effect.
mysql-test/r/sp.result:
New test case for BUG#14643.
mysql-test/t/sp.test:
New test case for BUG#14643.
sql/sp_head.cc:
Make sure variables are initialized to something (like null) when
the default initialization fails and a continue handler is in effect.
If this also fails (out of memory), we have to abort without letting
the handler catch.
non-deterministic result in the test case for BUG#7947
the bug fix for BUG#7947 now fixed the result of mix_innodb_myisam_binlog test, which
in the past was missing DO RELEASE_LOCK() in the output of SHOW BINLOG EVENTS
mysql-test/r/mix_innodb_myisam_binlog.result:
DO RELEASE_LOCK() was supposed to be there from the very start
mysql-test/r/rpl_bug7947.result:
changed select release_lock() to do release_lock() to avoid having to compare the
non-deterministic result
mysql-test/t/rpl_bug7947.test:
changed select release_lock() to do release_lock() to avoid having to compare the
non-deterministic result
are done for the = operator, such as when doing a comparison with a large
unsigned number that was quoted. (Bug #12612)
mysql-test/r/func_equal.result:
Add new results
mysql-test/t/func_equal.test:
Add new test
sql/item_cmpfunc.cc:
Handle FIELD_ITEM that can be compared as a longlong in agg_cmp_type()
instead of in each of the places it is called.
transaction while holding the lock. Also test to make sure other binlogging issues
reported in the bug have been addressed.
sql/item_func.cc:
fix for BUG#7947
mysql-test/r/rpl_bug7947.result:
New BitKeeper file ``mysql-test/r/rpl_bug7947.result''
mysql-test/t/rpl_bug7947.test:
New BitKeeper file ``mysql-test/t/rpl_bug7947.test''
Replace the full socket path name, not just a directory component. bug#14720
mysql-test/r/connect.result:
In cases where "--tmpdir=" is given to the test run, the socket file is not created below
"$MYSQL_TEST_DIR" but rather within this directory. So the "--replace_result" should not
be done to a directory in the path but rather to the complete path name of the socket file.
bug#14720
mysql-test/t/connect.test:
In cases where "--tmpdir=" is given to the test run, the socket file is not created below
"$MYSQL_TEST_DIR" but rather within this directory. So the "--replace_result" should not
be done to a directory in the path but rather to the complete path name of the socket file.
bug#14720
test "length" first (otherwise when "length" is 0, the *from invalid access still triggers a Valgrind warning).
I wrote to the Valgrind authors in case this is something fixable in Valgrind (normally the
decision to issue a warning is based on the simulated CPU condition code, which should not be undefined here).
BUILD/compile-pentium64-valgrind-max:
putting this script in sync with compile-pentium-valgrind-max, otherwise we didn't have the federated engine compiled in.
mysql-test/r/read_only.result:
result update
sql/field.cc:
To avoid a Valgrind warning running the type_bit test: test "length" first (otherwise when "length" is 0, the *from invalid access still triggers a Valgrind warning).
Initialized usable_keys from table->keys_in_use instead of ~0
in test_if_skip_sort_order(). It was possible that a disabled
index was used for sorting.
mysql-test/r/myisam.result:
Bug#14616 - Freshly imported table returns error 124 when using LIMIT
The test result.
mysql-test/t/myisam.test:
Bug#14616 - Freshly imported table returns error 124 when using LIMIT
The test case.
ctype_utf8.result, ctype_utf8.test:
Adding test case.
item_strfunc.cc:
item_strfunc.h:
Moving the well formed checking code into a method,
to reuse in several Item_func_xxx. Reusing the new
method in Item_func_char and Item_func_charset_conv.
sql/item_strfunc.h:
Bug#14146 CHAR(...USING ...) and CONVERT(CHAR(...) USING...) produce different results
Moving the well formed checking code into a method,
to reuse in several Item_func_xxx.
sql/item_strfunc.cc:
Moving the well formed checking code into a method,
to reuse in several Item_func_xxx.
mysql-test/t/ctype_utf8.test:
Adding test case.
mysql-test/r/ctype_utf8.result:
Adding test case.
when calculating table->null_fields.
mysql-test/r/create.result:
Testcase for BUG#14480
mysql-test/t/create.test:
Testcase for BUG#14480
sql/sql_table.cc:
BUG#14480: For CREATE ... SELECT ... a field list passed to mysql_prepare_table() contains
instances of create_field for both create-list and select-list. mysql_prepare_table()
matches elements that refer to the same field, and joins them together. When the "join"
is performed, both of create_field structures has already been counted in "null_fields".
This fix makes sure that "null_fields" contains the correct value after two create_field
structures have been joined.
mysql-test/r/csv.result:
correct result file
mysql-test/t/csv.test:
Add test for a bug
sql/examples/ha_tina.cc:
Add O_APPEND flag to my_open. We should always add rows to the end of file
mysql-test/r/csv.result:
update result file
mysql-test/t/csv.test:
Add test for a bug
sql/examples/ha_tina.cc:
sort function should return reverted values for chains to be sorted in
the right orded. don't do a strange memmove
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
mysql-test/r/func_gconcat.result:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/subselect_innodb.result:
BUG#14342 test case
mysql-test/t/subselect_innodb.test:
BUG#14342 test case
sql/opt_range.cc:
avoiding of calling Item::val_* methods family with opt_range mem_root, because its life time is too short.
Makefile.am:
Auto merged
client/Makefile.am:
Auto merged
libmysql/Makefile.am:
Auto merged
libmysql_r/Makefile.am:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/Makefile.am:
Auto merged
netware/Makefile.am:
Auto merged
support-files/Makefile.am:
Auto merged
Version for 4.0.
It fixes two problems:
1. The cause of the bug was that we did not check the table version for
the HANDLER ... READ commands. We did not notice when a table was
replaced by a new one. This can happen during ALTER TABLE, REPAIR
TABLE, and OPTIMIZE TABLE (there might be more cases). I call the fix
for this problem "the primary bug fix".
2. mysql_ha_flush() was not always called with a locked LOCK_open.
Though the function comment clearly said it must.
I changed the code so that the locking is done when required. I call
the fix for this problem "the secondary fix".
mysql-test/r/handler.result:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
The test result.
mysql-test/t/handler.test:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
The test case.
sql/mysql_priv.h:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed a definition for the secondary fix.
sql/sql_base.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed function calls for the secondary fix.
sql/sql_class.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed a function call for the secondary fix.
sql/sql_handler.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
The first two diffs make the primary bug fix.
The rest is for the secondary fix.
sql/sql_table.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed function calls for the secondary fix.
into mysql.com:/home/hf/work/mysql-5.0.9551
BitKeeper/deleted/.del-ctype_cp932.result:
Auto merged
BitKeeper/deleted/.del-ctype_cp932.test:
Auto merged
into mysql.com:/home/psergey/mysql-5.0-oct03-push
mysql-test/r/join_nested.result:
Auto merged
mysql-test/t/join_nested.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/table.h:
Auto merged
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-tmp
mysql-test/mysql-test-run.sh:
Auto merged
BitKeeper/deleted/.del-ctype_cp932.result:
Auto merged
BitKeeper/deleted/.del-ctype_cp932.test:
Auto merged
Makefile.am:
Merged from 4.1
large table gives server crash": make sure that when a MyISAM temporary
table is created for a cursor, it's created in its memory root,
not the memory root of the current query.
mysql-test/r/sp.result:
Test results fixed: a test case for Bug#14210
mysql-test/t/sp.test:
A test case for Bug#14210 "Simple query with > operator on large table
gives server crash"
sql/handler.cc:
- rewrite get_new_handler to accept a memory root and use it for
sql/handler.h:
- get_new_handler declaration changed
sql/opt_range.cc:
- get_new_handler declaration changed
sql/sql_base.cc:
- get_new_handler declaration changed
sql/sql_select.cc:
- the actual fix for Bug#14210. In create_myisam_from_heap we should
create the new table handler in TABLE::mem_root, not in THD::mem_root:
the latter is freed shortly after cursor is open.
- adjust create_tmp_table to explicitly supply &table->mem_root
to get_new_handler when creating a handler for a new temporary table
sql/sql_table.cc:
- get_new_handler declaration changed
sql/table.cc:
- get_new_handler declaration changed
sql/unireg.cc:
- get_new_handler declaration changed
tests/mysql_client_test.c:
A test case for Bug#14210 "Simple query with > operator on large table
gives server crash": a C API test case is worth adding because of different
memory allocation/freeing patterns in handling of C API and SP cursors
into mysql.com:/home/hf/work/mysql-5.0.9551
BitKeeper/deleted/.del-ctype_cp932.result:
Auto merged
BitKeeper/deleted/.del-ctype_cp932.test:
Auto merged
Invalid date like 2000-02-32 wasn't converted to int, which lead to not
using index and comparison with field as astring, which results in slow
query execution.
convert_constatn_item() and get_mm_leaf() now forces MODE_INVALID_DATES to
allow such conversion.
sql/item.h:
Fix bug #14093 Query takes a lot of time when date format is not valid
To Item_int_with_ref added method real_item() which returns ref.
sql/item_cmpfunc.cc:
Fix bug #14093 Query takes a lot of time when date format is not valid
convert_constant_item() now allows conversion of invalid dates like 2000-01-32 to int to make it possible to use index when comparing fields with such dates.
sql/opt_range.cc:
Fix bug #14093 Query takes a lot of time when date format is not valid
get_mm_leaf() modified so it allows index usage for comparing fields with invalid dates like 2000-01-32.
mysql-test/r/select.result:
Test case for bug#14093 Query takes a lot of time when date format is not valid
mysql-test/t/select.test:
Test case for bug#14093 Query takes a lot of time when date format is not valid
mysql-test/r/type_newdecimal.result:
test result updated
mysql-test/t/type_newdecimal.test:
test case added
strings/decimal.c:
i think that gives the proper precision
Fixed wrong test case
table.cc:
Fixed wrong DBUG_ENTER placement
sql/table.cc:
Fixed wrong DBUG_ENTER placement
mysql-test/r/func_gconcat.result:
Fixed wrong test case
new file
sql_table.cc, handler.h:
Fixed bug #14540.
Added error mnemonic code HA_ADMIN_NOT_BASE_TABLE
to report that an operation cannot be applied for views.
view.test, view.result:
Added a test case for bug #14540.
errmsg.txt:
Fixed bug #14540.
Added error ER_CHECK_NOT_BASE_TABLE.
mysql-test/r/view.result:
Added a test case for bug #14540.
mysql-test/t/view.test:
Added a test case for bug #14540.
sql/handler.h:
Fixed bug #14540.
Added error mnemonic code HA_ADMIN_NOT_BASE_TABLE
to report that an operation cannot be applied for views.
sql/share/errmsg.txt:
Added error ER_CHECK_NOT_BASE_TABLE.
sql/sql_table.cc:
Fixed bug #14540.
Added error mnemonic code HA_ADMIN_NOT_BASE_TABLE
to report that an operation cannot be applied for views.
(BDB keylength limitted to 255)
mysql-test/r/bdb.result:
fix bdb test after fixing the maximal length of BDB keys to 2^32-1
sql/ha_berkeley.h:
use the maximal possible length of 2^32 - 1
client/mysqltest.c:
Auto merged
myisam/mi_check.c:
Auto merged
mysql-test/r/update.result:
Auto merged
mysql-test/t/update.test:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/spatial.cc:
Auto merged
sql/sql_select.h:
Auto merged
BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003:
Auto merged
Item_func_group_concat::print() wasn't printing sort order thus creating wrong
view. This results in reported error.
sql/item_sum.cc:
Fix bug #14466 lost sort order in GROUP_CONCAT() in a view
Now Item_func_group_concat::print() prints sort order.
mysql-test/r/view.result:
Test case for bug #14466 lost sort order in GROUP_CONCAT() in a view
mysql-test/t/view.test:
Test case for bug #14466 lost sort order in GROUP_CONCAT() in a view
Added finer scope control for default clauses of local variable
declarations.
mysql-test/r/sp.result:
New test case for BUG#14376.
mysql-test/t/sp.test:
New test case for BUG#14376.
sql/sp_pcontext.cc:
Added boundary variable for local parameters/variables,
for better scope control of default values.
sql/sp_pcontext.h:
Added boundary variable for local parameters/variables,
for better scope control of default values.
sql/sql_yacc.yy:
Make the variables of the current DECLARE "invisible" to its DEFAULT clause.
Fix for bug #14536: SELECT @a,@a:=... fails with prepared statements
mysql-test/r/func_sapdb.result:
Correct tests after reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort)
mysql-test/r/type_newdecimal.result:
Correct tests after reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort)
mysql-test/r/user_var.result:
More test with SELECT @a:=
mysql-test/t/disabled.def:
Enable user_var.test for
mysql-test/t/user_var.test:
More test with SELECT @a:=
sql/item.cc:
Simple optimization during review of new code
sql/item_func.cc:
Reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort)
sql/item_timefunc.h:
timediff() can return NULL for not NULL arguments
sql/sql_base.cc:
Remove usage of current_thd() in mysql_make_view()
sql/sql_lex.h:
Remove usage of current_thd() in mysql_make_view()
sql/sql_select.cc:
Fix for bug #14536: SELECT @a,@a:=... fails with prepared statements
sql/sql_view.cc:
Remove usage of current_thd() in mysql_make_view()
Simple optimization of new code
sql/sql_view.h:
Remove usage of current_thd() in mysql_make_view()
sql/table.cc:
Simple optimization of new code
Removed wrong fix for bug #14009 (use of abs() on null value causes problems with filesort)
Mark that add_time(), time_diff() and str_to_date() can return null values
myisam/mi_check.c:
keyoffset is not a position (no %lx here)
mysql-test/r/func_sapdb.result:
Fixed test after marking that timediff() can return NULL
sql/item_func.cc:
Removed wrong fix for bug #14009 (use of abs() on null value causes problems with filesort)
sql/item_timefunc.cc:
Mark that add_time and str_to_date() can return null values
sql/item_timefunc.h:
Mark that time_diff can return 0
sql/spatial.cc:
Simple cleanups during review of new code
Added FIELD_TYPE_BIT to field method 'needs_quotes' to make BIT columns
work.
mysql-test/r/federated.result:
BUG# 14532
Test fix by creating table with bit column and inserting,selecting
mysql-test/t/federated.test:
BUG# 14532
Test fix by creating table with bit column and inserting,selecting
sql/field.cc:
BUG #14532
Just needed to quote/escape bit field, add FIELD_TYPE_BIT to switch
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-tmp
client/mysqlimport.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/gis.result:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
sql/field.cc:
Auto merged
sql/item_geofunc.cc:
Auto merged
sql/spatial.cc:
Auto merged
sql/spatial.h:
Auto merged
support-files/my-huge.cnf.sh:
Auto merged
support-files/my-innodb-heavy-4G.cnf.sh:
Auto merged
support-files/my-large.cnf.sh:
Auto merged
mysql-test/mysql-test-run.sh:
Merged from 4.1.
mysql-test/r/mysqldump.result:
Merged from 4.1.
mysql-test/t/gis.test:
Merged from 4.1.
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
cause a crash or write to an incorrect memory location. (Bug #14216)
mysql-test/r/union.result:
Update results
mysql-test/t/union.test:
Add regression test
sql/item.cc:
Set max_length for decimal fields correctly
include/config-netware.h:
Merged
innobase/row/row0ins.c:
BUG#10511: Per alexi's instructions, the changes in innobase/row/row0ins.c are not
propagated to 5.x
mysql-test/r/create.result:
Auto Merged
mysql-test/t/create.test:
Auto Merged
sql/field.cc:
Auto Merged
sql/field.h:
Manual Merge
sql/sql_table.cc:
Auto Merged
do advance the source pointer over 2 bytes that specify value length.
myisam/mi_key.c:
Fix for BUG#13814: in mi_pack_key(), when processing NULL value for TINYBLOB key segment,
do advance the source pointer over 2 bytes that specify value length (for NULL value the
format is: null_marker 0x01, value length 0x00 0x00, data: 0x00 keyseg->length times).
We need to advance over 2 bytes separately as keyseg->length doesn't include them.
mysql-test/r/myisam.result:
Testcase for BUG#13814
mysql-test/t/myisam.test:
Testcase for BUG#13814
Procedure analyse() redefines select's fields_list. setup_copy_fields() assumes
that fields_list is a part of all_fields_list. Because select have only
3 columns and analyse() redefines it to have 10 columns, int overrun in
setup_copy_fields() occurs and server goes to almost infinite loop.
Because fields_list used not only to send data ad fields types, it's wrong
to allow procedure redefine it. This patch separates select's fileds_list
and procedure's one. Now if procedure is present, copy of fields_list is
created in procedure_fields_list and it is used for sending data and fields.
mysql-test/t/analyse.test:
Test case for bug #14138 ROLLUP and PROCEDURE ANALYSE() hang server
mysql-test/r/analyse.result:
Test case for bug #14138 ROLLUP and PROCEDURE ANALYSE() hang server
sql/sql_select.h:
Fix bug #14138 ROLLUP and PROCEDURE ANALYSE() hang server
To JOIN Added separate fields_list for procedure.
sql/sql_select.cc:
Fix bug #14138 ROLLUP and PROCEDURE ANALYSE() hang server
SELECT's fields_list and procedure's fields_list made split. If procedure is defined
then procedure's fields_list is used to send fields and data.
Changed the parser test for wildcards in hostname to checking for empty
strings instead (analogous with the test in default_view_definer()),
since wildcards do appear in the definer's host-part sometimes.
mysql-test/r/view.result:
Updated result.
mysql-test/r/view_grant.result:
Added test for BUG#14256.
mysql-test/t/view.test:
Changed test for explicit definer; wildcards in host are ok, empty host-part is not.
mysql-test/t/view_grant.test:
Added test for BUG#14256.
sql/sql_yacc.yy:
Changed test for wildcards in hostpart of explicit view definer to test for empty
host part instead. (Analogous with sql_parse.cc:default_view_definer().)
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
client/mysqltest.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
mysql-test/t/myisam.test:
Auto merged
mysql-test/t/sp-security.test:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/structs.h:
Auto merged
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/insert_select.result:
Merge from 4.1 to 5.0.
mysql-test/r/select.result:
Merge from 4.1 to 5.0.
mysql-test/t/insert_select.test:
Merge from 4.1 to 5.0.
mysys/my_handler.c:
Merge from 4.1 to 5.0.
sql/item.cc:
Merge from 4.1 to 5.0.
sql/item_timefunc.cc:
Imported bug fix from 4.1 to 5.0. (Bug#14016)
sql/item_timefunc.h:
Imported bug fix from 4.1 to 5.0. (Bug#14016)
into sanja.is.com.ua:/home/bell/mysql/bk/work-owner7-5.0
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_view.cc:
Auto merged
Date field was declared as not null, thus expression 'datefield is null'
was always false. For SELECT special handling of such cases is used.
There 'datefield is null' converted to 'datefield eq "0000-00-00"'.
In mysql_update() before creation of select added remove_eq_conds() call.
It makes some optimization of conds and in particular performs conversion
from 'is null' to 'eq'.
Also remove_eq_conds() makes some evaluation of conds and if it founds that
conds is always false then update statement is not processed further.
All this allows to perform some update statements process faster due to
optimized conds, and not wasting resources if conds known to be false.
sql/sql_select.cc:
Fix bug#14186 select datefield is null not updated
Remove static from remove_eq_conds()
sql/sql_select.h:
Fix bug#14186 select datefield is null not updated
Added remove_eq_conds() prototype.
mysql-test/r/update.result:
Test case for bug#14186 select datefield is null not updated
mysql-test/t/update.test:
Test case for bug#14186 select datefield is null not updated
sql/sql_update.cc:
Fix bug#14186 select datefield is null not updated
To mysql_update() added call to remove_eq_conds() to optimize conds and convert 'datefield is null' to 'datefield eq 0000-00-00'
mysql-test/r/information_schema.result:
error message changed
mysql-test/r/sp.result:
error message changed
mysql-test/r/sql_mode.result:
fixed test suite
mysql-test/r/view.result:
error message changed
mysql-test/r/view_grant.result:
test of underlying view tables check
mysql-test/t/sql_mode.test:
fixed test suite
mysql-test/t/view_grant.test:
test of underlying view tables check
sql/item.cc:
check of underlying tables privilege added
sql/item.h:
Name the resolution context points to the security context of view (if item belong to the view)
sql/item_func.cc:
a view error hiding for execution of prepared function belonged to a view
fixed checking privileges if stored functions belonds to some view
sql/mysql_priv.h:
refult of derived table processing functions changed to bool
Security_context added as an argument to find_field_in_table()
sql/share/errmsg.txt:
error message fixed
sql/sql_acl.cc:
Storing requested privileges of tables added
View underlying tables privilege check added
sql/sql_base.cc:
View underlying tables privilege check added
sql/sql_cache.cc:
Code cleunup: we should not register underlying tables of view second time
sql/sql_delete.cc:
ancestor -> merge_underlying_list renaming
sql/sql_derived.cc:
refult of derived table processing functions changed to bool
do not give SELECT_ACL for TEMPTABLE views
sql/sql_lex.h:
The comment added
sql/sql_parse.cc:
registration of requested privileges added
sql/sql_prepare.cc:
registration of requested privileges added
sql/sql_update.cc:
manipulation of requested privileges for underlying tables made the same as for table which we are updating
sql/sql_view.cc:
underlying tables of view security check support added
sql/table.cc:
renaming and fixing view preparation methods, methods for checking underlyoing tables security context added
sql/table.h:
storege for reuested privileges added
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-tmp
heap/_check.c:
Auto merged
heap/hp_create.c:
Auto merged
include/config-netware.h:
Auto merged
include/my_base.h:
Auto merged
include/my_handler.h:
Auto merged
include/myisam.h:
Auto merged
innobase/include/Makefile.am:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/mi_delete.c:
Auto merged
myisam/mi_rnext_same.c:
Auto merged
myisam/mi_search.c:
Auto merged
myisam/mi_write.c:
Auto merged
myisam/myisamdef.h:
Auto merged
myisam/sort.c:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/update.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysql-test/t/update.test:
Auto merged
mysys/my_getopt.c:
Auto merged
mysys/my_handler.c:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/records.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/structs.h:
Auto merged
strings/conf_to_src.c:
Auto merged
strings/ctype-win1250ch.c:
Auto merged
Makefile.am:
Merged from 4.1
myisam/myisamchk.c:
Merged from 4.1
mysql-test/mysql-test-run.pl:
Merged from 4.1
mysql-test/r/insert_select.result:
Merged from 4.1
mysql-test/r/myisam.result:
Merged from 4.1
mysql-test/r/select.result:
Merged from 4.1
mysql-test/t/insert_select.test:
Merged from 4.1
mysql-test/t/myisam.test:
Merged from 4.1
netware/mysql_test_run.c:
Merged from 4.1
sql/item.cc:
Merged from 4.1
sql/mysqld.cc:
Merged from 4.1
sql/sql_update.cc:
Merged from 4.1
tests/mysql_client_test.c:
Merged from 4.1
Cleaned up xxxx_gis.test's and made gis_generic.inc independent of ndb
(Note that archive_gis.test fails, but this is independent of this patch)
client/mysqldump.c:
Add DROP TABLE to be able to re-run mysqldump if it fails after 'table-named-as-view' is created
mysql-test/include/gis_generic.inc:
Remove dependency of ndb
mysql-test/include/have_archive.inc:
Fix syntax
mysql-test/include/have_geometry.inc:
Fix syntax
mysql-test/r/mysqldump.result:
New test results after adding 'drop table'
mysql-test/t/archive_gis.test:
gis_generic tests for have_geometry.inc
mysql-test/t/bdb_gis.test:
gis_generic tests for have_geometry.inc
mysql-test/t/innodb_gis.test:
gis_generic tests for have_geometry.inc
mysql-test/t/ndb_gis.test:
gis_generic tests for have_geometry.inc
sql/item_func.cc:
Simplify code (as signal_divide_by_null sets 'null_value')
include/config-netware.h:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/select.result:
Manually merged fix for bug#13855
mysql-test/t/select.test:
Manuall merged fix for bug#13855
Added back missing return in mysql_delete()
mysql-test/my_manage.c:
Cleanup: Remove some #ifdef
mysql-test/r/drop_temp_table.result:
Delete database that may be left from other test
mysql-test/t/drop_temp_table.test:
Delete database that may be left from other test
sql/log.cc:
false -> FALSE
true -> TRUE
Wait until readers_count is 0 (not just for a signal)
NOTE: it's very likely that the way to handle readers_count is wrong.
(We are in pthread_cond_wait freeing a mutex that is not the innermost mutex,
which can lead to deadlocks)
I will talk with Guilhem about this ASAP
sql/log_event.h:
Remove number from last even to help future merges
(all compilers I know of can handle this properly)
sql/sql_delete.cc:
Add back missing RETURN (was lost in a merge)
Indentation fixes
into mysql.com:/home/jimw/my/mysql-5.0-clean
mysql-test/std_data/loaddata_dq.dat:
Merge rename: mysql-test/std_data/loaddata5.dat -> mysql-test/std_data/loaddata_dq.dat
sql/item.cc:
Auto merged
sql/sql_load.cc:
Auto merged
mysql-test/r/loaddata.result:
Resolve conflicts, deal with renamed dat file
mysql-test/t/loaddata.test:
Resolve conflicts, deal with renamed dat file
mysql-test/include/gis_generic.inc:
Change in test for NDB (needs order by)
mysql-test/r/archive.result:
Change for gis_generic
mysql-test/r/archive_gis.result:
Change in test gis_generic
mysql-test/r/bdb_gis.result:
Change in gis test means new results
mysql-test/r/innodb_gis.result:
Change in gis test means change in results.
mysql-test/r/ndb_gis.result:
Change in gis means result change
mysql-test/t/archive.test:
Added alter table test to fix bug in alter table
mysql-test/t/archive_gis.test:
Change in syntax
mysql-test/t/ndb_gis.test:
Change to test both with and not with pushdown conditions
sql/ha_archive.cc:
Removed ARN temp file from exts[] to solve warning messages in alter table.
in sp-destruct.test since using "create ... as ..." didn't preserve everything,
which made the system_mysql_db test fail.
mysql-test/r/sp-destruct.result:
Updated result.
mysql-test/t/sp-destruct.test:
Changed backup method for mysql.proc.
Added error checking for errors when attempting to use stored procedures
after the mysql.proc table has been dropped, corrupted, or tampered with.
Test cases were put in a separate file (sp-destruct.test).
mysql-test/t/sp.test:
Added comment.
sql/share/errmsg.txt:
New error message for corrupted mysql.proc table.
sql/sp.cc:
Check and return error code when caching stored routines.
In the case when no error message has been set, set one.
sql/sp.h:
Return error code from stored routine cache function.
sql/sql_base.cc:
Check for error from sp_cache_routines_* calls.
sql/sql_trigger.h:
Updated friend declaration for sp_cache_routines*.
mysql-test/r/sp-destruct.result:
New test file for destruction of the mysql.proc table.
mysql-test/t/sp-destruct.test:
New result file for destruction of the mysql.proc table.
Made change to mysqlimport to set character_set_database to binary to
make importing various charsets/columns work correctly.
client/mysqlimport.c:
BUG# 12123
Added 'set @@character_set_database=binary' to make loading of tables with
mixed charset types and non-latin characters load.
mysql-test/mysql-test-run.pl:
BUG #12123
Added $MYSQL_IMPORT in order to test mysqlimport bug.
mysql-test/mysql-test-run.sh:
BUG #12123
Added $MYSQL_IMPORT in order to test mysqlimport bug.
mysql-test/r/mysqldump.result:
BUG #12123
Added dumping and reloading (using mysql, mysqldump, and mysqlimport) to
show that this fix handles dumping and reloading of non-latin1 charsets
in table with different charset columns (mixing of charsets, also can be a
UTF table with latin1 tables). Note the select before and after dump and
restore - should be exact.
mysql-test/t/mysqldump.test:
BUG #12123
Added dumping and reloading (using mysql, mysqldump, and mysqlimport) to
show that this fix handles dumping and reloading of non-latin1 charsets
in table with different charset columns (mixing of charsets, also can be a
UTF table with latin1 tables). Note the select before and after dump and
restore - should be exact. (results of this)
avoid multiplying length of field_X by charset->mbmaxlen twice when calculating space
required for field_X in the new table.
mysql-test/r/create.result:
Testcase for BUG#14139
mysql-test/t/create.test:
Testcase for BUG#14139
sql/field.cc:
BUG#14139: Make create_length_to_internal_length() save length-in-characters in
create_field::chars_length.
sql/field.h:
BUG#14139: Add create_length::chars_length where we save length-in-characters, added comments.
sql/sql_table.cc:
BUG#14139: When handling "CREATE TABLE(field_X type_spec,...) SELECT smth AS field_X, ...."
we get two instances of create_field: (1) is occurence of field_X in create list, and (2) is
in select list. If we figure they both refer to the same field, we "join" them according to
some rule that is not explicitly specified anywhere.
When we do this "join", create_field::length already contains length-in-bytes for both, so
when we transfer field length (in characters) from (1) to (2), use length-in-characters that
we have saved in create_length::chars_length.
options to the wrong value. (Bug #12925)
mysql-test/t/mysql_client_test.test:
Add parameter for testing getopt bug
mysys/my_getopt.c:
Remove incorrect and unnecessary casts
tests/mysql_client_test.c:
Add test case for Bug #12925 (my_getopt bug)
mysqldump.result:
BUG# 12838
New test results for mysqldump -x on a DB with views
mysqldump.test:
sqldump.test:
BUG# 12838
New test to run mysqldump -x on a DB with views
mysqldump.c:
BUG# 12838
Removed/Changed code which created tables to be put into the dump
(For loading views of views) by creating temp tables and then using
the CREATE TABLE information in those temp tables. The problem with this
is that when mysqldump -x is called, it locks all tables, so the
temp tables could not be created, causing the mysqldump to exit with
failure. The code was changed to use SHOW FIELDS to get the column
names and type to build CREATE TABLE text used to create these tables
that views need in the dump.
client/mysqldump.c:
BUG# 12838
Removed/Changed code which created tables to be put into the dump
(For loading views of views) by creating temp tables and then using
the CREATE TABLE information in those temp tables. The problem with this
is that when mysqldump -x is called, it locks all tables, so the
temp tables could not be created, causing the mysqldump to exit with
failure. The code was changed to use SHOW FIELDS to get the column
names and type to build CREATE TABLE text used to create these tables
that views need in the dump.
mysql-test/t/mysqldump.test:
sqldump.test:
BUG# 12838
New test to run mysqldump -x on a DB with views
mysql-test/r/mysqldump.result:
BUG# 12838
New test results for mysqldump -x on a DB with views
collation
By default constant strings in second parameter of date_time() have case
insensitive collation. Because of this expressions date_format(f,'%m') and
date_format(f,'%M') wrongly becomes equal, which results in choosing wrong
column to sort by.
Now if second parameter of date_format() is constant then it's collation is
changed to case sensitive.
sql/item_timefunc.cc:
Fix bug #14016 date_format() 2nd parameter was compared using case insensitive collation.
If second parameter of date_format() is constant then it's collation is changed to case sensitive.
mysql-test/r/date_formats.result:
Test case for bug#14016 2nd parameter was compared using case insensitive collation
mysql-test/t/date_formats.test:
Test case for bug#14016 2nd parameter was compared using case insensitive collation
VALUES() can only refer to table insert going to.
But Item_insert_value::fix_fields() were passing to it's arg full table list,
This results in finding second column which shouldn't be found, and
failing with error about ambiguous field.
Item_insert_value::fix_fields() now passes only first table of full table
list.
sql/item.cc:
Fix bug #14016 date_format() 2nd parameter was compared using case insensitive collation.
If second parameter of date_format() is constant then it's collation is changed to case sensitive.
mysql-test/r/insert_select.result:
Test case for bug#14016 2nd parameter was compared using case insensitive collation
mysql-test/t/insert_select.test:
Test case for bug#14016 2nd parameter was compared using case insensitive collation
orders that cannot be handled by the executioner.
mysql-test/r/bigint.result:
Added mssing "drop table if exists"
mysql-test/r/join_nested.result:
Testcase for BUG#13126
mysql-test/t/bigint.test:
Added mssing "drop table if exists"
mysql-test/t/join_nested.test:
Testcase for BUG#13126
sql/mysql_priv.h:
BUG#13126: Added nested_join_map type.
sql/sql_prepare.cc:
BUG#13126: Don't set NESTED_JOIN::counter to 0 here as it is reset in other place now.
sql/sql_select.cc:
BUG#13126: When choosing join order for join with nested joins, don't produce join orders
that the executioner cannot handle. The work is done by check_interleaving_with_nj() and
restore_prev_nj_state() functions that are used from the join optimizer to avoid building
invalid join orders.
sql/sql_select.h:
BUG#13126: Added JOIN_TAB::embedding_map and JOIN::cur_embedding_map.
sql/table.h:
BUG#13126: In NESTED_JOIN: added nj_map, added comment about where counter is used.
This could cause failures because there are table handlers (like federated)
that support quick select scanning but do not support index scanning.
mysql-test/t/disabled.def:
Enabled federated testcase.
type_binary.result, type_binary.test:
Adding test case.
item_timefunc.cc:
Padding code was added.
sql/item_timefunc.cc:
Bug#14255 CAST(x AS BINARY(N)) does not pad
Padding code was added.
mysql-test/t/type_binary.test:
Adding test case.
mysql-test/r/type_binary.result:
Adding test case.
ctype-win1250ch.c:
Like range prefix tables were wrong.
ctype_cp1250_ch.result, ctype_cp1250_ch.test:
Adding test case.
strings/ctype-win1250ch.c:
Bug#13347: empty result from query with like and cp1250 charset
Like range prefix tables were wrong.
mysql-test/t/ctype_cp1250_ch.test:
Adding test case.
mysql-test/r/ctype_cp1250_ch.result:
Adding test case.
mysql-test/r/sp-error.result:
Results for the test case for BUG#13037.
mysql-test/t/sp-error.test:
Test case for BUG#13037.
sql/sql_base.cc:
Polishing: use constant.
sql/sql_class.cc:
Reset THD::where in THD::cleanup_after_query();
Polishing: use the constant (THD::DEFAULT_WHERE).
sql/sql_class.h:
Introduce a constant for the default value of THD::where.
mysql-test/r/ndb_gis.result:
Result file change to check pushdown conditions.
mysql-test/t/ndb_gis.test:
pushdown conditions now checked for geom types
mysql-test/r/innodb_gis.result:
New BitKeeper file ``mysql-test/r/innodb_gis.result''
sql/ha_archive.h:
Adding support for Geometry type to archive.
sql/ha_berkeley.cc:
Adding geometry support to berkely
sql/ha_innodb.cc:
Adding geometry support to Innodb.
sql/ha_ndbcluster.cc:
Adding Geometry support to NDB.
mysql-test/include/gis_generic.inc:
New BitKeeper file ``mysql-test/include/gis_generic.inc''
mysql-test/r/archive_gis.result:
New BitKeeper file ``mysql-test/r/archive_gis.result''
mysql-test/r/bdb_gis.result:
New BitKeeper file ``mysql-test/r/bdb_gis.result''
mysql-test/r/ndb_gis.result:
New BitKeeper file ``mysql-test/r/ndb_gis.result''
mysql-test/t/archive_gis.test:
New BitKeeper file ``mysql-test/t/archive_gis.test''
mysql-test/t/bdb_gis.test:
New BitKeeper file ``mysql-test/t/bdb_gis.test''
mysql-test/t/innodb_gis.test:
New BitKeeper file ``mysql-test/t/innodb_gis.test''
mysql-test/t/ndb_gis.test:
New BitKeeper file ``mysql-test/t/ndb_gis.test''
into mysql.com:/home/timka/mysql/src/5.0-bug-13832
mysql-test/r/select.result:
Auto merged
mysql-test/t/select.test:
Auto merged
sql/sql_yacc.yy:
Auto merged
The cause for the bug is that the priorities of all rules/terminals
that process the FROM clause are not fully specified, and the
parser generator produces a parser that doesn't always parse
the FROM clause so that JOINs are left-associative. As a result
the final join tree produced by the parser is incorrect, which
is the cause for subsequent name resolution to fail.
mysql-test/r/select.result:
Test for BUG#13832.
mysql-test/t/select.test:
Test for BUG#13832.
sql/sql_yacc.yy:
Fix for BUG#13832 - Unknown column t1.a in 'on clause'.
List all join-related operators as having lower priority
than the join operands to make the parser process join-
related productions from left to right.
Option to set environment variable MTR_BUILD_THREAD to a small
number, from what mysql-test-run calculate port numbers that
will not conflict with other runs with different thread num
Makefile.am:
Option to set environment variable MTR_BUILD_THREAD to a small
number, from what mysql-test-run calculate port numbers that
will not conflict with other runs with different thread num