@@ -113,12 +113,23 @@ var defaultSkippedQueries = []string{
113113 "show create table fk_tbl" , // we create an extra key for the FK that vanilla gms does not
114114 "show indexes from" , // we create / expose extra indexes (for foreign keys)
115115 "show global variables like" , // we set extra variables
116+ "show columns from" , // MySQL SHOW variant with no PostgreSQL equivalent
117+ "show extended columns from" , // MySQL SHOW variant with no PostgreSQL equivalent
118+
116119 // unsupported doltgres syntax
117120 // " WITH ",
118121 // " OVER ",
119122 // string functions are broken due to incompatible types
120123 "HEX(" ,
121124 "TO_BASE64(" ,
125+ // MySQL-specific functions not supported in doltgresql
126+ "json_unquote" , // MySQL JSON function
127+ "year(" , // YEAR() functional index hits a type-incompatibility in doltgresql
128+
129+ // MySQL-specific operators and syntax not supported in PostgreSQL
130+ "<=>" , // null-safe equality (PostgreSQL uses IS NOT DISTINCT FROM)
131+ "modify column" , // MySQL ALTER TABLE MODIFY COLUMN syntax
132+ "column first" , // MySQL ADD COLUMN ... FIRST positioning
122133}
123134
124135// Setup sets the setup scripts for this DoltHarness's engine
@@ -729,6 +740,10 @@ func getDmlResult(rows pgx.Rows, query string) (sql.Row, bool) {
729740 return sql .NewRow (gmstypes .NewOkResult (0 )), true
730741 case strings .HasPrefix (tag .String (), "ALTER TABLE" ):
731742 return sql .NewRow (gmstypes .NewOkResult (0 )), true
743+ case strings .HasPrefix (tag .String (), "CREATE INDEX" ):
744+ return sql .NewRow (gmstypes .NewOkResult (0 )), true
745+ case strings .HasPrefix (tag .String (), "DROP INDEX" ):
746+ return sql .NewRow (gmstypes .NewOkResult (0 )), true
732747 case strings .HasPrefix (tag .String (), "TRUNCATE" ):
733748 return sql .NewRow (gmstypes .NewOkResult (0 )), true
734749 case strings .HasPrefix (tag .String (), "SET" ):
@@ -814,12 +829,15 @@ func unwrapResultColumn(v any) (any, error) {
814829 }
815830}
816831
832+ // IsServerBacked implements enginetest.ServerBackedEngine, marking DoltgresQueryEngine
833+ // as a server-backed engine so that plan-inspection checks (evalIndexTest, etc.) are
834+ // skipped, matching the behavior of GMS's own ServerQueryEngine.
835+ func (d * DoltgresQueryEngine ) IsServerBacked () bool { return true }
836+
817837func (d * DoltgresQueryEngine ) EngineAnalyzer () * analyzer.Analyzer {
818838 // TODO: this is a shim to get simple tests to work, we need to restructure the tests to not require access to
819839 // an analyzer
820- catalog := & analyzer.Catalog {}
821- catalog .AuthHandler = sql .GetAuthorizationHandlerFactory ().CreateHandler (catalog )
822-
840+ catalog := analyzer .NewCatalog (nil , sql.EngineOverrides {})
823841 return & analyzer.Analyzer {
824842 Catalog : catalog ,
825843 }
0 commit comments