Commit graph

262 commits

Author SHA1 Message Date
Sergei Golubchik
07315d3603 strmake_buf(X,Y) helper, equivalent to strmake(X,Y,sizeof(X)-1)
with a bit of lame protection against abuse.
2013-04-17 19:42:34 +02:00
Sergei Golubchik
f57ecb7786 5.5 merge 2013-04-14 10:04:07 +02:00
Sergei Golubchik
ffbd15eb32 post-review comments and other minor edits 2013-04-09 16:20:59 +02:00
Sergei Golubchik
ee92b2114d assisted discovery in federatedx 2013-04-09 16:19:18 +02:00
Sergei Golubchik
58e62d701e * move bas_ext from the handler to the handlerton
* provide a default bas_ext value of the empty list
2013-04-07 17:08:49 +02:00
Sergei Golubchik
2901497b18 MDEV-4243 Warnings/errors while compiling with clang 2013-03-28 20:04:14 +01:00
Michael Widenius
068c61978e Temporary commit of 10.0-merge 2013-03-26 00:03:13 +02:00
Sergei Golubchik
6ac52386bb fix the failing federated.federated_innodb test:
update all start_bulk_insert() methods to the new signature.
2013-01-23 16:24:04 +01:00
Sergei Golubchik
682da0aa75 cleanup: use MYF() for mysys flags 2013-01-23 16:18:09 +01:00
Michael Widenius
a260b15554 MDEV-4011 Added per thread memory counting and usage
Base code and idea from a patch from by plinux at Taobao.

The idea is that we mark all memory that are thread specific with MY_THREAD_SPECIFIC.
Memory counting is done per thread in the my_malloc_size_cb_func callback function from my_malloc().
There are plenty of new asserts to ensure that for a debug server the counting is correct.

Information_schema.processlist gets two new columns: MEMORY_USED and EXAMINED_ROWS.
- The later is there mainly to show how query is progressing.

The following changes in interfaces was needed to get this to work:
- init_alloc_root() amd init_sql_alloc() has extra option so that one can mark memory with MY_THREAD_SPECIFIC
- One now have to use alloc_root_set_min_malloc() to set min memory to be allocated by alloc_root()
- my_init_dynamic_array()  has extra option so that one can mark memory with MY_THREAD_SPECIFIC
- my_net_init() has extra option so that one can mark memory with MY_THREAD_SPECIFIC
- Added flag for hash_init() so that one can mark hash table to be thread specific.
- Added flags to init_tree() so that one can mark tree to be thread specific.
- Removed with_delete option to init_tree(). Now one should instead use MY_TREE_WITH_DELETE_FLAG.
- Added flag to Warning_info::Warning_info() if the structure should be fully initialized.
- String elements can now be marked as thread specific.
- Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC.
- Changed type of myf from int to ulong, as this is always a set of bit flags.

Other things:
- Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
- We now also show EXAMINED_ROWS in SHOW PROCESSLIST
- Added new variable 'memory_used'
- Fixed bug where kill_threads_for_user() was using the wrong mem_root to allocate memory.
- Removed calls to the obsoleted function init_dynamic_array()
- Use set_current_thd() instead of my_pthread_setspecific_ptr(THR_THD,...)


client/completion_hash.cc:
  Updated call to init_alloc_root()
client/mysql.cc:
  Updated call to init_alloc_root()
client/mysqlbinlog.cc:
  init_dynamic_array() -> my_init_dynamic_array()
  Updated call to init_alloc_root()
client/mysqlcheck.c:
  Updated call to my_init_dynamic_array()
client/mysqldump.c:
  Updated call to init_alloc_root()
client/mysqltest.cc:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
  Fixed compiler warnings
extra/comp_err.c:
  Updated call to my_init_dynamic_array()
extra/resolve_stack_dump.c:
  Updated call to my_init_dynamic_array()
include/hash.h:
  Added HASH_THREAD_SPECIFIC
include/heap.h:
  Added flag is internal temporary table.
include/my_dir.h:
  Safety fix: Ensure that MY_DONT_SORT and MY_WANT_STAT don't interfer with other mysys flags
include/my_global.h:
  Changed type of myf from int to ulong, as this is always a set of bit flags.
include/my_sys.h:
  Added MY_THREAD_SPECIFIC and MY_THREAD_MOVE
  Added malloc_flags to DYNAMIC_ARRAY
  Added extra mysys flag argument to my_init_dynamic_array()
  Removed deprecated functions init_dynamic_array() and my_init_dynamic_array.._ci
  Updated paramaters for init_alloc_root()
include/my_tree.h:
  Added my_flags to allow one to use MY_THREAD_SPECIFIC with hash tables.
  Removed with_delete. One should now instead use MY_TREE_WITH_DELETE_FLAG
  Updated parameters to init_tree()
include/myisamchk.h:
  Added malloc_flags to allow one to use MY_THREAD_SPECIFIC for checks.
include/mysql.h:
  Added MYSQL_THREAD_SPECIFIC_MALLOC
  Used 'unused1' to mark memory as thread specific.
include/mysql.h.pp:
  Updated file
include/mysql_com.h:
  Used 'unused1' to mark memory as thread specific.
  Updated parameters for my_net_init()
libmysql/libmysql.c:
  Updated call to init_alloc_root() to mark memory thread specific.
libmysqld/emb_qcache.cc:
  Updated call to init_alloc_root()
libmysqld/lib_sql.cc:
  Updated call to init_alloc_root()
mysql-test/r/create.result:
  Updated results
mysql-test/r/user_var.result:
  Updated results
mysql-test/suite/funcs_1/datadict/processlist_priv.inc:
  Update to handle new format of SHOW PROCESSLIST
mysql-test/suite/funcs_1/datadict/processlist_val.inc:
  Update to handle new format of SHOW PROCESSLIST
mysql-test/suite/funcs_1/r/is_columns_is.result:
  Update to handle new format of SHOW PROCESSLIST
mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result:
  Updated results
mysql-test/suite/funcs_1/r/processlist_val_no_prot.result:
  Updated results
mysql-test/t/show_explain.test:
  Fixed usage of debug variable so that one can run test with --debug
mysql-test/t/user_var.test:
  Added test of memory_usage variable.
mysys/array.c:
  Added extra my_flags option to init_dynamic_array() and init_dynamic_array2() so that one can mark memory with MY_THREAD_SPECIFIC
  All allocated memory is marked with the given my_flags.
  Removed obsolete function init_dynamic_array()
mysys/default.c:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
mysys/hash.c:
  Updated call to my_init_dynamic_array_ci().
  Allocated memory is marked with MY_THREAD_SPECIFIC if HASH_THREAD_SPECIFIC is used.
mysys/ma_dyncol.c:
  init_dynamic_array() -> my_init_dynamic_array()
  Added #if to get rid of compiler warnings
