Commit graph

28 commits

Author SHA1 Message Date
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
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
monty@mysql.com
d35140a851 First stage of table definition cache
Split TABLE to TABLE and TABLE_SHARE (TABLE_SHARE is still allocated as part of table, will be fixed soon)
Created Field::make_field() and made Field_num::make_field() to call this
Added 'TABLE_SHARE->db' that points to database name; Changed all usage of table_cache_key as database name to use this instead
Changed field->table_name to point to pointer to alias. This allows us to change alias for a table by just updating one pointer.
Renamed TABLE_SHARE->real_name to table_name
Renamed TABLE->table_name to alias
Renamed TABLE_LIST->real_name to table_name
2005-01-06 13:00:13 +02:00
monty@mysql.com
5e03ebbcad After merge fixes
Cleanup of mi_print_error() handling
Deleted 'merge' directory
2004-12-31 03:47:56 +02:00
dlenev@brandersnatch.localdomain
c834a49b66 Fix for bug #6849 "Crash while preparing query containing const expr with
IN and CONVERT_TZ()" (with after review changes).

Now we add implicitly used time zone tables to global table list right
at the parsing stage instead of doing it later in mysql_execute_command()
or in check_prepared_statement().

No special test-case needed since this bug also manifests itself as
timezone2.test failure if one runs it with --ps-protocol option.
2004-12-17 15:34:48 +03:00
monty@mysql.com
afbe601302 merge with 4.1 2004-10-29 19:26:52 +03:00
dlenev@brandersnatch.localdomain
e6a44b719a Fix for bug #6116 "SET time_zone := ... requires access to
mysql.time_zone* tables".

We are excluding implicitly used time zone tables from privilege
checking.
2004-10-21 22:18:00 +04:00
dlenev@brandersnatch.localdomain
431467b116 Small after merge cleanup of time zone initialization code. 2004-09-17 12:30:26 +04:00
jani@rhols221.adsl.netsonic.fi
ac55486644 A fix for MetroWerks compiler. 2004-09-16 16:24:45 +03:00
monty@mysql.com
f2829d0386 After merge fixes of merge with 4.1 that included the new arena code.
Fixed (together with Guilhem) bugs in mysqlbinlog regarding --offset
Prefix addresses with 0x for easier comparisons of debug logs
Fixed problem where MySQL choosed index-read even if there would be a much better range on the same index
This fix changed some 'index' queries to 'range' queries in the test suite
Don't create 'dummy' WHERE clause for trivial WHERE clauses where we can remove the WHERE clause.
This fix removed of a lot of 'Using where' notes in the test suite.
Give NOTE instead of WARNING if table/function doesn't exists when using DROP IF EXISTS
Give NOTE instead of WARNING for safe field-type conversions
2004-09-09 06:59:26 +03:00
serg@serg.mylan
b60713c033 bug in my_strnncoll_utf8 (and friends) fixed
cleanups
better, charset-dependent, ft_max_len_for_sort value
2004-08-30 08:37:36 +02:00
monty@mysql.com
ea687ba5da Portability fixes
Fixed bug in end space handle for WHERE text_column="constant"
2004-08-26 18:26:38 +03:00
dlenev@brandersnatch.localdomain
f49d4f5350 Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server".
Instead of trying to open time zone tables during calculation of CONVERT_TZ() function
or setting of @@time_zone variable we should open and lock them with the rest of 
statement's table (so we should add them to global table list) and after that use such 
pre-opened tables for loading info about time zones.
2004-08-10 12:42:31 +04:00
konstantin@mysql.com
403b91798a Cleanup in mysql_time.h/my_time.h headers. The first is used in mysql.h,
the second is for the rest of time declarations in mysys.
2004-08-05 14:16:43 -07:00
serg@serg.mylan
08ac1d1bda memory leak in tz code closed
(table opened in my_tz_init, was removed from thd->open_tables in
tz_load_from_db w/o being unlocked, so it was stayng in open_cache
forever preventing the latter from being free'd in table_cache_free)
2004-06-27 01:32:52 +02:00
dlenev@brandersnatch.localdomain
9c35c402f2 Removed mysql_tzinfo_to_sql dependancy on sql/mysql_priv.h for circumventing
problems with unresolved dependancies on some platforms.
2004-06-25 21:04:48 +04:00
konstantin@mysql.com
29b88ff539 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/kostja/mysql/mysql-4.1-4030
2004-06-24 19:09:31 +04:00
konstantin@mysql.com
a30fcdc690 Fix for Bug#4030 "Client side conversion string -> date type doesn't
work (prepared statements)" and after-review fixes:
- str_to_TIME renamed to str_to_datetime to pair with str_to_time
- functions str_to_time and str_to_TIME moved to sql-common
- send_data_str now supports MYSQL_TYPE_TIME, MYSQL_TIME_DATE,
  MYSQL_TIME_DATETIME types of user input buffers.
- few more comments in the client library
- a test case added.
2004-06-24 19:08:36 +04:00
dlenev@brandersnatch.localdomain
afa211f57b Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into brandersnatch.localdomain:/home/dlenev/src/mysql-4.1-winfix
2004-06-24 01:42:43 +04:00
serg@serg.mylan
d5808281e6 followup 2004-06-23 23:41:56 +02:00
dlenev@brandersnatch.localdomain
0d78aa2c55 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into brandersnatch.localdomain:/home/dlenev/src/mysql-4.1-winfix
2004-06-24 01:09:05 +04:00
dlenev@brandersnatch.localdomain
ab8a72c7c7 Fixed compilation on windows. 2004-06-24 01:08:07 +04:00
monty@mysql.com
d0507ca7f3 Fixed warning about unitialized mutex when mysqld couldn't start. 2004-06-23 16:39:56 +03:00
dlenev@brandersnatch.localdomain
ea36bd3c78 Small cleanup in time zone handling code:
Now we are using time zone abbreviations in debug builds or in utlities only.
Tried to remove warnings generated by compiler by using more proper types for
members of time zone describing structures. Removed unused variables. 
Fixed test_time to be able to build on FreeBSD without much problems.
Portability fix: resolved ambiguity of abs() function.
2004-06-22 03:10:30 +04:00
dlenev@brandersnatch.localdomain
09ba29e539 WL#1264 "Per-thread time zone support infrastructure".
Added basic per-thread time zone functionality (based on public
domain elsie-code). Now user can select current time zone
(from the list of time zones described in system tables).
All NOW-like functions honor this time zone, values of TIMESTAMP
type are interpreted as values in this time zone, so now
our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH
LOCAL TIME ZONE (or proper PostgresSQL type).
  
WL#1266 "CONVERT_TZ() - basic time with time zone conversion 
function".
  
Fixed problems described in Bug #2336 (Different number of warnings 
when inserting bad datetime as string or as number). This required
reworking of datetime realted warning hadling (they now generated 
at Field object level not in conversion functions).
  
Optimization: Now Field class descendants use table->in_use member
instead of current_thd macro.
2004-06-18 10:11:31 +04:00