Commit graph

3316 commits

Author SHA1 Message Date
konstantin@mysql.com
cc57252bb7 ps.test, ps.result: a test case for Bug#6042 "constants
propogation works only once (prepared statements)".
2004-10-12 21:16:07 +04:00
joerg@mysql.com
ae8800d8d3 New tests for prepared statements:
- 'ps_10nestset' uses a "nested set" approach for an employee 
  hierarchy, then does arithmetic on the "salary" field;
  (soon) to be extended by inserts / deletes which imply
  mass updates on the "l"/"r" fields showing the set inclusion,
- 'ps_11bugs' will get (some of ?) those bug DB entries which
  refer to prepared statements, but whose number does not appear
  in a test file comment - so it will also be extended.
2004-10-12 16:00:50 +02:00
tomas@poseidon.ndb.mysql.com
1b35f6b469 another order by fix for ndb 2004-10-11 20:58:48 +00:00
ram@gw.mysql.r18.ru
e970eab39d Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b5382
2004-10-10 16:31:42 +05:00
tomas@poseidon.ndb.mysql.com
f3d002c1b6 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
2004-10-10 11:31:41 +00:00
ram@gw.mysql.r18.ru
48305dcd69 A fix (bug #5382: Server crashes after writing INTO OUTFILE) 2004-10-10 14:40:24 +05:00
tomas@poseidon.ndb.mysql.com
c5020e3b4c Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
2004-10-10 08:32:15 +00:00
tomas@poseidon.ndb.mysql.com
060707c2f1 Fixes bug with tableImpl with blobs not being initialized properly w.r.t pointer to blob tableImpl in column
added blob to test to see that blob tables don't show up in show tables
    auto increment setting need not fetch blob tables (will otherwise generate error during table creation)
    moved addBlobTables out of fetchGlobalTableImpl to get_local_table_info
    changed addBlobTables to start from last column and break if all blobs added
    also addBlobTables will return -1 if failed (typically getTable)
    changed to using get_local_table_info with internal table name where applicable for efficiency
    added option to get_local_table_info wether to fetch blob tables or not
    getTable always fetches the blobtables
    moved addBlobTables to get_local_table_info to always be called, even if main table goes to cache only
2004-10-10 08:31:45 +00:00
ram@gw.mysql.r18.ru
5e352defa5 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1.gconcat
2004-10-10 12:35:39 +05:00
ram@gw.mysql.r18.ru
5f857a7a82 Blob support for the group_concat() function.
(Bug #4315: GROUP_CONCAT with ORDER BY returns strange results for TEXT fields
 Bug #5564: Strange behaviour with group_concat and distinct
 Bug #5970: group_concat doesn't print warnings)
2004-10-10 12:10:53 +05:00
konstantin@mysql.com
daa4c2495c A fix and test case for Bug#5987 "subselect in bool function
crashes server (prepared statements)": the bug was that all boolean
items always recovered its original arguments at statement cleanup 
stage.
This collided with Item_subselect::select_transformer, which tries to 
permanently change the item tree to use a transformed subselect instead of
original one.
So we had this call sequence for prepare:
mysql_stmt_prepare -> JOIN::prepare -> 
Item_subselect::fix_fields -> the item tree gets transformed ->
Item_bool_rowready_func2::cleanup, item tree is recovered to original
state, while it shouldn't have been;
mysql_stmt_execute -> attempts to execute a broken tree -> crash.
Now instead of bluntly recovering all arguments of bool functions in 
Item_bool_rowready_func2::cleanup, we recover only those
which were changed, and do it in one place.
There still would exist a possibility for a collision with subselect
tranformation, if permanent and temporary changes were performed at the 
same stage.
But fortunately subselect transformation is always done first, so it 
doesn't conflict with the optimization done by propogate_cond_constants.
Now we have: 
mysql_stmt_prepare -> JOIN::prepare -> subselect transformation 
permanently changes the tree -> cleanup doesn't recover anything, 
because nothing was registered for recovery.
mysql_stmt_execute -> JOIN::prepare (the tree is already transformed, 
so it doesn't change), JOIN::optimize -> 
propogate_cond_constants -> temporary changes the item tree 
with constants -> JOIN::execute -> cleanup -> 
the changes done by propogate_cond_constants are recovered, as
they were registered for recovery.
2004-10-10 02:39:22 +04:00
magnus@neptunus.(none)
01c29fc921 BUG#5973 ndb table belonging to different database shows up in SHOW TABLES 2004-10-08 13:37:13 +02:00
konstantin@mysql.com
d7bda287de Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/media/sda1/mysql/mysql-4.1-5748-anew
2004-10-08 02:22:40 +04:00
konstantin@mysql.com
2aa7ec0d9d A fix for Bug#5748 "Prepared statement with BETWEEN and bigint values
crashes mysqld": implementation for a generic item tree modifications
registry. Every item tree modification which should be rolled back for
subsequent execution of a prepared statement or stored procedure should
be saved in the registry. All such modifications are rolled back at once
during cleanup stage of PS.
Actual fix for the bug just adds a call to register modifications to
convert_constant_item.
Post review fixes implemented.
2004-10-08 02:21:19 +04:00
tomas@poseidon.ndb.mysql.com
69f40808e2 ndb_alter_table.result, ndb_alter_table.test:
...
2004-10-07 16:30:21 +00:00
tomas@poseidon.ndb.mysql.com
a257686692 more order by fixes 2004-10-07 12:36:37 +00:00
dlenev@mysql.com
e5483ab3bd Manual merge of tree containing fix for bug #5915 "ALTER TABLE behaves
differently when converting column to auto_increment in 4.1" with
current tree.
2004-10-07 13:51:32 +04:00
monty@mysql.com
01232b2c52 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-10-07 12:51:31 +03:00
tomas@poseidon.ndb.mysql.com
4afccd761b more order by for ndb 2004-10-07 09:51:30 +00:00
monty@mysql.com
546c2bd6ab Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-10-07 12:37:21 +03:00
tomas@poseidon.ndb.mysql.com
690cdfc697 added order by to give same order results on different endian and different sized clusters 2004-10-07 09:27:39 +00:00
dlenev@brandersnatch.localdomain
1f54900630 Fix for bug #5915 "ALTER TABLE behaves differently when converting column
to auto_increment in 4.1".
Now we are enforcing NO_AUTO_VALUE_ON_ZERO mode during ALTER TABLE only
if we are converting one auto_increment column to another auto_increment
column (this also includes most common case when we don't do anything
with such column).

Also now when we convert some column to TIMESTAMP NOT NULL column with
ALTER TABLE we convert NULL values to current timestamp, (as we do this
in INSERT). One can still get old behavior by setting system TIMESTAMP
variable to 0.
2004-10-07 13:02:39 +04:00
tomas@poseidon.ndb.mysql.com
a8d2692c65 adder order by 2004-10-07 08:42:11 +00:00
monty@mysql.com
6239edc1d1 After merge fixes
Some bigger code changes was necessary becasue of the multi-table-update and the new HANDLER code
2004-10-07 10:50:13 +03:00
monty@mysql.com
62f3cd6a31 Merge with 4.0 for 4.1 release
Noteworthy:
- New HANDLER code
- New multi-update-grant-check code
- Table lock code in ha_innodb.cc was not applied
2004-10-06 19:14:33 +03:00
tomas@poseidon.ndb.mysql.com
884892a650 bug#5736, subqueries and not in
and testcases
2004-10-06 13:18:55 +00:00
ram@gw.mysql.r18.ru
0944bed7fc Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into gw.mysql.r18.ru:/usr/home/ram/work/4.0.b5733
2004-10-06 12:49:56 +05:00
bar@mysql.com
3fc7640a19 Bug #5832 SELECT doesn't return records in some cases 2004-10-05 21:22:14 +05:00
gluh@gluh.mysql.r18.ru
2a621e275b Fix for bug #5555: "GROUP BY enum_field" returns incorrect results 2004-10-05 17:02:09 +04:00
ingo@mysql.com
c546074e21 Merge mysql.com:/home/mydev/mysql-4.0
into mysql.com:/home/mydev/mysql-4.0-bug4286
2004-10-05 11:33:13 +02:00
dlenev@mysql.com
0d83bdf20d Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-ryan
2004-10-04 20:13:16 +04:00
dlenev@mysql.com
a4d5804e31 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-ryan
2004-10-04 17:16:49 +04:00
dlenev@brandersnatch.localdomain
cfd34f779f Made TIMESTAMP NULL columns without explicit DEFAULT value to be always
treated as DEFAULT NULL columns (independently from their position in
table).

(still to be discussed with Monty, Brian, Trudy et al. before push)
2004-10-04 17:13:31 +04:00
tomas@poseidon.ndb.mysql.com
bc5ca3a1ce Merge 2004-10-04 12:36:25 +00:00
tomas@poseidon.ndb.mysql.com
e13b136c9a bug #5872, transactions should only be restarted with transaction.on flag off if execute_commit has been performed
added testcase for this
use force send for all executes
2004-10-04 12:26:26 +00:00
tomas@poseidon.ndb.mysql.com
f6ad058388 Merge 2004-10-03 21:39:04 +00:00
antony@ltantony.rdg.cyberkinetica.homeunix.net
b36a565931 Merge ltantony.rdg.cyberkinetica.homeunix.net:/usr/home/staff/repositories/mysql-4.0
into ltantony.rdg.cyberkinetica.homeunix.net:/usr/home/antony/work/bug4118
2004-10-03 00:25:09 +01:00
antony@ltantony.rdg.cyberkinetica.homeunix.net
2973a047ea Bug#4118: multi-table UPDATE takes WRITE lock on read table
Ensures that WRITE lock is not obtained on all tables referenced.
2004-10-03 00:20:47 +01:00
tomas@poseidon.ndb.mysql.com
fbf2a6ac0c Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
2004-10-01 22:15:05 +00:00
tomas@poseidon.ndb.mysql.com
5745223a90 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
2004-10-01 21:35:50 +00:00
dellis@goetia.(none)
141a5eeaca Merge dellis@bk-internal.mysql.com:/home/bk/mysql-4.1
into goetia.(none):/home/dellis/mysqlab/bk/mysql-4.1
2004-10-01 14:53:52 -05:00
dellis@goetia.(none)
ce6f076315 grant.test, grant.result, sql_acl.cc:
BUG #5831 Changed mysql_revoke_all() to successfully delete all privileges for a user in one pass.
2004-10-01 14:48:48 -05:00
tomas@poseidon.ndb.mysql.com
929e98b45b Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
2004-10-01 16:17:04 +00:00
dlenev@mysql.com
53209cc4fc Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-ryan
2004-10-01 18:55:17 +04:00
dlenev@brandersnatch.localdomain
2511990c97 Support for TIMESTAMP columns holding NULL values. Unlike all other
column types TIMESTAMP is NOT NULL by default, so in order to have 
TIMESTAMP column holding NULL valaues you have to specify NULL as
one of its attributes (this needed for backward compatibility).

Main changes:
Replaced TABLE::timestamp_default_now/on_update_now members with
TABLE::timestamp_auto_set_type flag which is used everywhere
for determining if we should auto-set value of TIMESTAMP field 
during this operation or not. We are also use Field_timestamp::set_time()
instead of handler::update_timestamp() in handlers.
2004-10-01 18:54:06 +04:00
dellis@goetia.(none)
f5b7774e99 Merge dellis@bk-internal.mysql.com:/home/bk/mysql-4.1
into goetia.(none):/home/dellis/mysqlab/bk/mysql-4.1
2004-10-01 08:22:12 -05:00
mskold@mysql.com
dd8c74beac Added index cardinality check 2004-10-01 14:57:17 +02:00
dellis@goetia.(none)
8a12b5add0 logging_ok:
Logging to logging@openlogging.org accepted
sql_acl.cc, grant.test, grant.result:
  BUG 5831 Changed mysql_revoke_all() to successfully delete all privileges for a user in one pass.
2004-10-01 07:50:26 -05:00
mskold@mysql.com
ca47a4a25c Changed test to be independent on scan order 2004-10-01 14:23:31 +02:00
ram@gw.mysql.r18.ru
4ec50dc4d7 delete.result, delete.test:
A fix (bug #5733: Table handler error with self-join multi-table DELETE).
records.cc:
  A fix (bug #5733: Table handler error with self-join multi-table DELETE).
2004-10-01 16:23:54 +05:00