aboutsummaryrefslogtreecommitdiff
path: root/oracle
diff options
context:
space:
mode:
Diffstat (limited to 'oracle')
-rw-r--r--oracle/types/driver.cxx2
-rw-r--r--oracle/types/test.hxx8
2 files changed, 10 insertions, 0 deletions
diff --git a/oracle/types/driver.cxx b/oracle/types/driver.cxx
index b1ca3ad..554c506 100644
--- a/oracle/types/driver.cxx
+++ b/oracle/types/driver.cxx
@@ -63,6 +63,8 @@ main (int argc, char* argv[])
o.nvarchar2_ = medium_str;
o.nclob_.assign (vlong_str.data (), vlong_str.data () + vlong_str.size ());
+ o.empty_c_.push_back ("");
+
o.raw_.assign (long_str.data (), long_str.data () + long_str.size ());
o.blob_.assign (vlong_str.data (), vlong_str.data () + vlong_str.size ());
diff --git a/oracle/types/test.hxx b/oracle/types/test.hxx
index f745a1e..0543598 100644
--- a/oracle/types/test.hxx
+++ b/oracle/types/test.hxx
@@ -175,6 +175,12 @@ struct object
#pragma db type ("NVARCHAR2(512)")
std::string nvarchar2_;
+ // Oracle treats empty and NULL VARCHAR2 the same. Test that we
+ // handle this.
+ //
+ std::string empty_;
+ std::vector<std::string> empty_c_;
+
#pragma db type ("RAW(1024)")
std::vector<char> raw_;
@@ -222,6 +228,8 @@ struct object
varchar2_ == y.varchar2_ &&
nchar_ == y.nchar_ &&
nvarchar2_ == y.nvarchar2_ &&
+ empty_ == y.empty_ &&
+ empty_c_ == y.empty_c_ &&
raw_ == y.raw_ &&
blob_ == y.blob_ &&
clob_ == y.clob_ &&