Commit graph

620 commits

Author SHA1 Message Date
monty@narttu.mysql.fi
717284b85c Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1
2006-11-29 23:07:15 +02:00
monty@mysql.com/narttu.mysql.fi
0bee93e038 Ignore some generated files
Don't return from my_thread_global_end() until all threads have called my_thread_end()
Bug#24387: Valgrind: my_thread_init (handle_sl sql, handle_one_conn, handle_slave_io)
2006-11-29 22:14:08 +02:00
msvensson@shellback.(none)
7ddc43e305 Merge shellback.(none):/home/msvensson/mysql/mysql-5.1
into  shellback.(none):/home/msvensson/mysql/mysql-5.1-maint
2006-11-29 15:44:09 +01:00
msvensson@neptunus.(none)
04d5a42bbf Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-11-28 20:59:57 +01:00
jpipes@shakedown.(none)
03a5dcd7ce Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  shakedown.(none):/home/jpipes/dev/mysql-5.0-maint
2006-11-27 14:58:57 -05:00
jpipes@shakedown.(none)
7c7b1ede76 Merge shakedown.(none):/home/jpipes/dev/mysql-5.0-maint
into  shakedown.(none):/home/jpipes/dev/mysql-5.1-new-maint2
2006-11-27 14:46:48 -05:00
monty@nosik.monty.fi
89570bf966 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1
2006-11-22 14:11:36 +02:00
monty@mysql.com/nosik.monty.fi
e825879800 Remove compiler warnings
(Mostly in DBUG_PRINT() and unused arguments)
Fixed bug in query cache when used with traceing (--with-debug)
Fixed memory leak in mysqldump
Removed warnings from mysqltest scripts (replaced -- with #)
2006-11-20 22:42:06 +02:00
msvensson@neptunus.(none)
74d8113c2e Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
2006-10-24 22:02:33 +02:00
msvensson@neptunus.(none)
e0985bef96 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-10-24 21:05:35 +02:00
msvensson@neptunus.(none)
ac5b37ef00 Pass --core-file option to mysqld when bootstrapping 2006-10-24 21:02:04 +02:00
msvensson@neptunus.(none)
1a7676fa65 WL#3462 Add testing of MySQL client ABI to prevent unintentional ABI breaks
BUG#23427 incompatible ABI change in 5.0.26?
   - Use the icheck tool if avaliable and compare the current mysql.h to a version
controlled reference file
2006-10-24 20:32:07 +02:00
jpipes@shakedown.(none)
b57051381a Fix for Bug #21412 (client allows DELIMITER with backslash character) 2006-10-02 11:45:48 -04:00
msvensson@neptunus.(none)
8ee337a590 Merge neptunus.(none):/home/msvensson/mysql/netware/my50-netware_libmysql_imp
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-09-28 11:05:28 +02:00
msvensson@neptunus.(none)
3f59918eab Merge neptunus.(none):/home/msvensson/mysql/netware/my50-netware_libmysql_imp
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
2006-09-28 10:39:55 +02:00
msvensson@neptunus.(none)
c4a50dea3f Build fixes for netware/ directory
- Create the file netware/libmysql.imp from libmysql/libmysql.def
 - Remove the outdated netware/libmysql.imp file from version control
2006-09-27 17:11:19 +02:00
msvensson@shellback.(none)
fe0cfacf35 Merge shellback.(none):/home/msvensson/mysql/mysql-5.1
into  shellback.(none):/home/msvensson/mysql/mysql-5.1-maint
2006-09-21 20:31:35 +02:00
istruewing@chilla.local
1782889d35 Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-bug14400-monty
2006-09-20 08:33:46 +02:00
istruewing@chilla.local
c49c58cbf4 Merge chilla.local:/home/mydev/mysql-5.0-bug14400-monty
into  chilla.local:/home/mydev/mysql-5.1-bug14400-monty
2006-09-19 14:33:29 +02:00
istruewing@chilla.local
5d509b32d4 Merge chilla.local:/home/mydev/mysql-4.1-bug14400-monty
into  chilla.local:/home/mydev/mysql-5.0-bug14400-monty
2006-09-19 11:27:00 +02:00
istruewing@chilla.local
47dc3fbe8a Merge bk-internal:/home/bk/mysql-4.0
into  chilla.local:/home/mydev/mysql-4.1-bug14400-monty
2006-09-19 10:17:25 +02:00
msvensson@shellback.(none)
f415523c17 Merge bk-internal:/home/bk/mysql-5.1-maint
into  shellback.(none):/home/msvensson/mysql/mysql-5.1-maint
2006-09-18 11:34:07 +02:00
msvensson@shellback.(none)
0a59967cb0 Remove trailing whitespace
Add linebreak
2006-09-18 11:27:21 +02:00
ramil/ram@myoffice.izhnet.ru
8445f3e3de Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/usr/home/ram/work/mysql-5.1-maint
2006-09-15 14:15:09 +05:00
dlenev@mockturtle.local
5ba1b83c98 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mockturtle.local:/home/dlenev/src/mysql-5.1-rt-merge
2006-09-14 23:53:35 +04:00
iggy@rolltop.ignatz42.dyndns.org
e9ff111d1e Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/winbkfix/my50-winbkfix
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-5.0-maint
2006-09-13 14:18:36 -04:00
iggy@rolltop.ignatz42.dyndns.org
eb641f4a43 Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/winbkfix/my50-winbkfix
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/winbkfix/my51-winbkfix
2006-09-13 14:16:53 -04:00
iggy@rolltop.ignatz42.dyndns.org
1cae186141 These bitKeeper changes will allow Windows to be used as a primary development platform. 2006-09-13 14:15:22 -04:00
msvensson@shellback.(none)
a63285a647 Merge shellback.(none):/home/msvensson/mysql/mtr/my50-mtr
into  shellback.(none):/home/msvensson/mysql/mtr/my51-mtr
2006-09-01 10:32:20 +02:00
msvensson@shellback.(none)
7afee46c55 Merge shellback.(none):/home/msvensson/mysql/mtr/my41-mtr
into  shellback.(none):/home/msvensson/mysql/mtr/my50-mtr
2006-09-01 10:25:50 +02:00
msvensson@shellback.(none)
324cf4ccb3 Add target to make "mtr", shortcut for running test suite 2006-09-01 10:21:08 +02:00
cmiller@zippy.cornsilk.net
05df2f9402 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0-maint-gca
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0-maint
2006-08-23 18:37:04 -04:00
cmiller@zippy.cornsilk.net
2a06452bde Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0-maint-gca
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.1-new-maint
2006-08-23 18:29:44 -04:00
cmiller@zippy.cornsilk.net
a4f32ff2e8 String broken up to avoid silly MICROS~1 string-size limit. 2006-08-23 18:29:05 -04:00
andrey@example.com
53089a19d9 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-wl3337
into  example.com:/work/mysql-5.1-runtime-wl3337
2006-08-14 15:26:59 +02:00
kostja@bodhi.local
04c97488f9 Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-08-12 21:06:51 +04:00
monty@mysql.com/narttu.mysql.fi
7d0b042ec5 Better bug fix for #14400 "Query joins wrong rows from table which is subject of "concurrent insert""
The previous bug fix didn't work when using partial keys.
Don't use GNUC min/max operations are they are depricated.
Fixed valgrind warning
2006-08-10 22:41:19 +03:00
kostja@bodhi.local
12051070a7 Fix a bug in the .dsp file. Ignore a symlink. 2006-08-04 00:00:48 +04:00
kostja@bodhi.local
73189969f3 Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-07-26 23:33:25 +04:00
kostja@bodhi.local
d7845b74db Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge-5.0
2006-07-13 22:09:36 +04:00
andrey@lmy004.
3f6de6c523 update to ease the patch process 2006-07-13 16:24:55 +02:00
andrey@lmy004.
2319aac01e Manual merge 2006-07-10 14:42:29 +02:00
kostja@bodhi.local
a2c0cdd75b Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge-41
2006-07-08 02:30:07 +04:00
kostja@bodhi.local
96f4c10dde Cleanups: ignore more files. 2006-07-08 00:03:43 +04:00
bar@mysql.com
3855520138 WL#2928 Date Translation NRE
(implemented by by Josh Chamas)
2006-07-04 17:40:40 +05:00
cmiller@zippy.(none)
6110a83a0e Merge zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.0
into  zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1
2006-07-03 11:35:58 -04:00
monty@mysql.com
f62829636b After merge fixes 2006-06-30 20:07:33 +03:00
monty@mysql.com
3f22bc07c6 Fixed failing test rpl_ndb_auto_inc.test
Mark events_stress.test as 'big' as it's very slow on some machines
2006-06-29 03:24:33 +03:00
monty@narttu.mysql.fi
91c3e28d77 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2006-06-28 20:03:46 +03:00
monty@mysql.com
500dd048b9 Added -DHAVE_MUTEX_THREAD_ONLY to fix that bdb doesn't crash with "unable to initialize mutex" 2006-06-28 17:23:54 +03:00
andrey@lmy004.
04659677a8 WL#3337 (Events new infrasctructure)
Second cut of separating parsing phase from execution phase
Separate Event_timed from parsing phase and introducing Event_parse_data.
2006-06-27 10:53:26 +02:00
cmiller@zippy.(none)
deca07bdcc Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.(none):/home/cmiller/work/mysql/mysql-5.0-maint
2006-06-20 17:17:04 -04:00
andrey@lmy004.
45598df7d4 manual merge 2006-06-20 17:14:36 +02:00
cmiller@zippy.(none)
00243ac847 Merge zippy.(none):/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new
2006-06-13 16:06:35 -04:00
andrey@lmy004.
1d1e9d10b6 Reorganize, physically the events code
Unify method naming -> create/update/drop_event
Move class Event_timed to event_timed.h
class Events is in events.h (renamed from event.h)
The implementation is in events.cc (renamed from event.h)
2006-06-08 23:07:11 +02:00
anjuta@arthur.local
a885c2e6f2 Merge anna@bk-internal.mysql.com:/home/bk/mysql-5.0
into  arthur.local:/home/my/mysql-5.0
2006-06-05 12:19:53 +03:00
monty@mysql.com
c46fb742b8 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/my/mysql-5.1
2006-06-04 21:05:22 +03:00
monty@mysql.com
74cc73d461 This changeset is largely a handler cleanup changeset (WL#3281), but includes fixes and cleanups that was found necessary while testing the handler changes
Changes that requires code changes in other code of other storage engines.
(Note that all changes are very straightforward and one should find all issues
by compiling a --debug build and fixing all compiler errors and all
asserts in field.cc while running the test suite),

- New optional handler function introduced: reset()
  This is called after every DML statement to make it easy for a handler to
  statement specific cleanups.
  (The only case it's not called is if force the file to be closed)

- handler::extra(HA_EXTRA_RESET) is removed. Code that was there before
  should be moved to handler::reset()

- table->read_set contains a bitmap over all columns that are needed
  in the query.  read_row() and similar functions only needs to read these
  columns
- table->write_set contains a bitmap over all columns that will be updated
  in the query. write_row() and update_row() only needs to update these
  columns.
  The above bitmaps should now be up to date in all context
  (including ALTER TABLE, filesort()).

  The handler is informed of any changes to the bitmap after
  fix_fields() by calling the virtual function
  handler::column_bitmaps_signal(). If the handler does caching of
  these bitmaps (instead of using table->read_set, table->write_set),
  it should redo the caching in this code. as the signal() may be sent
  several times, it's probably best to set a variable in the signal
  and redo the caching on read_row() / write_row() if the variable was
  set.

- Removed the read_set and write_set bitmap objects from the handler class

- Removed all column bit handling functions from the handler class.
  (Now one instead uses the normal bitmap functions in my_bitmap.c instead
  of handler dedicated bitmap functions)

- field->query_id is removed. One should instead instead check
  table->read_set and table->write_set if a field is used in the query.

- handler::extra(HA_EXTRA_RETRIVE_ALL_COLS) and
  handler::extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY) are removed. One should now
  instead use table->read_set to check for which columns to retrieve.

- If a handler needs to call Field->val() or Field->store() on columns
  that are not used in the query, one should install a temporary
  all-columns-used map while doing so. For this, we provide the following
  functions:

  my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set);
  field->val();
  dbug_tmp_restore_column_map(table->read_set, old_map);

  and similar for the write map:

  my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set);
  field->val();
  dbug_tmp_restore_column_map(table->write_set, old_map);

  If this is not done, you will sooner or later hit a DBUG_ASSERT
  in the field store() / val() functions.
  (For not DBUG binaries, the dbug_tmp_restore_column_map() and
  dbug_tmp_restore_column_map() are inline dummy functions and should
  be optimized away be the compiler).

