Commit graph

612 commits

Author SHA1 Message Date
dlenev@brandersnatch.localdomain
0aa589d099 Final solution for bug# 4302 "Ambiguos order by when renamed column is
identical to another in result"
According to SQL standard queries like 
"select t1.a as col from t1, t2 order by a" should return an error if
both tables contain field a.
2004-09-30 16:28:17 +04:00
bell@sanja.is.com.ua
24e1464d5a information about different variables agged to query cache (BUG#5515, BUG#5394) 2004-09-10 16:28:18 +03:00
bell@sanja.is.com.ua
b02451c5bd Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-not-4.1
2004-08-31 21:11:54 +03:00
bell@sanja.is.com.ua
2cf1234ba2 after review patch 2004-08-31 21:10:57 +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
serg@serg.mylan
b4bb38e896 merged 2004-08-26 15:19:46 +02:00
rburnett@build.mysql.com
0e44c9fdab Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into build.mysql.com:/users/rburnett/mysql-4.0
2004-08-26 13:43:27 +02:00
monty@mysql.com
91ec38a74e merge 2004-08-26 00:39:43 +03:00
monty@mysql.com
4fccf1c4ac Remove default argument to mysql_truncate()
Update to new valgrind
2004-08-26 00:37:25 +03:00
rburnett@build.mysql.com
52a973c5ff Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into build.mysql.com:/users/rburnett/mysql-4.0
2004-08-25 06:39:19 +02:00
bell@sanja.is.com.ua
3ca433e332 merge 2004-08-23 15:50:59 +03:00
bell@sanja.is.com.ua
74d7a092b2 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-4.1
2004-08-23 10:59:35 +03:00
konstantin@mysql.com
75454b0a1d Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/kostja/work/mysql-4.1-4912
2004-08-21 02:08:20 +04:00
konstantin@mysql.com
568c6e8526 Fix for bug#4912 "mysqld crashs in case a statement is executed
a second time". The bug was caused by incompatibility of
negations elimination algorithm and PS: during first statement 
execute a subtree with negation was replaced with equivalent 
subtree without NOTs.
The problem was that although this transformation was permanent, 
items of the new subtree were created in execute-local memory.
The patch adds means to check if it is the first execute of a
prepared statement, and if this is the case, to allocate items
in memory of the prepared statement.
The implementation:
- backports Item_arena from 5.0
- adds Item_arena::is_stmt_prepare(), 
  Item_arena::is_first_stmt_execute().
- deletes THD::allocate_temporary_pool_for_ps_preparing(),
  THD::free_temporary_pool_for_ps_preparing(); they
  were redundant.
and adds a few invariants:
- thd->free_list never contains junk (= freed items)
- thd->current_arena is never null. If there is no
  prepared statement, it points at the thd. 
The rest of the patch contains mainly mechanical changes and
cleanups.
2004-08-21 02:02:46 +04:00
serg@serg.mylan
f401650290 Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
2004-08-20 22:37:19 +02:00
serg@serg.mylan
050bf6a89f merged 2004-08-20 21:56:29 +02:00
rburnett@build.mysql.com
69ec557494 Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1
into build.mysql.com:/users/rburnett/mysql-4.1
2004-08-20 21:48:16 +02:00
guilhem@mysql.com
5db56a106b Making FLUSH TABLES WITH READ LOCK block COMMITs of existing transactions,
in a deadlock-free manner. This splits locking the global read lock in two steps.
This fixes a consequence of this bug, known as:
BUG#4953 'mysqldump --master-data may report incorrect binlog position if using InnoDB'
And a test.
2004-08-20 16:35:23 +02:00
serg@serg.mylan
62722e7b05 merged 2004-08-20 00:52:43 +02:00
guilhem@mysql.com
0db5b4d202 (manual port from 4.0 - was needed)
Fix for BUG#4971 "CREATE TABLE ... TYPE=HEAP SELECT ... stops slave (wrong DELETE in binlog)":
replacing the no_log argument of mysql_create_table() by some safer method
(temporarily setting OPTION_BIN_LOG to 0) which guarantees that even the automatic
DELETE FROM heap_table does not get into the binlog when a not-yet-existing HEAP table
is opened by mysql_create_table().
2004-08-19 23:24:35 +02:00
rburnett@build.mysql.com
d3e6b5c3ad This fixes a Windows build failure. How did this build on Linux?
logging_ok:
  Logging to logging@openlogging.org accepted
mysql_priv.h, my_time.h:
  Moved declaration of days_in_month array from mysql_priv.h to my_time.h to correct Windows build issues
2004-08-19 22:40:31 +02:00
rburnett@build.mysql.com
eb04e6da07 Bug #4466 Nothing in .err when mysql service ends because of malformed my.ini options
mysqld.cc:
  Changed LOGLEVEL enum to loglevel
mysql_priv.h, log.cc:
  Changed LOGLEVEL to loglevel.  Removed startup_ from some of the DBUG_ENTER macros. Removed the print_msg_to_log function as it was unused.
my_getopt.c, my_getopt.h:
  Renamed LOGLEVEL to loglevel to match coding standards
2004-08-19 17:56:32 +02:00
guilhem@mysql.com
42d30b758b Fix for BUG#4971 "CREATE TABLE ... TYPE=HEAP SELECT ... stops slave (wrong DELETE in binlog)":
replacing the no_log argument of mysql_create_table() by some safer method
(temporarily setting OPTION_BIN_LOG to 0) which guarantees that even the automatic
DELETE FROM heap_table does not get into the binlog when a not-yet-existing HEAP table
is opened by mysql_create_table().
2004-08-19 00:29:11 +02:00
rburnett@build.mysql.com
a22cdab9e9 BUG# 4466 - Nothing in .err when mysql service ends because of malformed my.ini options
mysqld.cc:
  Changed option_error_reporter to match new function header that includes LOGLEVEL enum
mysql_priv.h:
  Removed the MY_ERROR style bitmask.  Changed function headers to use new LOGLEVEL enum
log.cc:
  Changed print_buffer_to_log to print_buffer_to_file.  Remove the timestamp bool and now all log entries written to stderr are timestamped.  Removed some unused commented code.  changed to use the new LOGLEVEL enum.  
my_getopt.c:
  Changed functions to use the new LOGLEVEL enum and changed the included error reporter to be default_reporter.  This reporter is used in handle_options if a reporter is not given
my_getopt.h:
  changed typedefs to use better naming convention.  Moved error bitmask into the LOGLEVEL enum and included it here.
2004-08-18 22:31:01 +02:00
rburnett@build.mysql.com
67003d1c98 mysql_priv.h:
Added declarations for print_msg_to_log and vprint_msg_to_log.  sql_print_error are simple functions that wrap calls to print_msg_to_log.  Define the different error types with MY_ERROR_TYPE, MY_WARNING_TYPE, and MY_INFORMATION_TYPE
gen_lex_hash.cc:
  Added NULL error reporting parameter to handle_options
log.cc:
  Add print_msg_to_log, print_buffer_to_log, and vprint_msg_to_log.  Print_msg_to_log will write the message to the windows event log if on NT.  We now have error, warning, and information versions of sql_print_xxxx.  T his is a variation of a similar changeset WAX did.
mysqld.cc:
  Added option_error_reporter callback function and pass that into handle_options
mysql.cc:
  Added NULL as error reporter arg to the end of handle_options
Many files:
  Added NULL error reporter parameter as the last paramter to handle_options
my_getopt.c:
  Added second function pointer to server as an error reporting callback.  Added local function report_option_error that will either write the error to stderr or to the error reporting callback.  changed all calls in handle_options from fprintf(stderr, ... ) to report_option_error
my_getopt.h:
  Changed declaration of handle_options to use typedefs for the two function pointers.  added second function pointer to server as an error reporting callback
mysqld.dsp:
  Added custom build step for compiling message file and added message resource file (output of mc)
2004-08-14 03:38:37 +02:00
brian@avenger.(none)
b7b48d6764 Merge baker@bk-internal.mysql.com:/home/bk/mysql-4.1
into avenger.(none):/export/brian/tina-4.1
2004-08-13 16:27:17 -07:00
bell@sanja.is.com.ua
0ce931947e skip resolving field in table list if table list is not accessable due to groupping (BUG#4814) 2004-08-13 10:01:30 +03:00
brian@avenger.(none)
1fe8b35bba This is the addition of the CSV engine "aka tina". Its an example engine that works as a plain text file. 2004-08-12 20:57:18 -07: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
guilhem@mysql.com
2b6151c20f Merge gbichot@213.136.52.20:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1-1717
2004-07-29 23:28:28 +02:00
guilhem@mysql.com
0f3e279a05 WL#1580: --start-datetime, --stop-datetime, --start-position (alias for --position) and --stop-position
options for mysqlbinlog, with a test file.
This enables user to say "recover my database to how it was this morning at 10:30"
(mysqlbinlog "--stop-datetime=2003-07-29 10:30:00").
Using time functions into client/ made me move them out of sql/ into sql-common/.
+ (small) fix for BUG#4507 "mysqlbinlog --read-from-remote-server sometimes
cannot accept 2 binlogs" (that is, on command line).
2004-07-29 23:25:58 +02:00
bell@sanja.is.com.ua
a1b6f6db0e LEX initialization fixed 2004-07-21 22:44:12 +03:00
monty@mysql.com
56d5e56cc6 Merge 2004-07-11 12:16:25 +03:00
serg@serg.mylan
d6f601c80f mysql_find_files() made extern (from static to sql_show.cc) 2004-07-10 11:13:05 +02:00
monty@mysql.com
c1032fe9eb Cleanup of db option cacheing
Some bug fixes to last pushed code
2004-07-09 10:55:16 +03:00
bar@mysql.com
a5025f4ca6 WL#807 Optimize loading database options in load_db_opt
also known as
BUG#2326 Charset of table is determined by charset of db only if "USE db;"
2004-07-08 15:03:01 +05:00
monty@mysql.com
8c867328cd Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-06-25 21:56:42 +03:00
monty@mysql.com
b1d08ba2b4 Merge with 4.0 to get the latest bug patches to 4.1 2004-06-25 20:13:05 +03: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
ingo@mysql.com
18cd61d0d0 bug#3565 - HANDLER and FLUSH TABLE/TABLES deadlock.
Redesigned the handler close functions so that they are usable
at different places where waiting for closing tables is done.
2004-06-24 15:06:56 +02:00
guilhem@mysql.com
4a82bd4732 Final part of WL#1717 "innodb/binlog consistency". This is to resolve
a limitation of yesterday's implementation:
if there was an unfinished transaction (COMMIT not typed), and some MyISAM tables were
then updated, and then mysqld crashes, then at restart the server would use the too old
binlog offset known by InnoDB to cut the binlog, thus cutting the successful MyISAM
updates. We fix this by reporting the binlog offset into InnoDB even if InnoDB was not
affected at all by the update.
But the feature is still disabled until we decide if it can go into 4.1.3.
2004-06-24 11:38:57 +02:00
guilhem@mysql.com
f5d6424487 Robustness feature.
Won't be pushed as is - separate email sent for internal review.
WL#1717 "binlog-innodb consistency".
Now when mysqld starts, if InnoDB does a crash recovery, we use the binlog name
and position retrieved from InnoDB (corresponding to the last transaction
successfully committed by InnoDB) to cut any rolled back transaction from
the binary log. This is triggered by the --innodb-safe-binlog option.
Provided you configure mysqld to fsync() InnoDB at every commit (using
flush_log_at_trx_commit) and to fsync() the binlog at every write
(using --sync-binlog=1), this behaviour guarantees that a master always has
consistency between binlog and InnoDB, whenever the crash happens.
6 tests to verify that it works.
2004-06-20 19:11:02 +02: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
konstantin@mysql.com
f08bbd1f12 assert.h needed for my_dbug.h now is included in my_dbug.h, where it for
some reason wasn't included before.
A lot of files cleaned up from #include <assert.h>
2004-06-10 23:58:39 +04:00
guilhem@mysql.com
3d33dc7c77 Merge gbichot@213.136.52.20:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1-874
2004-06-10 16:42:07 +02:00
guilhem@mysql.com
e816a757db WL#1689 "Map OPTIMIZE TABLE to ALTER TABLE for InnoDB"
exactly it's mapped to "ALTER TABLE t; ANALYZE TABLE t;"
2004-06-10 16:41:24 +02:00
guilhem@mysql.com
73411a2ed5 WL#1595 "Optionally fsync() the binlog after every statement":
New option --sync-binlog=x (and global settable variable) which will fsync the binlog
after every x-th disk write to it. That is, if in autocommit mode, after every x-th statement
written to the binlog; if using transactions, after every x-th transaction written to the binlog.
x==0 means no fsync. x==1 is the slowest.
There is no test added for this, I have just checked that it works as --sync-binlog=1 dramatically
slows down mysqld.
Made sync-frm a global settable variable.
2004-06-10 15:56:13 +02:00
sergefp@mysql.com
7e0455f333 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-ps-merge
2004-06-07 23:50:59 +04:00