ansi.test
Upload User: romrleung
Upload Date: 2022-05-23
Package Size: 18897k
Code Size: 1k
Category:

MySQL

Development Platform:

Visual C++

  1. #
  2. # Test of ansi mode
  3. #
  4. --disable_warnings
  5. drop table if exists t1;
  6. --enable_warnings
  7. set sql_mode="MySQL40";
  8. select @@sql_mode;
  9. set @@sql_mode="ANSI";
  10. select @@sql_mode;
  11. # Test some functions that works different in ansi mode
  12. SELECT 'A' || 'B';
  13. # Test GROUP BY behaviour
  14. CREATE TABLE t1 (id INT, id2 int);
  15. SELECT id,NULL,1,1.1,'a' FROM t1 GROUP BY id;
  16. #No --error 1055 error due to temporary fix for BUG#8510:
  17. #ONLY_FULL_GROUP_BY is overly restrictive, so remove it from ANSI mode.
  18. SELECT id FROM t1 GROUP BY id2;
  19. drop table t1;
  20. SET @@SQL_MODE="";
  21. # End of 4.1 tests