mysys/mf_tempdir.c:
  Updated call to my_init_dynamic_array()
mysys/my_alloc.c:
  Added extra parameter to init_alloc_root() so that one can mark memory with MY_THREAD_SPECIFIC
  Extend MEM_ROOT with a flag if memory is thread specific.
  This is stored in block_size, to keep the size of the MEM_ROOT object identical as before.
  Allocated memory is marked with MY_THREAD_SPECIFIC if used with init_alloc_root()
mysys/my_chmod.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_chsize.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_copy.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_create.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_delete.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_error.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_fopen.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_fstream.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_getwd.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_lib.c:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
  Updated DBUG_PRINT because of change of myf type
mysys/my_lock.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_malloc.c:
  Store at start of each allocated memory block the size of the block and if the block is thread specific.
  Call malloc_size_cb_func, if set, with the memory allocated/freed.
  Updated DBUG_PRINT because of change of myf type
mysys/my_open.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_pread.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_read.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_redel.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_rename.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_seek.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_sync.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_thr_init.c:
  Ensure that one can call my_thread_dbug_id() even if thread is not properly initialized.
mysys/my_write.c:
  Updated DBUG_PRINT because of change of myf type
mysys/mysys_priv.h:
  Updated parameters to sf_malloc and sf_realloc()
mysys/safemalloc.c:
  Added checking that for memory marked with MY_THREAD_SPECIFIC that it's the same thread that is allocation and freeing the memory.
  Added sf_malloc_dbug_id() to allow MariaDB to specify which THD is handling the memory.
  Added my_flags arguments to sf_malloc() and sf_realloc() to be able to mark memory with MY_THREAD_SPECIFIC.
  Added sf_report_leaked_memory() to get list of memory not freed by a thread.
mysys/tree.c:
  Added flags to init_tree() so that one can mark tree to be thread specific.
  Removed with_delete option to init_tree(). Now one should instead use MY_TREE_WITH_DELETE_FLAG.
  Updated call to init_alloc_root()
  All allocated memory is marked with the given malloc flags
mysys/waiting_threads.c:
  Updated call to my_init_dynamic_array()
sql-common/client.c:
  Updated call to init_alloc_root() and my_net_init() to mark memory thread specific.
  Updated call to my_init_dynamic_array().
  Added MYSQL_THREAD_SPECIFIC_MALLOC so that client can mark memory as MY_THREAD_SPECIFIC.
sql-common/client_plugin.c:
  Updated call to init_alloc_root()
sql/debug_sync.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/event_scheduler.cc:
  Removed calls to net_end() as this is now done in ~THD()
  Call set_current_thd() to ensure that memory is assigned to right thread.
sql/events.cc:
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/filesort.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/filesort_utils.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/ha_ndbcluster.cc:
  Updated call to init_alloc_root()
  Updated call to my_net_init()
  Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
sql/ha_ndbcluster_binlog.cc:
  Updated call to my_net_init()
  Updated call to init_sql_alloc()
  Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
sql/ha_partition.cc:
  Updated call to init_alloc_root()
sql/handler.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
  Added missing call to my_dir_end()
sql/item_func.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/item_subselect.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/item_sum.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/log.cc:
  More DBUG
  Updated call to init_alloc_root()
sql/mdl.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/mysqld.cc:
  Added total_memory_used
  Updated call to init_alloc_root()
  Move mysql_cond_broadcast() before my_thread_end()
  Added mariadb_dbug_id() to count memory per THD instead of per thread.
  Added my_malloc_size_cb_func() callback function for my_malloc() to count memory.
  Move initialization of mysqld_server_started and mysqld_server_initialized earlier.
  Updated call to my_init_dynamic_array().
  Updated call to my_net_init().
  Call my_pthread_setspecific_ptr(THR_THD,...) to ensure that memory is assigned to right thread.
  Added status variable 'memory_used'.
  Updated call to init_alloc_root()
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/mysqld.h:
  Added set_current_thd()
sql/net_serv.cc:
  Added new parameter to my_net_init() so that one can mark memory with MY_THREAD_SPECIFIC.
  Store in net->thread_specific_malloc if memory is thread specific.
  Mark memory to be thread specific if requested.
sql/opt_range.cc:
  Updated call to my_init_dynamic_array()
  Updated call to init_sql_alloc()
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/opt_subselect.cc:
  Updated call to init_sql_alloc() to mark memory thread specific.
sql/protocol.cc:
  Fixed compiler warning
sql/records.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/rpl_filter.cc:
  Updated call to my_init_dynamic_array()
sql/rpl_handler.cc:
  Updated call to my_init_dynamic_array2()
sql/rpl_handler.h:
  Updated call to init_sql_alloc()
sql/rpl_mi.cc:
  Updated call to my_init_dynamic_array()
sql/rpl_tblmap.cc:
  Updated call to init_alloc_root()
sql/rpl_utility.cc:
  Updated call to my_init_dynamic_array()
sql/slave.cc:
  Initialize things properly before calling functions that allocate memory.
  Removed calls to net_end() as this is now done in ~THD()
sql/sp_head.cc:
  Updated call to init_sql_alloc()
  Updated call to my_init_dynamic_array()
  Added parameter to warning_info() that it should be fully initialized.
sql/sp_pcontext.cc:
  Updated call to my_init_dynamic_array()
sql/sql_acl.cc:
  Updated call to init_sql_alloc()
  Updated call to my_init_dynamic_array()
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_admin.cc:
  Added parameter to warning_info() that it should be fully initialized.
sql/sql_analyse.h:
  Updated call to init_tree() to mark memory thread specific.
sql/sql_array.h:
  Updated call to my_init_dynamic_array() to mark memory thread specific.
sql/sql_audit.cc:
  Updated call to my_init_dynamic_array()
sql/sql_base.cc:
  Updated call to init_sql_alloc()
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_cache.cc:
  Updated comment
sql/sql_class.cc:
  Added parameter to warning_info() that not initialize it until THD is fully created.
  Updated call to init_sql_alloc()
  Mark THD::user_vars has to be thread specific.
  Updated call to my_init_dynamic_array()
  Ensure that memory allocated by THD is assigned to the THD.
  More DBUG
  Always acll net_end() in ~THD()
  Assert that all memory signed to this THD is really deleted at ~THD.
  Fixed set_status_var_init() to not reset memory_used.
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_class.h:
  Added MY_THREAD_SPECIFIC to allocated memory.
  Added malloc_size to THD to record allocated memory per THD.
sql/sql_delete.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/sql_error.cc:
  Added 'initialize' parameter to Warning_info() to say if should allocate memory for it's structures.
  This is used by THD::THD() to not allocate memory until THD is ready.
  Added Warning_info::free_memory()
sql/sql_error.h:
  Updated Warning_info() class.
