Commit graph

20920 commits

Author SHA1 Message Date
svoj@may.pils.ru
ffd8ed1716 BUG#1662 - ALTER TABLE LIKE ignores DATA/INDEX DIRECTPORY
Produce a warning if DATA/INDEX DIRECTORY is specified in
ALTER TABLE statement.

Ignoring of these options is documented in the symbolic links
section of the manual.
2006-06-27 22:22:43 +05:00
joerg@mysql.com
f789b87a1b Move "mysqldumpslow" from the client RPM to the server RPM (bug#20216),
manual merge from 4.0.
2006-06-27 18:36:41 +02:00
joerg@mysql.com
46ee3ac19d Move "mysqldumpslow" from the client RPM to the server RPM (bug#20216). 2006-06-27 18:17:53 +02:00
gkodinov@mysql.com
be3c4a154f Merge mysql.com:/home/kgeorge/mysql/4.1/teamclean
into  mysql.com:/home/kgeorge/mysql/4.1/B16458
2006-06-27 18:47:22 +03:00
kroki@mysql.com
49cc2904d2 Dec. 31st, 9999 is still a valid date, only starting with Jan 1st 10000 things become invalid (Bug #12356) 2006-06-27 19:33:59 +04:00
gkodinov@mysql.com
9ec681ef35 Bug #16458: Simple SELECT FOR UPDATE causes "Result Set not updatable" error
'SELECT DISTINCT a,b FROM t1' should not use temp table if there is unique 
index (or primary key) on a.
There are a number of other similar cases that can be calculated without the
use of a temp table : multi-part unique indexes, primary keys or using GROUP BY 
instead of DISTINCT.
When a GROUP BY/DISTINCT clause contains all key parts of a unique
index, then it is guaranteed that the fields of the clause will be
unique, therefore we can optimize away GROUP BY/DISTINCT altogether.
This optimization has two effects:
* there is no need to create a temporary table to compute the
   GROUP/DISTINCT operation (or the temporary table will be smaller if only GROUP 
   is removed and DISTINCT stays or if DISTINCT is removed and GROUP BY stays)
* this causes the statement in effect to become updatable in Connector/Java
because the result set columns will be direct reference to the primary key of 
the table (instead to the temporary table that it currently references). 

Implemented a check that will optimize away GROUP BY/DISTINCT for queries like 
the above.
Currently it will work only for single non-constant table in the FROM clause.
2006-06-27 17:40:19 +03:00
holyfoot@mysql.com
366339f4ed Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/hf/work/mysql-4.1.clean
2006-06-27 15:12:13 +05:00
ingo@mysql.com
e67bdaf604 Bug#11824 - internal /tmp/*.{MYD,MYI} files remain, causing subsequent queries to fail
Very complex select statements can create temporary tables
that are too big to be represented as a MyISAM table.

This was not checked at table creation time, but only at
open time. The result was an attempt to delete the 
"impossible" table.

But if the server is built --with-raid, MyISAM tries to 
open the table before deleting the files. It needs to find 
out if the table uses the raid support and how many raid 
chunks there are. This is done with an open "for repair",
which will almost always succeed.

But in this case we have an "impossible" table. The open
failed. Hence the files were not deleted. Also the error
message was a bit unspecific.

I turned an open error in this situation into the assumption 
of having no raid support on the table. Thus the normal data 
file is tried to be deleted. This may however leave existing 
raid chunks behind.

I also added a check in mi_create() to prevent the creation
of an "impossible" table. A more decriptive error message is
given in this case.

No test case. The required select statement is way too
large for the test suite. I added a test script to the
bug report.
2006-06-27 11:26:41 +02:00
kent@mysql.com
748b287cad Merge mysql.com:/Users/kent/mysql/bk/mysql-4.0
into mysql.com:/Users/kent/mysql/bk/mysql-4.1-new
2006-06-26 23:47:14 +02:00
kent@mysql.com
c36dd28676 make_sharedlib_distribution.sh:
For compatibility, don't use {..,..} in pattern matching
make_binary_distribution.sh:
  Added .dylib and .sl as shared library extensions
2006-06-26 23:44:17 +02:00
holyfoot@mysql.com
bb347299b1 Merge mysql.com:/home/hf/work/mysql-4.1.20318
into mysql.com:/home/hf/work/mysql-4.1.clean
2006-06-26 22:17:42 +05:00
holyfoot@mysql.com
5a96a1b090 Merge mysql.com:/home/hf/work/mysql-4.1.10166
into mysql.com:/home/hf/work/mysql-4.1.clean
2006-06-26 21:07:13 +05:00
jonas@perch.ndb.mysql.com
a5e1b01920 ndb - bug#20683
part 1 - make sure return code is propagated from request tracker
2006-06-26 12:16:39 +02:00
bar@mysql.com
cfb08851f7 Bug#11228: DESC shows arbitrary column as "PRI"
An UNIQUE KEY consisting of NOT NULL columns
  was displayed as PRIMARY KEY in "DESC t1".
  According to the code, that was intentional
  behaviour for some reasons unknown to me.
  This code was written before bitkeeper time,
  so I cannot check who and why made this.
  After discussing on dev-public, a decision
  was made to remove this code
2006-06-23 13:19:30 +05:00
igor@rurik.mysql.com
faa48bf1a0 Added a test case for bug #18359.
This was another manifestation of the problems fixed in the
patch for bug 16674.
Wrong calculation of length of the search prefix in the pattern
string led here to a wrong result set for a query in 4.1. 
The bug could be demonstrated for any multi-byte character set.
2006-06-22 20:39:46 -07:00
igor@rurik.mysql.com
8940231491 Fixed bug #20076.
Server crashed in some cases when a query required a MIN/MAX
agrregation for a 'ucs2' field. 
In these cases  the aggregation caused calls of the function
update_tmptable_sum_func that indirectly invoked 
the method Item_sum_hybrid::min_max_update_str_field() 
containing a call to strip_sp for a ucs2 character set.
The latter led directly to the crash as it used my_isspace
undefined for the ucs2 character set.
Actually the call of strip_sp is not needed at all in this
situation and has been removed by the fix.
2006-06-22 15:50:15 -07:00
kent@mysql.com
ef2860e8ff mysql.spec.sh:
Disable the simplistic auto dependency scan for test/bench (bug#20078)
2006-06-23 00:37:31 +02:00
holyfoot@deer.(none)
36cea7d4fe bug #10166 (Signed byte values cause data to be padded)
The AsBinary function returns VARCHAR data type with binary collation.
It can cause problem for clients that treat that kind of data as
different from BLOB type.
So now AsBinary returns BLOB.
2006-06-22 22:11:27 +05:00
jonas@perch.ndb.mysql.com
18686cd08d ndb - bug#19164
set max value on ports
2006-06-22 12:03:28 +02:00
igor@rurik.mysql.com
e307b5b297 Modified the test case for bug 16674 to have the same
execution plans in 4.1 and 5.0.
2006-06-21 22:39:48 -07:00
igor@rurik.mysql.com
cfd2c2a569 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rurik.mysql.com:/home/igor/mysql-4.1-opt
2006-06-21 16:29:58 -07:00
evgen@moonbone.local
6439337bb1 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-06-22 00:29:47 +04:00
evgen@moonbone.local
8d4a910a1f Fixed bug #14896.
This bug in Field_string::cmp resulted in a wrong comparison 
with keys in partial indexes over multi-byte character fields.
Given field a is declared as a varchar(16) collate utf8_unicode_ci
INDEX(a(4)) gives us an example of such an index.
  
Wrong key comparisons could lead to wrong result sets if 
the selected query execution plan used a range scan by 
a partial index over a utf8 character field.
This also caused wrong results in many other cases.
2006-06-22 00:29:04 +04:00
svoj@may.pils.ru
fedbbf4865 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG20357/mysql-4.1
2006-06-21 19:41:08 +05:00
tomas@poseidon.ndb.mysql.com
5f46cb7e1a added missing MYSQLTEST_VARDIR declaration 2006-06-21 16:41:07 +02:00
svoj@may.pils.ru
e560564cfa Merge april:devel/BitKeeper/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG20357/mysql-4.1
2006-06-21 17:51:16 +05:00
svoj@may.pils.ru
8b98be2844 BUG#20357 - Got error 124 from storage engine using MIN and MAX
functions in queries

Using MAX()/MIN() on table with disabled indexes (by ALTER TABLE)
results in error 124 (wrong index) from storage engine.

The problem was that optimizer use disabled index to optimize
MAX()/MIN(). Normally it must skip disabled index and perform
table scan.

This patch skips disabled indexes for min/max optimization.
2006-06-21 17:30:59 +05:00
jonas@perch.ndb.mysql.com
8f06aae041 ndb - bug#20197
also close scan which are in "delivered" state, as it's impossible to release locks afterwards

  backport from 5.1
2006-06-21 14:00:26 +02:00
igreenhoe@mysql.com
85d130c58b Fix for bug #15977 (switch ordering of DISABLE KEYS/LOCK TABLE in mysqldump) 2006-06-21 00:12:23 -07:00
igor@rurik.mysql.com
5e8d011c3a Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rurik.mysql.com:/home/igor/mysql-4.1-opt
2006-06-20 22:15:30 -07:00
igor@rurik.mysql.com
2893d11c5e Fixed bug #16674.
The length of the prefix of the pattern string in the LIKE predicate that 
determined the index range to be scanned was calculated incorrectly for
multi-byte character sets. 
As a result of this in 4. 1 the the scanned range was wider then necessary
if the prefix contained not only one-byte characters.  
In 5.0 additionally it caused missing some rows from the result set.
2006-06-20 19:57:21 -07:00
evgen@moonbone.local
52d86dff85 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-06-20 23:49:33 +04:00
evgen@moonbone.local
ae6970e6bc select.result:
Added test case for bug#18759 Incorrect string to numeric conversion.  
select.test:
  Added test case for bug#18759 Incorrect string to numeric conversion.
item_cmpfunc.cc:
  Cleanup after fix for bug#18360 removal
2006-06-20 23:05:55 +04:00
ramil@mysql.com
c311fb0500 Merge mysql.com:/usr/home/ram/work/mysql-4.0
into  mysql.com:/usr/home/ram/work/mysql-4.1
2006-06-20 12:09:02 +05:00
ramil@mysql.com
d1fcc620d8 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/mysql-4.1
2006-06-20 09:35:25 +05:00
lars@mysql.com
1f5715af92 Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge
2006-06-20 03:33:43 +02:00
evgen@moonbone.local
217faf569e Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-06-20 02:04:36 +04:00
evgen@moonbone.local
609e0dbd99 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-06-20 01:56:33 +04:00
evgen@moonbone.local
279c310b66 item_cmpfunc.cc, func_in.result, func_in.test:
Reverted fix for bug#18360
2006-06-20 00:50:09 +04:00
holyfoot@deer.(none)
d8d42948b2 bug #20318 (ctype_ucs2_def test fails with embedded)
there was two problems about charsets in embedded server
1. mysys/charset.c - defined there default_charset_info variable is
modified by both server and client code (particularly when
--default-charset option is handled)
In embedded server we get two codelines modifying one variable.
I created separate default_client_charset_info for client code

2. mysql->charset and mysql->options.charset initialization isn't
properly done for embedded server - necessary calls added
2006-06-19 22:11:01 +05:00
gkodinov@mysql.com
6777928eec Merge mysql.com:/home/kgeorge/mysql/4.1/teamclean
into  mysql.com:/home/kgeorge/mysql/4.1/B9676
2006-06-19 13:25:28 +03:00
gkodinov@mysql.com
c5ed7a87f4 * Bug #9676: INSERT INTO x SELECT .. FROM x LIMIT 1; slows down with big
tables
Currently in INSERT ... SELECT ... LIMIT ... the compiler uses a 
temporary table to store the results of SELECT ... LIMIT .. and then
uses that table as a source for INSERT. The problem is that in some cases
it actually skips the LIMIT clause in doing that and materializes the 
whole SELECT result set regardless of the LIMIT.
This fix is limiting the process of filling up the temp table with only 
that much rows that will be actually used by propagating the LIMIT value.
2006-06-19 13:22:42 +03:00
lars@mysql.com
ba3e825e21 Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge
2006-06-19 12:06:54 +02:00
svoj@may.pils.ru
737e166403 Merge april:devel/BitKeeper/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG18036/mysql-4.1
2006-06-19 14:13:44 +05:00
svoj@may.pils.ru
37cdb0fbf3 BUG#18036 - update of table joined to self reports table as crashed
Certain updates of table joined to self results in unexpected
behavior.

The problem was that record cache was mistakenly enabled for
self-joined table updates. Normally record cache must be disabled
for such updates.

Fixed wrong condition in code that determines whether to use
record cache for self-joined table updates.

Only MyISAM tables were affected.
2006-06-19 14:05:14 +05:00
ramil@mysql.com
49797c23b3 Fix for bug #20496: func_time.test failure 2006-06-19 13:03:29 +05:00
evgen@moonbone.local
c02e6f2a5b Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-06-18 20:48:48 +04:00
kent@mysql.com
ad87e7b314 Makefile.am:
Avoid error message trying 'windoze-dsp' in obsolete directory
compile-dist:
  Avoid error message for target 'distclean' and no Makefile
2006-06-17 15:37:23 +02:00
kent@mysql.com
6783fc830f make_win_src_distribution.sh:
Make output less verbose
  Make temporary directory name unique
  Remove temporary directory on interrupt
2006-06-17 11:33:34 +02:00
kent@mysql.com
eadd351031 make_win_src_distribution.sh:
Include "sql_yacc.yy" for completeness (bug#20387)
2006-06-17 03:04:43 +02:00