Commit graph

9222 commits

Author SHA1 Message Date
bar@mysql.com
63b038f2e6 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b14406
2005-11-28 12:45:40 +04:00
konstantin@mysql.com
f57dffe453 A fix and a test case for Bug#14410 "Crash in Enum or Set type in
CREATE TABLE and PS/SP": make sure that 'typelib' object for
ENUM values and 'Item_string' object for DEFAULT clause are 
created in the statement memory root.
2005-11-25 13:25:31 +03:00
mskold@mysql.com
6d5ef98adc Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/local/home/marty/MySQL/mysql-4.1
2005-11-25 10:56:01 +01:00
evgen@moonbone.local
e3cab037bf Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/14482-bug-4.1-mysql
2005-11-24 19:17:31 +03:00
evgen@moonbone.local
a4a3215a44 Fix bug #14482 Wrongly applied optimization in resolve_const_item() caused
crash

resolve_const_item() substitutes item which will evaluate to constant with
equvalent constant item, basing on the item's result type. In this case
subselect was resolved as constant, and resolve_const_item() was substituting
it's result's Item_caches to Item_null. Later Item_cache's function was called
for Item_null object, which caused server crash.

resolve_const_item() now substitutes constants for items with 
result_type == ROW_RESULT only for Item_rows.
2005-11-24 19:16:51 +03:00
mskold@mysql.com
f27dc1c232 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/local/home/marty/MySQL/mysql-4.1
2005-11-24 16:21:49 +01:00
mskold@mysql.com
70d447c1f1 Moved check of wrong schema version earlier 2005-11-24 16:21:07 +01:00
msvensson@neptunus.(none)
e6331657a7 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-11-21 12:28:36 +01:00
msvensson@neptunus.(none)
9301123eb3 Bug #14514 Creating table with packed key fails silently
- Backport from 5.0
2005-11-21 12:27:58 +01:00
mskold@mysql.com
efdef780bc Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/local/home/marty/MySQL/mysql-4.1
2005-11-21 08:42:36 +01:00
kent@mysql.com
bd80dc6c2e Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-4.1-distcheck
2005-11-19 11:11:09 +01:00
mskold@mysql.com
2237d9b745 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/local/home/marty/MySQL/mysql-4.1
2005-11-18 10:14:27 +01:00
jimw@mysql.com
cee6671756 Merge mysql.com:/home/jimw/my/mysql-4.1-11796
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-11-17 10:58:46 -08:00
mskold@mysql.com
77cbf5d3ff Fixed incorrectly use if table with wrong schema version 2005-11-17 12:45:23 +01:00
ingo@mysql.com
1237c2fbcc Merge mysql.com:/home/mydev/mysql-4.1
into  mysql.com:/home/mydev/mysql-4.1-4100
2005-11-16 21:33:38 +01:00
sasha@asksasha.com
cb6d69f6f4 Merge spachev@bk-internal.mysql.com:/home/bk/mysql-4.1
into  asksasha.com:/reiser-data/mysql-dev/mysql-4.1-bug7947
2005-11-15 13:38:48 -07:00
ingo@mysql.com
6bc4636b64 Merge mysql.com:/home/mydev/mysql-4.0-4000
into  mysql.com:/home/mydev/mysql-4.1-4100
2005-11-15 18:09:40 +01:00
ingo@mysql.com
1aa15c25c7 Merge mysql.com:/home/mydev/mysql-4.0-bug14397
into  mysql.com:/home/mydev/mysql-4.0-4000
2005-11-15 16:47:15 +01:00
ingo@mysql.com
8996fd40cf Merge mysql.com:/home/mydev/mysql-4.0-bug14616
into  mysql.com:/home/mydev/mysql-4.1-4100
2005-11-15 16:07:05 +01:00
bar@mysql.com
8894bd8d55 Bug#14406 GRANTS ON objects with non-ascii names borked after FLUSH PRIVILEGES
ps_grant.result:
  Fixing result order.
