Commit graph

494 commits

Author SHA1 Message Date
unknown
9b993fda63 Fix wrong install location for DEB supportfiles. 2013-03-04 12:49:35 +01:00
Tor Didriksen
e478ceaa3f Bug#11765489 CMAKE BUILD ON MAC OS X DOES NOT DETERMINE CPU TYPE
Don't use CMAKE_OSX_ARCHITECTURES to determine DEFAULT_MACHINE
if it is not defined.

If we're 64bit, then use "x86_64" rather than "x86"
2013-03-01 13:25:59 +01:00
Murthy Narkedimilli
8f73221035 Updated/added copyright headers 2013-02-26 06:35:17 +01:00
Tor Didriksen
f325fc42e8 Bug#14300733 CMAKE DOES NOT CHECK FOR ZLIB VERSION
Add check for compressBound() and deflateBound()
Keep existing functionality: fallback to bundled zlib if functions not found.
2013-02-20 11:24:16 +01:00
Vladislav Vaintroub
2c37ace131 MDEV-4174 - Use kqueue for threadpool implementation on more BSD variants than just FreeBSD
or OSX - i.e NetBSD, OpenBSD, DragonFly, etc.
2013-02-19 23:46:52 +01:00
Sergei Golubchik
f93b5a6027 make rpm packages to respect CMAKE_INSTALL_PREFIX 2013-02-08 12:59:54 +01:00
Sergei Golubchik
ab83952f29 10.0-base merge 2013-01-31 09:48:19 +01:00
Sergei Golubchik
6f2680a73c move cassandra-related code from cmake/cpack_rpm.cmake
to storage/cassandra/CMakeLists.txt
2013-01-29 19:14:43 +01:00
Sergei Golubchik
0af4b6c6ee 5.5 merge 2013-01-29 15:10:47 +01:00
Sergei Golubchik
52fbe44fbb more changes for fedora18 2013-01-29 12:27:31 +01:00
Sergei Golubchik
78e47eb004 fix 'compat' rpm for fedora18 2013-01-29 10:46:05 +01:00
Vladislav Vaintroub
8864940583 MDEV-3971 : problems installing MariaDB packages (conflicts with mysql-libs-5.5)
FIx  : make "shared" RPM obsolete/provide mysql-libs
2013-01-25 16:50:14 +01:00
Jani Tolonen
09665bfd0e MDEV-3931 Cassandra SE packaging
Added autodetection for thrift library and includes
Added Cassandra Storage Engine rpm
2013-01-23 15:52:59 +01:00
Sergei Golubchik
48bf57b02e MDEV-3832 MariaDB conflicts with packages filesystem-3.1-2.fc18.i686 and jre-1.7.0_09-fcs.i586 on Fedora 18
fix the rpm packaging to work on Fedora18. Two problems:
* conflicts on common directories with other packages.
* more auto-generated requirements for mariadb-test.rpm
2013-01-19 14:03:33 +01:00
Vladislav Vaintroub
5649377b55 Fix Windows installers' bootstrapper scripts , after mysql_performance_tables.sql was split off mysql_system_tables.sql 2013-01-18 18:49:07 +01:00
Sergei Golubchik
d3935adf7a mysql-5.5.29 merge 2013-01-15 19:13:32 +01:00
Michael Widenius
edc89f7511 Buildbot fixes and cleanups:
- Added --verbose to BUILD scripts to get make to write out compile commands.
- Detect if AM_EXTRA_MAKEFLAGS=VERBOSE=1 was used with build scripts.
- Don't write warnings about replication variables when doing bootstrap.
- Fixed that mysql_cond_wait() and mysql_cond_timedwait() will report original source file in case of errors.
- Ignore some compiler warnings

BUILD/FINISH.sh:
  Detect if AM_EXTRA_MAKEFLAGS=VERBOSE=1 or --verbose was used
BUILD/SETUP.sh:
  Added --verbose to print out the full compile lines
  Updated help message
client/mysqltest.cc:
  Fixed that one can use 'replace' with cat_file
cmake/configure.pl:
  If --verbose is used, get make to write out compile commands
debian/dist/Debian/rules:
  Added $AM_EXTRA_MAKEFLAGS to get VERBOSE=1 on buildbot builds
debian/dist/Ubuntu/rules:
  Added $AM_EXTRA_MAKEFLAGS to get VERBOSE=1 on buildbot builds
include/my_pthread.h:
  Made set_timespec_time_nsec() more portable.
include/mysql/psi/mysql_thread.h:
  Fixed that mysql_cond_wait() and mysql_cond_timedwait() will report original source file in case of errors.
mysql-test/suite/innodb/r/auto_increment_dup.result:
  Fixed wrong DBUG_SYNC
mysql-test/suite/innodb/t/auto_increment_dup.test:
  Fixed wrong DBUG_SYNC
mysql-test/suite/perfschema/include/upgrade_check.inc:
  Make test more portable for changes in *.sql files
mysql-test/suite/perfschema/r/pfs_upgrade.result:
  Updated test results
mysql-test/valgrind.supp:
  Ignore running Aria checkpoint thread
scripts/mysqlaccess.sh:
  Changed reference of bugs database
  Ensure that also client-server group is read.
sql/handler.cc:
  Added missing syncpoint
sql/mysqld.cc:
  Don't write warnings about replication variables when doing bootstrap
sql/mysqld.h:
  Don't write warnings about replication variables when doing bootstrap
sql/rpl_rli.cc:
  Don't write warnings about replication variables when doing bootstrap
sql/sql_insert.cc:
  Don't mask SERVER_SHUTDOWN in insert_delayed
  This is done to be able to distingush between shutdown and interrupt errors
support-files/compiler_warnings.supp:
  Ignore some compiler warnings in xtradb,innobase, oqgraph, yassl, string3.h
2013-01-11 02:03:43 +02:00
unknown
0a5312dc2f Make cassandra not built by default 2013-01-10 01:01:15 +02:00
unknown
61412c0c31 pre-merge 2012-12-23 23:37:11 +02:00
unknown
701419b02f Merge MariaDB 10.0-base to MariaDB 10.0 2012-12-18 15:01:58 +01:00
Igor Babaev
7760efad74 Merge mariadb-5.5 -> 10.0-base. 2012-12-16 16:49:19 -08:00
Sergei Golubchik
7c5f62a313 5.5.28a 2012-11-27 12:26:15 +01:00
Joerg Bruehe
6a875b24c3 Placement change:
Top level "SPECIFIC-ULN/" was inappropriate,
put the files to create RPMs for ULN into
"packaging/rpm-uln/".
2012-11-08 19:06:44 +01:00
Joerg Bruehe
7e613db478 Placement change:
Top level "SPECIFIC-ULN/" was inappropriate,
put the files to create RPMs for ULN into
"packaging/rpm-uln/".
2012-11-07 17:45:02 +01:00
Vladislav Vaintroub
4fe2478b0d Improve cleanup in create_initial_db.cmake, fix the 'table already exists' error if build is run twice. 2012-11-04 21:04:34 +01:00
Sergei Golubchik
40e94a3734 merge with 5.5 2012-11-03 12:28:51 +01:00
Vladislav Vaintroub
4839f61bbd MDEV-3822 : 10.0-serg fails on windows buildslaves
Ensure semicolons are not lost when concatenating fill_help_tables to  bootstrap.sql in Windows.
5.6 bootstrapper requires semicolons to separate bootstrapper commands.
2012-10-29 16:52:15 +01:00
Sergei Golubchik
32b70aeadf RPM fixes:
shared should provide libmysqlclient.so.18(libmysqlclient_16) too
  don't "use DBD::mysql" explicitly in mytop
2012-10-27 15:05:01 +02:00
Tor Didriksen
4baab59e93 Bug#14737559 BZR JOIN PLUGIN TREES INTO INTERNAL/PLUGIN
Part three:
Fix some search paths.
2012-10-24 17:06:43 +02:00
Tor Didriksen
7873a6e4d7 Use MESSAGE(STATUS ...) as we don't want any popup from the build system. 2012-10-23 13:41:34 +02:00
Sergei Golubchik
e1f681c99b 10.0-base -> 10.0-monty 2012-10-19 20:38:59 +02:00
Joerg Bruehe
4828c75af1 Fix formatting in 'INFO_BIN' on Windows - backport. 2012-10-19 20:31:22 +02:00
Sergei Golubchik
bf106948e0 RPM fixes:
shared should provide libmysqlclient.so.18(libmysqlclient_16) too
  don't "use DBD::mysql" explicitly in mytop
2012-10-17 19:04:08 +02:00
Sergei Golubchik
ee9afef271 mysql-5.5.28 2012-10-16 13:04:42 +02:00
Sergei Golubchik
c975fdbc85 a typo caused plugins to have no MYSQL_SERVER symbol defined.
don't try to define it for plugins, then, as they don't need it.
2012-10-16 10:34:38 +02:00
Sergei Golubchik
3012a5d5ce MDEV-3796 various RPM problems
cmake/cpack_rpm.cmake:
  * mark all cnf files with %config(noreplace)
  * add the forgotten postun script
