@@ -648,7 +648,33 @@ public void InsertLargeBlobSync(string column, int size)
648648 [ InlineData ( "Timestamp" , "datatypes_times" , 26 , typeof ( DateTime ) , "N" , 0 , 6 ) ]
649649 [ InlineData ( "Time" , "datatypes_times" , 17 , typeof ( TimeSpan ) , "N" , 0 , 6 ) ]
650650 [ InlineData ( "Year" , "datatypes_times" , 4 , typeof ( int ) , "N" , 0 , 0 ) ]
651- public void GetSchemaTable ( string column , string table , int columnSize , Type dataType , string flags , int precision , int scale )
651+ public void GetSchemaTable ( string column , string table , int columnSize , Type dataType , string flags , int precision , int scale ) =>
652+ DoGetSchemaTable ( column , table , columnSize , dataType , flags , precision , scale ) ;
653+
654+ [ Theory ]
655+ [ InlineData ( "`decimal-type` decimal(10,0) NOT NULL" , "decimal-type" , 11 , typeof ( decimal ) , "" , 10 , 0
656+ #if BASELINE
657+ , Skip = "https://bugs.mysql.com/bug.php?id=88058"
658+ #endif
659+ ) ]
660+ [ InlineData ( "`decimal-type` decimal(10,1) NOT NULL" , "decimal-type" , 12 , typeof ( decimal ) , "" , 10 , 1 ) ]
661+ [ InlineData ( "`decimal-type` decimal(10,0) UNSIGNED NOT NULL" , "decimal-type" , 10 , typeof ( decimal ) , "" , 10 , 0
662+ #if BASELINE
663+ , Skip = "https://bugs.mysql.com/bug.php?id=88058"
664+ #endif
665+ ) ]
666+ [ InlineData ( "`decimal-type` decimal(10,1) UNSIGNED NOT NULL" , "decimal-type" , 11 , typeof ( decimal ) , "" , 10 , 1 ) ]
667+ [ InlineData ( "`decimal-type` decimal(65,30) NOT NULL" , "decimal-type" , 67 , typeof ( decimal ) , "" , 65 , 30 ) ]
668+ [ InlineData ( "`decimal-type` decimal(1,1) NOT NULL" , "decimal-type" , 3 , typeof ( decimal ) , "" , 1 , 1 ) ]
669+ public void GetSchemaTableForNewColumn ( string createColumn , string column , int columnSize , Type dataType , string flags , int precision , int scale )
670+ {
671+ m_database . Connection . Execute ( $@ "drop table if exists schema_table;
672+ create table schema_table({ createColumn } );" ) ;
673+
674+ DoGetSchemaTable ( column , "schema_table" , columnSize , dataType , flags , precision , scale ) ;
675+ }
676+
677+ private void DoGetSchemaTable ( string column , string table , int columnSize , Type dataType , string flags , int precision , int scale )
652678 {
653679 if ( table == "datatypes_json_core" && ! AppConfig . SupportsJson )
654680 return ;
0 commit comments