groks avatar groks committed 0fae5f9

Add test for matching column name and table

Comments (0)

Files changed (1)

         create table test (
             a integer not null,
             b varchar not null,
-			c bytea
+            c bytea,
+            test varchar
         )
     }
-    dbi_dml {insert into test values (1, 'x')}
-    dbi_dml {insert into test values (2, 'y')}
+    dbi_dml {insert into test (a, b, test) values (1, 'x', 'test1')}
+    dbi_dml {insert into test (a, b, test) values (2, 'y', 'test2')}
 
 } err]} {
     ns_log error $err
     dbi_rows {select NULL, NULL, NULL}
 } -result {{} {} {}}
 
+test rows-8 {column name matches table name bug} -constraints table -body {
+    dbi_rows {select a, test from test} {$a $test }
+} -result {1 test1 2 test2 }
+
 
 
 test 1row-1 {expect 1 row} -constraints table -body {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.