sql/sys_vars.cc:
  0 for a string variable means "no default. But datadir has the default value.
support-files/rpm/server-postin.sh:
  * use mysqld --help to determine the correct datadir in the presence of my.cnf files
    (better than my_print_defaults, because it considers the correct group set).
  * Only create users, and chown/chmod if it's a fresh install, not an upgrade.
  * only run mysql_install_db if datadir does not exist
2012-10-05 14:24:38 +02:00
Tor Didriksen
30d35590a3 Bug#13713525 CREATE_INITIAL_DB.CMAKE IS FAILING ON WINDOWS, STILL "DEVENV" RETURNS 0
This bug depends on cmake version.

For cmake 2.6 (which is still in use for some pushbuild trees)
the main build would succeed, even if create_initial_db failed.

The problem was the chaining of commands in the CUSTOM_COMMAND
to produce 'initdb.dep'. It first invokes cmake to run mysqld,
then invokes 'touch' to create the file. Moving the 'touch'
command makes the error propagate properly for both cmake 2.6 and 2.8
2012-10-03 16:05:07 +02:00
Sergey Petrunya
703d82c4ca Include cassandra storage engine in tarballs 2012-09-28 15:29:59 +04:00
Michael Widenius
1864d9596d Implementation of Multi-source replication (MDEV:253)
Documentation of the feature can be found at: http://kb.askmonty.org/en/multi-source-replication/
This code is based on code from Taobao, developed by Plinux

BUILD/SETUP.sh:
  Added -Wno-invalid-offsetof to get rid of warning of offsetof() on C++ class (safe in the contex we use it)
client/mysqltest.cc:
  Added support for error names starting with 'W'
  Added connection_name support to --sync_with_master
cmake/maintainer.cmake:
  Added -Wno-invalid-offsetof to get rid of warning of offsetof() on C++ class (safe in the contex we use it)
mysql-test/r/mysqltest.result:
  Updated results
mysql-test/r/parser.result:
  Updated results
mysql-test/suite/multi_source/my.cnf:
  Setup of multi-master tests
mysql-test/suite/multi_source/simple.result:
  Simple basic test of multi-source functionality
mysql-test/suite/multi_source/simple.test:
  Simple basic test of multi-source functionality
mysql-test/suite/multi_source/syntax.result:
  Test of multi-source syntax
mysql-test/suite/multi_source/syntax.test:
  Test of multi-source syntax
mysql-test/suite/rpl/r/rpl_rotate_logs.result:
  Updated results because of new error messages
mysql-test/t/parser.test:
  Updated test as master_pos_wait() now takes more arguments than before