grant.result:
  Adding test case,
  fixing result order.
grant.test:
  Adding test case.
sql_acl.cc:
  Fixed that my_charset_latin1 was incorrectly used instead of system_charset_info.
  This problem was previously fixed by Ingo in 5.0.
  This patch is basically a backport of the same changes into 4.1.
2005-11-14 16:36:06 +04:00
guilhem@mysql.com
27a6670747 Merge mysql.com:/home/mysql_src/mysql-4.1-gca
into  mysql.com:/home/mysql_src/mysql-4.1
2005-11-10 15:14:17 +01:00
guilhem@mysql.com
2df7d97281 Declaring some class members public for BUG#12377:
"Item_date_add_interval needs to have the int_type member as Public".
As explained in the bug report, this change is is to help http://search.cpan.org/~philips/DBIx-MyParse-0.20/
So please keep those members public.
2005-11-10 15:12:22 +01:00
sergefp@mysql.com
f12212f74e BUG#14480: post-fix: use the default field value from CREATE list too. 2005-11-09 09:34:46 +03:00
sergefp@mysql.com
5656740542 Merge mysql.com:/home/psergey/mysql-4.1-bug14480
into mysql.com:/home/psergey/mysql-4.1-nov08-push
2005-11-08 05:34:56 +03:00
sasha@asksasha.com
aaaee3f23b Merge spachev@bk-internal.mysql.com:/home/bk/mysql-4.1
into  asksasha.com:/reiser-data/mysql-dev/mysql-4.1-bug7947
2005-11-07 15:10:48 -07:00
sasha@asksasha.com
41752fa9a0 fix for BUG#7947 - failure to log DO RELEASE_LOCK() if we disconnect in the middle of
transaction while holding the lock. Also test to make sure other binlogging issues
reported in the bug have been addressed.
2005-11-07 15:09:35 -07:00
kent@mysql.com
58dd64612c Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-4.1-distcheck
2005-11-07 13:39:03 +01:00
ingo@mysql.com
1f3df2e669 Bug#14616 - Freshly imported table returns error 124 when using LIMIT
Initialized usable_keys from table->keys_in_use instead of ~0
in test_if_skip_sort_order(). It was possible that a disabled
index was used for sorting.
2005-11-07 12:16:49 +01:00
sergefp@mysql.com
edd094b194 BUG#14480, attempt2: In CREATE ... SELECT ..., don't count the same field twice
when calculating table->null_fields.
2005-11-07 09:23:43 +03:00
petr@mysql.com
038b300753 Fix Bug#14672 Bug in deletion 2005-11-06 02:11:12 +03:00
petr@mysql.com
a1f56ea5a6 Fix Bug#13894 Server crashes on update of CSV table 2005-11-05 15:08:15 +03:00
petr@mysql.com
085b48427d fix --ansi --pedantic compilation failure 2005-11-04 16:17:43 +03:00
kent@mysql.com
ee0b6db191 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-4.1-distcheck
2005-11-04 01:15:35 +01:00
ingo@mysql.com
1b99d30c23 Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Version for 4.0.
It fixes two problems:
1. The cause of the bug was that we did not check the table version for
   the HANDLER ... READ commands. We did not notice when a table was
   replaced by a new one. This can happen during ALTER TABLE, REPAIR
   TABLE, and OPTIMIZE TABLE (there might be more cases). I call the fix
   for this problem "the primary bug fix".
2. mysql_ha_flush() was not always called with a locked LOCK_open.
   Though the function comment clearly said it must.
   I changed the code so that the locking is done when required. I call
   the fix for this problem "the secondary fix".