- If one needs to temporary set the column map for all binaries (and not
  just to avoid the DBUG_ASSERT() in the Field::store() / Field::val()
  methods) one should use the functions tmp_use_all_columns() and
  tmp_restore_column_map() instead of the above dbug_ variants.

- All 'status' fields in the handler base class (like records,
  data_file_length etc) are now stored in a 'stats' struct. This makes
  it easier to know what status variables are provided by the base
  handler.  This requires some trivial variable names in the extra()
  function.

- New virtual function handler::records().  This is called to optimize
  COUNT(*) if (handler::table_flags() & HA_HAS_RECORDS()) is true.
  (stats.records is not supposed to be an exact value. It's only has to
  be 'reasonable enough' for the optimizer to be able to choose a good
  optimization path).

- Non virtual handler::init() function added for caching of virtual
  constants from engine.

- Removed has_transactions() virtual method. Now one should instead return
  HA_NO_TRANSACTIONS in table_flags() if the table handler DOES NOT support
  transactions.

- The 'xxxx_create_handler()' function now has a MEM_ROOT_root argument
  that is to be used with 'new handler_name()' to allocate the handler
  in the right area.  The xxxx_create_handler() function is also
  responsible for any initialization of the object before returning.

  For example, one should change:

  static handler *myisam_create_handler(TABLE_SHARE *table)
  {
    return new ha_myisam(table);
  }

  ->

  static handler *myisam_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
  {
    return new (mem_root) ha_myisam(table);
  }

