@@ -246,7 +246,54 @@ var fixtures = map[string]sql.Node{
246246 }}),
247247 []string {"col1" , "col2" },
248248 ),
249- `SHOW TABLES` : plan .NewShowTables (sql .UnresolvedDatabase ("" )),
249+ `SHOW TABLES` : plan .NewShowTables (sql .UnresolvedDatabase ("" ), false ),
250+ `SHOW FULL TABLES` : plan .NewShowTables (sql .UnresolvedDatabase ("" ), true ),
251+ `SHOW TABLES FROM foo` : plan .NewShowTables (sql .UnresolvedDatabase ("foo" ), false ),
252+ `SHOW TABLES IN foo` : plan .NewShowTables (sql .UnresolvedDatabase ("foo" ), false ),
253+ `SHOW FULL TABLES FROM foo` : plan .NewShowTables (sql .UnresolvedDatabase ("foo" ), true ),
254+ `SHOW FULL TABLES IN foo` : plan .NewShowTables (sql .UnresolvedDatabase ("foo" ), true ),
255+ `SHOW TABLES LIKE 'foo'` : plan .NewFilter (
256+ expression .NewLike (
257+ expression .NewUnresolvedColumn ("Table" ),
258+ expression .NewLiteral ("foo" , sql .Text ),
259+ ),
260+ plan .NewShowTables (sql .UnresolvedDatabase ("" ), false ),
261+ ),
262+ "SHOW TABLES WHERE `Table` = 'foo'" : plan .NewFilter (
263+ expression .NewEquals (
264+ expression .NewUnresolvedColumn ("Table" ),
265+ expression .NewLiteral ("foo" , sql .Text ),
266+ ),
267+ plan .NewShowTables (sql .UnresolvedDatabase ("" ), false ),
268+ ),
269+ `SHOW FULL TABLES LIKE 'foo'` : plan .NewFilter (
270+ expression .NewLike (
271+ expression .NewUnresolvedColumn ("Table" ),
272+ expression .NewLiteral ("foo" , sql .Text ),
273+ ),
274+ plan .NewShowTables (sql .UnresolvedDatabase ("" ), true ),
275+ ),
276+ "SHOW FULL TABLES WHERE `Table` = 'foo'" : plan .NewFilter (
277+ expression .NewEquals (
278+ expression .NewUnresolvedColumn ("Table" ),
279+ expression .NewLiteral ("foo" , sql .Text ),
280+ ),
281+ plan .NewShowTables (sql .UnresolvedDatabase ("" ), true ),
282+ ),
283+ `SHOW FULL TABLES FROM bar LIKE 'foo'` : plan .NewFilter (
284+ expression .NewLike (
285+ expression .NewUnresolvedColumn ("Table" ),
286+ expression .NewLiteral ("foo" , sql .Text ),
287+ ),
288+ plan .NewShowTables (sql .UnresolvedDatabase ("bar" ), true ),
289+ ),
290+ "SHOW FULL TABLES FROM bar WHERE `Table` = 'foo'" : plan .NewFilter (
291+ expression .NewEquals (
292+ expression .NewUnresolvedColumn ("Table" ),
293+ expression .NewLiteral ("foo" , sql .Text ),
294+ ),
295+ plan .NewShowTables (sql .UnresolvedDatabase ("bar" ), true ),
296+ ),
250297 `SELECT DISTINCT foo, bar FROM foo;` : plan .NewDistinct (
251298 plan .NewProject (
252299 []sql.Expression {
0 commit comments