diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 8176f71f72642ba354dd973c304edf806558c792..3c689c48ea75000a54cb62df8dc16ef2a4f87eb8 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1001,7 +1001,7 @@ static void close_connections(void)
     if (tmp->vio_ok())
     {
       if (global_system_variables.log_warnings)
-        sql_print_warning(ER(ER_FORCING_CLOSE),my_progname,
+        sql_print_warning(ER_DEFAULT(ER_FORCING_CLOSE),my_progname,
                           tmp->thread_id,
                           (tmp->main_security_ctx.user ?
                            tmp->main_security_ctx.user : ""));
diff --git a/storage/archive/Makefile.am b/storage/archive/Makefile.am
index 319ed4679665db0470244668828879f10734bcaa..143d684025ef9b9f888a8e20d5e2117f7f8af9f1 100644
--- a/storage/archive/Makefile.am
+++ b/storage/archive/Makefile.am
@@ -1,4 +1,5 @@
 # Copyright (C) 2005-2006 MySQL AB
+# Copyright (C) 2009 SUN Microsystems
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -68,14 +69,23 @@ archive_reader_LDFLAGS = @NOINST_LDFLAGS@
 EXTRA_DIST =		CMakeLists.txt plug.in
 
 if HAVE_DTRACE_DASH_G
+# The object for static and dynamic linking of archive differ 
+# For static linkage of archive to mysqld 
 libarchive_a_LIBADD = probes_mysql.o
 libarchive_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers
-CLEANFILES = probes_mysql.o dtrace_files dtrace_providers
+# For archive as shared library 
+ha_archive_la_LIBADD = probes_sh_mysql.o
+ha_archive_la_DEPENDENCIES = probes_sh_mysql.o dtrace_shared_files dtrace_providers
+
+CLEANFILES = $(DTRACEPROVIDER) dtrace_files dtrace_providers dtrace_shared_files
 DTRACEFILES = libarchive_a-ha_archive.o
+DTRACESHAREDFILES = .libs/ha_archive_la-ha_archive.o
 DTRACEPROVIDER = probes_mysql.d
 
 dtrace_files:
 	echo $(DTRACEFILES) > $@
+dtrace_shared_files:
+	echo $(DTRACESHAREDFILES) > $@
 dtrace_providers: probes_mysql.d
 	echo $(DTRACEPROVIDER) > $@
 probes_mysql.d:
@@ -83,6 +93,9 @@ probes_mysql.d:
 	$(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d
 	echo timestamp > dtrace_sources
 
+probes_sh_mysql.o: $(DTRACEPROVIDER) $(DTRACESHAREDFILES)
+	$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACESHAREDFILES) -o $@
+
 probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)
 	$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
 endif