sql/event_scheduler.cc:
  No reason to initialize slave_thread (it's guaranteed to be zero here)
sql/item_create.cc:
  Added connection_name argument to master_pos_wait()
  Simplified code
sql/item_func.cc:
  Added connection_name argument to master_pos_wait()
sql/item_func.h:
  Added connection_name argument to master_pos_wait()
sql/log.cc:
  Added tag "Master 'connection_name'" to slave errors that has a connection name.
sql/mysqld.cc:
  Added variable mysqld_server_initialized so that other functions can test if server is fully initialized.
  Free all slave data in one place (fewer ifdef's)
  Removed not needed call to close_active_mi()
  Initialize slaves() later in startup to ensure that everthing is really initialized when slaves start.
  Made status variable slave_running multi-source safe
sql/mysqld.h:
  Added mysqld_server_initialized
sql/rpl_mi.cc:
  Store connection name and cmp_connection_name (only used for show full slave status) in Master_info
  Added code for Master_info_index, which handles storage of multi-master information
  Don't write the empty "" connection_name to multi-master.info file. This is handled by the original code.
sql/rpl_mi.h:
  Added connection_name and Master_info_index
sql/rpl_rli.cc:
  Added connection_name to relay log files.
sql/rpl_rli.h:
  Fixed type of slave_skip_counter as we now access it directly in sys_vars.cc, so it must be uint
sql/share/errmsg-utf8.txt:
  Added new error messages needed for multi-source
  Added multi-source name to error ER_MASTER_INFO and WARN_NO_MASTER_INFO
sql/slave.cc:
  Moved things a bit around to make it easier to handle error conditions.
  Create a global master_info_index and add the "" connection to it
  Ensure that new Master_info doesn't fail.
  Don't call terminate_slave_threads(active_mi..) on end_slave() as this is now done automaticly when deleting master_info_index.
  Delete not needed function close_active_mi(). One can achive same thing by calling end_slave().
  Added support for SHOW FULL SLAVE STATUS (show status for all master connections with connection_name as first column)
sql/slave.h:
  Added new prototypes
sql/sql_base.cc:
  More DBUG_PRINT
sql/sql_class.cc:
  Reset thd->connection_name and thd-->default_master_connection
sql/sql_class.h:
  Added thd->connection_name and thd-->default_master_connection
  Added slave_skip_count to variables to make changing the @@sql_slave_skip_count variable thread safe
sql/sql_const.h:
  Added MAX_CONNECTION_NAME
sql/sql_lex.cc:
  Reset 'lex->verbose' (to simplify some sql_yacc.yy code)
sql/sql_lex.h:
  Added connection_name
sql/sql_parse.cc:
  Added support for connection_name to all SLAVE commands.
  - Instead of using active_mi, we now get the current Master_info from master_info_index.
  - Create new replication threads with CHANGE MASTER
  - Added support for show_all_master_info()
sql/sql_reload.cc:
  Made reset/full slave use master_info_index->get_master_info() instead of active_mi.
  If one uses 'RESET SLAVE "connection_name" all' the connection is removed from master_info_index.
sql/sql_repl.cc:
  sql_slave_skip_counter is moved to thd->variables to make it thread safe and fix some bugs with it
  Add connection name to relay log files.
  Added connection name to errors.
  Added some logging for multi-master if log_warnings > 1
  stop_slave():
  - Don't check if thd is set. It's guaranteed to always be set.
  change_master():
  - Check for duplicate connection names in change_master()
  - Check for wrong arguments first in file (to simplify error handling)
  - Register new connections in master_info_index
sql/sql_yacc.yy:
  Added optional connection_name to a all relevant master/slave commands
sql/strfunc.cc:
  my_global.h shoud always be included first.
sql/sys_vars.cc:
  Added variable default_master_connection
  Made variable sql_slave_skip_counter multi-source safe
sql/sys_vars.h:
  Added Sys_var_session_lexstring (needed for default_master_connection)
  Added Sys_var_multi_source_uint (needed for sql_slave_skip_counter).
2012-09-28 02:06:56 +03:00
Sergei Golubchik
474fe6d9d9 fixes for test failures
and small collateral changes

mysql-test/lib/My/Test.pm:
  somehow with "print" we get truncated writes sometimes
mysql-test/suite/perfschema/r/digest_table_full.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/dml_handler.result:
  host table is not ported over yet
mysql-test/suite/perfschema/r/information_schema.result:
  host table is not ported over yet
mysql-test/suite/perfschema/r/nesting.result:
  this differs, because we don't rewrite general log queries, and multi-statement
  packets are logged as a one entry. this result file is identical to what mysql-5.6.5
  produces with the --log-raw option.
mysql-test/suite/perfschema/r/relaylog.result:
  MariaDB modifies the binlog index file directly, while MySQL 5.6 has a feature "crash-safe binlog index" and modifies a special "crash-safe" shadow copy of the index file and then moves it over. That's why this test shows "NONE" index file writes in MySQL and "MANY" in MariaDB.
mysql-test/suite/perfschema/r/server_init.result:
  MariaDB initializes the "manager" resources from the "manager" thread, and starts this thread only when --flush-time is not 0. MySQL 5.6 initializes "manager" resources unconditionally on server startup.
mysql-test/suite/perfschema/r/stage_mdl_global.result:
  this differs, because MariaDB disables query cache when query_cache_size=0. MySQL does not
  do that, and this causes useless mutex locks and waits.
mysql-test/suite/perfschema/r/statement_digest.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/statement_digest_consumers.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/statement_digest_long_query.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result:
  will be updated to match 5.6 when alfranio.correia@oracle.com-20110512172919-c1b5kmum4h52g0ni and anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y are merged
mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result:
  will be updated to match 5.6 when anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y is merged
2012-09-27 20:09:46 +02:00
Michael Widenius
3e83c4e8f9 Automatic merge 2012-09-22 15:30:24 +03:00
Michael Widenius
ae5bc05988 Fix for MDEV-533: Confusing error code when doing auto-increment insert for out-of-range values
create table t1 (a smallint primary key auto_increment);
insert into t1 values(32767);
insert into t1 values(NULL);
ERROR 1062 (23000): Duplicate entry '32767' for key 'PRIMARY

Now on always gets error HA_ERR_AUTOINC_RANGE=167 "Out of range value for column", independent of
store engine, SQL Mode or number of inserted rows. This is an unique error that is easier to test for in replication.

Another bug fix is that we now get an error when trying to insert a too big auto-generated value, even in non-strict mode.
Before one get insted the max column value inserted.
This patch also fixes some issues with inserting negative numbers in an auto-increment column.
Fixed the ER_DUP_ENTRY and HA_ERR_AUTOINC_ERANGE are compared the same between master and slave.
This ensures that replication works between an old server to a new slave for auto-increment overflow errors.
Added SQLSTATE errors for handler errors

Smaller bug fixes:
* Added warnings for duplicate key errors when using INSERT IGNORE
* Fixed bug when using --skip-log-bin followed by --log-bin, which did set log-bin to "0"
* Allow one to see how cmake is called by using --just-print --just-configure


BUILD/FINISH.sh:
  --just-print --just-configure now shows how cmake would be invoked. Good for understanding parameters to cmake.
cmake/configure.pl:
  --just-print --just-configure now shows how cmake would be invoked. Good for understanding parameters to cmake.
include/CMakeLists.txt:
  Added handler_state.h
include/handler_state.h:
  SQLSTATE for handler error messages.
  Required for HA_ERR_AUTOINC_ERANGE, but solves also some other cases.
mysql-test/extra/binlog_tests/binlog.test:
  Fixed old wrong behaviour
  Added more tests
mysql-test/extra/binlog_tests/binlog_insert_delayed.test:
  Reset binary log to only print what's necessary in show_binlog_events
mysql-test/extra/rpl_tests/rpl_auto_increment.test:
  Update to new error codes
mysql-test/extra/rpl_tests/rpl_insert_delayed.test:
  Ignore warnings as this depends on how the test is run
mysql-test/include/strict_autoinc.inc:
  On now gets an error on overflow
mysql-test/r/auto_increment.result:
  Update results after fixing error message
mysql-test/r/auto_increment_ranges_innodb.result:
  Test new behaviour
mysql-test/r/auto_increment_ranges_myisam.result:
  Test new behaviour
mysql-test/r/commit_1innodb.result:
  Added warnings for duplicate key error
mysql-test/r/create.result:
  Added warnings for duplicate key error
mysql-test/r/insert.result:
  Added warnings for duplicate key error
mysql-test/r/insert_select.result:
  Added warnings for duplicate key error
mysql-test/r/insert_update.result:
  Added warnings for duplicate key error
mysql-test/r/mix2_myisam.result:
  Added warnings for duplicate key error
mysql-test/r/myisam_mrr.result:
  Added warnings for duplicate key error
mysql-test/r/null_key.result:
  Added warnings for duplicate key error
mysql-test/r/replace.result:
  Update to new error codes
mysql-test/r/strict_autoinc_1myisam.result:
  Update to new error codes
mysql-test/r/strict_autoinc_2innodb.result:
  Update to new error codes
mysql-test/r/strict_autoinc_3heap.result:
  Update to new error codes
mysql-test/r/trigger.result:
  Added warnings for duplicate key error
mysql-test/r/xtradb_mrr.result:
  Added warnings for duplicate key error
mysql-test/suite/binlog/r/binlog_innodb_row.result:
  Updated result
mysql-test/suite/binlog/r/binlog_row_binlog.result:
  Out of range data for auto-increment is not inserted anymore
mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result:
  Updated result
mysql-test/suite/binlog/r/binlog_stm_binlog.result:
  Out of range data for auto-increment is not inserted anymore
mysql-test/suite/binlog/r/binlog_unsafe.result:
  Updated result
mysql-test/suite/innodb/r/innodb-autoinc.result:
  Update to new error codes
mysql-test/suite/innodb/r/innodb-lock.result:
  Updated results
mysql-test/suite/innodb/r/innodb.result:
  Updated results
mysql-test/suite/innodb/r/innodb_bug56947.result:
  Updated results
mysql-test/suite/innodb/r/innodb_mysql.result:
  Updated results
mysql-test/suite/innodb/t/innodb-autoinc.test:
  Update to new error codes
mysql-test/suite/maria/maria3.result:
  Updated result
mysql-test/suite/maria/mrr.result:
  Updated result
mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result:
  Updated result
mysql-test/suite/rpl/r/rpl_auto_increment.result:
  Update to new error codes
mysql-test/suite/rpl/r/rpl_insert_delayed,stmt.rdiff:
  Updated results
mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
  Updated results
mysql-test/t/auto_increment.test:
  Update to new error codes
mysql-test/t/auto_increment_ranges.inc:
  Test new behaviour
mysql-test/t/auto_increment_ranges_innodb.test:
  Test new behaviour
mysql-test/t/auto_increment_ranges_myisam.test:
  Test new behaviour
mysql-test/t/replace.test:
  Update to new error codes
mysys/my_getopt.c:
  Fixed bug when using --skip-log-bin followed by --log-bin, which did set log-bin to "0"
sql/handler.cc:
  Ignore negative values for signed auto-increment columns
  Always give an error if we get an overflow for an auto-increment-column (instead of inserting the max value)
  Ensure that the row number is correct for the out-of-range-value error message.
  
  
  ******
  Fixed wrong printing of column namn for "Out of range value" errors
  Fixed that INSERT_ID is correctly replicated also for out-of-range autoincrement values
  Fixed that print_keydup_error() can also be used to generate warnings
  ******
  Return HA_ERR_AUTOINC_ERANGE (167) instead of ER_WARN_DATA_OUT_OF_RANGE for auto-increment overflow
sql/handler.h:
  Allow INSERT IGNORE to continue also after out-of-range inserts.
  Fixed that print_keydup_error() can also be used to generate warnings
sql/log_event.cc:
  Added DBUG_PRINT
  Fixed the ER_AUTOINC_READ_FAILED, ER_DUP_ENTRY and HA_ERR_AUTOINC_ERANGE are compared the same between master and slave.
  This ensures that replication works between an old server to a new slave for auto-increment overflow errors.
sql/sql_insert.cc:
  Add warnings for duplicate key errors when using INSERT IGNORE
sql/sql_state.c:
  Added handler errors
sql/sql_table.cc:
  Update call to print_keydup_error()
storage/innobase/handler/ha_innodb.cc:
  Fixed increment handling of auto-increment columns to be consistent with rest of MariaDB.
storage/xtradb/handler/ha_innodb.cc:
  Fixed increment handling of auto-increment columns to be consistent with rest of MariaDB.
2012-09-18 15:14:19 +03:00
Joerg Bruehe
fc03d92ebe Merge changes for ULN RPMs into main 5.5 2012-09-21 16:01:53 +02:00
Michael Widenius
1999be8d4e Automatic merge with 5.5 2012-09-01 00:54:54 +03:00
Vladislav Vaintroub
ae325ec6ce Compile 10.0 on Windows 2012-08-30 11:36:24 +02:00
Tor Didriksen
b143676297 Bug#14593123 CONFIGURE.PL WITH CMAKE2.8 BREAKS THE BUILD
Ignore --with-client-ldflags 
it's not supported by the cmake scripts anyways.

Ignore --with-mysqld-ldflags
it's only used with --with-mysqld-ldflags=-static
and that doesn't work.
2012-09-07 10:12:32 +02:00
Vladislav Vaintroub
bd39599668 fix oqgraph on MSVC 2012-08-02 23:17:27 +02:00
Sergei Golubchik
0117a92fed MDEV-419 ensure that all HAVE_XXX constants can be set by cmake
add missing checks to configure.cmake
remove dead code and unused HAVE_xxx constants from the sources
2012-07-31 19:29:07 +02:00
Harin Vadodaria
7baba64497 Bug#13904906: YASSL PRE-AUTH CRASH WITH 5.1.62, 5.5.22
Problem: Valgrind reports errors when an invalid certificate is used on the
         client.

Solution: Updated yaSSL to version 2.2.2.
2012-07-24 18:45:58 +05:30
Vladislav Vaintroub
13f6783f75 MDEV-409 : /etc/my.cnf config file overwritten during RPM installation
Fix : use attribute %config(noreplace)  for /etc/my.cnf , instead of (automatically generated) %config
2012-07-23 23:54:57 +02:00
Michael Widenius
aa67a198e8 automatic merge with 5.5 2012-06-27 17:22:23 +03:00
Michael Widenius
8294226097 Switched off Maintainer mode by default as it gave wrong compiler warnings (as it added -Wall after some switches was already turned off)
cmake/maintainer.cmake:
  Add -DFORCE_INIT_OF_VARS to not get warnings generated by -Wall
configure.cmake:
  Don't add -Wall if we already have it. This is to not enable options that are already turned off.
support-files/compiler_warnings.supp:
  Removed suppression that is not needed anymore
2012-06-13 19:21:28 +03:00
Joerg Bruehe
6cd3c6b6b0 More changes to supporting the build of RPMs for ULN
from the MySQL 5.5 source tree.

Contrary to the comment, the spec file for these ULN RPMs
was missing in the previous changeset (blame ".bzrignore").

This change now brings said spec file, and it adds cmake
handling for the new files.

Still for internal tool tests only, not yet ready for publishing.


CMakeLists.txt:
  Add the subdirectory holding specific stuff
  for the RedHat-compatible RPMs for ULN.
cmake/install_layout.cmake:
  Explicitly mention my the ULN RPMs are handled.
2012-06-11 12:11:02 +02:00
Michael Widenius
efa48b2148 Merge with 5.5 2012-06-08 20:13:55 +03:00
Sergei Golubchik
38c4ef63b8 MDEV-302 lp:988204 MariaDB 5.5.23 binaries don't use libaio
simplify debian/dist/*/rules slightly.
move hard-coded config value to cmake files.
(the actual fix is -DBUILD_CONFIG=mysql_release)
2012-06-06 14:15:29 +02:00
Sergei Golubchik
3e3606d21d merge with 5.3.
Take only test cases from MDEV-136 Non-blocking "set read_only"
2012-06-04 17:26:11 +02:00
Michael Widenius
83c02f3237 Increased the version number to 10.0
- Fixed code that was not ready for a major version number > 9
- Fixed test cases that assumed max major version number could be 9
Updated version number for depricated options (will be removed in a later commit)

VERSION:
  Version number 10.0.0
client/mysqlbinlog.cc:
  Added support for major version numbers > 9
cmake/mysql_version.cmake:
  Added support for version numbers that is 0
mysql-test/r/comments.result:
  Modified test to handle version number 100000
mysql-test/r/func_system.result:
  Modified test to handle version number 100000
mysql-test/r/log_state.result:
  Updated depricated error message
mysql-test/r/sp.result:
  Modified test to handle version number 100000
mysql-test/r/subselect4.result:
  Updated depricated error message
mysql-test/r/variables.result:
  Updated depricated error message
mysql-test/suite/rpl/r/rpl_conditional_comments.result:
  Modified test to handle version number 100000
mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
  Modified test to handle version number 100000
mysql-test/suite/rpl/t/rpl_conditional_comments.test:
  Modified test to handle version number 100000
mysql-test/suite/rpl/t/rpl_loaddatalocal.test:
  Modified test to handle version number 100000
mysql-test/suite/sys_vars/r/debug_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/log_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/log_slow_queries_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/multi_range_count_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/sql_big_selects_func.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/sql_max_join_size_func.result:
  Updated depricated error message
mysql-test/t/comments.test:
  Modified test to handle version number 100000
mysql-test/t/file_contents.test:
  Modified test to handle version number 100000
mysql-test/t/func_system.test:
  Modified test to handle version number 100000
mysql-test/t/parser_not_embedded.test:
  Modified test to handle version number 100000
mysql-test/t/sp.test:
  Modified test to handle version number 100000
sql/mysqld.cc:
  Updated version number for depricated options (will be removed in a later commit)
sql/slave.cc:
  Modified test to handle version number 100000
  Better error messages
sql/sql_lex.cc:
  Modified test to handle version number 100000 in comment syntax
sql/sys_vars.cc:
  Updated version number for depricated options (will be removed in a later commit)
2012-05-31 22:39:11 +03:00
Sergei Golubchik
32addeaf45 RPM packages should not obsolete themselves.
Otherwise yum on fedora will not install them
(rpm will, yum on centos and rhel will).
2012-05-29 21:38:51 +02:00
Sergei Golubchik
6cfb62b733 MDEV-293 5.5 RPMs for RHEL6/CentOS6
Build MariaDB-compat rpm by repackaging files from MariaDB-shared-5.3.*.rpm
Or RHEL6/CentOS6 make all other MariaDB rpms depend on MariaDB-compat.
2012-05-29 21:38:35 +02:00
Sergei Golubchik
9f7bfbefb1 Don't install debug plugins and don't populate unused "plugins.files" file. 2012-05-26 13:04:23 +02:00
Sergei Golubchik
be0d1179a8 create a new MariaDB-common.rpm that contains files needed both by the client and the server.
use my.cnf includes to split one big my.cnf file in server and client parts.

remove "Provides: mysql-libs" (doesn't help on CentOS 6)
2012-05-25 19:18:29 +02:00
Sergei Golubchik
ec586f529c Building RPMs with CPack
configure with cmake -DRPM=distro
2012-05-22 11:04:32 +02:00
Vladislav Vaintroub
31886faef6 Add -Wno-missing-field-initializers to silence bogus warnings from GCC in maintainer mode. 2012-05-17 21:50:50 +02:00
Vladislav Vaintroub
ab58904367 Fix FreeBSD test errors. Also link with libexecinfo on FreeBSD for stacktrace functionality. 2012-05-04 14:02:35 +02:00
Vladislav Vaintroub
e3ffaed147 support same version upgrade for MSI 2012-05-04 03:51:30 +02:00
Vladislav Vaintroub
f544b21fcb Fix build on OSX
- Workaround linker bug that prevents linking aria test executables
   using -fno-common on OSX
- Skip system readline detection (OSX readline is incompatible one)
- Make Xcode generator work
2012-04-12 01:33:43 +02:00
Sergei Golubchik
16c5c53fc2 mysql 5.5.23 merge 2012-04-10 08:28:13 +02:00
unknown
34ed8f3379 lp:886550 Wrong installation path for some include files.
Now install all includes in a flat hierarchy under
$PREFIX/include/mysq/, same as 5.3. User can override with
-DINSTALL_INCLUDEDIR
2012-04-03 08:00:57 +02:00
Sergei Golubchik
0d5adca0de debug_sync is now a service, available to dynamically loaded plugins.
new make target - abi_update

libservices/HOWTO:
  remove references to Makefile.am
  small tweaks
2012-03-28 19:26:00 +02:00
Sergei Golubchik
20e706689d mysql-5.5.22 merge
mysql-test/suite/innodb/t/group_commit_crash.test:
  remove autoincrement to avoid rbr being used for insert ... select
mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test:
  remove autoincrement to avoid rbr being used for insert ... select
mysys/my_addr_resolve.c:
  a pointer to a buffer is returned to the caller -> the buffer cannot be on the stack
mysys/stacktrace.c:
  my_vsnprintf() is ok here, in 5.5
2012-03-28 01:04:46 +02:00
Vladislav Vaintroub
02d982a90b Fix Windows build 2012-03-22 20:21:14 +01:00
Bjorn Munch
26c08ffa40 Merged some fixes from 7.2 release branches 2012-03-22 16:16:11 +01:00
Vladislav Vaintroub
526de8478a precache results of system tests on Windows 2012-03-22 15:44:06 +01:00
Vladislav Vaintroub
9f54ae519e Fix CMake code to work with older cmake version, such as 2.6.2 2012-03-22 15:37:52 +01:00
Vladislav Vaintroub
49d6568aae Reduce size of windows MSI by approx. 50%
- Mark test components, plugins etc with COMPONENT Test, to get them excluded from the MSI
- Only include debug symbols for client and embedded libs and also
  mysqld.exe and server plugins (so we can still can get a callstack in case of crash)

The rest (all *.pdbs, test components, MTR) can be obtained from the big ZIP distribution, if required.
2012-03-16 20:52:17 +01:00
Sergei Golubchik
92f31d8070 mdev-176 feedback plugin is linked dynamically in bintar 2012-03-13 14:43:34 +01:00
MySQL Build Team
7a35cb9150 Updated/added copyright headers 2012-02-16 10:48:16 +01:00
Vladislav Vaintroub
b64a2fef59 precache some more system checks on Windows 2012-02-27 19:54:30 +01:00
Vladislav Vaintroub
62dcaf8c29 merge 5.5 2012-02-27 19:32:44 +01:00
Vladislav Vaintroub
3ebb4b8833 because of the high cost associated with fake symdir resolution, disable symbolic-links on Windows by default. Real symlinks (Vista+) as well as NTFS junctions (prior to Vista) do not require this parameter 2012-02-27 19:20:18 +01:00
Vladislav Vaintroub
150f238538 Workaround buggy Linux dtrace - it fails on fedora if CC is set to 'ccache gcc' 2012-02-20 22:25:44 +01:00
Vladislav Vaintroub
8877fe7359 merge 2012-02-08 11:18:55 +01:00
Vladislav Vaintroub
24e7faa54f Various fixes for Solaris compiler.
Also, restrict symbol visibility in statically
built plugins, to minimize the chance for symbol 
name clashes with dynamic plugins.
2012-02-03 11:46:40 +01:00
Vladislav Vaintroub
657e8675d8 Fix portability problems
- Solaris readline always needs curses
- -rdynamic is not portable, replaced by SET_TARGET_PROPERTIES(...ENABLE_EXPORTS)
2012-02-02 21:48:22 +01:00
Vladislav Vaintroub
b7cf6abe52 merge 2012-01-24 01:59:03 +01:00
unknown
cfd4fcb0bc Initial draft for building .deb packages for MariaDB 5.5. 2012-01-23 12:20:16 +01:00
Vladislav Vaintroub
6404fcbf9e merge 5.5 2012-01-11 14:56:19 +01:00
Vladislav Vaintroub
44c8745ff5 MDEV-85: Remove shared plugin library if build swtiches from shared to static with
e.g 
cmake . -DWITH_XXXX_STORAGE_ENGINE=1
2012-01-11 13:35:27 +01:00
Vladislav Vaintroub
305ae953db merge 2011-12-26 16:57:28 +01:00
Vladislav Vaintroub
7da4229f2e Fix build on old 32 bit Centos (kernel 2.6.18) 2011-12-26 01:08:46 +01:00
Vladislav Vaintroub
c03deada6c fix 64 bit Windows build 2011-12-21 02:44:50 +01:00
Sergei Golubchik
2573f03a05 * remove WITH_DEBUG from CMakeLists.txt
* MYSQL_MAINTAINER_MODE and SAFEMALLOC take values ON/OFF/AUTO
  (in all builds, in none, only in debug and platform dependent)
* ./configure prefers RelWithDebInfo unless the user overrides
2011-12-15 22:08:42 +01:00
Tor Didriksen
b507df6145 Bug#13463417 63487: ANNOYING TRACE MESSAGE IN CMAKE CODE
Remove it.
2011-12-15 10:44:33 +01:00
Sergei Golubchik
db8f698c8a new configure option: NOT_FOR_DISTRIBUTION
fix safemalloc to compile w/o libbfd.

CMakeLists.txt:
  NOT_FOR_DISTRIBUTION option
cmake/readline.cmake:
  simplify libedit/readline detection.
  never use bundled libedit.
  use system readline v6 only if NOT_FOR_DISTRIBUTION=1
configure.cmake:
  use libbfd only if NOT_FOR_DISTRIBUTION=1
include/my_stacktrace.h:
  link with libbfd even w/o safemalloc.
2011-12-14 10:53:32 +01:00
Vladislav Vaintroub
e91bbca5fb Initial threadpool implementation for MariaDB 5.5 2011-12-08 19:17:49 +01:00
Vladislav Vaintroub
25a9b33591 fix signing and packaging 2011-11-30 00:23:50 +01:00
Vladislav Vaintroub
835d8b6242 merge 2011-11-28 01:23:13 +01:00
Sergei Golubchik
ac8dd6beb9 merged 2011-11-27 17:50:50 +01:00
Sergei Golubchik
dfc1901e80 compilation fixes
cmake/maintainer.cmake:
  don't do -Werror just yet
config.h.cmake:
  according to MSDN PSAPI_VERSION should be 1 in a portable application
mysys/my_thr_init.c:
  first, reset THR_KEY_mysys, and then free dbug data,
  because dbug data are automacially created on the next dbug call,
  unless THR_KEY_mysys is null.
2011-11-27 17:50:08 +01:00
Vladislav Vaintroub
64e308e28d Fix build and packaging on Windows:
- build executables we have in 5.3 (mysql_install_db.exe, mysq_upgrade_service.exe, upgrade wizard), and MSI

- add some missing headers to windows specific source files. 
This needs to be done since 5.5 is using WIN32_LEAN_AND_MEAN preprocessor constant thus windows.h 
no more includes whiole Windows

- do not deliver perl scripts  (mysql_install_db.pl & friends)  -they do not work, are not documented, and we 
have native executables for this functionality. do not pack echo.exe, replace.exe  into MSI, they 
are not needed. Do not build resolveip on Windows, it is not used.

- precache results of  of system checks in cmake/os/WindowsCache.cmake (like it is alreay done for  majority of tests
to speed up cmake run with VS)

- make feedback plugin DEFAULT on Windows (so MSI works if user enables plugin), 
fix null pointer access in PSI_register
2011-11-26 23:07:53 +01:00
Vladislav Vaintroub
6be24a771a Avoid mysqld dependency on libaio.so by linking xtradb statically to libaio.
A variable XTRADB_PREFER_STATIC_LIBAIO should be set to 1 (or TRUE
 or ON) for static linking.

Even if mysqld can avoid dependency on shared libaio, shared libraries 
libmysqld.so or ha_innodb.so cannot link without it.

Given that the patch primarily addresses building tar.gz package, and 
shared libraries mentioned above deemed less important than mysqld
executable, we accept shared lib dependency on libaio.so
2011-11-25 20:50:14 +01:00
Sergei Golubchik
feba65a554 merged 2011-11-22 18:51:33 +01:00
Vladislav Vaintroub
c104d31404 For libmysqld.so, apply patch to the MySQL Bug#39288 found here
http://lists.mysql.com/commits/102373

It is better than previous attempts to build the libmysqld, 
as it also takes care of

1) -Wl,--no-undefined for shared libraries and 
2) CLEAN_DIRECT_OUTPUT since there are now 2 libraries with 
the same base output name
2011-11-08 02:14:57 +01:00
Vladislav Vaintroub
216d5450e7 add version to the libmysqld.so 2011-11-07 22:20:44 +01:00
Sergei Golubchik
6edd76785c merge 2011-11-03 23:39:53 +01:00
Sergei Golubchik
0e007344ea mysql-5.5.18 merge 2011-11-03 19:17:05 +01:00
Sergei Golubchik
952e4067ad On linux we build with defined _GNU_SOURCE.
We must perform system tests with _GNU_SOURCE too!
2011-10-31 17:25:29 +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
Daniel Fischer
7450044eb7 merge from 5.5.16 2011-09-21 12:40:41 +02:00
Jonathan Perkin
1f9fe1b4d5 Update email address for Release Engineering. 2011-09-20 17:47:53 +02:00
Daniel Fischer
888b8793a2 Source plugin library files list from cmake-generated file in RPM builds 2011-08-15 12:10:08 +02:00
Sergei Golubchik
2853f6bfbb unit test fixes for ctest 2011-07-16 09:09:01 +02:00
Sergei Golubchik
9809f05199 5.5-merge 2011-07-02 22:08:51 +02:00
Daniel Fischer
f089d2e870 RETURN doesn't exactly return from the macro... 2011-06-10 14:57:42 +02:00
Tor Didriksen
155df6c657 Bug#12641810 - MYSQL MAKE DIST DOESN'T WORK WHEN USING MYSQL TREE + PLUGIN TREE(S)
cmake/make_dist.cmake.in:
  Run 'bzr export' for plugins.
cmake/plugin.cmake:
  Lookup plugins with bzr repos.
2011-06-10 09:12:10 +02:00
Bjorn Munch
aca402b62b Followup to 12607800, testing it in PB2 didn't work, trying again
Be more explicit about path to (potential) plugin tests dirs
2011-06-01 15:19:36 +02:00
Bjorn Munch
fd717fb560 Bug #12607800 ADD HOOK TO INSTALL TESTS FROM IMPORTED FEATURE TREES
Sets INSTALL_PLUGINTESTDIR if any plugin/*/tests exist
2011-06-01 12:15:01 +02:00
Bjorn Munch
94f96bc472 Bug #12598603 HAVE COLLECTIONS FILES IN FEATURE TREES AUTO-APPENDED TO COMMON FILES
Do this in the common plugin.cmake but only if running in PB2
  (If done in manual builds it would create a bzr diff)
2011-05-27 14:43:15 +02:00
Bjorn Munch
b5009ee6be merge from 5.5-mtr 2011-05-26 10:18:21 +02:00
Tor Didriksen
c41e866357 Don't check for FIONREAD on windows.
Execution of platforms tests are slow/flaky when building on windows.
in PB:mysql-next-mr-opt-team on 2011-05-18 for win x86 debug_max, i see:
-- Looking for FIONREAD
-- Looking for FIONREAD - found
and the build fails.
2011-05-26 09:54:19 +02:00
Bjorn Munch
73d1992ef4 Bug #12586211 ENABLE GCOV BUILDS WITH CMAKE, INCLUDING PLUGINS
Added --with-gcov option to configure.pl and use that from SETUP.sh
2011-05-25 12:39:11 +02:00
Tor Didriksen
0fd2624780 Bug#12710832 - PB2 DAILY-TRUNK BUILD FAILS ON SOLARIS X86_64
Compiler bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6879978

Workaround is to always specify "-xOn".


cmake/build_configurations/mysql_release.cmake:
  Enable basic optimization for debug builds.
2011-07-04 14:27:08 +02:00
Kent Boortz
789aa8c485 Updated/added copyright headers 2011-07-04 01:25:49 +02:00
Kent Boortz
02e07e3b51 Updated/added copyright headers 2011-06-30 17:46:53 +02:00
Nirbhay Choubey
51721df03a Merge of fix for bug#11757855 from mysql-5.1 -> mysql-5.5. 2011-04-30 10:54:38 +05:30
Georgi Kodinov
c7b12ecc6e Backport of (part of) bug #11760838 to 5.5.
Enabled the ABI check to run on MacOSX.
2011-04-28 13:13:36 +03:00
Sergei Golubchik
0accbd0364 lots of post-merge changes 2011-04-25 17:22:25 +02:00
Guilhem Bichot
fe1ec4a6e7 Fix for Bug#11892055 - "GCC COMPILER FLAG -WOVERLOADED-VIRTUAL NOT USED, WHICH LETS BUGS IN" 2011-04-26 11:18:29 +02:00
Magne Mahre
b71c5d51c6 Bug#11766320 MYSQL SYMBOLIC LINKS NOT WORKING
When MySQL converted from autotools to CMake, the
preprocessor symbol USE_SYMDIR was omitted by mistake.

Without this symbol, the code for checking .sym files
is not built.

This patch defines USE_SYMDIR when built on MS Windows.
2011-04-14 10:08:12 +02:00
Davi Arnaut
8aadfb4065 Remove some leftovers from the removal of the gethostbyname wrappers. 2011-04-13 16:05:26 -03:00
unknown
753c406994 Merge from mysql-5.5.10-release 2011-03-16 15:11:20 +01:00
MySQL Build Team
a471109971 Implementing Bug #57175 MySQL source tarballs should include generated spec file 2011-03-03 22:46:12 +01:00
Kent Boortz
fe12c639b1 The client shared library major version was changed to 18, to reflect
ABI changes (Bug#60061)

Bumping the version from 16 to 18, instead of 17, was done to avoid a
library conflict on Mac OS X between MySQL 5.1 and MySQL 5.5. In MySQL
5.1 GNU libtool was used, that made the ABI version used in the file
name to be 16, and the one stored inside the binary to be 17.

MySQL 5.5 uses CMake as a build tool, that will store the same ABI
number in the file name as inside the binary in Mac OS X, and then
bumping the ABI number two steps avoids a conflict on Mac OS X.
2011-02-17 19:36:19 +01:00
Joerg Bruehe
a7662cf0a9 Merge bug fix 42969 into main 5.5 branch. 2011-02-14 15:53:51 +01:00
Joerg Bruehe
bb956c1ea2 Fix bug#42969 Please add a MANIFEST to each build
With this change, there will be new files "INFO_SRC"
and "INFO_BIN", which describe the source and the
binaries.
They will be contained in all packages:
- in "tar.gz" and derived packages, in "docs/",
- in RPMs, in "/usr/share/doc/packages/MySQL-server".

"INFO_SRC" is also part of a source tarball.
It gives the version as exact as possible, preferably
by calling "bzr version-info" on the source tree.
If that is not possible, it just contains the three
level version number.

"INFO_BIN" contains some info when and where the
binaries were built, the options given to the compiler,
and the flags controlling the included features.

The tests (test "mysql" in the main suite) are extended
to verify the existence of both "INFO_SRC" and "INFO_BIN",
as well as some of the expected contents.


CMakeLists.txt:
  For the new files describing the source and the build
  ("INFO_SRC" and "INFO_BIN"), we need a new file
  "cmake/info_macros.cmake.in" with the build rules.
  
  1) This file must be configured with the current variables.
  
  2) "INFO_SRC" can be created during the cmake phase,
     but this should be repeated with each "make" to
  protect against a developer doing only "make" after
  a "bzr pull" (or "bzr commit").
  So have it both as a cmake rule and as a custom target.
  
  3) "INFO_BIN" must be created during the make phase
     only, because it contains information from files
  which will be written at the end of the cmake phase only.
  Therefore, it must be a custom target which is included
  in all "make" targets.
  
  4) The resulting "INFO_*" files must be included in packages.
