diff options
author | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2006-12-28 09:42:04 +0400 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2006-12-28 09:42:04 +0400 |
commit | 333b2684af77673c9019748865c2967226de678e (patch) | |
tree | 98d5ea35a1c1b4733dc237d98ddba348ece8c639 | |
parent | 1aa1efdbd3cae8c9bc0524c92dda4c8084ec5b7c (diff) | |
download | mariadb-git-333b2684af77673c9019748865c2967226de678e.tar.gz |
WL#3630 (add embedded server to pushbuild)
5.1-related fixes
libmysqld/Makefile.am fixed to recompile and link ha_*.cc files that
keep dependance on THD structure.
Minor fixes to make tests working.
config/ac-macros/plugins.m4:
condition_dependent_plugin_objects added
libmysqld/Makefile.am:
rules for ha_*.o files added
condition_dependent_plugin_objects sent to linker
libmysqld/lib_sql.cc:
ddl_log initialization added
mysql-test/r/flush_block_commit_notembedded.result:
result fixed
mysql-test/t/crash_commit_before.test:
doesn't work in embedded server
mysql-test/t/csv.test:
replace_result added
mysql-test/t/ps.test:
doesn't work in embedded server
should be fixed by separating ps_notembedded.test
mysql-test/t/ps_1general.test:
replace_result fixed
mysql-test/t/ps_not_windows.test:
doesn't work in embedded server
mysql-test/t/trigger.test:
replace_result fixed
sql/sql_insert.cc:
#ifdef HAVE_ROW_BASED_REPLICATION added
storage/myisam/ha_myisam.cc:
MY_UNPACK_FILENAME flag added
-rw-r--r-- | config/ac-macros/plugins.m4 | 2 | ||||
-rw-r--r-- | libmysqld/Makefile.am | 28 | ||||
-rw-r--r-- | libmysqld/lib_sql.cc | 2 | ||||
-rw-r--r-- | mysql-test/r/flush_block_commit_notembedded.result | 6 | ||||
-rw-r--r-- | mysql-test/t/crash_commit_before.test | 1 | ||||
-rw-r--r-- | mysql-test/t/csv.test | 1 | ||||
-rw-r--r-- | mysql-test/t/ps.test | 1 | ||||
-rw-r--r-- | mysql-test/t/ps_1general.test | 2 | ||||
-rw-r--r-- | mysql-test/t/ps_not_windows.test | 1 | ||||
-rw-r--r-- | mysql-test/t/trigger.test | 2 | ||||
-rw-r--r-- | sql/sql_insert.cc | 2 | ||||
-rw-r--r-- | storage/myisam/ha_myisam.cc | 6 |
12 files changed, 43 insertions, 11 deletions
diff --git a/config/ac-macros/plugins.m4 b/config/ac-macros/plugins.m4 index b022ab67045..48754563992 100644 --- a/config/ac-macros/plugins.m4 +++ b/config/ac-macros/plugins.m4 @@ -306,6 +306,7 @@ AC_DEFUN([MYSQL_CONFIGURE_PLUGINS],[ AC_SUBST([mysql_se_unittest_dirs]) AC_SUBST([mysql_pg_unittest_dirs]) AC_SUBST([condition_dependent_plugin_modules]) + AC_SUBST([condition_dependent_plugin_objects]) AC_SUBST([condition_dependent_plugin_links]) AC_SUBST([condition_dependent_plugin_includes]) ]) @@ -431,6 +432,7 @@ dnl Although this is "pretty", it breaks libmysqld build AC_MSG_RESULT([yes]) m4_ifdef([$11],[ condition_dependent_plugin_modules="$condition_dependent_plugin_modules m4_bregexp($11, [[^/]+$], [\&])" + condition_dependent_plugin_objects="$condition_dependent_plugin_objects m4_bregexp($11, [[^/]+\.], [\&o])" condition_dependent_plugin_links="$condition_dependent_plugin_links $6/$11" condition_dependent_plugin_includes="$condition_dependent_plugin_includes -I[\$(top_srcdir)]/$6/m4_bregexp($11, [^.+[/$]], [\&])" ]) diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index cf4f90d99c9..2008b0e66a2 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -79,6 +79,7 @@ libmysqld_a_SOURCES= sqlstoragesources = $(EXTRA_libmysqld_a_SOURCES) storagesources = @condition_dependent_plugin_modules@ +storageobjects = @condition_dependent_plugin_objects@ storagesourceslinks = @condition_dependent_plugin_links@ # automake misses these @@ -109,6 +110,24 @@ ha_ndbcluster_binlog.o: ha_ndbcluster_binlog.cc handler.o: handler.cc $(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $< +# We need rules to compile these as no good way +# found to append fileslists that collected by configure +# to the sources list + +ha_federated.o:ha_federated.cc + $(CXXCOMPILE) $(LM_CFLAGS) -c $< + +ha_heap.o:ha_heap.cc + $(CXXCOMPILE) $(LM_CFLAGS) -c $< + +ha_innodb.o:ha_innodb.cc + $(CXXCOMPILE) $(LM_CFLAGS) -c $< + +ha_myisam.o:ha_myisam.cc + $(CXXCOMPILE) $(LM_CFLAGS) -c $< + +ha_myisammrg.o:ha_myisammrg.cc + $(CXXCOMPILE) $(LM_CFLAGS) -c $< # # To make it easy for the end user to use the embedded library we @@ -120,18 +139,18 @@ handler.o: handler.cc # need to add the same file twice to the library, so 'sort -u' save us # some time and spares unnecessary work. -libmysqld.a: libmysqld_int.a $(INC_LIB) $(libmysqld_a_DEPENDENCIES) +libmysqld.a: libmysqld_int.a $(INC_LIB) $(libmysqld_a_DEPENDENCIES) $(storageobjects) if DARWIN_MWCC - mwld -lib -o $@ libmysqld_int.a `echo $(INC_LIB) | sort -u` + mwld -lib -o $@ libmysqld_int.a `echo $(INC_LIB) | sort -u` $(storageobjects) else -rm -f libmysqld.a if test "$(host_os)" = "netware" ; \ then \ - $(libmysqld_a_AR) libmysqld.a libmysqld_int.a $(INC_LIB) ; \ + $(libmysqld_a_AR) libmysqld.a $(INC_LIB) libmysqld_int.a $(storageobjects); \ else \ current_dir=`pwd`; \ rm -rf tmp; mkdir tmp; \ - (for arc in ./libmysqld_int.a $(INC_LIB); do \ + (for arc in $(INC_LIB) ./libmysqld_int.a; do \ arpath=`echo $$arc|sed 's|[^/]*$$||'|sed 's|\.libs/$$||'`; \ artmp=`echo $$arc|sed 's|^.*/|tmp/lib-|'`; \ for F in `$(AR) t $$arc | grep -v SYMDEF`; do \ @@ -142,6 +161,7 @@ else ls $$artmp/* | grep -v SYMDEF; \ continue 2; fi; done; \ done; echo $(libmysqld_a_DEPENDENCIES) ) | sort -u | xargs $(AR) cq libmysqld.a ; \ + $(AR) r libmysqld.a $(storageobjects); \ $(RANLIB) libmysqld.a ; \ rm -rf tmp; \ fi diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 1901477b20e..b339cb5521b 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -542,6 +542,7 @@ int init_embedded_server(int argc, char **argv, char **groups) } } + execute_ddl_log_recovery(); return 0; } @@ -549,6 +550,7 @@ void end_embedded_server() { my_free((char*) copy_arguments_ptr, MYF(MY_ALLOW_ZERO_PTR)); copy_arguments_ptr=0; + release_ddl_log(); clean_up(0); } diff --git a/mysql-test/r/flush_block_commit_notembedded.result b/mysql-test/r/flush_block_commit_notembedded.result index 09c1bcafafe..1d045b21763 100644 --- a/mysql-test/r/flush_block_commit_notembedded.result +++ b/mysql-test/r/flush_block_commit_notembedded.result @@ -5,11 +5,11 @@ insert t1 values (1); flush tables with read lock; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 98 - commit; +master-bin.000001 102 +commit; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 98 +master-bin.000001 102 unlock tables; drop table t1; set autocommit=1; diff --git a/mysql-test/t/crash_commit_before.test b/mysql-test/t/crash_commit_before.test index 757817915dd..5a91cd7a7ad 100644 --- a/mysql-test/t/crash_commit_before.test +++ b/mysql-test/t/crash_commit_before.test @@ -1,3 +1,4 @@ +-- source include/not_embedded.inc # Don't test this under valgrind, memory leaks will occur --source include/not_valgrind.inc diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test index 60d38394fc0..22e533e2655 100644 --- a/mysql-test/t/csv.test +++ b/mysql-test/t/csv.test @@ -1575,6 +1575,7 @@ create table bug15205 (val int(11) default null) engine=csv; create table bug15205_2 (val int(11) default null) engine=csv; --exec rm $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV # system error (can't open the datafile) +--replace_result $MYSQLTEST_VARDIR . master-data/ '' --error 13 select * from bug15205; select * from bug15205_2; diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 0e96a7aad10..fc6038b4838 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -1,3 +1,4 @@ +-- source include/not_embedded.inc # # SQL Syntax for Prepared Statements test # diff --git a/mysql-test/t/ps_1general.test b/mysql-test/t/ps_1general.test index 4c0f411c758..dd70f7edfa7 100644 --- a/mysql-test/t/ps_1general.test +++ b/mysql-test/t/ps_1general.test @@ -579,7 +579,7 @@ prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ; create table t5 (a int) ; # rename must fail, t7 does not exist # Clean up the filename here because embedded server reports whole path ---replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ / t7.frm t7 +--replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ "" t7.frm t7 --error 1017 execute stmt1 ; create table t7 (a int) ; diff --git a/mysql-test/t/ps_not_windows.test b/mysql-test/t/ps_not_windows.test index 0d97df96285..d66d5dccbeb 100644 --- a/mysql-test/t/ps_not_windows.test +++ b/mysql-test/t/ps_not_windows.test @@ -1,3 +1,4 @@ +-- source include/not_embedded.inc # Non-windows specific ps tests. --source include/not_windows.inc diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test index 93bd7815e01..916a85ec424 100644 --- a/mysql-test/t/trigger.test +++ b/mysql-test/t/trigger.test @@ -1140,7 +1140,7 @@ select trigger_schema, trigger_name, event_object_schema, # Trick which makes update of second .TRN file impossible system echo dummy >$MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~; system chmod 000 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~; ---replace_result $MYSQLTEST_VARDIR . master-data/ '' +--replace_result $MYSQLTEST_VARDIR . master-data// '' --error 1 rename table t1 to t2; # 't1' should be still there and triggers should work correctly diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 191fc60dfd5..d12dba503c4 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2928,7 +2928,9 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, save us from that ? */ table->reginfo.lock_type=TL_WRITE; +#ifdef HAVE_ROW_BASED_REPLICATION hooks->prelock(&table, 1); // Call prelock hooks +#endif if (! ((*lock)= mysql_lock_tables(thd, &table, 1, MYSQL_LOCK_IGNORE_FLUSH, ¬_used))) { diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index f407f62fa0c..fc0fcdbdc9f 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -1370,10 +1370,12 @@ int ha_myisam::info(uint flag) if table is symlinked (Ie; Real name is not same as generated name) */ data_file_name= index_file_name= 0; - fn_format(name_buff, file->filename, "", MI_NAME_DEXT, MY_APPEND_EXT); + fn_format(name_buff, file->filename, "", MI_NAME_DEXT, + MY_APPEND_EXT | MY_UNPACK_FILENAME); if (strcmp(name_buff, info.data_file_name)) data_file_name=info.data_file_name; - fn_format(name_buff, file->filename, "", MI_NAME_IEXT, MY_APPEND_EXT); + fn_format(name_buff, file->filename, "", MI_NAME_IEXT, + MY_APPEND_EXT | MY_UNPACK_FILENAME); if (strcmp(name_buff, info.index_file_name)) index_file_name=info.index_file_name; } |