Commit graph

13242 commits

Author SHA1 Message Date
stewart@willster.(none)
ac9abcf2d4 Backport Magnus' fix from 5.1
ChangeSet@1.2575, 2007-08-07 19:16:06+02:00, msvensson@pilot.(none) +2 -0
  Bug#26793 mysqld crashes when doing specific query on information_schema
   - Drop the newly created user user1@localhost
   - Cleanup testcase
2007-08-14 15:07:17 +10:00
stewart@willster.(none)
3afa32dc2b save the data from mysql.db that we delete (side effect that made read_only fail) 2007-07-27 17:12:53 +10:00
stewart@flamingspork.com[stewart]
76f7cdba81 [PATCH] BUG#26793 test: mysqld crashes in NDB on I_S query
Reduce case and formalise into something we should be
able to use in mysql-test-run.

Index: ndb-work/mysql-test/t/ndb_bug26793.test
===================================================================
2007-07-26 20:24:54 +10:00
tomas@whalegate.ndb.mysql.com
8a08ac40fb correct test and result 2007-06-17 22:04:01 +02:00
tomas@whalegate.ndb.mysql.com
b5f30a99f9 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
2007-06-17 19:50:07 +02:00
tomas@whalegate.ndb.mysql.com
9e3c14fae3 BUG#27640
- correct test and result file
2007-06-17 19:27:20 +02:00
mskold/marty@linux.site
dea70c74dd Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2007-06-14 21:58:45 +02:00
tomas@whalegate.ndb.mysql.com
ad81e83c70 Bug #27640 backup id not displayed in the output of "ndb_mgm start backup wait completed"
- correction, missing node id
2007-06-14 18:40:32 +02:00
mskold/marty@linux.site
8945183fc3 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2007-06-14 16:21:52 +02:00
Justin.He/justin.he@dev3-240.dev.cn.tlan
ad88a849c8 Merge jhe@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.0/bug27640-5.0-ndb
2007-06-14 20:45:12 +08:00
Justin.He/justin.he@dev3-240.dev.cn.tlan
51fe11b494 Bug#27640, backup id not displayed in the output of "ndb_mgm start backup wait completed" 2007-06-14 19:40:44 +08:00
mskold/marty@mysql.com/linux.site
43f80e9875 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2007-05-28 15:23:28 +02:00
tomas@whalegate.ndb.mysql.com
186d1534b8 Bug #28719: multi pk update ignore corrupts data
- check multi update as well as update
- this bug is not present in 5.0, but execution patch is wrong, so there are probably other bugs
2007-05-28 13:23:11 +02:00
svoj@mysql.com/june.mysql.com
122167bb4b Merge mysql.com:/home/svoj/devel/bk/mysql-5.0
into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines
2007-05-23 12:39:33 +05:00
tomas@whalegate.ndb.mysql.com
481b314e9a Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
2007-05-22 23:20:40 +02:00
tsmith@quadxeon.mysql.com
99488b31b9 Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/50
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/50
2007-05-21 20:50:08 +02:00
tomas@whalegate.ndb.mysql.com
11feedf073 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
2007-05-21 08:49:49 +02:00
msvensson@pilot.blaudden
a3bd588435 Merge pilot.blaudden:/home/msvensson/mysql/bug28401/my50-bug28401
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-05-19 18:22:08 +02:00
msvensson@pilot.blaudden
bc69d072f3 Bug #28401 mysql_upgrade Failed with STRICT_ALL_TABLES, ANSI_QUOTES and NO_ZERO_DATE
- The SQL commands used by mysql_upgrade are written to be run
    with sql_mode set to '' - thus the scripts should change sql_mode
    for the session to make sure the SQL is legal.
2007-05-19 18:15:08 +02:00
serg@sergbook.mysql.com
c7a4547361 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0
2007-05-18 18:22:38 +02:00
serg@sergbook.mysql.com
11e5fa8f71 added cleanup to some tests 2007-05-18 17:48:44 +02:00
msvensson@pilot.blaudden
01ae08078e Merge bk-internal:/home/bk/mysql-5.0-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-05-18 12:58:28 +02:00
msvensson@pilot.blaudden
c3f407a07a Merge pilot.blaudden:/home/msvensson/mysql/mysql-4.1-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-05-18 12:56:52 +02:00
msvensson@pilot.blaudden
e05aa94353 WL#2247 mysqltest: add option for sorting results
- Final touchups
2007-05-18 12:50:23 +02:00
evgen@moonbone.local
835189cb85 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/28261-bug-5.0-opt-mysql
2007-05-18 13:39:34 +04:00
igor@olga.mysql.com
2189c571b2 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28337
2007-05-17 16:06:57 -07:00
tsmith@siva.hindu.god
30bc713c77 Merge siva.hindu.god:/home/tsmith/m/bk/50
into  siva.hindu.god:/home/tsmith/m/bk/maint/50
2007-05-17 14:17:50 -06:00
evgen@moonbone.local
0e3c4f6729 Bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function
is involved.

