go-randgen
go-randgen copied to clipboard
_field selects non-existing columns in a table
t2 doesn't have an a column, but ais selected in the generated SQLs:
mysql> desc t1;
+-------+---------+------+------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+------+---------+-------+
| a | int(11) | YES | | NULL | |
+-------+---------+------+------+---------+-------+
1 row in set (0.00 sec)
mysql> desc t2;
+-------+---------+------+------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+------+---------+-------+
| b | int(11) | YES | | NULL | |
+-------+---------+------+------+---------+-------+
1 row in set (0.00 sec)
--- SELECT `a` FROM t2; // wrong
--- SELECT `a` FROM t1 WHERE `a` > 7; // correct
Could you please attach your yy and zz file?
I think the reason was the same as in #25. It assumes t2 has the same scheme as t1.