cmake/info_bin.cmake:
  This is the file to create "INFO_BIN",
  by calling the "CREATE_INFO_BIN()" macro.
  
  It must be a separate file, so that the macro
  definitions can be included in other cmake scripts
  without that file inclusion causing a side effect,
  the macro call.
  That call would modify the source tree which should
  be trated read-only.
cmake/info_macros.cmake.in:
  This new file contains the macros to create the
  "INFO_*" files during various steps of the build,
  the calls will be at other places.
  
  1) For source: If running from a BZR tree, always create
     (update) "INFO_SRC" by running "bzr version-info".
     Outside a BZR tree, try to take it from exported
     sources, and create it only if missing, in that
     case put the three level version number into it.
  
  2) "INFO_BIN" contains
     - date/time and host name of the build host,
     - information about the platform,
     - information about the C and CXX compiler
       and the options given to them (Unix only),
     - the feature flags as reported by "cmake -L".
cmake/info_src.cmake:
  This is the file to create "INFO_SRC",
  by calling the "CREATE_INFO_SRC()" macro.
  
  It must be a separate file, so that the macro
  definitions can be included in other cmake scripts
  without that file inclusion causing a side effect,
  the macro call.
  That call would modify the source tree which should
  be trated read-only.
cmake/make_dist.cmake.in:
  Create a "VERSION_src" file during "make dist".
  
  In case it already exists from a preceding "cmake" run
  or tree export (which is quite likely), a new
  "make dist" must not modify it.
