Commit graph

168 commits

Author SHA1 Message Date
sergefp@mysql.com
e1f49888bf WL#2985 "Partition Pruning" 2005-12-22 12:29:00 +03:00
monty@mysql.com
4575a662cb Merge mysql.com:/home/my/mysql-5.1
into  mysql.com:/home/my/mysql-5.1-TDC
2005-11-23 22:58:53 +02:00
monty@mysql.com
e42c980967 Table definition cache, part 2
The table opening process now works the following way:
- Create common TABLE_SHARE object
- Read the .frm file and unpack it into the TABLE_SHARE object
- Create a TABLE object based on the information in the TABLE_SHARE
  object and open a handler to the table object

Other noteworthy changes:
- In TABLE_SHARE the most common strings are now LEX_STRING's
- Better error message when table is not found
- Variable table_cache is now renamed 'table_open_cache'
- New variable 'table_definition_cache' that is the number of table defintions that will be cached
- strxnmov() calls are now fixed to avoid overflows
- strxnmov() will now always add one end \0 to result
- engine objects are now created with a TABLE_SHARE object instead of a TABLE object.
- After creating a field object one must call field->init(table) before using it

- For a busy system this change will give you:
 - Less memory usage for table object
 - Faster opening of tables (if it's has been in use or is in table definition cache)
 - Allow you to cache many table definitions objects
 - Faster drop of table
2005-11-23 22:45:02 +02:00
bell@sanja.is.com.ua
7f162c7899 Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug1-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-merge-5.0
2005-11-21 21:15:48 +02:00
bar@mysql.com
3d1c1d7f68 cast.result:
Fixing test results accordingly.
item_timefunc.cc:
  Displaying BINARY or CHAR in error messages,
  depending on the character set.
2005-11-21 21:11:28 +04:00
bar@mysql.com
174d28e4cc Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/home/bar/mysql-5.0.b14255
2005-11-21 17:57:14 +04:00
bell@sanja.is.com.ua
806f9e24ff Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
  fixed (BUG#14090).
A hook for unknown keys added to the parser to support old .TRG files.
2005-11-20 20:47:07 +02:00
evgen@moonbone.local
bbe58c7e26 Manually merged 2005-11-01 19:47:53 +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
jani@ua141d10.elisa.omakaista.fi
af50eff0d2 Merge 4.1 - 5.0 2005-10-28 02:36:19 +03:00
jani@ua141d10.elisa.omakaista.fi
cbe21a8eb6 Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-tmp
2005-10-27 23:43:20 +03: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
bar@mysql.com
c7db18719e Bug#14255 CAST(x AS BINARY(N)) does not pad
type_binary.result, type_binary.test:
  Adding test case.
item_timefunc.cc:
  Padding code was added.
2005-10-25 15:36:39 +05:00
jimw@mysql.com
bae1154235 Fix calculation of TIMESTAMPDIFF() of months and years. (Bug #13534) 2005-10-13 15:32:31 -07:00
aivanov@mysql.com
53e90b53bc Fixed BUG#12963, BUG#13000: wrong VIEW creation with DAYNAME(),
DAYOFWEEK(), and WEEKDAY().
2005-09-14 20:25:00 +04:00
jimw@mysql.com
9e4a9e23c6 Make SYSDATE() behave as in Oracle: always the current datetime, not the
datetime of when the current statement began. This also makes SYSDATE()
not safe in replication. (Bug #12562)
2005-08-24 15:50:58 -07:00
jimw@mysql.com
fac058502b Generate a warning/error when DATE_SUB/ADD() functions calculate a date
that is outside the acceptable date range. (Bug #10627)
2005-08-02 15:28:09 -07:00
monty@mishka.local
8437e9c1be Fixes during review of new pushed code
Change bool in C code to my_bool
Added to mysqltest --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
Added comparison of LEX_STRING's and use this to compare file types for view and trigger files.
2005-07-31 12:49:55 +03:00
jimw@mysql.com
2a06e5756e Merge bk-internal:/home/bk/mysql-5.0
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-07-19 19:59:32 -07:00
evgen@moonbone.local
6b25219fea Fix bug #11760 Typo in Item_func_add_time::print() results in NULLs returned
by subtime() in view

Item_func_add_time::print() were printing arg[0] instead of arg[1] which
results in wrongly created view. Functions addtime() and subtime were
affected by this bug.
2005-07-20 06:55:51 +04:00
jimw@mysql.com
80c1c6b33f Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-07-19 11:05:49 -07:00
monty@mishka.local
7e83d09ce7 Simple fixes during review of new code 2005-07-19 19:25:05 +03:00
bell@sanja.is.com.ua
d3905f3d0e Name resolution context added (BUG#6443) 2005-07-01 07:05:42 +03:00
ramil@mysql.com
b0e6db14c5 backport for #10568: Function 'LAST_DAY(date)' does not return NULL for invalid argument. 2005-06-24 14:04:48 +05:00
bell@sanja.is.com.ua
a11677026f fixed printing of sum(distinct ) & avg(distinct ) & cast(... as decimal) (BUG#7015, BUG#11387) 2005-06-17 17:27:47 +03:00
monty@mysql.com
775f17667b Merge with 4.1 2005-06-07 00:31:53 +03:00
ramil@mysql.com
417447ae82 Merge 2005-06-06 10:39:21 +05:00
serg@serg.mylan
6a5349028c a compiler must see '#pragma implementation' *before*
'#pragma interface' (that comes with the #include'd header file)
2005-06-05 19:38:52 +02:00
jimw@mysql.com
0f8c2e2a4b Merge mysql.com:/home/jimw/my/mysql-5.0-10590
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-06-03 16:06:51 -07:00
monty@mysql.com
29fd1f2fd9 Move USE_PRAGMA_IMPLEMENTATION to proper place
Ensure that 'null_value' is not accessed before val() is called in FIELD() functions
Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys
Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable
2005-06-03 23:46:03 +03:00
kent@mysql.com
f0fcc54b0c Merge 2005-06-02 04:45:09 +02:00
kent@mysql.com
bd48eed988 tztime.cc:
Set #pragma implementation" earlier
Many files:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
2005-06-02 02:43:32 +02:00
ramil@mysql.com
086d81207b A fix (bug #10568: Function 'LAST_DAY(date)' does not return NULL for invalid argument). 2005-06-01 17:09:46 +05:00
jimw@mysql.com
2f0c098ef5 Fix '%h', '%I', and '%l' format specifiers in TIME_FORMAT()
to handle large time values as documented. (Bug #10590)
2005-05-27 16:41:53 -07:00
msvensson@neptunus.(none)
697cfe7f07 Merge from 4.1 2005-05-26 21:01:55 +02:00
msvensson@neptunus.(none)
83d430353e Add ifdefs to control when "#pragma implementation" should be used
Added some more ifdefs for "#pragma interface"
2005-05-26 12:09:14 +02:00
dlenev@mysql.com
814d4bf3e8 Merge mysql.com:/home/dlenev/src/mysql-4.1-bg10040
into mysql.com:/home/dlenev/src/mysql-5.0-merges
2005-04-25 11:35:30 +04:00
dlenev@brandersnatch.localdomain
a4a4c5cb69 Fix for func_sapdb failures on 64-bit platforms (aka Bug #10040
"'func_sapdb' fails on 64bit build hosts")
2005-04-25 11:25:40 +04:00
dlenev@mysql.com
a95ede0527 Manual merge of patch for bug #8068 "TIMEDIFF with first negative
argument gives wrong result" (and similar bug in ADDTIME/SUBTIME)
into 5.0 tree.
2005-04-18 14:29:31 +04:00
monty@mysql.com
48de1ff277 Don't generate message in send_kill_message() if wrong data. (Caused core dump for wrong data in ALTER TABLE on some system) 2005-04-05 01:19:48 +03:00
monty@mysql.com
201ee3eb78 Invalid DEFAULT values for CREATE TABLE now generates errors. (Bug #5902)
CAST() now produces warnings when casting a wrong INTEGER or CHAR values. This also applies to implicite string to number casts. (Bug #5912)
ALTER TABLE now fails in STRICT mode if it generates warnings.
Inserting a zero date in a DATE, DATETIME or TIMESTAMP column during TRADITIONAL mode now produces an error. (Bug #5933)
2005-04-01 15:04:50 +03:00
monty@mysql.com
332b7ed4a1 Give warnings if wrong date/time/datetime argument for STR_TO_DATE
Small fixes while doing review of new pushed code
More test cases for decimal
2005-03-30 16:00:31 +03:00
dlenev@brandersnatch.localdomain
aae37f5ea5 Fix for bug #8068 "TIMEDIFF with first negative argument gives wrong
result" (and similar bug in ADDTIME/SUBTIME).

Both Item_func_add_time/Item_func_timediff::val_str() now use
calc_time_diff() function which was backported from 5.0 (and which
was was fixed to properly handle microseconds part of its second 
argument). Also now we correctly set sign of result in case when
first argument is negative and second is positive.
2005-03-28 16:20:55 +04:00
dlenev@mysql.com
2276bfa374 Manual merge of fixes for bugs #7899 "CREATE TABLE .. SELECT .. and
CONVERT_TZ() function does not work well together" and bug #7705 
"CONVERT_TZ() crashes with subquery/WHERE on index column" in 5.0
tree.
2005-01-28 10:22:50 +03:00
dlenev@mysql.com
c80c503a1b Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-tzbug
2005-01-28 09:32:43 +03:00
ingo@mysql.com
48488e483a Merge mysql.com:/home/mydev/mysql-4.1-4100
into mysql.com:/home/mydev/mysql-5.0-5000
2005-01-27 12:18:02 +01:00
bar@mysql.com
858171cb6f item_timefunc.cc:
CAST now always return a well-formed character string.
2005-01-27 14:51:16 +04:00
dlenev@brandersnatch.localdomain
80282016c2 Fix for bug #7899 "CREATE TABLE .. SELECT .. and CONVERT_TZ() function
does not work well together". Now using simplier and more correct
implementation of st_lex::unlink_first_table()/link_first_table_back() 
(It also nicely handles case when global table list is created because
of implictly used time zone tables). (2nd attempt)

Fix for bug #7705 "CONVERT_TZ() crashes with subquery/WHERE on index
column". Implemented new approach for caching objects for constant
time zone arguments. Now instead of determining whenever these arguments
are constants and performing time zone lookup at fix_fields() stage, we
do it on first get_date() invocation.

Cleanup of global @@time_zone variable handling.
2005-01-26 22:25:02 +03:00
serg@serg.mylan
c76405a7ee merged 2005-01-24 19:41:42 +01:00
serg@serg.mylan
67ba2e367a fixes/cleanups according to Coverity report 2005-01-24 15:48:25 +01:00