@@ -514,11 +514,11 @@ func TestDateTime(t *testing.T) {
514514 }
515515}
516516
517- // This tests for https://github.com/go-sql-driver/mysql/pull/140
517+ // This tests for https://github.com/go-sql-driver/mysql/pull/139
518518//
519519// An extra (invisible) nil byte was being added to the beginning of positive
520520// time strings.
521- func TestTime (t * testing.T ) {
521+ func TestTimeSign (t * testing.T ) {
522522 runTests (t , dsn , func (dbt * DBTest ) {
523523 var sTimes = []struct {
524524 value string
@@ -535,14 +535,13 @@ func TestTime(t *testing.T) {
535535 for _ , sTime := range sTimes {
536536 dbt .db .Exec ("DROP TABLE IF EXISTS test" )
537537 dbt .mustExec ("CREATE TABLE test (id INT, time_field " + sTime .fieldType + ")" )
538- dbt .mustExec ("TRUNCATE TABLE test" )
539538 dbt .mustExec ("INSERT INTO test (id, time_field) VALUES(1, '" + sTime .value + "')" )
540539 rows := dbt .mustQuery ("SELECT time_field FROM test WHERE id = ?" , 1 )
541540 if rows .Next () {
542541 var oTime string
543542 rows .Scan (& oTime )
544543 if oTime != sTime .value {
545- dbt .Error ( fmt . Sprintf ( `time values differ: got %q, expected %q.` , oTime , sTime .value ) )
544+ dbt .Errorf ( `time values differ: got %q, expected %q.` , oTime , sTime .value )
546545 }
547546 } else {
548547 dbt .Error ("expecting at least one row." )
0 commit comments