The Arg_comparator::compare_datetime() comparator caches its arguments if
they are constants i.e. const_item() returns true. The
Item_func_get_user_var::const_item() returns true or false based on
the current query_id and the query_id where the variable was created.
Thus even if a query can change its value its const_item() still will return
true. All this leads to a wrong comparison result when an object of the
Item_func_get_user_var class is involved.

Now the Arg_comparator::can_compare_as_dates() and the
get_datetime_value() functions never cache result of the GET_USER_VAR()
function (the Item_func_get_user_var class).
2007-05-17 23:09:45 +04:00
tsmith@siva.hindu.god
2703da69ff ps_6bdb.result:
Fix bad merge of test results
2007-05-17 12:55:59 -06:00
igor@olga.mysql.com
8c34ae268c Fixed bug #28337: wrong results for grouping queries with correlated
subqueries in WHERE conditions.
This bug was introduced by the patch for bug 27321.
2007-05-16 23:42:10 -07:00
holyfoot/hf@mysql.com/hfmain.(none)
4ac1e98630 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/8663/my50-8663
2007-05-17 00:10:39 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
28eddbe12b Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/8663/my50-8663
2007-05-17 00:09:43 +05:00
msvensson@pilot.blaudden
4998976d22 Bug#28473 Does mysql-test-run.pl handle LD_LIBRARY_PATH wrong ?
- Fix spelling error
2007-05-16 17:51:28 +02:00
msvensson@pilot.blaudden
d5676f2feb WL#2247 mysqltest: add option for sorting results
- Change from "query_sorted <query>" to "sorted_results"
2007-05-16 17:19:36 +02:00
thek@adventure.(none)
6d6674e71f Merge kpettersson@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
2007-05-16 14:54:47 +02:00
thek@adventure.(none)
ed43ceb178 Bug#27415 Text Variables in stored procedures
- Problem was reported as a SP variable using itself as 
   right value inside SUBSTR caused corruption of data. 
 - This bug could not be verified in either 5.0bk or 5.1bk
 - Added test case to prevent future regressions.
2007-05-16 14:25:38 +02:00
msvensson@pilot.blaudden
290b975043 Bug#21103: "DATE column not compared as DATE"
BDB results fixed (not p/o 5.1 fix)
2007-05-16 14:00:47 +02:00
msvensson@pilot.blaudden
3d723860c7 Merge pilot.blaudden:/home/msvensson/mysql/bk_fix/mysql-5.0-maint-patch4
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-05-16 12:49:15 +02:00
mhansson/martin@linux-st28.site
364014e455 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/5.0o-bug27573
2007-05-16 12:22:20 +03:00
msvensson@pilot.blaudden
a65d12a830 Backport of TIME->MYSQL_TIME / Y2K fixset
Made year 2000 handling more uniform
Removed year 2000 handling out from calc_days()
The above removes some bugs in date/datetimes with year between 0 and 200
Now we get a note when we insert a datetime value into a date column
For default values to CREATE, don't give errors for warning level NOTE
Fixed some compiler failures
Added library ws2_32 for windows compilation (needed if we want to compile with IOCP support)
Removed duplicate typedef TIME and replaced it with MYSQL_TIME

Better (more complete) fix for: Bug#21103 "DATE column not compared as DATE"
Fixed properly Bug#18997 "DATE_ADD and DATE_SUB perform year2K autoconversion magic on 4-digit year value"
Fixed Bug#23093 "Implicit conversion of 9912101 to date does not match cast(9912101 as date)"
2007-05-16 10:44:59 +02:00
msvensson@pilot.blaudden
e888128e88 Bug#28223: mysqldump --compact --routines restores from @OLD_SQL_MODE w/o ever setting it
- mysqldump generated output that set OLD_SQL_MODE twice, to different values
    (for triggers), or not at all (for routines) in some cases.
2007-05-16 10:14:29 +02:00
kostja@vajra.(none)
f10effe402 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  vajra.(none):/opt/local/work/mysql-5.0-21483
2007-05-16 09:52:01 +04:00
kostja@vajra.(none)
747842e10b A fix and a test case for
Bug#21483 "Server abort or deadlock on INSERT DELAYED with another
implicit insert"
Also fixes and adds test cases for bugs:
20497 "Trigger with INSERT DELAYED causes Error 1165"
21714 "Wrong NEW.value and server abort on INSERT DELAYED to a
table with a trigger".
Post-review fixes.

