diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-09-28 10:51:12 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-09-28 10:51:12 +0200 |
commit | 12aa1b18d99b51e513e9e82c0ed45717d7538ca0 (patch) | |
tree | a7e6c080dce069d7093130372954211a66e03474 /odb/relational/source.hxx | |
parent | 5e7e037dd8c593e727f5a9672a2564257194cb48 (diff) |
Make schema version access (but not modification) thread-safe
Also cache the version in statements so that we don't have to lock
the mutex (slow) every time we need to check the version.
Diffstat (limited to 'odb/relational/source.hxx')
-rw-r--r-- | odb/relational/source.hxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/odb/relational/source.hxx b/odb/relational/source.hxx index d4bc7a8..ac81bdf 100644 --- a/odb/relational/source.hxx +++ b/odb/relational/source.hxx @@ -4820,8 +4820,8 @@ namespace relational if (s.versioned || s.versioned_containers) os << "const schema_version_migration& svm (" << endl - << "esc." << m.name () << ".connection ().database ()." << - "schema_version_migration (" << schema_name << "));" + << "esc." << m.name () << ".version_migration (" << + schema_name << "));" << endl; // Load values, if any. @@ -5097,8 +5097,8 @@ namespace relational if (s.versioned || s.readwrite_versioned_containers) os << "const schema_version_migration& svm (" << endl - << "esc." << m.name () << ".connection ().database ()." << - "schema_version_migration (" << schema_name << "));" + << "esc." << m.name () << ".version_migration (" << + schema_name << "));" << endl; // Update values, if any. |