sql/sql_handler.cc:
  Updated call to init_alloc_root() to mark memory thread specific.
sql/sql_insert.cc:
  More DBUG
sql/sql_join_cache.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/sql_lex.cc:
  Updated call to my_init_dynamic_array()
sql/sql_lex.h:
  Updated call to my_init_dynamic_array()
sql/sql_load.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/sql_parse.cc:
  Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
  Ensure that examined_row_count() is reset before query.
  Fixed bug where kill_threads_for_user() was using the wrong mem_root to allocate memory.
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
  Don't restore thd->status_var.memory_used when restoring thd->status_var
sql/sql_plugin.cc:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
  Don't allocate THD on the stack, as this causes problems with valgrind when doing thd memory counting.
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_prepare.cc:
  Added parameter to warning_info() that it should be fully initialized.
  Updated call to init_sql_alloc() to mark memory thread specific.
sql/sql_reload.cc:
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_select.cc:
  Updated call to my_init_dynamic_array() and init_sql_alloc() to mark memory thread specific.
  Added MY_THREAD_SPECIFIC to allocated memory.
  More DBUG
sql/sql_servers.cc:
  Updated call to init_sql_alloc() to mark memory some memory thread specific.
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_show.cc:
  Updated call to my_init_dynamic_array()
  Mark my_dir() memory thread specific.
  Use my_pthread_setspecific_ptr(THR_THD,...) to mark that allocated memory should be allocated to calling thread.
  More DBUG.
  Added malloc_size and examined_row_count to SHOW PROCESSLIST.
  Added MY_THREAD_SPECIFIC to allocated memory.
  Updated call to init_sql_alloc()
  Added parameter to warning_info() that it should be fully initialized.
sql/sql_statistics.cc:
  Fixed compiler warning
sql/sql_string.cc:
  String elements can now be marked as thread specific.
sql/sql_string.h:
  String elements can now be marked as thread specific.
sql/sql_table.cc:
  Updated call to init_sql_alloc() and my_malloc() to mark memory thread specific
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
  Fixed compiler warning
sql/sql_test.cc:
  Updated call to my_init_dynamic_array() to mark memory thread specific.
sql/sql_trigger.cc:
  Updated call to init_sql_alloc()
sql/sql_udf.cc:
  Updated call to init_sql_alloc()
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_update.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/table.cc:
  Updated call to init_sql_alloc().
  Mark memory used by temporary tables, that are not for slave threads, as MY_THREAD_SPECIFIC
  Updated call to init_sql_alloc()
sql/thr_malloc.cc:
  Added my_flags argument to init_sql_alloc() to be able to mark memory as MY_THREAD_SPECIFIC.
sql/thr_malloc.h:
  Updated prototype for init_sql_alloc()
sql/tztime.cc:
  Updated call to init_sql_alloc()
  Updated call to init_alloc_root() to mark memory thread specific.
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/uniques.cc:
  Updated calls to init_tree(), my_init_dynamic_array() and my_malloc() to mark memory thread specific.
sql/unireg.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
storage/csv/ha_tina.cc:
  Updated call to init_alloc_root()
storage/federated/ha_federated.cc:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
  Ensure that memory allocated by fedarated is registered for the system, not for the thread.
storage/federatedx/federatedx_io_mysql.cc:
  Updated call to my_init_dynamic_array()
storage/federatedx/ha_federatedx.cc:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
storage/heap/ha_heap.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
storage/heap/heapdef.h:
  Added parameter to hp_get_new_block() to be able to do thread specific memory tagging.
storage/heap/hp_block.c:
  Added parameter to hp_get_new_block() to be able to do thread specific memory tagging.
storage/heap/hp_create.c:
  - Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC.
  - Use MY_TREE_WITH_DELETE instead of removed option 'with_delete'.
storage/heap/hp_open.c:
  Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC.
storage/heap/hp_write.c:
  Added new parameter to hp_get_new_block()
storage/maria/ma_bitmap.c:
  Updated call to my_init_dynamic_array()
storage/maria/ma_blockrec.c:
  Updated call to my_init_dynamic_array()
storage/maria/ma_check.c:
  Updated call to init_alloc_root()
storage/maria/ma_ft_boolean_search.c:
  Updated calls to init_tree() and init_alloc_root()
storage/maria/ma_ft_nlq_search.c:
  Updated call to init_tree()
storage/maria/ma_ft_parser.c:
  Updated call to init_tree()
  Updated call to init_alloc_root()
storage/maria/ma_loghandler.c:
  Updated call to my_init_dynamic_array()
storage/maria/ma_open.c:
  Updated call to my_init_dynamic_array()
storage/maria/ma_sort.c:
  Updated call to my_init_dynamic_array()
storage/maria/ma_write.c:
  Updated calls to my_init_dynamic_array() and init_tree()
storage/maria/maria_pack.c:
  Updated call to init_tree()
storage/maria/unittest/sequence_storage.c:
  Updated call to my_init_dynamic_array()
storage/myisam/ft_boolean_search.c:
  Updated call to init_tree()
  Updated call to init_alloc_root()
storage/myisam/ft_nlq_search.c:
  Updated call to init_tree()
storage/myisam/ft_parser.c:
  Updated call to init_tree()
  Updated call to init_alloc_root()
storage/myisam/ft_stopwords.c:
  Updated call to init_tree()
storage/myisam/mi_check.c:
  Updated call to init_alloc_root()
storage/myisam/mi_write.c:
  Updated call to my_init_dynamic_array()
  Updated call to init_tree()
storage/myisam/myisamlog.c:
  Updated call to init_tree()
storage/myisam/myisampack.c:
  Updated call to init_tree()
storage/myisam/sort.c:
  Updated call to my_init_dynamic_array()
storage/myisammrg/ha_myisammrg.cc:
  Updated call to init_sql_alloc()
storage/perfschema/pfs_check.cc:
  Rest current_thd
storage/perfschema/pfs_instr.cc:
  Removed DBUG_ENTER/DBUG_VOID_RETURN as at this point my_thread_var is not allocated anymore, which can cause problems.
support-files/compiler_warnings.supp:
  Disable compiler warning from offsetof macro.
2013-01-23 16:16:14 +01:00
Sergei Golubchik
cb7f5948ec simplify the handler api - table_type() is no longer abstract, not even virtual 2012-12-17 11:00:39 +01:00
unknown
bc4a456758 MDEV-452 Add full support for auto-initialized/updated timestamp and datetime
Generalized support for auto-updated and/or auto-initialized timestamp
and datetime columns. This patch is a reimplementation of MySQL's
"WL#5874: CURRENT_TIMESTAMP as DEFAULT for DATETIME columns". In order to
ease future merges, this implementation reused few function and variable
names from MySQL's patch, however the implementation is quite different.

