aboutsummaryrefslogtreecommitdiff
path: root/mssql
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-10-05 10:58:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-10-05 10:58:38 +0200
commiteb20ad512d29475ebf81ae43bca362d40ab3fba2 (patch)
tree87078786e5d842e30e0d890062f4ed67b3c45272 /mssql
parent0bcac7dde58c0538b9d06f866a0ebd3d60d4001d (diff)
Fix bug in short national char data querying
Diffstat (limited to 'mssql')
-rw-r--r--mssql/types/driver.cxx31
1 files changed, 31 insertions, 0 deletions
diff --git a/mssql/types/driver.cxx b/mssql/types/driver.cxx
index 3f5577f..cd5523d 100644
--- a/mssql/types/driver.cxx
+++ b/mssql/types/driver.cxx
@@ -127,6 +127,37 @@ main (int argc, char* argv[])
assert (o == *o1);
}
+
+ // Test short/long data in queries.
+ //
+ typedef odb::query<object> query;
+ typedef odb::result<object> result;
+
+ {
+ transaction t (db->begin ());
+
+ {
+ result r (db->query<object> (query::svchar == o.svchar_));
+ assert (size (r) == 1);
+ }
+
+ {
+ result r (db->query<object> (query::snvchar == o.snvchar_));
+ assert (size (r) == 1);
+ }
+
+ {
+ result r (db->query<object> (query::mvchar == o.mvchar_));
+ assert (size (r) == 1);
+ }
+
+ {
+ result r (db->query<object> (query::mnvchar == o.mnvchar_));
+ assert (size (r) == 1);
+ }
+
+ t.commit ();
+ }
}
// Test long NULL data.