Commit graph

683 commits

Author SHA1 Message Date
monty@mishka.local
f2941380c4 Strict mode & better warnings
Under strict mode MySQL will generate an error message if there was any conversion when assigning data to a field.
Added checking of date/datetime fields.
If strict mode, give error if we have not given value to field without a default value (for INSERT)
2004-09-28 20:08:00 +03:00
monty@mishka.local
095f7e8740 Removed wrong warnings in test suite (This was because select_insert / select_create results was not freed.
Added thd to openfrm() for initialization of TABLE->in_use. This fixed a bug in BDB handling where table->in_use was used early
2004-09-17 03:08:23 +03:00
jani@rhols221.adsl.netsonic.fi
0b3d778691 Merge. 2004-09-13 18:12:44 +03:00
jani@rhols221.adsl.netsonic.fi
fe23df1a2b Added per thread status variables, after review, patch v1.1. 2004-09-13 16:48:01 +03:00
bell@sanja.is.com.ua
763c57d41f Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-show-5.0
2004-09-10 02:26:09 +03:00
bell@sanja.is.com.ua
a23857e071 post merge fixes 2004-09-10 02:22:44 +03:00
dlenev@mysql.com
c46e640009 Yet another manual merge with main tree for patch for WL#1218 "Triggers" 2004-09-09 19:52:10 +04:00
bell@sanja.is.com.ua
336cb5f8be merge 2004-09-09 16:52:22 +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
dlenev@mysql.com
9b1bc6a4d5 Merge of changes from the main tree to tree for WL#1218 "Triggers". 2004-09-08 13:29:21 +04:00
bell@sanja.is.com.ua
425857f5b2 test of updating and fetching from the same table check (BUG##5157) 2004-09-08 10:18:04 +03:00
dlenev@brandersnatch.localdomain
9ed038dd6f WL#1218 "Triggers". Some very preliminary version of patch.
Mostly needed for Monty for him getting notion what needed for triggers 
from new .FRM format. 

Things to be done:
- Right placement of trigger's invocations
- Right handling of errors in triggers (including transaction rollback)
- Support for priviliges
- Right handling of DROP/RENAME table (hope that it will be handled automatically
  with merging of .TRG into .FRM file)
- Saving/restoring some information critical for trigger creation and replication
  with their definitions (e.g. sql_mode, creator, ...)
- Replication

Already has some known bugs so probably not for general review.
2004-09-07 16:29:46 +04:00
monty@mysql.com
31122efde7 Merge with 4.1
(Includes merge of arena code in 4.1 and 5.0)
2004-09-06 15:14:10 +03:00
monty@mysql.com
46ff90738b Merge with pulled code 2004-09-03 22:38:45 +03:00
monty@mysql.com
cbd67f49e1 Cleanup of new code pushed into 5.0 since last pull
Merged the different find_xxxx_table_in_list functions to one + some inline functions
2004-09-03 21:43:04 +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
bell@sanja.is.com.ua
7e446b8349 Item name for VIEW added to find_field_in_table (BUG#5147) 2004-08-27 00:08:59 +03: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
konstantin@mysql.com
d3e520ce7e Port of cursors to be pushed into 5.0 tree:
- client side part is simple and may be considered stable
- server side part now just joggles with THD state to save execution
  state and has no additional locking wisdom.
  Lot's of it are to be rewritten.
2004-08-03 03:32:21 -07: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
serg@serg.mylan
c9fd775777 merged 2004-07-21 23:32:11 +02:00
bell@sanja.is.com.ua
a1b6f6db0e LEX initialization fixed 2004-07-21 22:44:12 +03:00
bell@sanja.is.com.ua
9336d36cf8 VIEW
two TABLE_LIST copy eliminated
2004-07-16 01:15:55 +03:00
monty@mysql.com
b97ef911c5 Merge 2004-07-15 04:28:42 +03:00