#At file:///home/og136792/mysql/shared/mysql-6.0-backup-solaris/
2645 Oystein Grovlen 2008-06-27
BUG#37660 Build error for backup on Solaris.
Implementation of Table_ref::describe was defined inline in a separate he ader file
(backup_engine.h) from the declaration of the class in api_types.h. This created problems
for files that import the declaration, but not the implementation. (Since the function is
inline it is not included in object files). To fix this, I "un-inlined" the implementation and moved it to backup/kernel.cc.
modified:
sql/backup/backup_engine.h
sql/backup/kernel.cc
per-file comments:
sql/backup/backup_engine.h
Move Table_ref functions to kernel.cc to fix linking problem on Solaris.
sql/backup/kernel.cc
Move Table_ref functions from backup_engine.h to fix linking problem on Solaris.
=== modified file 'sql/backup/backup_engine.h'
=== modified file 'sql/backup/backup_engine.h'
--- a/sql/backup/backup_engine.h 2008-05-05 15:03:24 +0000
+++ b/sql/backup/backup_engine.h 2008-06-27 12:49:06 +0000
@@ -524,28 +524,6 @@
}; // Restore_driver
-/**
- Produce string identifying the table in internal format (as used by
- storage engines).
-*/
-inline
-const char* Table_ref::internal_name(char *buf, size_t len) const
-{
- uint plen= build_table_filename(buf, len,
- db().name().ptr(), name().ptr(),
- "", /* no extension */
- 0 /* not a temporary table - do conversions */);
- buf[plen]='\0';
- return buf;
-}
-
-/// Produce human readable string identifying the table (e.g. for error reporting)
-inline
-const char* Table_ref::describe(char *buf, size_t len) const
-{
- my_snprintf(buf, len, "`%s`.`%s`", db().name().ptr(), name().ptr());
- return buf;
-}
} // backup namespace
=== modified file 'sql/backup/kernel.cc'
--- a/sql/backup/kernel.cc 2008-06-25 13:30:04 +0000
+++ b/sql/backup/kernel.cc 2008-06-27 12:49:06 +0000
@@ -1573,6 +1573,41 @@
/*************************************************
+ Implementation of Table_ref class
+
+ *************************************************/
+
+namespace backup {
+
+/**
+ Produce string identifying the table in internal format (as used by
+ storage engines).
+*/
+const char* Table_ref::internal_name(char *buf, size_t len) const
+{
+ uint plen= build_table_filename(buf, len,
+ db().name().ptr(), name().ptr(),
+ "", /* no extension */
+ 0 /* not a temporary table - do conversions */);
+ buf[plen]='\0';
+ return buf;
+}
+
+/**
+ Produce human readable string identifying the table
+ (e.g. for error reporting)
+*/
+const char* Table_ref::describe(char *buf, size_t len) const
+{
+ my_snprintf(buf, len, "`%s`.`%s`", db().name().ptr(), name().ptr());
+ return buf;
+}
+
+} // backup namespace
+
+
+/*************************************************
+
Helper functions
*************************************************/