2005-11-03 18:24:12 +01:00
jimw@mysql.com
15da5308c3 Avoid possible race condition in accessing slave statistics
during shutdown. (Bug #11796)
2005-11-01 11:48:55 -08:00
evgen@moonbone.local
47059b89f5 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/14186-bug-4.1-mysql
2005-11-01 17:34:19 +03:00
monty@mysql.com
19502e8eb5 Review of new pushed code
Removed wrong fix for bug #14009 (use of abs() on null value causes problems with filesort)
Mark that add_time(), time_diff() and str_to_date() can return null values
2005-11-01 13:00:02 +02:00
hf@deer.(none)
5150bd8f9f Merge bk@192.168.21.1:/usr/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.12839
2005-10-31 12:24:43 +04:00
hf@deer.(none)
16c66d49ca Additional fix for #12839 2005-10-31 12:05:27 +04:00
sergefp@mysql.com
f220d87476 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug14139
2005-10-28 21:42:01 +04:00
evgen@moonbone.local
cc5d7c0715 Fix bug #14138 ROLLUP and PROCEDURE ANALYSE() hang server
Procedure analyse() redefines select's fields_list. setup_copy_fields() assumes
that fields_list is a part of all_fields_list. Because select have only 
3 columns and analyse() redefines it to have 10 columns, int overrun in
setup_copy_fields() occurs and server goes to almost infinite loop.

Because fields_list used not only to send data ad fields types, it's wrong 
to allow procedure redefine it. This patch separates select's fileds_list 
and procedure's one. Now if procedure is present, copy of fields_list is 
created in procedure_fields_list and it is used for sending data and fields.
2005-10-28 15:24:46 +04:00
evgen@moonbone.local
77723c2438 Fix bug#14186 select datefield is null not updated
Date field was declared as not null, thus expression 'datefield is null'
was always false. For SELECT special handling of such cases is used. 
There 'datefield is null' converted to 'datefield eq "0000-00-00"'.

In mysql_update() before creation of select added remove_eq_conds() call.
It makes some optimization of conds and in particular performs conversion
from 'is null' to 'eq'. 
Also remove_eq_conds() makes some evaluation of conds and if it founds that
conds is always false then update statement is not processed further.
All this allows to perform some update statements process faster due to
optimized conds, and not wasting resources if conds known to be false.
2005-10-28 01:24:11 +04:00
jimw@mysql.com
7a8bd252d2 Merge mysql.com:/home/jimw/my/mysql-4.1-14009
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-10-27 10:20:38 -07:00
evgen@moonbone.local
71b731e92e Manually merged 2005-10-27 17:44:28 +04:00
sergefp@mysql.com
2219ada7f6 BUG#14139: When handling "CREATE TABLE(field_X type_spec,...) SELECT smth AS field_X, ...."
avoid multiplying length of field_X by charset->mbmaxlen twice when calculating space 
required for field_X in the new table.
2005-10-26 00:56:17 +04:00
evgen@moonbone.local
b5d426623f Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/14016-bug-4.1-mysql
2005-10-25 20:37:45 +04:00
evgen@moonbone.local
90cf3e78f0 Fix bug #14016 date_format() 2nd parameter was compared using case insensitive
collation

By default constant strings in second parameter of date_time() have case
insensitive collation. Because of this expressions date_format(f,'%m') and 
date_format(f,'%M') wrongly becomes equal, which results in choosing wrong 
column to sort by.

Now if second parameter of date_format() is constant then it's collation is 
changed to case sensitive.
2005-10-25 20:37:26 +04:00
evgen@moonbone.local
8cb0dff904 Fix bug#13392 Wrong VALUES() behaviour in INSERT SELECT with ON DUPLICATE
VALUES() can only refer to table insert going to. 
But Item_insert_value::fix_fields() were passing to it's arg full table list,
This results in finding second column which shouldn't be found, and
failing with error about ambiguous field.

Item_insert_value::fix_fields() now passes only first table of full table
list.
2005-10-25 20:04:12 +04:00
monty@mysql.com
3e653fb922 Added more tests for new UPDATE ... ORDER BY ... LIMIT optimization 2005-10-25 02:27:40 +03:00
sergefp@mysql.com
ea3ea9ed10 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-nulls-stats-r2
2005-10-23 02:49:57 +04:00