Bug#12166 - Unable to index very large tables
Moved clearing of errors behind the second repair attempt,
but will clear only if no error happened.
No test case. The error can be repeated with little free
space on tmpdir only. I do not know of a way to create this
in a portable way with our test suite.
I did however attach a shell script to the bug report which
can easily be adapted to the situation on the test machine.
myisam/mi_check.c:
Bug#12166 - Unable to index very large tables
Changed comments.
Removed unnecessary use of param->keys_in_use.
sql/ha_myisam.cc:
Bug#12166 - Unable to index very large tables
Moved clearing of errors behind the second repair attempt,
but will clear only if no error happened.
into mysql.com:/usr/home/bar/mysql-5.0.char1
mysql-test/t/ctype_utf8.test:
Auto merged
sql/item_func.cc:
Auto merged
mysql-test/r/ctype_utf8.result:
after merge fix.
sql/sql_update.cc:
discarding this change in 5.0.
field::sort_key() now adds length last for varbinary/blob
VARBINARY/BLOB is now sorted by filesort so that shorter strings comes before longer ones
Fixed issues in test cases from last merge
mysql-test/r/select.result:
Change column name in test to get GROUP BY to use the alias
mysql-test/r/type_blob.result:
Test BLOB and VARCHAR sorting
mysql-test/t/select.test:
Change column name in test to get GROUP BY to use the alias
Drop used tables at start of test
Don't use table names 'a', 'b' or 'c'
mysql-test/t/type_blob.test:
Test BLOB and VARCHAR sorting
sql/field.cc:
Store length last in VARBINARY() and BLOB() columns to get shorter strings sorted before longer onces
sql/field.h:
Added method 'sort_length()' to allow one to have length bytes last for VARBINARY/BLOB to get these to sort properly
sql/filesort.cc:
Use 'sort_length()' instead of 'pack_length()' to get length of field.
Store suffix_length last for varbinary (blob) objects.
The above ensures that BLOB/VARBINARY are correctly sorted (shorter strings before longer ones)
sql/sql_class.h:
Added sort suffix length (to get varbinary/blob to sort correctly)
sql/sql_select.cc:
Use sort_length() instead of pack_lengths()
strings/ctype-bin.c:
Don't let strnxfrm_bin store length last
Better to do it in MySQL field object to ensure it's done properly for all cases
- fixed test
mysql-test/r/rpl_multi_update2.result:
fixed setting/reseting environment
multi-update with subquery added
mysql-test/t/rpl_multi_update2.test:
fixed setting/reseting environment
multi-update with subquery added
sql/sql_update.cc:
set 'updating' in both tables list if we have two of them (because of subquery)
into mysql.com:/home/my/mysql-5.0
mysql-test/t/select.test:
Auto merged
sql/item.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_select.cc:
Auto merged
vio/vio.c:
Auto merged
mysql-test/r/select.result:
Merge and change table names a,b,c to t1,t2.t3
into mysql.com:/usr/home/bar/mysql-5.0.b9278
mysql-test/t/cast.test:
Auto merged
strings/ctype-big5.c:
Auto merged
strings/ctype-tis620.c:
Auto merged
mysql-test/r/cast.result:
Auto merged
mysql-test/r/select.result:
Auto merged
sql/handler.cc:
Indentation fixes
sql/item.cc:
Remove not needed test of *ref (If ref is set it always points to a valid address)
sql/table.cc:
Indentation changes
Moved buff_end directly after 'buff' assignment to make code more clear
sql/unireg.cc:
Indentation changes
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0
configure.in:
Auto merged
include/config-win.h:
Auto merged
include/m_string.h:
Auto merged
include/my_pthread.h:
Auto merged
myisam/mi_search.c:
Auto merged
mysql-test/r/cast.result:
Auto merged
mysql-test/t/cast.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysys/my_pthread.c:
Auto merged
mysys/thr_alarm.c:
Auto merged
netware/pack_isam.def:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
strings/ctype-big5.c:
Auto merged
strings/ctype-tis620.c:
Auto merged
strings/xml.c:
Auto merged
vio/vio.c:
Auto merged
vio/viosocket.c:
Auto merged
mysql-test/r/select.result:
Merged from 4.1.
netware/BUILD/mwenv:
Merged from 4.1.
scripts/make_binary_distribution.sh:
Merged from 4.1.
sql/mysqld.cc:
Merged from 4.1.
sql/sql_show.cc:
Merged from 4.1.
strings/my_strtoll10.c:
Merged from 4.1.
New syntax: CHAR(x USING charset)
Adding test case.
sql_yacc.yy:
New syntax: CHAR(x USING charset)
Adding new parser rule.
item_strfunc.h:
New syntax: CHAR(x USING charset)
Adding a new constructor.
sql/item_strfunc.h:
New syntax: CHAR(x USING charset)
Adding a new constructor.
sql/sql_yacc.yy:
New syntax: CHAR(x USING charset)
Adding new parser rule.
mysql-test/t/ctype_utf8.test:
New syntax: CHAR(x USING charset)
Adding test case.
mysql-test/r/ctype_utf8.result:
New syntax: CHAR(x USING charset)
Adding test case.
into mysql.com:/usr/home/bar/mysql-5.0.b9278
mysql-test/r/alter_table.result:
Auto merged
mysql-test/r/cast.result:
Auto merged
mysql-test/r/federated.result:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
mysql-test/t/cast.test:
Auto merged
mysql-test/t/federated.test:
Auto merged
Updated more DDL statements to cause implicit commit.
mysql-test/r/rpl_ddl.result:
updated results to test for implicit commit for:
CREATE OR REPLACE VIEW
ALTER VIEW
DROP VIEW
CREATE TRIGGER
DROP TRIGGER
CREATE USER
RENAME USER
DROP USER
mysql-test/t/rpl_ddl.test:
updated results to test for implicit commit for:
CREATE OR REPLACE VIEW
ALTER VIEW
DROP VIEW
CREATE TRIGGER
DROP TRIGGER
CREATE USER
RENAME USER
DROP USER
sql/sql_parse.cc:
added implicit commit for:
CREATE OR REPLACE VIEW
ALTER VIEW
DROP VIEW
CREATE TRIGGER
DROP TRIGGER
CREATE USER
RENAME USER
DROP USER
The bug was in JOIN::join_free which was wrongly determining that
all joins have been already executed and therefore all used tables
can be closed.
mysql-test/r/subselect_innodb.result:
- test results fixed (Bug#12736 "Server crash during a select
mysql-test/t/subselect_innodb.test:
- a test case for Bug#12736 "Server crash during a select": test
that ha_index_or_rnd_end and mysql_unlock_tables are called
for all used tables in proper order.
sql/item_subselect.cc:
- implement subselect_union_engine::is_executed
sql/item_subselect.h:
- implement Item_subselect::is_evaluated. This function is used
to check whether we can clean up a non-correlated join of a subquery
when cleaning up the join of the outer query
sql/sql_lex.h:
- declare st_select_lex::cleanup_all_joins
sql/sql_select.cc:
- remove an argument from JOIN::join_free, it's now not used
- reimplement JOIN::join_free to not unlock tables if there
is a subquery that has not yet been evaluated. Make sure that the
new implementation calls ha_index_or_rnd_end for every table in
the join and inner joins, because all table cursors must be closed
before mysql_unlock_tables.
sql/sql_select.h:
- JOIN::join_free signature changed
sql/sql_union.cc:
- implement a helper method st_select_lex::cleanup_all_joins, which
recursively walks over a tree of joins and calls cleanup() for
each join.
mysql-test/r/subselect.result:
correcting non-ascii chars hosed by automerge as usual
mysql-test/t/subselect.test:
correcting non-ascii chars hosed by automerge as usual
sql/log_event.cc:
correcting bad manual merge. ZERO_LEN is not needed in 5.0, as ::exec_event() just tell()s the relay log instead
of using get_event_len().
sql/log_event.h:
get_event_len() is not needed in 5.0, ZERO_LEN neither.
sql/slave.cc:
fixes to take into account 5.0 specificities in replication. ZERO_LEN is not needed.
into mysql.com:/home/mysql_src/mysql-5.0;
a very bad automerge (issues with non-ascii chars), plus some hard conflicts I'll fix by hand in a next cset
BitKeeper/deleted/.del-compile-pentium64-valgrind-max:
Delete: BUILD/compile-pentium64-valgrind-max
BitKeeper/etc/config:
Auto merged
sql/log.cc:
Auto merged
sql/slave.h:
Auto merged
client/mysqltest.c:
manual merge
mysql-test/r/subselect.result:
manual merge
mysql-test/t/subselect.test:
manual merge
sql/log_event.cc:
manual merge
sql/log_event.h:
manual merge
sql/slave.cc:
manual merge
sql/sql_yacc.yy:
manual merge
can't be executed on slave". It will be possible to solve this problem
in more correct way when we will implement WL#2897 "Complete definer support
in the stored routines".
mysql-test/r/rpl_sp.result:
Added test for bug #13969 "Routines which are replicated from master can't be
executed on slave".
mysql-test/t/rpl_sp.test:
Added test for bug #13969 "Routines which are replicated from master can't be
executed on slave".
sql/sp_head.cc:
sp_change_security_context():
Currently the slave replication thread creates all stored routines with
definer ''@'', ignoring the actual definer. When the slave replication
thread executes these routines, it ignores the definer, and so the routines
work. However, in case of a failover, the replica operates in a normal mysqld
mode and changes security context to the definer when executing a routine.
A proper fix for this issue is described in WL#2897 "Complete definer support
in the stored routines". Until this WL is implemented, we need this temporary
fix, which ignores errors when changing security context.
in short we now record whenever the slave I/O thread ignores a master's event because of its server id,
and use this info in the slave SQL thread to advance Exec_master_log_pos. Because if we
do not, this variable stays at the position of the last executed event, i.e. the last *non-ignored*
executed one, which may not be the last of the master's binlog (and so the slave *looks* behind
the master though it's data-wise it's not).
mysql-test/t/rpl_dual_pos_advance-master.opt:
empty; its goal is just to trigger a server restart after running the test,
so that the master forgets that it was a slave (otherwise it affects the following tests).
sql/log.cc:
No more default arguments for Rotate_log_event constructor.
MYSQL_LOG::appendv() is now called without mutex.
sql/log_event.cc:
Moving one Rotate_log_event constructor from log_event.h. Support for on-demand choice of
duplicating the string argument of the constructor or not (because there now are needs for both
alternatives, see slave.cc).
sql/log_event.h:
We now have a case where a Rotate_log_event is executed by the slave SQL thread while
not being in the relay log, so it needs to pretend its length is 0: a ZERO_LEN flag for that;
a flag DUP_NAME (replaces "bool alloced") to be able to choose if we want the constructor
to duplicate the string argument or not.
sql/slave.cc:
A comment for BUG#13861 (to be fixed). llstr() instead of %ld as the number is ulonglong.
mi->rli becomes rli in some places.
Fix for BUG#13023:
- in the slave I/O thread, whenever we ignore an event because of its server id we update
a couple of coordinates in memory
- in the slave SQL thread, whenever we bump into the end of the latest relay log, we check
this couple of coordinates to see if we should advance our Exec_master_log_pos.
- when the slave I/O thread terminates it saves these in-memory coordinates into a Rotate event
in the relay log, so that they are durable.
sql/slave.h:
A couple of coordinates in RELAY_LOG_INFO to keep track of the last ignored events received
by the slave I/O thread (ignored because of the server id).
mysql-test/r/rpl_dual_pos_advance.result:
New BitKeeper file ``mysql-test/r/rpl_dual_pos_advance.result''
mysql-test/t/rpl_dual_pos_advance.test:
Test for BUG#13023 (with a part, disabled, to test BUG#13861 when I fix it).
Before the fix, this test used to hang.