mysql-test/r/file_contents.result:
  Result of test for bug#42969.
mysql-test/t/file_contents.test:
  Perl test scriptlet for bug#42969.
support-files/mysql.spec.sh:
  Add "INFO_SRC" and "INFO_BIN" to the RPM contents.
2011-02-11 15:55:25 +01:00
Tor Didriksen
7f3decd9b2 Bug #58991 DEFAULT_CHARSET and DEFAULT_COLLATION does not work with CMake.
cmake/character_sets.cmake:
  Fix typo in variable name.
  Some cosmetics.
config.h.cmake:
  Do not use hard-coded defaults for charset and collation.
2011-01-04 11:23:45 +01:00
Tor Didriksen
029a5df870 Bug #58699 cannot build with gcc dbg on solaris
cmake/os/SunOS.cmake:
  Remove TARGET_OS_SOLARIS
config.h.cmake:
  Remove TARGET_OS_SOLARIS
  Add PTHREAD_ONCE_INITIALIZER
configure.cmake:
  Add function for testing whether we need { PTHREAD_ONCE_INIT } rather than PTHREAD_ONCE_INIT
include/my_pthread.h:
  Use PTHREAD_ONCE_INITIALIZER if set by cmake.
include/mysql/psi/mysql_file.h:
  Include my_global.h first, to get correct platform definitions.