TODO:
The only unresolved problem in this patch is the semantics of LOAD DATA for
TIMESTAMP and DATETIME columns in the cases when there are missing or NULL
columns. I couldn't fully comprehend the logic behind MySQL's behavior and
its relationship with their own documentation, so I left the results to be
more consistent with all other LOAD cases.

The problematic test cases can be seen by running the test file function_defaults,
and observing the test case differences. Those were left on purpose for discussion.
2012-10-17 15:43:56 +03:00
Sergei Golubchik
1efdd5a572 rename debug variable to debug_dbug, to make test pass in release builds
(and to follow the naming conventons).
keep old debug variable, but mark it as deprecated.
2011-12-15 22:07:58 +01:00
Sergei Golubchik
0e007344ea mysql-5.5.18 merge 2011-11-03 19:17:05 +01:00
Sergei Golubchik
76f0b94bb0 merge with 5.3
sql/sql_insert.cc:
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
  ******
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
  small cleanup
  ******
  small cleanup
2011-10-19 21:45:18 +02:00
Sergei Golubchik
a844635637 use PSI wrappers in aria and other non-MySQL code 2011-07-13 21:10:18 +02:00
Sergei Golubchik
7e6c8ea891 remove unused autotools files 2011-07-03 20:07:41 +02:00
Sergei Golubchik
b843de11d5 Bug#25679
Ensure that we do not hold the LOCK_open mutex while attempting
to establish FederatedX connection to guard against a trivial
Denial of Service scenario.
2011-07-03 20:00:14 +02:00
Sergei Golubchik
b4a0b2c2f8 post-merge fixes.
most tests pass.
5.3 merge is next
2011-07-02 22:12:12 +02:00
Sergei Golubchik
9809f05199 5.5-merge 2011-07-02 22:08:51 +02:00
Sergei Golubchik
0accbd0364 lots of post-merge changes 2011-04-25 17:22:25 +02:00
Michael Widenius
139a2b64bf Merge with 5.2 2011-03-09 15:47:59 +02:00
Michael Widenius
3358cdd504 Merge with 5.1 to get in changes from MySQL 5.1.55 2011-02-28 19:39:30 +02:00
Michael Widenius
869f5d0e81 Merge with alias as String 2011-02-28 13:16:17 +02:00
Michael Widenius
ff3da0f963 Change TABLE->alias to String for less memory reallocation
Changed some String.ptr() -> String.c_ptr() for String that are not guaranteed to end with \0
Removed some c_ptr() usage from parameters to functions that takes ptr & length
Use preallocate buffers to avoid calling malloc() for most operations. 


sql/event_db_repository.cc:
  alias is now a String
sql/event_scheduler.cc:
  c_ptr -> c_ptr_safe() to avoid warnings from valgrind.
sql/events.cc:
  c_ptr -> c_ptr_safe() to avoid warnings from valgrind.
  c_ptr -> ptr() as function takes ptr & length
sql/field.cc:
  alias is now a String
sql/field.h:
  alias is now a String
sql/ha_partition.cc:
  alias is now a String
sql/handler.cc:
  alias is now a String
  ptr() -> c_ptr() as string is not guaranteed to be \0 terminated
sql/item.cc:
  Store error parameter in separarte buffer to ensure correct error message
sql/item_func.cc:
  ptr() -> c_ptr_safe() as string is not guaranteed to be \0 terminated
sql/item_sum.h:
  Use my_strtod() instead of my_atof() to not have to make string \0 terminated
sql/lock.cc:
  alias is now a String
sql/log.cc:
  c_ptr() -> ptr() as function takes ptr & length
sql/log_event.cc:
  c_ptr_quick() -> ptr() as we only want to get the pointer to String buffer
sql/opt_range.cc:
  ptr() -> c_ptr() as string is not guaranteed to be \0 terminated
sql/opt_table_elimination.cc:
  alias is now a String
sql/set_var.cc:
  ptr() -> c_ptr() as string is not guaranteed to be \0 terminated
  c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
  c_ptr() -> ptr() as function takes ptr & length
  Simplify some code.
sql/sp.cc:
  c_ptr() -> ptr() as function takes ptr & length
sql/sp_rcontext.cc:
  alias is now a String
sql/sql_base.cc:
  alias is now a String.
  Here we win a realloc() for most alias usage.
sql/sql_class.cc:
  Use size descriptor for printf() to avoid accessing bytes outside of buffer
sql/sql_insert.cc:
  Change allocation of TABLE as it's now contains a String
  _ptr() -> ptr() as function takes ptr & length
sql/sql_load.cc:
  Use preallocate buffers to avoid calling malloc() for most operations.
sql/sql_parse.cc:
  Use c_ptr_safe() to ensure string is \0 terminated.
sql/sql_plugin.cc:
  c_ptr_quick() -> ptr() as function takes ptr & length
sql/sql_select.cc:
  alias is now a String
sql/sql_show.cc:
  alias is now a String
sql/sql_string.h:
  Added move() function to change who owns the string (owner does the free)
sql/sql_table.cc:
  alias is now a String
  c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
sql/sql_test.cc:
  c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
  alias is now a String
sql/sql_trigger.cc:
  c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
  Use field->init() to setup pointers to alias.
sql/sql_update.cc:
  alias is now a String
sql/sql_view.cc:
  ptr() -> c_ptr_safe() as string is not guaranteed to be \0 terminated
sql/sql_yacc.yy:
  r() -> c_ptr() as string is not guaranteed to be \0 terminated
sql/table.cc:
  alias is now a String
sql/table.h:
  alias is now a String
storage/federatedx/ha_federatedx.cc:
  Remove extra 1 byte alloc that is automaticly done by strmake()
  Ensure that error message ends with \0
storage/maria/ha_maria.cc:
  alias is now a String
storage/myisam/ha_myisam.cc:
  alias is now a String
2011-02-28 12:48:50 +02:00
Michael Widenius
1c23091c4e Fixed build failures
- Removed references to deleted files
- If we link staticly, check for static zlib
  - This should fix the problem with 'no -lz found' link error
- Fixed build failure on window (Patch from Wlad)
- Fixed build problem with federatedx when using -Werror

BUILD/Makefile.am:
  Remove removed file
config/ac-macros/zlib.m4:
  If we compile with --all-static, test that we have a static libz
libmysqld/CMakeLists.txt:
  Fix for build error on windows
mysql-test/suite/pbxt/r/key_cache.result:
  Updated result
mysql-test/suite/pbxt/t/key_cache.test:
  Fixed not updated test case
sql/CMakeLists.txt:
  Fix for build error on windows
storage/federatedx/Makefile.am:
  Don't use CFLAGS to compile C++ programs
storage/pbxt/src/lock_xt.cc:
  Fixed compiler warning about using uninitialized b2
