<tmp_tbl> with RBL
When binlogging the statement, the server always handle the existing
object as a table, even though it is a view. However a view is
handled differently in other parts of the code thus leading the
statement to crash in RBL if the view exists.
This happens because the underlying tables for the view are not opened
when we try to call store_create_info() on the view in order to build
a CREATE TABLE statement.
This patch will only address the crash problem, other binlogging
problems related to CREATE TABLE IF NOT EXISTS LIKE when the existing
object is a view will be solved by BUG 47442.
The semisync plugin library names on Unix like systems were prefixed with
'lib', which did not follow the conventions.
Fix the problem by removing the 'lib' prefix on Unix systems.
When the data directory contained a symbolic link to another
file system, and the DATA or INDEX DIRECTORY clause of a
CREATE TABLE statement referred to a subdirectory of the data
directory, this was accepted.
The problem was the use of a table file path name, which included
the table name without an extension, for the comparison against
the data directory path name. This was almost always a
non-existent file. The internal algorithm failed to resolve
symbolic links for non-existent files. So we compared unrelated
path names.
Fixed by truncating the table name from the path before resolving
symlinks. If this is also a non-existent path, the creation of
the table will fail anyway.
Backport to 5.6.0. 6.0-codebase revid: 2599.60.1
table .frm file
Problem:
========
Myisampack --join did not create the destination table .frm file.
The user had to copy one of the source table .frm file as destination .frm
file for mysql server to recognize. This is just 'user-friendliness' issue.
How it was solved
=================
After successful join and compression we copy the frm file from the first
source table.
Functionality added
===================
myisampack --join=/path/t3 /path/t1 /path/t2 creates
/path/t3.frm (which is bascially copied from first table's frm /path/t1)
Tests
=====
Modified myisampack.test to test two scenario's
1. Positive myisampack --join test
In this case after the join operation is done,we test if the destination
table is accessible from the server
2. Positive myisampack --join test with an existing .frm file.
We test the above case with an existing .frm file for the destination
table. It should return success even in this case.
3. Positive myisampack --join test with no .frm file for source tables
We test the join operation with no .frm files for source tables. It should
complete the join operation without any warnings and error messages
4. Negative myisampack --join test
We test myisampack --join with existing .MYI,.MDI,.frm files for the
destination table. It should fail with exit status 2 in this case.
Select queries on archive tables when joined on their primary keys
returns no results(empty set)
Archive storage doesn't inform the handler about the fetched record
status when it is found. Fixed the archive storage engine to update
the record status when it fetches successfully
> ------------------------------------------------------------
> revno: 3190 [merge]
> revision-id: kostja@sun.com-20091103174552-bfpak6r7ngf5cbjb
> parent: magnus.blaudd@sun.com-20091103170719-6b64sjnivsiyz6xy
> parent: kostja@sun.com-20091103165854-7di545xruez8w207
> committer: Konstantin Osipov <kostja@sun.com>
> branch nick: 5.1-41756
> timestamp: Tue 2009-11-03 20:45:52 +0300
> message:
> A fix and a test case for
> Bug#41756 "Strange error messages about locks from InnoDB".
>
> In JT_EQ_REF (join_read_key()) access method,
> don't try to unlock rows in the handler, unless certain that
> a) they were locked
> b) they are not used.
>
> Unlocking of rows is done by the logic of the nested join loop,
> and is unaware of the possible caching that the access method may
> have. This could lead to double unlocking, when a row
> was unlocked first after reading into the cache, and then
> when taken from cache, as well as to unlocking of rows which
> were actually used (but taken from cache).
>
> Delegate part of the unlocking logic to the access method,
> and in JT_EQ_REF count how many times a record was actually
> used in the join. Unlock it only if it's usage count is 0.
>
> Implemented review comments.
> ------------------------------------------------------------
> Use --include-merges or -n0 to see merged revisions.
> ------------------------------------------------------------
> revno: 3184.7.1
> revision-id: luis.soares@sun.com-20091027151553-ri74b2zdchw8wyg7
> parent: joro@sun.com-20091019135504-e6fmhf4xyy0wdymb
> committer: Luis Soares <luis.soares@sun.com>
> branch nick: mysql-5.1-bugteam
> timestamp: Tue 2009-10-27 15:15:53 +0000
> message:
> BUG#48297: Schema name is ignored when LOAD DATA is written into
> binlog, replication aborts
>
> In SBR or MBR, the schema name is not being written to the binlog
> when executing a LOAD DATA statement. This becomes a problem when
> the current database (lets call it db1) is different from the
> table's schema (lets call it db2). For instance, take the
> following statements:
>
> use db1;
> load data local infile 'infile.txt' into table db2.t
>
> Should this statement be logged without t's schema (db2), when
> replaying it, one can get db1.t populated instead of db2.t (if
> db1.t exists). On the other hand, if there is no db1.t at all,
> replication will stop.
>
> We fix this by always logging the table (in load file) with fully
> qualified name when its schema is different from the current
> database or when no default database was selected.
> ------------------------------------------------------------
> revno: 3184.3.13
> revision-id: joro@sun.com-20091019135504-e6fmhf4xyy0wdymb
> parent: joro@sun.com-20091026095557-euhe1z9oxtgkw35h
> committer: Georgi Kodinov <joro@sun.com>
> branch nick: B47788-5.1-bugteam
> timestamp: Mon 2009-10-19 16:55:04 +0300
> message:
> Bug #47788: Crash in TABLE_LIST::hide_view_error on
> UPDATE + VIEW + SP + MERGE + ALTER
>
> When cleaning up the stored procedure's internal
> structures the flag to ignore the errors for
> INSERT/UPDATE IGNORE was not cleaned up.
> As a result error ignoring was on during name
> resolution. And this is an abnormal situation : the
> SELECT_LEX flag can be on only during query execution.
>
> Fixed by correctly cleaning up the SELECT_LEX flag
> when reusing the SELECT_LEX in a second execution.
> ------------------------------------------------------------
> revno: 3182 [merge]
> revision-id: ramil@mysql.com-20091018162655-z4dlolfx5s0zem8l
> parent: alexey.kopytov@sun.com-20091016201951-fsht0wm8xn8vkzsx
> parent: ramil@mysql.com-20091013044327-24km05wc060ied87
> committer: Ramil Kalimullin <ramil@mysql.com>
> branch nick: mysql-5.1-bugteam
> timestamp: Sun 2009-10-18 21:26:55 +0500
> message:
> Fix for bug#47963: Wrong results when index is used
>
> Problem: using null microsecond part in a WHERE condition
> (e.g. WHERE date_time_field <= "YYYY-MM-DD HH:MM:SS.0000")
> may lead to wrong results due to improper DATETIMEs
> comparison in some cases.
>
> Fix: comparing DATETIMEs as strings we must trim trailing 0's
> in such cases.
> ------------------------------------------------------------
> Use --include-merges or -n0 to see merged revisions.
> ------------------------------------------------------------
> revno: 3181
> revision-id: alexey.kopytov@sun.com-20091016201951-fsht0wm8xn8vkzsx
> parent: joerg@mysql.com-20091016164025-kb4sbrggq5o7zufc
> committer: Alexey Kopytov <Alexey.Kopytov@Sun.com>
> branch nick: mysql-5.1-bugteam
> timestamp: Sat 2009-10-17 00:19:51 +0400
> message:
> Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
>
> The problem was in incorrect handling of predicates involving
> NULL as a constant value by the range optimizer.
>
> For example, when creating a SEL_ARG node from a condition of
> the form "field < const" (which would normally result in the
> "NULL < field < const" SEL_ARG), the special case when "const"
> is NULL was not taken into account, so "NULL < field < NULL"
> was produced for the "field < NULL" condition.
>
> As a result, SEL_ARG structures of this form could not be
> further optimized which in turn could lead to incorrectly
> constructed SEL_ARG trees. In particular, code assuming SEL_ARG
> structures to always form a sequence of ordered disjoint
> intervals could enter an infinite loop under some
> circumstances.
>
> Fixed by changing get_mm_leaf() so that for any sargable
> predicate except "<=>" involving NULL as a constant, "empty"
> SEL_ARG is returned, since such a predicate is always false.
> ------------------------------------------------------------
> revno: 3148.9.6
> revision-id: martin.hansson@sun.com-20091102122407-krzh4h0i052lbwr5
> parent: davi.arnaut@sun.com-20091102112236-k3myix2xy8miyv4s
> committer: Martin Hansson <martin.hansson@sun.com>
> branch nick: 5.1bt
> timestamp: Mon 2009-11-02 13:24:07 +0100
> message:
> Bug#47925: regression of range optimizer and date comparison in 5.1.39!
>
> When a query was using a DATE or DATETIME value formatted
> using any other separator characters beside hyphen '-', a
> query with a greater-or-equal '>=' condition matching only
> the greatest value in an indexed column, the result was
> empty if index range scan was employed.
>
> The range optimizer got a new feature between 5.1.38 and
> 5.1.39 that changes a greater-or-equal condition to a
> greater-than if the value matching that in the query was not
> present in the table. But the value comparison function
> compared the dates as strings instead of dates.
>
> The bug was fixed by splitting the function
> get_date_from_str in two: One part that parses and does
> error checking. This function is now visible outside the
> module. The old get_date_from_str now calls the new
> function.
> ------------------------------------------------------------
> revno: 3148.9.3
> revision-id: azundris@mysql.com-20091029230154-jp2xqvzw2nhj9q41
> parent: azundris@mysql.com-20091027095316-54lwjr9vqkscq1ik
> committer: Tatiana A. Nurnberg <azundris@mysql.com>
> branch nick: 51-48295
> timestamp: Thu 2009-10-29 16:01:54 -0700
> message:
> Bug#48295: explain extended crash with subquery and ONLY_FULL_GROUP_BY sql_mode
>
> If an outer query is broken, a subquery might not even get set up.
> EXPLAIN EXTENDED did not expect this and merrily tried to de-ref all
> of the half-setup info.
>
> We now catch this case and print as much as we have, as it doesn't cost us
> anything (doesn't make regular execution slower).