mysys/ptr_cmp.c:
  Hide the unused static functions in #ifdef's on solaris.
  Use __sun (defined by both gcc and SunPro cc) rather than TARGET_OS_SOLARIS
sql/my_decimal.cc:
  Include my_global.h first, to get correct platform definitions.
sql/mysqld.cc:
  Fix signed/unsigned comparison warning.
sql/sql_audit.h:
  Include my_global.h first, to get correct platform definitions.
sql/sql_plugin.h:
  Include my_global.h first, to get correct platform definitions.
sql/sql_show.cc:
  Fix: warning: cast from pointer to integer of different size
sql/sys_vars.h:
  Use reinterpret_cast rather than c-style cast.
storage/perfschema/pfs_instr.cc:
  Include my_global.h first, to get correct platform definitions.
2010-12-21 13:00:26 +01:00
Alexander Nozdrin
3237e4908a Manual merge from mysql-5.5. 2010-12-16 21:43:21 +03:00
Georgi Kodinov
74e2520cd9 merge mysql-5.5->mysql-5.5-bugteam 2010-12-16 18:44:17 +02:00
Jonathan Perkin
5752c16ca9 bug#58955: Must -DBUILD_CONFIG=mysql_release require libaio on Linux
Allow users to build without aio if they really want to, by passing
-DIGNORE_AIO_CHECK to cmake.
2010-12-16 09:27:55 +00:00
Davi Arnaut
650d9cc5b0 Bug#58871: Reorganize maintainer mode compiler flags to allow
option for specific compilers

Reorganize the maintainer mode cmake code to allow options
for specific compilers. For now, enable -Wcheck for ICC,
but do not turn warnings into errors.

CMakeLists.txt:
  Move the code that sets options to cmake/maintainer.cmake
cmake/maintainer.cmake:
  Add macros for each specific compiler.
2010-12-15 08:30:09 -02:00
Jonathan Perkin
5046dc160b bug#58766: Server binary was compiled without fast-mutexes
Re-enable fast mutexes on Linux for release builds.
2010-12-07 11:40:38 +00:00
Jonathan Perkin
9836927774 Fix the .deb package prefix. 2010-11-25 00:21:28 +00:00
Vladislav Vaintroub
199cb4b7b1 Post-fix for Bug#58158 on Solaris
Problem : The build might fail with 
make[2]: *** No rule to make target `../sql/z',
needed by `sql/mysqld_dtrace_all.o'.  Stop.
if one of plugins would depends on system libz 
library

Fix: Filter out non-static dependent libraries
when dtracing static libs
2010-11-25 00:20:36 +00:00
Tor Didriksen
20f94499fa Bug #58372 cmake should not write temporary files in the source directory
cmake/do_abi_check.cmake:
  Put temporary files in ${BINARY_DIR} rather than in source directory.
  Slight reformatting for readability of commands.
2010-11-23 10:26:26 +01:00
Magnus Blåudd
6ad007c7ad Merge 5.5-bug58158 into 5.5-bugteam 2010-11-24 11:49:10 +01:00
Magnus Blåudd
41cab32111 WL#5665: Removal of the autotools-based build system
- Make the cmake files depend on VERSION, causing
   cmake rerun when VERSION changes
2010-11-24 11:37:59 +01:00
Sunanda Menon
377c783e75 merge 2010-11-22 11:35:48 +01:00
Davi Arnaut
af67d8ae02 WL#5665: Removal of the autotools-based build system
Remove some more leftovers from the initial removal:

