You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.6 KiB

  1. #################### include/testdb_only.inc ######################
  2. # #
  3. # We must prevent to work on databases created by customers, #
  4. # because we DROP/CREATE/MODIFY objects with sometimes common #
  5. # names like STAFF, EMPLOYEE etc. #
  6. # #
  7. # Therefore we check the environment variable USE_RUNNING_SERVER. #
  8. # USE_RUNNING_SERVER is exported by "mysql-test-run" and could #
  9. # contain the following values: #
  10. # 0 -- mysql-test-run was started without the --extern option #
  11. # That means the test will be performed within the test #
  12. # area 'mysql-test/var/...' . #
  13. # 1 -- mysql-test-run was started with the --extern option #
  14. # That means the test will be performed by an already #
  15. # running server and data modifications will most probably #
  16. # outside of the common test area 'mysql-test/var/...' . #
  17. # #
  18. # If USE_RUNNING_SERVER is not 0 the test will be skipped. #
  19. # #
  20. ###################################################################
  21. --disable_query_log
  22. eval set @USE_RUNNING_SERVER= '$USE_RUNNING_SERVER';
  23. --require r/testdb_only.require
  24. SELECT 'use extern server'
  25. AS "Variable_name ",
  26. IF(@USE_RUNNING_SERVER= '1','YES',
  27. IF(@USE_RUNNING_SERVER= '0','NO','UNEXPECTED'))
  28. AS "Value" ;
  29. --enable_query_log