@@ -236,7 +236,7 @@ func (d *Div) div(ctx *sql.Context, lval, rval interface{}) (interface{}, error)
236236 switch r := rval .(type ) {
237237 case float32 :
238238 if r == 0 {
239- arithmeticWarning (ctx , ERDivisionByZero , fmt . Sprintf ( "Division by 0" ) )
239+ arithmeticWarning (ctx , ERDivisionByZero , "Division by 0" )
240240 return nil , nil
241241 }
242242 return l / r , nil
@@ -245,7 +245,7 @@ func (d *Div) div(ctx *sql.Context, lval, rval interface{}) (interface{}, error)
245245 switch r := rval .(type ) {
246246 case float64 :
247247 if r == 0 {
248- arithmeticWarning (ctx , ERDivisionByZero , fmt . Sprintf ( "Division by 0" ) )
248+ arithmeticWarning (ctx , ERDivisionByZero , "Division by 0" )
249249 return nil , nil
250250 }
251251 return l / r , nil
@@ -254,7 +254,7 @@ func (d *Div) div(ctx *sql.Context, lval, rval interface{}) (interface{}, error)
254254 switch r := rval .(type ) {
255255 case decimal.Decimal :
256256 if r .Equal (decimal .NewFromInt (0 )) {
257- arithmeticWarning (ctx , ERDivisionByZero , fmt . Sprintf ( "Division by 0" ) )
257+ arithmeticWarning (ctx , ERDivisionByZero , "Division by 0" )
258258 return nil , nil
259259 }
260260
@@ -743,7 +743,7 @@ func intDiv(ctx *sql.Context, lval, rval interface{}) (interface{}, error) {
743743 switch r := rval .(type ) {
744744 case uint64 :
745745 if r == 0 {
746- arithmeticWarning (ctx , ERDivisionByZero , fmt . Sprintf ( "Division by 0" ) )
746+ arithmeticWarning (ctx , ERDivisionByZero , "Division by 0" )
747747 return nil , nil
748748 }
749749 return l / r , nil
@@ -752,7 +752,7 @@ func intDiv(ctx *sql.Context, lval, rval interface{}) (interface{}, error) {
752752 switch r := rval .(type ) {
753753 case int64 :
754754 if r == 0 {
755- arithmeticWarning (ctx , ERDivisionByZero , fmt . Sprintf ( "Division by 0" ) )
755+ arithmeticWarning (ctx , ERDivisionByZero , "Division by 0" )
756756 return nil , nil
757757 }
758758 return l / r , nil
@@ -761,7 +761,7 @@ func intDiv(ctx *sql.Context, lval, rval interface{}) (interface{}, error) {
761761 switch r := rval .(type ) {
762762 case float64 :
763763 if r == 0 {
764- arithmeticWarning (ctx , ERDivisionByZero , fmt . Sprintf ( "Division by 0" ) )
764+ arithmeticWarning (ctx , ERDivisionByZero , "Division by 0" )
765765 return nil , nil
766766 }
767767 res := l / r
@@ -771,7 +771,7 @@ func intDiv(ctx *sql.Context, lval, rval interface{}) (interface{}, error) {
771771 switch r := rval .(type ) {
772772 case decimal.Decimal :
773773 if r .Equal (decimal .NewFromInt (0 )) {
774- arithmeticWarning (ctx , ERDivisionByZero , fmt . Sprintf ( "Division by 0" ) )
774+ arithmeticWarning (ctx , ERDivisionByZero , "Division by 0" )
775775 return nil , nil
776776 }
777777
0 commit comments