o Update relevant mentions of configure.in throughout
the source code.

o Remove win/configure.js, which at this point just
duplicates logic already present in CMake based build
system.

o Remove support files which relied on the autotools
build system. In any case, MySQL is no longer officially
supported on SCO.

o Remove files which are no longer part of the build.
2010-11-20 20:56:09 -02:00
Davi Arnaut
8664de2230 WL#5665: Removal of the autotools-based build system
The autotools-based build system has been superseded and
is being removed in order to ease the maintenance burden on
developers tweaking and maintaining the build system.

In order to support tools that need to extract the server
version, a new file that (only) contains the server version,
called VERSION, is introduced. The file contents are human
and machine-readable. The format is:

MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=8
MYSQL_VERSION_EXTRA=-rc

The CMake based version extraction in cmake/mysql_version.cmake
is changed to extract the version from this file. The configure
to CMake wrapper is retained for backwards compatibility and to
support the BUILD/ scripts. Also, a new a makefile target
show-dist-name that prints the server version is introduced.

VERSION:
  Add top-level version file.
cmake/mysql_version.cmake:
  Get version information from the top-level VERSION file.
  Do not cache the version components (MAJOR_VERSION, etc).
  Add MYSQL_RPM_VERSION as a replacement for MYSQL_U_SCORE_VERSION.
2010-11-20 12:47:50 -02:00
Vladislav Vaintroub
4180ba3d6e avoid useless system check on Windows 2010-11-20 00:56:07 +01:00
Vladislav Vaintroub
861971428b Bug#58313: CMake stops with VS Express if -DBUILD_CONFIG=mysql_release.cmake
Bug : -DBUILD_CONFIG=mysql_release sets SIGNCODE parameter which requires 
singtool.exe (part of Windows SDK)  in order to be able to sign the binaries (
only if valid certificate is found). However singtool is not a part of the SDK shipped
with Visual Studio Express, so the build fails claiming missing singtools.exe

Fix: Do not  use SIGNCODE  wiith VC Express.