Problem:
In MySQL INSERT DELAYED is a way to pipe all inserts into a
given table through a dedicated thread. This is necessary for
simplistic storage engines like MyISAM, which do not have internal
concurrency control or threading and thus can not
achieve efficient INSERT throughput without support from SQL layer.
DELAYED INSERT works as follows:
For every distinct table, which can accept DELAYED inserts and has
pending data to insert, a dedicated thread is created to write data
to disk. All user connection threads that attempt to
delayed-insert into this table interact with the dedicated thread in
producer/consumer fashion: all records to-be inserted are pushed
into a queue of the dedicated thread, which fetches the records and 
writes them.
In this design, client connection threads never open or lock
the delayed insert table.
This functionality was introduced in version 3.23 and does not take 
into account existence of triggers, views, or pre-locking.
E.g. if INSERT DELAYED is called from a stored function, which,
in turn, is called from another stored function that uses the delayed
table, a deadlock can occur, because delayed locking by-passes
pre-locking. Besides:
 * the delayed thread works directly with the subject table through
   the storage engine API and does not invoke triggers
 * even if it was patched to invoke triggers, if triggers,
   in turn, used other tables, the delayed thread would
   have to open and lock involved tables (use pre-locking).
 * even if it was patched to use pre-locking, without deadlock
   detection the delayed thread could easily lock out user 
   connection threads in case when the same table is used both
   in a trigger and on the right side of the insert query: 
   the delayed thread would not release locks until all inserts 
   are complete, and user connection can not complete inserts 
   without having locks on the tables used on the right side of the
   query.

Solution:

These considerations suggest two general alternatives for the
future of INSERT DELAYED:
 * it is considered a full-fledged alternative to normal INSERT
 * it is regarded as an optimisation that is only relevant 
   for simplistic engines.
Since we missed our chance to provide complete support of new
features when 5.0 was in development, the first alternative
currently renders infeasible.
However, even the second alternative, which is to detect
new features and convert DELAYED insert into a normal insert, 
is not easy to implement.
The catch-22 is that we don't know if the subject table has triggers
or is a view before we open it, and we only open it in the
delayed thread. We don't know if the query involves pre-locking
until we have opened all tables, and we always first create
the delayed thread, and only then open the remaining tables.
This patch detects the problematic scenarios and converts
DELAYED INSERT to a normal INSERT using the following approach:
 * if the statement is executed under pre-locking (e.g. from
   within a stored function or trigger) or the right
   side may require pre-locking, we detect the situation
   before creating a delayed insert thread and convert the statement
   to a conventional INSERT.
  * if the subject table is a view or has triggers, we shutdown
   the delayed thread and convert the statement to a conventional
   INSERT.
2007-05-16 09:51:05 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
bb089cea38 bug #8663 cant use bigint unsigned as input to cast
in the case of the overflow in the decimal->integer conversion
we didn't return the proper boundary value, but just the result
of the conversion we calculated on the moment of the error
2007-05-16 10:12:49 +05:00
igor@olga.mysql.com
8b829fb1ae Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28272
2007-05-15 14:14:52 -07:00
evgen@moonbone.local
fbb2332628 Bug#28208: Wrong result of a non-const STRING function with a const DATETIME
function.

A wrong  condition was used to check that the
Arg_comparator::can_compare_as_dates() function calculated the value of the
string constant. When comparing a non-const STRING function with a constant
DATETIME function it leads to saving an arbitrary value as a cached value of
the DATETIME function.

Now the Arg_comparator::set_cmp_func() function initializes the const_value
variable to the impossible DATETIME value (-1) and this const_value is
cached only if it was changed by the Arg_comparator::can_compare_as_dates()
function.
2007-05-16 00:30:12 +04:00
igor@olga.mysql.com
fea67e6868 Merge olga.mysql.com:/home/igor/dev-opt/mysql-4.1-opt-bug28272
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28272
2007-05-15 13:16:10 -07:00
msvensson@pilot.blaudden
da8a944dfb Bug#27344 Total failure to start the server
- Give some more protection against "too long socket name by setting the max
   length when to use a tmpdir for sockets to 70
2007-05-15 16:03:38 +02:00
mhansson/martin@linux-st28.site
5bc137ff17 Bug#27573: MIN() on an indexed column which is always NULL sets _other_ results
to NULL

For queries of the form SELECT MIN(key_part_k) FROM t1 
WHERE key_part_1 = const and ... and key_part_k-1 = const,
the opt_sum_query optimization tries to
use an index to substitute MIN/MAX functions with their values according
to the following rules:
1) Insert the minimum non-null values where the WHERE clause still matches, or
3) A row of nulls

However, the correct semantics requires that there is a third case 2)
such that a NULL value is substituted if there are only NULL values for 
key_part_k.

The patch modifies opt_sum_query() to handle this missing case.
2007-05-15 15:29:12 +03:00
kostja@vajra.(none)
7ff604eb76 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  vajra.(none):/opt/local/work/mysql-5.0-runtime
2007-05-15 13:56:09 +04:00