- New optional virtual function: use_hidden_primary_key().
  This is called in case of an update/delete when
  (table_flags() and HA_PRIMARY_KEY_REQUIRED_FOR_DELETE) is defined
  but we don't have a primary key. This allows the handler to take precisions
  in remembering any hidden primary key to able to update/delete any
  found row. The default handler marks all columns to be read.

- handler::table_flags() now returns a ulonglong (to allow for more flags).

- New/changed table_flags()
  - HA_HAS_RECORDS	    Set if ::records() is supported
  - HA_NO_TRANSACTIONS	    Set if engine doesn't support transactions
  - HA_PRIMARY_KEY_REQUIRED_FOR_DELETE
                            Set if we should mark all primary key columns for
			    read when reading rows as part of a DELETE
			    statement. If there is no primary key,
			    all columns are marked for read.
  - HA_PARTIAL_COLUMN_READ  Set if engine will not read all columns in some
			    cases (based on table->read_set)
 - HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS
   			    Renamed to HA_PRIMARY_KEY_REQUIRED_FOR_POSITION.
 - HA_DUPP_POS              Renamed to HA_DUPLICATE_POS
 - HA_REQUIRES_KEY_COLUMNS_FOR_DELETE
			    Set this if we should mark ALL key columns for
			    read when when reading rows as part of a DELETE
			    statement. In case of an update we will mark
			    all keys for read for which key part changed
			    value.
  - HA_STATS_RECORDS_IS_EXACT
			     Set this if stats.records is exact.
			     (This saves us some extra records() calls
			     when optimizing COUNT(*))
			    

- Removed table_flags()
  - HA_NOT_EXACT_COUNT     Now one should instead use HA_HAS_RECORDS if
			   handler::records() gives an exact count() and
			   HA_STATS_RECORDS_IS_EXACT if stats.records is exact.
  - HA_READ_RND_SAME	   Removed (no one supported this one)

- Removed not needed functions ha_retrieve_all_cols() and ha_retrieve_all_pk()

- Renamed handler::dupp_pos to handler::dup_pos

- Removed not used variable handler::sortkey


Upper level handler changes:

- ha_reset() now does some overall checks and calls ::reset()
- ha_table_flags() added. This is a cached version of table_flags(). The
  cache is updated on engine creation time and updated on open.


MySQL level changes (not obvious from the above):

- DBUG_ASSERT() added to check that column usage matches what is set
  in the column usage bit maps. (This found a LOT of bugs in current
  column marking code).

- In 5.1 before, all used columns was marked in read_set and only updated
  columns was marked in write_set. Now we only mark columns for which we
  need a value in read_set.

- Column bitmaps are created in open_binary_frm() and open_table_from_share().
  (Before this was in table.cc)

- handler::table_flags() calls are replaced with handler::ha_table_flags()

- For calling field->val() you must have the corresponding bit set in
  table->read_set. For calling field->store() you must have the
  corresponding bit set in table->write_set. (There are asserts in
  all store()/val() functions to catch wrong usage)

- thd->set_query_id is renamed to thd->mark_used_columns and instead
  of setting this to an integer value, this has now the values:
  MARK_COLUMNS_NONE, MARK_COLUMNS_READ, MARK_COLUMNS_WRITE
  Changed also all variables named 'set_query_id' to mark_used_columns.

- In filesort() we now inform the handler of exactly which columns are needed
  doing the sort and choosing the rows.

- The TABLE_SHARE object has a 'all_set' column bitmap one can use
  when one needs a column bitmap with all columns set.
  (This is used for table->use_all_columns() and other places)

- The TABLE object has 3 column bitmaps:
  - def_read_set     Default bitmap for columns to be read
  - def_write_set    Default bitmap for columns to be written
  - tmp_set          Can be used as a temporary bitmap when needed.
  The table object has also two pointer to bitmaps read_set and write_set
  that the handler should use to find out which columns are used in which way.

- count() optimization now calls handler::records() instead of using
  handler->stats.records (if (table_flags() & HA_HAS_RECORDS) is true).

- Added extra argument to Item::walk() to indicate if we should also
  traverse sub queries.

- Added TABLE parameter to cp_buffer_from_ref()

- Don't close tables created with CREATE ... SELECT but keep them in
  the table cache. (Faster usage of newly created tables).


New interfaces:

- table->clear_column_bitmaps() to initialize the bitmaps for tables
  at start of new statements.

- table->column_bitmaps_set() to set up new column bitmaps and signal
  the handler about this.

- table->column_bitmaps_set_no_signal() for some few cases where we need
  to setup new column bitmaps but don't signal the handler (as the handler
  has already been signaled about these before). Used for the momement
  only in opt_range.cc when doing ROR scans.

- table->use_all_columns() to install a bitmap where all columns are marked
  as use in the read and the write set.

- table->default_column_bitmaps() to install the normal read and write
  column bitmaps, but not signaling the handler about this.
  This is mainly used when creating TABLE instances.

- table->mark_columns_needed_for_delete(),
  table->mark_columns_needed_for_delete() and
  table->mark_columns_needed_for_insert() to allow us to put additional
  columns in column usage maps if handler so requires.
  (The handler indicates what it neads in handler->table_flags())

- table->prepare_for_position() to allow us to tell handler that it
  needs to read primary key parts to be able to store them in
  future table->position() calls.
  (This replaces the table->file->ha_retrieve_all_pk function)

- table->mark_auto_increment_column() to tell handler are going to update
  columns part of any auto_increment key.

- table->mark_columns_used_by_index() to mark all columns that is part of
  an index.  It will also send extra(HA_EXTRA_KEYREAD) to handler to allow
  it to quickly know that it only needs to read colums that are part
  of the key.  (The handler can also use the column map for detecting this,
  but simpler/faster handler can just monitor the extra() call).

- table->mark_columns_used_by_index_no_reset() to in addition to other columns,
  also mark all columns that is used by the given key.

- table->restore_column_maps_after_mark_index() to restore to default
  column maps after a call to table->mark_columns_used_by_index().

- New item function register_field_in_read_map(), for marking used columns
  in table->read_map. Used by filesort() to mark all used columns

- Maintain in TABLE->merge_keys set of all keys that are used in query.
  (Simplices some optimization loops)

- Maintain Field->part_of_key_not_clustered which is like Field->part_of_key
  but the field in the clustered key is not assumed to be part of all index.
  (used in opt_range.cc for faster loops)

-  dbug_tmp_use_all_columns(), dbug_tmp_restore_column_map()
   tmp_use_all_columns() and tmp_restore_column_map() functions to temporally
   mark all columns as usable.  The 'dbug_' version is primarily intended
   inside a handler when it wants to just call Field:store() & Field::val()
   functions, but don't need the column maps set for any other usage.
   (ie:: bitmap_is_set() is never called)

- We can't use compare_records() to skip updates for handlers that returns
  a partial column set and the read_set doesn't cover all columns in the
  write set. The reason for this is that if we have a column marked only for
  write we can't in the MySQL level know if the value changed or not.
  The reason this worked before was that MySQL marked all to be written
  columns as also to be read. The new 'optimal' bitmaps exposed this 'hidden
  bug'.

- open_table_from_share() does not anymore setup temporary MEM_ROOT
  object as a thread specific variable for the handler. Instead we
  send the to-be-used MEMROOT to get_new_handler().
  (Simpler, faster code)



Bugs fixed:

- Column marking was not done correctly in a lot of cases.
  (ALTER TABLE, when using triggers, auto_increment fields etc)
  (Could potentially result in wrong values inserted in table handlers
  relying on that the old column maps or field->set_query_id was correct)
  Especially when it comes to triggers, there may be cases where the
  old code would cause lost/wrong values for NDB and/or InnoDB tables.