storage/xtradb/buf/buf0buf.c:
  Fixed wrong printf
storage/xtradb/srv/srv0srv.c:
  Fixed assignment of different width and test with different sign/unsigned
2011-02-23 11:22:56 +02:00
Michael Widenius
f2ca9c8784 Applied patch for lp:585688 "maridb crashes in federatedx code" from lp:~atcurtis/maria/federatedx:
- Fixed Partition engine to store CONNECTION string for partitions.
  Removed HA_NO_PARTITION flag from FederatedX.
  Added test 'federated_partition' to suite.
- lp:#585688 - maridb crashes in federatedx code
  FederatedX handler instances, created on one thread and used on
  another thread (via table cache) when "show table status" is executed
  crashed because txn member was not initialized for current thread.
  Added test 'federated_bug_585688' to suite.

Author for the patch is Antony Curtis

mysql-test/suite/federated/federated_bug_585688.result:
  Test for lp:585688
mysql-test/suite/federated/federated_bug_585688.test:
  Test for lp:585688
mysql-test/suite/federated/federated_partition-slave.opt:
  Test for partition support in federatedx
mysql-test/suite/federated/federated_partition.result:
  Test for partition support in federatedx
mysql-test/suite/federated/federated_partition.test:
  Test for partition support in federatedx
mysql-test/t/partition_federated.test:
  Updated error message
sql/ha_partition.cc:
  Added support for connection strings to partitions for federatedx
sql/ha_partition.h:
  Added support for connection strings to partitions for federatedx
sql/partition_element.h:
  Added support for connection strings to partitions for federatedx
sql/sql_yacc.yy:
  Added support for connection strings to partitions for federatedx
storage/federatedx/ha_federatedx.cc:
  Added support for partitions.
  FederatedX handler instances, created on one thread and used on another thread (via table cache) when "show table status"
  is executed crashed because txn member was not initialized for current thread.
2011-02-10 22:40:59 +02:00
Michael Widenius
b7b25dc666 Merge with 5.1-release.
- Fixed problem with oqgraph and 'make dist'

Note that after this merge we have a problem show in join_outer where we examine too many rows in one specific case (related to BUG#57024).
This will be fixed when mwl#128 is merged into 5.3.
2010-12-06 10:25:44 +02:00
Michael Widenius
1e5061fe3b merge with 5.1 2010-11-30 23:11:03 +02:00
Michael Widenius
e68ff46653 Fixed compiler and gmake warnings
- Removed SCCS rule from Makefile.am
- Made dummy rule in sql_yacc.yy to get rid of compiler warning about not used label.
Don't use maintainer mode with valgrind (as we don't want to initialize all variables)

config/ac-macros/maintainer.m4:
  Don't use maintainer mode with valgrind (as we don't want to initialize all variables)
  Force initialization of variables when using -Werror (To get rid of compiler warnings)
configure.in:
  Don't use maintainer mode with valgrind (as we don't want to initialize all variables)
sql/sql_yacc.yy:
  Made dummy rule in sql_yacc.yy to get rid of compiler warning about not used label.
2010-11-29 11:27:52 +02:00
Sergei Golubchik
65ca700def merge.
checkpoint.
does not compile.
2010-11-25 18:17:28 +01:00
Michael Widenius
52090a4434 Code cleanup to get fewer reallocs() during execution.
- Changed TABLE->alias to String to get fewer reallocs when alias are used.
- Preallocate some buffers

Changed some String->c_ptr() -> String->ptr() when \0 is not needed.
Fixed wrong usage of String->ptr() when we need a \0 terminated string.
Use my_strtod() instead of my_atof() to avoid having to add \0 to string.
c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
zr 

sql/event_db_repository.cc:
  Update usage of TABLE->alias
sql/event_scheduler.cc:
  c_ptr() -> c_ptr_safe()
sql/events.cc:
  c_ptr() -> ptr() as \0 was not needed
sql/field.cc:
  Update usage of TABLE->alias
sql/field.h:
  Update usage of TABLE->alias
sql/ha_partition.cc:
  Update usage of TABLE->alias
sql/handler.cc:
  Update usage of TABLE->alias
  Fixed wrong usage of str.ptr()
sql/item.cc:
  Fixed error where code wrongly assumed string was \0 terminated.
sql/item_func.cc:
  c_ptr() -> c_ptr_safe()
  Update usage of TABLE->alias
sql/item_sum.h:
  Use my_strtod() instead of my_atof() to avoid having to add \0 to string
sql/lock.cc:
  Update usage of TABLE->alias
sql/log.cc:
  c_ptr() -> ptr() as \0 was not needed
sql/log_event.cc:
  c_ptr_quick() -> ptr() as \0 was not needed
sql/opt_range.cc:
  ptr() -> c_ptr() as \0 is needed
sql/opt_subselect.cc:
  Update usage of TABLE->alias
sql/opt_table_elimination.cc:
  Update usage of TABLE->alias
sql/set_var.cc:
  ptr() -> c_ptr() as \0 is needed
  c_ptr() -> c_ptr_safe()
sql/sp.cc:
  c_ptr() -> ptr() as \0 was not needed
sql/sp_rcontext.cc:
  
  Update usage of TABLE->alias
sql/sql_base.cc:
  Preallocate buffers
  Update usage of TABLE->alias
sql/sql_class.cc:
  Fix arguments to sprintf() to work even if string is not \0 terminated
sql/sql_insert.cc:
  Update usage of TABLE->alias
  c_ptr() -> ptr() as \0 was not needed
sql/sql_load.cc:
  Preallocate buffers
  Trivial optimizations
sql/sql_parse.cc:
  Trivial optimization
sql/sql_plugin.cc:
  c_ptr() -> ptr() as \0 was not needed
sql/sql_select.cc:
  Update usage of TABLE->alias
sql/sql_show.cc:
  Update usage of TABLE->alias
sql/sql_string.h:
  Added move() function to move allocated memory from one object to another.
sql/sql_table.cc:
  Update usage of TABLE->alias
  c_ptr() -> c_ptr_safe()
sql/sql_test.cc:
  ptr() -> c_ptr_safe()
sql/sql_trigger.cc:
  Update usage of TABLE->alias
  c_ptr() -> c_ptr_safe()
sql/sql_update.cc:
  Update usage of TABLE->alias
sql/sql_view.cc:
  ptr() -> c_ptr_safe()
sql/sql_yacc.yy:
  ptr() -> c_ptr()
sql/table.cc:
  
  Update usage of TABLE->alias
sql/table.h:
  Changed TABLE->alias to String to get fewer reallocs when alias are used.
storage/federatedx/ha_federatedx.cc:
  Use c_ptr_safe() to ensure strings are \0 terminated.
storage/maria/ha_maria.cc:
  Update usage of TABLE->alias