Also, fix broken nmake build (*.rc files could not be compiled due to ADD_DEFINITIONS
contaning C/C++ compiler specific flags)
2010-11-20 00:20:18 +01:00
Sunanda Menon
92db6e9af9 Bug #58227 improve error message "aio is required on Linux" 2010-11-19 10:34:22 +01:00
Vladislav Vaintroub
bd15ec0086 Bug#58272: -DBUILD_CONFIG=mysql_release is broken with cmake 2.8.3
The reason  for the bug is that :
-  we use system checks in cmake/os/mysql_release.cmake 
-  we include cmake/os/mysql_release.cmake using CMAKE_USER_MAKE_RULES_OVERRIDE 
-  this  (having system checks based on TRY_COMPILE inside file pointed by 
   CMAKE_USER_MAKE_RULES_OVERRIDE  does not work with cmake 2.8.3,
   and  according to Kitware was never meant to work, it just happened to work by accident
   until 2.8.2 release (though, it seems not to work wiith 2.6.0 either)

Related CMake bug discussing the situation:
http://public.kitware.com/Bug/view.php?id=11469  

The fix is to use INCLUDE instead of CMAKE_USER_MAKE_RULES_OVERRIDE as suggested
by Kitware. The downside is that compile flags are not in cache, but this is  pure cosmetics.
The functionality is the same,  flags are used for compiling are correct using INCLUDE.
2010-11-17 22:06:24 +01:00
Magnus Blåudd
31e30ee326 Bug#58158 LINK_LIBRARIES for MYSQL_ADD_PLUGIN is not added to libmysqld
- Add ARG_LINK_LIBRARIES to MYSQLD_STATIC_PLUGIN_LIBS in
    MYSQL_ADD_PLUGIN so that any libraries listed by the plugin is
    added to libmysqld
  - remove the variables NDB_CLIENT_LIBS and NDB_CLUSTER_INCLUDES
    from libmysqld/CMakeLists.txt since those are just old remnants
2010-11-16 10:05:54 +01:00
Vladislav Vaintroub
f0c2b9c5c6 add missing COMPONENT to all CMake INSTALL commands 2010-11-13 23:16:52 +01:00
Vladislav Vaintroub
36fffdeaa2 Bug#58074: ADD_VERSION_INFO cmake/mysql_version.cmake fails if LINK_FLAGS are modified
Backport version info handling  (Windows-specific) from next-mr. 
Instead of adding ".res" object as linker flag, add  resource file (.rc) file to the source list.
This is more obvious and less error prone method.
2010-11-12 13:42:50 +01:00
Vladislav Vaintroub
e1837cc0d8 Bug #52275 CMake configure wrapper does not handle
--with-comment correctly
      
Properly convert --with-comment
do not uppercase it, quote as it might contain spaces.
2010-11-12 02:33:19 +01:00
Vladislav Vaintroub
2e2f3b1fc1 Fix typo : SVR5=>SVR4 2010-11-10 20:10:04 +01:00
Joerg Bruehe
6f01f9c5ac Fix cmake's version string handling (change proposed by Jonathan Perkin).
Before this, a text suffix (like "-rc") after the numeric version was needed.
2010-11-02 19:52:56 +01:00
Davi Arnaut
9129cb184b GCC's link option only take a single hyphen. 2010-10-20 19:25:28 -02:00
Jonathan Perkin
50ca4bc155 Fix typo, allow SVR4 packages to be built again. 2010-10-14 16:57:16 +01:00
Davi Arnaut
215e967ace Use a guard macro to prevent the inclusion of system headers
when checking the ABI with the C Preprocessor. Also, add the
new hearders to the cmake based ABI check.

cmake/abi_check.cmake:
  Add headers which were added to the autotools ABI check.
  Remove trailing spaces.
include/mysql/client_plugin.h:
  Guard the inclusion of system headers.
2010-10-13 12:11:29 -03:00
Vladislav Vaintroub
10bc97de5c Do not accept invalid INSTALL_LAYOUT parameter 2010-10-11 19:44:35 +02:00
Davi Arnaut
c192be206a Bug#42733: Type-punning warnings when compiling MySQL -- strict aliasing violations.
Due to the extent of aliasing violations in the MySQL source
code, at this time it is safer to disable strict aliasing related
optimizations in release builds.

As of this patch, only GCC enables strict aliasing by default.
Hence, use the -fno-strict-aliasing option to disable the
aliasing rules.

cmake/build_configurations/mysql_release.cmake:
  Add -fno-strict-aliasing to release builds.
2010-10-08 10:30:58 -03:00
Vladislav Vaintroub
a1fe23668f Fix compile error on Windows after WL#1054 push.
The error was introduced by typo in variable name (errormsg instead of correct
errmsg)

- Also, precache  HAVE_PEERCRED to OFF in cmake\os\WindowsCache.cmake
(to avoid useless system check).
- Also, add missing check for errors from FormatMessage().

- Also, remove annoying CMake debug printout of MALLOC_LIB if this is not set.
2010-10-04 21:25:53 +02:00
Vladislav Vaintroub
36081eed3d Rename CMAKE_PARSE_ARGUMENTS macro to avoid name collision
with CMake 2.8.3 builtin macro
2010-09-29 11:42:35 +02:00
Mats Kindahl
c4913bc3aa Bug #55966: "plugin" tests fail in 5.5
On Solaris with version 3.4.6, the ha_example.so shared library is built
with DTrace and the server is built without DTrace support. This occurs
because dtrace.cmake disables DTrace support for 3.4.6, but still set
HAVE_DTRACE, which causes probes_mysql.h to include probes_mysql_dtrace.h
instead of probes_mysql_nodtrace.h.

This patch fixes this by not setting HAVE_DTRACE on Solaris for GCC 3.4.6.
2010-09-06 14:45:12 +02:00
Sergey Vojtovich
8c05b08550 BUG#52821 - plugin_ftparser.h and plugin_audit.h are
not tested by ABI check

plugin_audit.h and plugin_ftparser.h are now subject
for ABI check. plugin.h is now tested implicitly.

Also fixed broken ABI check cmake rules.

Makefile.am:
  plugin_audit.h and plugin_ftparser.h are now subject
  for ABI check. plugin.h is now tested implicitly.
cmake/abi_check.cmake:
  plugin_audit.h and plugin_ftparser.h are now subject
  for ABI check. plugin.h is now tested implicitly.
  
  Also fixed broken ABI check rules: -DMYSQL_ABI_CHECK is
  compiler (not cmake) definition, incorrect definitions
  were passed to do_abi_check.cmake for abi_check_all rule.
cmake/do_abi_check.cmake:
  Inform sources that we do ABI check.
include/mysql/plugin.h.pp:
  plugin.h is now tested implicitly.
include/mysql/plugin_audit.h.pp:
  plugin_audit.h is now subject for ABI check.
include/mysql/plugin_ftparser.h.pp:
  plugin_ftparser.h is now subject for ABI check.
2010-08-27 10:45:35 +04:00
Davi Arnaut
76382d2746 Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Post-merge fix: remove --with-debug=full, it was only used for safemalloc.

BUILD/compile-pentium-mysqlfs-debug:
  Remove build script for a feature that is long gone.
2010-08-06 09:59:38 -03:00
Vladislav Vaintroub
b94d86215d Build cleanups
- Simplify sql-bench installation, 
do not try to resolve names : this leads to probem
if builddir is symlink located on different filesystem.
(reported by alik)

- Make WITHOUT_XXX (disabling plugin) work for DEFAULT
plugins. Prior to the patch is behaved just like 
MANDATORY.

- LINK_LIBRARIES in MYSQL_ADD_PLUGIN had no effect for
statically linked plugins.

- Fix constant rebuild of initdb target on Windows.
2010-08-05 18:38:24 +02:00
Alexander Nozdrin
32f3ab7933 Auto-merge from mysql-trunk-merge. 2010-07-29 16:32:11 +04:00
Vladislav Vaintroub
568c26631c Cleanup after bild team push.
* Fixed obvious errors (HAVE_BROKEN_PREAD is not true for on any
of systems we use, definitely not on HPUX)

* Remove other junk flags for OSX and HPUX

* Avoid checking type sizes in universal builds on OSX, again 
(CMake2.8.0 fails is different architectures return different results)

* Do not compile template instantiation stuff unless 
EXPLICIT_TEMPLATE_INSTANTIATION is used.

* Some cleanup (make gen_lex_hash simpler, avoid dependencies)

* Exclude some unused files from compilation (strtol.c etc)
2010-07-25 19:30:18 +02:00
Alexander Nozdrin
ab3d1c0d31 Auto-merge from mysql-trunk. 2010-07-23 17:06:26 +04:00
Davi Arnaut
7f87c8f099 Bug#52514: mysql 5.1 do_abi_check does not compile w/ gcc4.5
due to GCC preprocessor change
      
Addendum for trunk: add -DMYSQL_ABI_CHECK to the cmake ABI check.
2010-07-20 16:53:39 -03:00
Jonathan Perkin
74d6731682 Revert the ndb removal for now. 2010-07-20 10:35:55 +01:00
Jonathan Perkin
967ee2c65c bug#55250: 5.5.5-m3 incorrectly compiled with exceptions on Solaris/x86
Put '-features=no%except' back into Solaris/x86 CXXFLAGS.
2010-07-19 15:23:02 +01:00
Alexander Nozdrin
b5eac2b2ce Manual merge from mysql-trunk.
Conflicts:
  - scripts/CMakeLists.txt
2010-07-19 18:00:29 +04:00
Davi Arnaut
711c318c07 Merge of mysql-trunk-bugfixing into mysql-trunk-merge. 2010-07-15 10:47:50 -03:00
Davi Arnaut
03ff26c759 Remove leftovers from old versions of the code. 2010-07-13 14:34:32 -03:00
Davi Arnaut
47a4a88160 Add the cmake option MYSQL_MAINTAINER_MODE which is equivalent
to the autotools option mysql-maintainer-mode. This option is
intended to set a few flags that should be activated by anyone
doing MySQL development, regardless of the build type. Also, the
flags are only set by the very end of the platform checks as
to not disturb fragile checks.
2010-07-12 13:39:00 -03:00
Jonathan Perkin
7515fe4deb Spell CMAKE_COMPILER_IS_GNUCC correctly. 2010-07-06 11:28:11 +01:00
Jonathan Perkin
c687600f79 I'm pretty sure 'CXX_FLAGS' is a typo for 'CMAKE_CXX_FLAGS', and
this is the reason why -fno-implicit-templates is removed from the
entire build when sourcing this file, rather than just limited to
yassl sources.
2010-07-05 19:54:07 +01:00
Jonathan Perkin
d72b3dc40d Remove flags which have already been defined in configure.cmake.
Add a note to investigate -felide-constructors usage on OSX.
2010-07-05 19:34:38 +01:00
Jonathan Perkin
cfb2379036 Fix typo in previous. 2010-07-05 17:19:59 +01:00
Jonathan Perkin
c14e08401a kent's recent changes to this file resulted in flag loss due to
the way cmake parses, in particular CMAKE_SIZEOF_VOID_P was
uninitialized during the first parse, and the bad values were
cached.

Pull in SIZEOF_VOIDP macro from package_name.cmake, define some
useful variables, and clean up the file a bit with explicit
definitions, to hopefully avoid this problem in the future.
2010-07-05 15:46:51 +01:00
Davi Arnaut
54a5c00de9 Unset the execute bit where it's not needed. 2010-07-03 20:17:03 -03:00
Davi Arnaut
5641fb64b4 Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-02 16:38:04 -03:00
Jonathan Perkin
d8621f8924 Fix icc/icpc flags. 2010-07-02 14:02:50 +01:00
Jonathan Perkin
38954b526b Don't cache {C,CXX} flags, this file is parsed twice, the first time
CMAKE_SIZEOF_VOID_P is unset so the variables are set incorrectly.
2010-07-02 13:28:17 +01:00
Jonathan Perkin
4c626c0588 Fix syntax error (missing quote). 2010-07-01 14:55:52 +01:00
Vladislav Vaintroub
1134fe2fdb Bug #52850: mysqld-debug.pdb doesn't match
mysqld-debug.exe in 5.5.3 on windows

Fix:

- Do not rename PDB, install mysqld.pdb matching 
mysqld-debug.exe into bin\debug subdirectory

- Stack tracing code will now additionally look in 
debug subdirectory of the application directory 
for debug symbols.

- Small cleanup in stacktracing code: link with 
dbghelp rather than load functions dynamically 
at runtime, since dbghelp.dll is always present.

- Install debug binaries with WiX

cmake/install_macros.cmake:
  Add optional COMPONENT and PDB_DESTINATION 
  to INSTALL_DEBUG_TARGET
mysys/stacktrace.c:
  If binary is build with DBUG, also look in debug subdirectory
  of  executable directory. Packaging will put some PDBs there
  (e.g bin\mysqld-debug.exe will have corresponding pdb in 
  bin\debug)
  
  Also some cleanup: do not load dbghelp dynamically, instead
  link with it. dbghelp is present on all Windows starting with 
  XP.
packaging/WiX/CPackWixConfig.cmake:
  Install debug binaries
sql/CMakeLists.txt:
  Do not rename PDB for mysqld-debug.exe, install it in debug subdirectory
2010-06-30 14:10:29 +02:00
Jonathan Perkin
0699a98413 Fix previous 2010-06-25 16:16:46 +01:00
Jonathan Perkin
5dd1d5c2b4 Update ICC flags to avoid deprecated options. 2010-06-25 15:01:18 +01:00
Jonathan Perkin
654637d463 Ensure aio is available on Linux. 2010-06-25 11:02:39 +01:00
Joerg Bruehe
1e37ae0ea2 Automerge the bug fix 54739 into the 5.5.5-m3 release clone. 2010-06-24 13:02:50 +02:00
Joerg Bruehe
a5d9e0e0c4 Merge bug fix. 2010-06-23 16:32:03 +02:00
Joerg Bruehe
33173fbe82 Fix Bug #54739
Accidental change in compile-time definitions for FreeBSD


Revert the accidental setting of "HAVE_BROKEN_REALPATH"
on current versions of FreeBSD,

do it for both autotools ("configure.in")
and cmake ("cmake/os/FreeBSD.cmake").
2010-06-23 16:19:19 +02:00
Jonathan Perkin
f84c866c5c Remove storage/ndb from dist sources. 2010-06-23 13:36:19 +01:00
Kent Boortz
fb583cfaea CMakeLists.txt
cmake/build_configurations/mysql_release.cmake
 - Corrected spelling ENABLE_LOCAL_INFILE => ENABLED_LOCAL_INFILE
 - In addition to "RelWithDebInfo", set target "Release" and "Debug"
 - Set Debug flags
 - Enabled SSL on Mac OS X
 - For gcc builds, set RELEASE and DEBUG flags as well
 - For g++ builds, added "-fno-implicit-templates"
 - Use "-O" (gcc -O1) for optimized binaries, as "DEBUG" in out case
   is more about enabling trace support to the server, no optimization
   makes binaries too slow to be practical to reproduce problems

cmake/os/WindowsCache.cmake
 - Removed unused HAVE_SYS_IOCTL

config.h.cmake
 - Added header checks and missing defines
 - Removed unused HAVE_SYS_IOCTL
 - Grouped and uncommented some HAVE_* that are really not
   defines, but internal variables used in the CMake setup,
 - Added hard coded flags for HP-UX and Mac OS X

configure.cmake
 - Added header checks and missing defines
 - Removed unused HAVE_SYS_IOCTL
 - "sys/dir.h" test needs "sys/types.h"
 - Corrected syntax for "sys/ptem.h" test
 - Don't exclude test for some types if Mac OS X, harmless
   to do the test and we want the HAVE_<type> settings
 - Added hard coded flags for HP-UX and Mac OS X

extra/yassl/CMakeLists.txt
extra/yassl/taocrypt/CMakeLists.txt
 - Added missing source file "template_instnt.cpp"
2010-06-23 12:56:22 +02:00