- Split thd->options flag OPTION_STATUS_NO_TRANS_UPDATE to two flags:
  OPTION_STATUS_NO_TRANS_UPDATE and OPTION_KEEP_LOG.
  This allowed me to remove some wrong warnings about:
  "Some non-transactional changed tables couldn't be rolled back"

- Fixed handling of INSERT .. SELECT and CREATE ... SELECT that wrongly reset
  (thd->options & OPTION_STATUS_NO_TRANS_UPDATE) which caused us to loose
  some warnings about
  "Some non-transactional changed tables couldn't be rolled back")

- Fixed use of uninitialized memory in ha_ndbcluster.cc::delete_table()
  which could cause delete_table to report random failures.

- Fixed core dumps for some tests when running with --debug

- Added missing FN_LIBCHAR in mysql_rm_tmp_tables()
  (This has probably caused us to not properly remove temporary files after
  crash)

- slow_logs was not properly initialized, which could maybe cause
  extra/lost entries in slow log.

- If we get an duplicate row on insert, change column map to read and
  write all columns while retrying the operation. This is required by
  the definition of REPLACE and also ensures that fields that are only
  part of UPDATE are properly handled.  This fixed a bug in NDB and
  REPLACE where REPLACE wrongly copied some column values from the replaced
  row.

- For table handler that doesn't support NULL in keys, we would give an error
  when creating a primary key with NULL fields, even after the fields has been
  automaticly converted to NOT NULL.

- Creating a primary key on a SPATIAL key, would fail if field was not
  declared as NOT NULL.


Cleanups:

- Removed not used condition argument to setup_tables

- Removed not needed item function reset_query_id_processor().

- Field->add_index is removed. Now this is instead maintained in
  (field->flags & FIELD_IN_ADD_INDEX)

- Field->fieldnr is removed (use field->field_index instead)

- New argument to filesort() to indicate that it should return a set of
  row pointers (not used columns). This allowed me to remove some references
  to sql_command in filesort and should also enable us to return column
  results in some cases where we couldn't before.

- Changed column bitmap handling in opt_range.cc to be aligned with TABLE
  bitmap, which allowed me to use bitmap functions instead of looping over
  all fields to create some needed bitmaps. (Faster and smaller code)

- Broke up found too long lines

- Moved some variable declaration at start of function for better code
  readability.

- Removed some not used arguments from functions.
  (setup_fields(), mysql_prepare_insert_check_table())

- setup_fields() now takes an enum instead of an int for marking columns
   usage.

- For internal temporary tables, use handler::write_row(),
  handler::delete_row() and handler::update_row() instead of
  handler::ha_xxxx() for faster execution.

- Changed some constants to enum's and define's.

- Using separate column read and write sets allows for easier checking
  of timestamp field was set by statement.

- Remove calls to free_io_cache() as this is now done automaticly in ha_reset()