storage/myisam/ha_myisam.cc:
  Update usage of TABLE->alias
storage/xtradb/row/row0sel.c:
  Ensure that null bits in record are properly reset.
  (Old code didn't work as row_search_for_mysql() can be called twice while reading fields from one row.
2010-11-24 00:08:48 +02:00
unknown
95b37a254b Merge MariaDB 5.1->5.2 2010-11-19 22:33:47 +01:00
unknown
0de9a4abab MWL#74: Shared libmysqld.so library.
Switch makefiles to use libtool to build libmysqld.so, as well as all its
dependencies.

The previous MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS() declaration is removed,
as it does not work well with a libtool build. Instead, plugins that need it
can specify an alternate object in MYSQL_PLUGIN_STATIC() that will be used for
embedded library. The plugin must then take care itself of compiling the
special object for embedded, rebuilding the source files previously listed in
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS() with @plugin_embedded_defs@ in
CFLAGS/CXXFLAGS. The extra target @XXX_embedded_static_target@ is available
for the special object, this will be empty when --without-embedded-server.

All in-tree plugins are changed to build their static targets with libtool.
Additional plugins that want to work with libmysqld.so will need to be
similarly modified to build with libtool (or otherwise provide an -fPIC
object). Dynamically loaded plugins are not affected.

The old libraries like libmysys.a, libmyisam.a and similar libraries, which
were installed by `make install` though this is of little use, are still built
and installed to not break package scripts etc. that expect them. These
libraries are kept static to avoid introducing new .so dependencies.

The patch also fixes a handfull of duplicate symbol linker errors, where we
included some object twice during linking; these for one reason or another did
not produce errors before but caused problems on some platforms with this
patch (eg. Mac OS X linker is more strict for shared objects).

This patch only does what is necessary to build libmysqld.so. There are some
more cleanups that are possible now that we are using libtool more fully,
which could done in subsequent patches (though we may not bother as we are
switching from autotools to CMake anyway):

 - In libmysql_r/, we should be able to just link libmysys.la etc, instead of
   symlinking and re-compiling sources into the directory.

 - In libmysql/, we can similarly avoid symlinking and recompiling sources if
   we instead build a libmysys_nothread.la library with appropriate CFLAGS and
   link that.

 - In sql/, we can build a separate target libmysql_int.la with appropriate
   CFLAGS for embedded and use that in libmysqld/ instead of symlinking
   sources.

 - libmysys.a, libmyisam.a and similar libraries could be installed as .so
   also to save on code size; or alternatively could be not installed at all.


client/Makefile.am:
  Updated for using libtool
config/ac-macros/plugins.m4:
  Replace MUSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS with mechanism for plugins
  to specify alternate object for embedded.
configure.in:
  Fix linking duplicate objects related to THREAD_LOBJECTS.
dbug/Makefile.am:
  Updated for using libtool
extra/Makefile.am:
  Fix relative paths.
libmysqld/Makefile.am:
  Build libmysqld.la using libtool
libmysqld/examples/Makefile.am:
  Updated to use libtool
mysys/Makefile.am:
  Updated to use libtool.
  Fix linking duplicate objects related to THREAD_LOBJECTS.
mysys/my_uuid.c:
  Fix conflicting global mutex name by making it static.
regex/Makefile.am:
  Updated to use libtool
sql/Makefile.am:
  Updated to use libtool
sql/item_func.cc:
  Fix conflicting mutex name.
sql/mysql_priv.h:
  Fix conflicting mutex name
sql/mysqld.cc:
  Fix conflicting mutex name.
  Add missing call of my_uuid_end().
storage/archive/Makefile.am:
  Updated to use libtool
storage/archive/plug.in:
  Updated to use libtool
storage/blackhole/Makefile.am:
  Updated to use libtool
storage/blackhole/plug.in:
  Updated to use libtool
storage/csv/Makefile.am:
  Updated to use libtool
storage/csv/plug.in:
  Updated to use libtool
storage/example/Makefile.am:
  Updated to use libtool
storage/federated/Makefile.am:
  Updated to use libtool
storage/federated/plug.in:
  Updated to use libtool
storage/federatedx/Makefile.am:
  Updated to use libtool
storage/federatedx/plug.in:
  Updated to use libtool
storage/heap/Makefile.am:
  Updated to use libtool
storage/heap/plug.in:
  Updated to use libtool
storage/innobase/Makefile.am:
  Updated to use libtool
storage/innobase/plug.in.disabled:
  Updated to use libtool
storage/innodb_plugin/Makefile.am:
  Updated to use libtool
storage/maria/CMakeLists.txt:
  Fix linking duplicate object in maria_dump_log, causes failure on Mac OS X
storage/maria/Makefile.am:
  Updated to use libtool
  Fix linking duplicate object in maria_dump_log, causes link failure on Mac OS X
storage/maria/ma_loghandler.c:
  Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/ma_loghandler.h:
  Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/maria_dump_log.c:
  Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/plug.in:
  Updated to use libtool
storage/myisam/Makefile.am:
  Updated to use libtool
storage/myisam/plug.in:
  Updated to use libtool
storage/myisammrg/Makefile.am:
  Updated to use libtool
storage/myisammrg/plug.in:
  Updated to use libtool
storage/pbxt/plug.in:
  Updated to use libtool
storage/pbxt/src/Makefile.am:
  Updated to use libtool
storage/xtradb/Makefile.am:
  Updated to use libtool
storage/xtradb/plug.in:
  Updated to use libtool
strings/Makefile.am:
  Updated to use libtool
unittest/unit.pl:
  Don't attempt to run libtool internal files as unit tests.
vio/Makefile.am:
  Updated to use libtool
2010-11-17 13:24:20 +01:00
Sergei Golubchik
7bab240fdd build federared* with libmysqlservices 2010-09-12 14:31:14 +02:00
Sergei Golubchik
a3d80d952d merge with 5.1 2010-09-11 20:43:48 +02:00
Sergei Golubchik
44fec70b79 build dynamic plugins with the -shared libtool option to avoid
double compilation
2010-09-09 15:35:47 +02:00
Michael Widenius
ee5551e644 Fixed bugs (mostly on sparc) that caused crashes in mysql-test-run
sql/item_sum.cc:
  Fixed alignment problem that caused crases on sparc. (ORDER needs an aligment of 8 as it includes longlongs)
storage/federatedx/ha_federatedx.cc:
  Fixed crash on sparc as 'pos' is not aligned on 4/8.
storage/maria/ma_page.c:
  Removed wrong assert
2010-09-03 13:01:47 +03:00
Michael Widenius
58a75bb18b Automerge with 5.1 2010-08-25 01:44:50 +03:00
Michael Widenius
6ab5a8ac81 Fixed valgrind errors and compiler warnings discovered by buildbot
More DBUG_ASSERT() to discover errors earlier
More checking of BLOCK structures in Aria.
Fixed crashing bug in Aria when doing UPDATE of several records in same block when doing table scan.

storage/federatedx/ha_federatedx.cc:
  Added missing delete_dynamic(); This fixes the valgrind warnings about lost memory discovered by buildbot.
storage/maria/ma_blockrec.c:
  Added debugging helper function _ma_print_block_info() to print block structure.
  Changed arguments to _ma_print_directory() so it can be called by _ma_print_block_info()
  check_directory() now also checks that empty_space on block is calculated correctly.
  Added some local variables to get more information about what happend when things crash.
  Fixed crashing bug when doing UPDATE of several records in same block when doing table scan.
storage/maria/ma_key_recover.c:
  Simple optimization (don't call bmove_upp() if not needed); This could happen during page split.
storage/maria/ma_recovery.c:
  Fixed compiler warning
storage/maria/ma_test2.c:
  Run test without syncing to disk. (Not needed for this test)
storage/maria/ma_write.c:
  More comments.
  Added DBUG_ASSERT() to find wrong log entires, like the one reported at LP#616344, during log file creation.
storage/maria/unittest/ma_test_recovery.pl:
  Added extra -s to maria_chk to get it more silent.
  This fixes that ma_test_all.sh works again.
2010-08-20 10:29:26 +03:00
Michael Widenius
ae6c5d0de3 Fix for LP#571200 MySQL Bug#32426: FederatedX corrupt ORDER BY with TEXT
Patch taken from lp:~capttofu/maria/bug_571200 (originally for MariaDB 5.3, but adapted for 5.1)
2010-08-12 20:52:52 +03:00
Sergei Golubchik
68f02c65ef merge with 5.1 2010-07-25 17:09:21 +02:00
Sergei Golubchik
069a068c90 restore the unintentinally broken ABI 2010-07-23 22:37:21 +02:00
Michael Widenius
f58199f6f6 Merge with MariaDB 5.1 2010-07-17 01:57:55 +03:00
Michael Widenius
24c08f5279 Fixed wrong error message from federatedx (which could lead to assert in DBUG code)
mysql-test/suite/federated/federated_server.result:
  Update to new error message
mysql-test/suite/federated/federated_server.test:
  Update to new error message
storage/federatedx/ha_federatedx.cc:
  Return real error code, not 0, as in some cases before.
2010-07-16 16:43:46 +03:00
Sergei Golubchik
2f8ca649d2 merge 2010-06-14 18:58:52 +02:00
Sergei Golubchik
14e53d0668 allow federated and innodb_plugin to be built
storage/federated/Makefile.am:
  federated needs functions from mysys/string.c.
  mysqld does not use them, so they don't get into the binary.
storage/federated/plug.in:
  enable federated again.
  remove it from all configurations.
storage/federatedx/Makefile.am:
  federatedx is now called federatedx in configure
storage/federatedx/ha_federatedx.cc:
  federatedx is now called federatedx in configure
storage/federatedx/plug.in:
  federatedx is now called federatedx in configure
storage/innodb_plugin/plug.in:
  enable innodb plugin again.
  remove it from all configurations.
storage/xtradb/CMakeLists.txt:
  xtradb is now called xtradb in configure,
  and builds libxtradb.a and ha_xtradb.so
storage/xtradb/Makefile.am:
  xtradb is now called xtradb in configure,
  and builds libxtradb.a and ha_xtradb.so
storage/xtradb/handler/ha_innodb.cc:
  xtradb is now called xtradb in configure,
  and builds libxtradb.a and ha_xtradb.so
storage/xtradb/plug.in:
  xtradb is now called xtradb in configure,
  and builds libxtradb.a and ha_xtradb.so
2010-06-09 23:29:18 +02:00
unknown
20739646d7 Maria WL#61
Interface for maria extensions.
  Alternative plugin interface with additional info (maturity and string version).

CMakeLists.txt:
  Maria plugin interface used.
config/ac-macros/plugins.m4:
  Maria plugin interface used.
configure.in:
  Maria plugin interface used.
include/mysql/plugin.h:
  Maria plugin interface added.
include/mysql/plugin_auth.h.pp:
  Maria plugin interface added.
plugin/auth/auth_socket.c:
  Maria plugin interface added.
plugin/auth/dialog.c:
  Maria plugin interface added.
plugin/daemon_example/daemon_example.cc:
  Maria plugin interface added.
plugin/fulltext/plugin_example.c:
  Maria plugin interface added.
sql/ha_ndbcluster.cc:
  Maria plugin interface added.
sql/ha_partition.cc:
  Maria plugin interface added.
sql/log.cc:
  Maria plugin interface added.
sql/sql_acl.cc:
  Maria plugin interface added.
sql/sql_builtin.cc.in:
  Maria plugin interface used.
sql/sql_plugin.cc:
  Maria plugin interface added.
sql/sql_plugin.h:
  Maria plugin interface used.
sql/sql_show.cc:
  Maria plugin interface added.
storage/archive/ha_archive.cc:
  Maria plugin interface added.
storage/blackhole/ha_blackhole.cc:
  Maria plugin interface added.
storage/csv/ha_tina.cc:
  Maria plugin interface added.
storage/example/ha_example.cc:
  Maria plugin interface added.
storage/federated/ha_federated.cc:
  Maria plugin interface added.
storage/federatedx/ha_federatedx.cc:
  Maria plugin interface added.
storage/heap/ha_heap.cc:
  Maria plugin interface added.
storage/ibmdb2i/ha_ibmdb2i.cc:
  Maria plugin interface added.
storage/innobase/handler/ha_innodb.cc:
  Maria plugin interface added.
storage/innodb_plugin/handler/i_s.cc:
  Maria plugin interface added.
storage/maria/ha_maria.cc:
  Maria plugin interface added.
storage/myisam/ha_myisam.cc:
  Maria plugin interface added.
storage/myisammrg/ha_myisammrg.cc:
  Maria plugin interface added.
storage/pbxt/src/ha_pbxt.cc:
  Maria plugin interface added.
storage/xtradb/handler/ha_innodb.cc:
  Maria plugin interface added.
storage/xtradb/handler/i_s.cc:
  Maria plugin interface added.
storage/xtradb/handler/i_s.h:
  Maria plugin interface added.
2010-04-01 17:34:51 +03:00
unknown
3e32ba3ff1 Fix some compiler warnings seen in Buildbot.
Add some extra error output and code cleanup in an attempt to fix/debug
a rare random testsuite problem in check_warnings, where the exit code
from mysqltest is somehow corrupted inside mysql-test-run.pl.

include/my_global.h:
  Fix compiler warnings on some platforms.
mysql-test/lib/My/SafeProcess.pm:
  Move dereference of $? subprocess exit code closer to where it is generated,
  to make the code more robust and on the chance that this will fix the
  occasional problems in check_warnings we see in Buildbot.
mysql-test/mysql-test-run.pl:
  When check_warnings failed, also log the mysqld server for which it failed.
sql/sql_lex.cc:
  Fix compiler warning about possibly uninitialised value, by rewriting a for()
  loop that is always executed at least once into a do .. while() loop with an
  assert.
sql/table.cc:
  Fix compiler warning about uninitialised value.
storage/federatedx/ha_federatedx.cc:
  Fix uninitialised variable.
storage/maria/ma_delete.c:
  Fix compiler warning about uninitialised value.
storage/maria/ma_loghandler.c:
  Fix compiler warning about uninitialised value.
storage/myisam/ft_stopwords.c:
  Fix compiler warning.
storage/myisam/mi_write.c:
  Fix compiler warning about possibly uninitialised value, by rewriting a while()
  loop that is always executed at least once into a do .. while() loop with an
  assert.
storage/xtradb/btr/btr0cur.c:
  Fix compiler warning about possibly uninitialised value.
support-files/compiler_warnings.supp:
  Fix warning suppression to cover all cases in yassl.
vio/viossl.c:
  Fix compiler warning.
2010-03-10 11:32:14 +01:00
Michael Widenius
82e910d146 Merge with maria-5.1-federatedx; A patch to fix bugs in federatedx and enable federated_server.test
Author: Antony Curtis
License: BSD


client/mysql.cc:
  Reset variable if CTRL-C was used to kill running query, so that the user can do it again
client/mysqlcheck.c:
  Indentation fix
client/mysqlslap.c:
  Indentation fixes
client/mysqltest.cc:
  Make testing of commands safer by also testing length
  Removed not used variable
  Fixed indentation to be as it was before last patch
mysql-test/lib/mtr_report.pm:
  Fixed typo
mysql-test/mysql-test-run.pl:
  Merge (Align code with default mysql-tes-run.pl)
mysql-test/suite/federated/disabled.def:
  Removed test case
storage/federatedx/ha_federatedx.cc:
  Removed my changes and applied Antony's instead
2009-12-03 13:19:05 +02:00
unknown
a962160eec Merge with MySQL 5.1, with following additions:
- Moved some code from innodb_plugin to xtradb, to ensure that all tests runs
- Did changes in pbxt and maria storage engines becasue of changes in thd->query
- Reverted wrong code in sql_table.cc for how ROW_FORMAT is used.

This is a re-commit of Monty's merge to eliminate an extra commit from
MySQL-5.1.42 that was accidentally included in the merge.

This is a merge of the MySQL 5.1.41 clone-off (clone-5.1.41-build). In
case there are any extra changes done before final MySQL 5.1.41
release, these will need to be merged later before MariaDB 5.1.41
release.
2009-11-16 21:49:51 +01:00
Antony T Curtis
fb8a529d6e merge fix for bug monty found in ha_federatedx::close() method 2009-11-14 12:15:39 -08:00
Antony T Curtis
343001d840 merge from maria-5.1-merge 2009-11-14 11:33:59 -08:00
Michael Widenius
edd792fe12 Merge with MySQL 5.1, with following additions:
- Moved some code from innodb_plugin to xtradb, to ensure that all tests runs
- Did changes in pbxt and maria storage engines becasue of changes in thd->query
- Reverted wrong code in sql_table.cc for how ROW_FORMAT is used.

Todo before joining with main 5.1 tree:
- Join test fails (Igor to investigate)
- mysql-test-run shows warnings from tests; Some suppression rule is not working (Kristian to investiage)
- Run through all buildbots



sql/sql_table.cc:
  Reverted code for ROW_FORMAT is used. We must set the HA_CREATE_USED_ROW_FORMAT flag in alter table
  to signal the handler that it should not change row_type in update_create_info() (as happens for SHOW CREATE).
storage/maria/ha_maria.cc:
  Update for change in defintion of thd->query
storage/myisam/mi_check.c:
  Simplify code
storage/pbxt/src/discover_xt.cc:
  Update for change in defintion of thd->query
storage/xtradb/dict/dict0dict.c:
  Update for change in defintion of thd->query
storage/xtradb/handler/ha_innodb.cc:
  Copy some critical changes from innodb_plugin to get tests to pass
storage/xtradb/handler/ha_innodb.h:
  Copy some critical changes from innodb_plugin to get tests to pass
storage/xtradb/handler/handler0alter.cc:
  Copy some critical changes from innodb_plugin to get tests to pass
2009-11-11 13:17:49 +02:00
Antony T Curtis
2f18347d5c Add missing sources to cmake build. 2009-11-04 03:47:30 -08:00
Antony T Curtis
18435149fc fix federated_server test, possible null ptr deref 2009-11-04 03:11:04 -08:00
unknown
716c099363 Add federatedx files for build
storage/federatedx/CMakeLists.txt:
  Add fedrated files for build
2009-11-03 16:39:54 +02:00
unknown
cea82db95c Make federated compiling under windows
storage/federatedx/ha_federatedx.cc:
  lower_case_file_system do not suported for windows dll
2009-11-03 13:08:09 +02:00
unknown
134ac8483a Fixed federatedx building under windows
storage/federatedx/CMakeLists.txt:
  removed the same goals for federated and federatedx
2009-11-02 21:17:58 +02:00
Hakan Kuecuekyilmaz
70fbd55615 BUILD/compile-dist && make dist was not working due to typos.
Fixed by renaming a file and editing the typo in Makefile.am
2009-11-01 16:09:55 +01:00
Michael Widenius
226f0c7601 Added federatedx storage engine
Fixed compiler warnings


client/mysqladmin.cc:
  Fixed compiler warning
extra/yassl/taocrypt/src/twofish.cpp:
  Fixed compiler warning
libmysqld/Makefile.am:
  Use federatedx instead of federated
  (Should actually be removed)
mysql-test/mysql-test-run.pl:
  Fixed warning
mysql-test/valgrind.supp:
  Removed warning found on 64 bit Linux machine
storage/pbxt/src/cache_xt.cc:
  Fixed compile warning
storage/xtradb/include/buf0buf.ic:
  Fixed compiler warning
2009-10-30 20:50:56 +02:00
Michael Widenius
49b519ca0b Added federatedx storage engine
Fixed compiler warnings


client/mysqladmin.cc:
  Fixed compiler warning
extra/yassl/taocrypt/src/twofish.cpp:
  Fixed compiler warning
libmysqld/Makefile.am:
  Use federatedx instead of federated
  (Should actually be removed)
mysql-test/mysql-test-run.pl:
  Fixed warning
mysql-test/valgrind.supp:
  Removed warning found on 64 bit machine
2009-10-30 01:05:51 +02:00