• unknown's avatar
    Fix for BUG#5033 "When using temporary tables truncate does NOT reset the auto_increment counter" · 4dcbefcc
    unknown authored
    (ok'd by CTO to fix it in 4.0).
    Fix to make mysql-test-run work with all Valgrind versions.
    
    
    mysql-test/mysql-test-run.sh:
      fixing mysql-test-run.sh so that it works indifferently with Valgrind 1.x, 2.x
      (versions <= 2.0.0 refuse --tool option; versions >=2.1.2 require it; 2.1.0 accepts it).
      I hope the shell code is portable enough; anyway Valgrind only runs on Linux...
      I tested it with 2.0.0, 2.1.0, 2.1.2.
    mysql-test/r/truncate.result:
      result update
    mysql-test/t/truncate.test:
      testing if TRUNCATE resets autoinc counter for temp tables (BUG#5033); testing difference with DELETE FROM.
    sql/sql_delete.cc:
      in mysql_truncate(), always reset the autoinc counter, as manual says (even if it's a temp table, which was BUG#5033).
    4dcbefcc
truncate.result 1.09 KB