- Don't build table->normalized_path as this is now identical to table->path
  (after bar's fixes to convert filenames)

- Fixed some missed DBUG_PRINT(.."%lx") to use "0x%lx" to make it easier to
  do comparision with the 'convert-dbug-for-diff' tool.


Things left to do in 5.1:

- We wrongly log failed CREATE TABLE ... SELECT in some cases when using
  row based logging (as shown by testcase binlog_row_mix_innodb_myisam.result)
  Mats has promised to look into this.

- Test that my fix for CREATE TABLE ... SELECT is indeed correct.
  (I added several test cases for this, but in this case it's better that
  someone else also tests this throughly).
  Lars has promosed to do this.
2006-06-04 18:52:22 +03:00
anjuta@arthur.local
bd8eef5647 BUG#19363: mysql --no_pager makes core dump.
The problem was missing break; operator.
2006-06-02 22:03:39 +03:00
serg@serg.mylan
5409997d49 unittest:
rename *.t* to *-t* to be automake-friendly
  simplify Makefiles
test_atomic.c:
  move to unittest, add GPL comment, fix warnings, convert to tap framework.
configure:
  remove custom tests for available types, use AC_CHECK_TYPE instead
x86-gcc.h:
  fix gcc -ansi errors while maintaining readability
ignore:
  added *-t
2006-06-01 12:25:47 +02:00
anjuta@arthur.local
5459ebc572 Fixed Bug#19479:mysqldump creates invalid dump.
Only check for FN_DEVCHAR in filenames if FN_DEVCHAR is defined.
This allows to use table names with ":" on non windows platforms.
On Windows platform get an error if you use table name that contains FN_DEVCHAR
2006-06-01 12:34:44 +03:00
serg@serg.mylan
efdf221d49 WL#2595 - atomic operations 2006-05-31 18:44:09 +02:00
andrey@lmy004.
b429d73d62 fix for bug #17619 Scheduler race conditions
- Scheduler is either initialized at server start or never.
  Starting & stopping is now suspending & resuming.
- The scheduler has clear OO interface
- Now all calls to the scheduler are synchronous
- GLOBAL event_scheduler uses thd::sys_var_tmp (see set_var.cc)
- External API is encapsulated into class Events
- Includes fixes for all comments of Kostja's review of 19.05.2005

Starting to merge into 5.1-release (5.1.10) and push
2006-05-22 20:46:13 +02:00
acurtis@xiphis.org
09c7374d69 Merge xiphis.org:/home/antony/work2/mysql-5.1
into  xiphis.org:/home/antony/work2/wl3201-post-review.2
2006-05-01 22:45:31 -07:00
holyfoot@deer.(none)
9b832153f9 Fix for Win build 2006-05-01 22:16:08 +05:00
jimw@mysql.com
f21c110d13 Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into  mysql.com:/home/jimw/my/mysql-5.1-clean
2006-04-30 13:27:38 -07:00
serg@sergbook.mysql.com
506f9800bd fixes 2006-04-30 15:52:30 -04:00
msvensson@neptunus.(none)
7831bd0002 Cleanup formatting 2006-04-24 10:39:56 +02:00
jimw@mysql.com
0ed6517ab8 Fix 'make distcheck' problems with new unittest code, and a small
portability problem.
2006-04-13 13:01:57 -07:00
jimw@mysql.com
276109b155 Remove old cruft from the tree: mysqltestmanager, mysql_test_run_new,
and various stuff in Docs/. Also move the certificates used for testing
into mysql-test/std_data from the top-level SSL directory (now gone).
2006-04-11 18:54:24 -07:00
monty@mysql.com
1994ed49ec Fixed compiler and valgrind warnings
Added missing DBUG_xxx_RETURN statements
Fixed some usage of not initialized variables (as found by valgrind)
Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called.
This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names()
This will allow Tomas to continue with his work to use namelocks to syncronize things.

Note: valgrind still produces a lot of warnings about using not initialized code and shows memory loss errors when running the ndb tests
2006-03-29 14:27:36 +03:00
ian@zim.(none)
9caff206c2 Merge zim.(none):/home/ian/workspace/mysql-5.0
into  zim.(none):/home/ian/workspace/mysql-5.1-new

Updated bug message in disabled file -Brian
2006-03-27 19:48:44 -08:00
ian@zim.(none)
8607f1df65 Disable udf test 2006-03-27 18:25:35 -08:00
ian@zim.(none)
a66aace3e9 Fix for bug #16855 2006-03-27 17:45:06 -08:00
andrey@lmy004.
d770c77504 update 2006-03-25 13:14:52 +01:00
serg@serg.mylan
84ff8192ff merged 2006-03-06 23:20:19 +01:00
serg@serg.mylan
5a1672dd66 compilation fixes 2006-03-06 22:08:29 +01:00
serg@serg.mylan
2a8e4383f8 fixes to make the code compile with gcc 2.95 2006-02-28 22:07:14 +01:00
monty@mysql.com
e3796c924f After merge fixes 2006-02-26 15:11:56 +02:00
jimw@mysql.com
30c343a04e Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into  mysql.com:/home/jimw/my/mysql-5.1-clean
2006-02-17 10:59:47 -08:00
jimw@mysql.com
7182785f19 Fix subselect results (there was a bad merge when subselect test was disabled) 2006-02-17 10:02:59 -08:00
holyfoot@deer.(none)
942503927a WL#2645 (CHECK FOR UPGRADE)
5.1-related fixes
2006-02-17 13:37:37 +04:00
konstantin@mysql.com
9f0bb47f87 Merge mysql.com:/home/kostja/mysql/tmp_merge
into  mysql.com:/home/kostja/mysql/mysql-5.1-merge
2006-02-02 23:27:06 +03:00
sasha@asksasha.com
144490850a Merge spachev@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  asksasha.com:/reiser-data/mysql-dev/mysql-5.1-new
2006-01-30 20:58:17 -07:00
konstantin@mysql.com
d2bba04183 Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/opt/local/work/mysql-5.0-root
2006-01-18 15:15:09 +03:00
svoj@april.(none)
f84b301bd1 BUG#3074: Unversioned symbols in shared library
libmysqlclient versioning when linked with GNU ld.
2006-01-17 18:51:08 +04:00
anozdrin@mysql.com
b1705ae5c4 Merge BUG#15110 from 5.0 into 5.1.
Merge mysql.com:/home/alik/MySQL/devel/5.0-bug15110
into  mysql.com:/home/alik/MySQL/devel/5.1-bug15110
2006-01-13 19:09:27 +03:00
tomas@poseidon.ndb.mysql.com
931ec48085 coreect build error without ndb 2006-01-13 09:42:49 +01:00
tomas@poseidon.ndb.mysql.com
46b867757a updated mysql-test-run.pl to adjust to ndb replication testing 2006-01-13 03:13:58 +01:00
tomas@poseidon.ndb.mysql.com
0a0fe2b1c0 bug: replication of table spaces to work
bug: check if storage engine is enabled to avoif code dump
2006-01-11 19:49:38 +01:00
anozdrin@mysql.com
b04b851ef9 Fix for BUG#15110: mysqldump --triggers: does not include DEFINER clause
There are two main idea of this fix:
  - introduce a common function for server and client to split user value
    (<user name>@<host name>) into user name and host name parts;
  - dump DEFINER clause in correct format in mysqldump.
2006-01-11 02:07:40 +03:00
bar@mysql.com
cd56ec80bc ignore:
added item_xmlfunc.cc
2005-12-26 12:16:28 +04:00
monty@mysql.com
ba99b6c565 Fixed compile errors (when compiling in debug mode) 2005-12-25 16:34:10 +02:00
jimw@mysql.com
548bacf41b Fix innodb result file (merge clean-up) 2005-12-06 19:55:48 -08:00
jimw@mysql.com
af88d67a19 Import BDB 4.4.16 2005-12-05 10:27:46 -08:00
monty@mysql.com
aa37b75768 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1
2005-11-24 02:56:12 +02:00
monty@mysql.com
f5804869e3 Don't use PATH_MAX for FN_REFLEN as this uses too much stack space
Larger stack size neaded for open table on x86 64 bit
Fix failing test cases
Deleted symlink from bk
2005-11-24 02:36:28 +02:00
guilhem@mysql.com
2f95fc2701 Merge mysql.com:/home/mysql_src/mysql-5.0
into  mysql.com:/home/mysql_src/mysql-5.1-merge-of-5.0 (not all files are good,
I'll fix; I'll ask some devs to check their part)
2005-11-18 16:38:01 +01:00
SergeyV@selena.
be18f91a01 Added number of files into ignore list for win32 build within bk tree. 2005-11-14 16:36:05 +03:00
jimw@mysql.com
2e13e29a29 Add generated files to ignore list 2005-11-07 16:39:20 -08:00
monty@mysql.com
cdf64f0f57 Fix of crashed 5.1 tree (wrong merge + wrong pullout patch forced us to create a new 5.1 tree)
This is a merge of 5.0 -> 5.1 + some code from old 5.1 tree to get all tests to work and keep the .frm format the same as the old 5.1 tree.
2005-11-05 13:20:35 +02:00
tomas@poseidon.ndb.mysql.com
620b7bafb0 Merge 2005-10-06 10:54:07 +02:00
jimw@mysql.com
dcd8b9a503 Add files for bdb/build_win64, and tweak the configuration to skip over
parts of the library we have omitted.
2005-09-22 16:42:39 -07:00
jimw@mysql.com
b75cc41b7b Remove some files that should not have been added with BDB upgrade,
and update ignore file after move of storage engines to storage/.
2005-09-22 15:53:18 -07:00
konstantin@mysql.com
2d4c54ba1b Merge mysqldev@production.mysql.com:my/mysql-5.0-release
into  mysql.com:/opt/local/work/mysql-5.0-root
2005-09-23 00:46:59 +04:00
monty@mysql.com
82fc54781b Fixed problems found by valgrind
Fixed problems in test suite where some test failed
Fixed access to not initialized memory in federated
Fixed access to not initialized memory when using BIT fields in internal temporary tables
2005-09-22 03:23:07 +03:00
monty@mysql.com
9727fe5abf Merge mysql.com:/home/my/mysql-4.0
into  mysql.com:/home/my/mysql-4.1
2005-09-15 17:17:26 +03:00
monty@mysql.com
444dbfaf17 Turn off EOLN_NATIVE flag for all test files
Ignored some generated files
2005-09-15 17:14:39 +03:00
jonas@eel.(none)
2bd9c2d6f6 Merge eel.(none):/home/jonas/src/mysql-4.1
into  eel.(none):/home/jonas/src/mysql-5.0
2005-09-09 12:54:03 +02:00
jonas@eel.(none)
6ec3fa6ac1 ndb
new testprogram testSRBank
2005-09-09 12:39:06 +02:00
jan@hundin.mysql.fi
fc4fea68ad Merge jlindstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into  hundin.mysql.fi:/home/jan/new/mysql-5.0
2005-09-05 08:35:58 +03:00
monty@mishka.local
f384e08277 Merge mishka.local:/home/my/mysql-4.1
into  mishka.local:/home/my/mysql-5.0
2005-08-25 06:55:48 +03:00
sasha@asksasha.com
c594ab7921 updated patch for BUG#4680 (incomplete DROP DATABASE breaking replication).
We binlog the DROP TABLE for each table that was actually dropped. Per Sergei's 
suggestion a fixed buffer for the DROP TABLE query is pre-allocated from THD pool, and 
logging now is done in batches - new batch is started if the buffer becomes full.
Reduced memory usage by reusing the table list instead of accumulating a list of 
dropped table names. Also fixed the problem if the table was not actually dropped, eg
due to permissions. Extended the test case to make sure batched query 
logging does work.
2005-08-18 21:40:14 -06:00
serg@sergbook.mysql.com
d689d415b3 forgotten 'return' 2005-08-14 23:20:06 +02:00
monty@mysql.com
15d48525af Merge mysql.com:/home/my/mysql-4.1
into  mysql.com:/home/my/mysql-5.0
2005-07-28 17:09:54 +03:00
monty@mysql.com
af6863e7d0 Moved test for 'show full processlist' to not_embedded_server.test becasue it could fail on a slow computer where previous connections has not yet disconnected 2005-07-27 13:45:06 +03:00
monty@mysql.com
24d45c5c30 Merge mysql.com:/home/my/mysql-4.0
into  mysql.com:/home/my/mysql-4.1
2005-07-27 13:24:59 +03:00
monty@mysql.com
4098c40d87 Review fixes:
Fixed portability problem with bool in C programs
Moved close_thread_tables out from LOCK_thread_count mutex (safety fix)
my_sleep() -> pthread_cond_timedwait()
2005-07-26 17:55:58 +03:00
jan@hundin.mysql.fi
5607acde81 Merge jlindstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into  hundin.mysql.fi:/home/jan/new/mysql-5.0
2005-07-20 13:47:05 +03:00
konstantin@mysql.com
15ef68df0f Ignore mysql-test/var (I'm pushing it for the second time already :(() 2005-07-20 00:02:49 +04:00
konstantin@mysql.com
d2814fb1b5 Added mkinstalldirs (an auxiliary autotools symlink) to the ignore
list.
2005-07-19 11:35:16 +04:00
jan@hundin.mysql.fi
6aeca28a96 Added InnoDB offline file checksum utility. 2005-07-19 10:03:19 +03:00
timour@mysql.com
3220f721dd Fix for BUG#11211 "GROUP BY doesn't work correctly"
When the GROUP BY clause contains a column reference that can be resolved to
both an aliased column in the SELECT list, and to a column in the FROM clause,
the group column is resolved to the column in the FROM clause (for ANSI conformance).
However, it may be so that the user's intent is just the other way around, and he/she
gets the query results grouped by a completely different column than expexted.
This patch adds a warning in such cases that tells the user that there is potential
ambiguity in the group column.

sql/sql_select.cc
- Added a warning when a GROUP column is ambiguous due to that there is a
  column reference with the same name both in the SELECT and FROM clauses.
  In this case we resolve to the column in FROM clause and warn the user
  of a possible ambiguity.
- More extensive comments.
- Changed the function to return bool instead of int (as in other places).

mysql-test/t/group_by.test
  Added test for BUG#11211.

mysql-test/r/group_by.result
  Added test for BUG#11211.
2005-06-15 10:12:49 +03:00
igor@rurik.mysql.com
c963b12fd3 Merge rurik.mysql.com:/home/igor/dev/mysql-4.1-0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2005-06-07 06:38:05 -07:00
elliot@mysql.com
b906f31388 BUG#7967 Fix mysqlhotcopy --record-log-position 2005-06-06 22:17:16 -04:00
konstantin@mysql.com
f96de23ad3 Remove automatically generated autotools files from revision control.
Fix build scripts to create them.
2005-05-18 15:23:29 +04:00
monty@mysql.com
780202f130 Moved some old test and added a new test to only be run with mysql-test-run --big
Fixed warnings by valgrind for sum_distinct.test
Enable buffered-record-reads after filesort for InnoDB tables with short primary key
Enabled sort-with-data for MyISAM temporary files
2005-04-07 19:24:14 +03:00
serg@serg.mylan
d6062ef9b5 removed a reference to non-existing file 2005-04-05 16:39:40 +02:00
georg@lmy002.wdf.sap.corp
a9fde23474 typecast fix for windows 64-bit compilation error 2005-03-16 08:51:57 +01:00
serg@serg.mylan
956682de1a merged 2005-03-09 14:09:06 +01:00
Sinisa@sinisa.nasamreza.org
5da6cd551d Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
2005-03-07 16:23:41 +02:00
Sinisa@sinisa.nasamreza.org
79ac22e324 A fix for a bug #8830, which occured when binary data from blob was
dumped with --hex-blob and --skip-extended-insert options.
2005-03-05 22:06:07 +02:00
Sinisa@sinisa.nasamreza.org
a54b5ea52f Fixing bug #8850 in such a way that when TRUNCATE is called within
stored  procedure,  it  is converted  to DELETE.
2005-03-05 21:44:15 +02:00
monty@mysql.com
ab11370de6 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2005-02-28 12:00:18 +02:00
joreland@mysql.com
fe2a800423 Merge mysql.com:/home/jonas/src/mysql-4.1
into mysql.com:/home/jonas/src/mysql-5.0
2005-02-25 11:48:46 +01:00
joreland@mysql.com
54af1b8fc8 add auto generated ndb dsp-files (for msvc++ 6.0) to ignore file 2005-02-25 11:47:27 +01:00
hf@deer.(none)
dca227bac6 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into deer.(none):/home/hf/work/mysql-5.0.clean
2005-02-09 16:34:03 +04:00
hf@deer.(none)
2f7f2dfe5d Fix for NCHAR bug appeared during the merging 2005-02-09 16:32:43 +04:00
bell@sanja.is.com.ua
7df94d5e9b fixed C++ syntax in C code
fixed end of string detection in string->decimal conversion to avoid false alarm about some string part left unconverted (string can be not null terminated)
ignore my_decimal.cc in libmysqld directory
2005-02-09 11:35:22 +02:00
hf@deer.(none)
b94a482ee9 Precision Math implementation 2005-02-09 02:50:45 +04:00
monty@mysql.com
79ec81071a Better bugfix for "HAVING when refering to RAND()" (Bug #8216)
Ensure that references in HAVING, ORDER BY or GROUP BY are calculated after fields in SELECT.
This will ensure that any reference to these has a valid value.
Generalized the code for split_sum_func()
2005-02-08 14:41:09 +02:00
tomas@poseidon.ndb.mysql.com
4637544c61 small testcase update 2005-02-07 11:17:24 +01:00
serg@serg.mylan
852f2e0aba small Makefile.am cleanup
clean: targets removed
    generated *.h files moved to include/
2005-01-28 17:14:03 +01:00
serg@serg.mylan
76f3d6f002 merged 2005-01-25 21:11:04 +01:00
monty@mysql.com
37168015cd Cleanups during review 2005-01-25 21:27:51 +02:00
jimw@mysql.com
d11081bd6f Merge 2005-01-24 13:48:48 -08:00
serg@serg.mylan
736530afc8 merged 2005-01-24 21:30:21 +01:00
lenz@mysql.com
9675b0698f - renamed client_test -> mysql_client_test
- renamed the tests that use the embedded server (client_test -> 
  mysql_client_test_embedded, mysqltest -> mysql_test_embedded
  and changed some Makefiles and scripts so they are installed in $bindir
  (required to be able to run the test suite against the embedded server)
2005-01-20 16:25:38 +01:00
monty@mysql.com
3b0f8cabaf Merge with global tree 2005-01-15 14:39:16 +02:00
monty@mysql.com
0a1076a25f Merge with 4.1 2005-01-15 14:09:45 +02:00