~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/information_schema.test

  • Committer: Brian Aker
  • Date: 2009-09-26 04:00:11 UTC
  • mfrom: (1126.12.1 trunk-nodebug)
  • Revision ID: brian@gaz-20090926040011-2qzxdcbpm1ibpkhl
Merge Lee

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
show tables like 't%';
35
35
--replace_column 8 # 12 # 13 #
36
 
show table status;
 
36
#show table status;
37
37
show full columns from t3 like "a%";
38
38
select * from information_schema.COLUMNS where table_name="t1"
39
39
and column_name= "a";
55
55
 
56
56
select * from information_schema.CHARACTER_SETS
57
57
where CHARACTER_SET_NAME like 'latin1%';
58
 
SHOW CHARACTER SET LIKE 'latin1%';
59
58
 
60
59
# Test for information_schema.COLLATIONS &
61
60
# SHOW COLLATION
63
62
--replace_column 5 #
64
63
select * from information_schema.COLLATIONS
65
64
where COLLATION_NAME like 'latin1%';
66
 
--replace_column 5 #
67
 
SHOW COLLATION LIKE 'latin1%';
68
65
 
69
66
select * from information_schema.COLLATION_CHARACTER_SET_APPLICABILITY
70
67
where COLLATION_NAME like 'latin1%';
91
88
where table_schema="mysql" and table_name="user";
92
89
 
93
90
#
94
 
# Bug #7981:SHOW GLOBAL STATUS crashes server
95
 
#
96
 
# We don't actually care about the value, just that it doesn't crash.
97
 
--replace_column 2 #
98
 
show global status like "Threads_running";
99
 
 
100
 
#
101
91
# Bug #7215  information_schema: columns are longtext instead of varchar
102
92
# Bug #7217  information_schema: columns are varbinary() instead of timestamp
103
93
#
398
388
select * from information_schema.tables where table_name = NULL;
399
389
select * from `information_schema`.`TABLE_CONSTRAINTS` where `TABLE_SCHEMA` = NULL;
400
390
select * from `information_schema`.`TABLE_CONSTRAINTS` where `TABLE_NAME` = NULL;
 
391
 
 
392
--echo #
 
393
--echo # Test that the query is visible to self and others.
 
394
--echo #
 
395
 
 
396
SELECT info FROM information_schema.processlist WHERE id = CONNECTION_ID();
 
397
 
 
398
#
 
399
# test that SHOW PROCESSLIST works correctly
 
400
#
 
401
--replace_column 1 # 2 # 3 # 6 # 7 #
 
402
show processlist;
 
403
 
 
404
#
 
405
# do a query on the PROCESSLIST table in I_S to ensure it works correctly
 
406
#
 
407
SELECT info, command, db
 
408
FROM information_schema.processlist
 
409
WHERE id = CONNECTION_ID();
 
410
 
 
411
#
 
412
# do a query on the CHARACTER_SET table in I_S 
 
413
#
 
414
SELECT *
 
415
FROM information_schema.character_sets
 
416
ORDER BY character_set_name;
 
417
 
 
418
#
 
419
# perform a query on the COLLATIONS table
 
420
#
 
421
SELECT *
 
422
FROM information_schema.collations
 
423
ORDER BY collation_name;
 
424
 
 
425
#
 
426
# perform a query on COLLATION_CHARACTER_SET_APPLICABILITY
 
427
#
 
428
SELECT * 
 
429
FROM information_schema.collation_character_set_applicability
 
430
ORDER BY collation_name;
 
431
 
 
432
#
 
433
# perform a query on COLUMNS
 
434
#
 
435
SELECT table_name, column_name
 
436
FROM information_schema.columns
 
437
ORDER BY table_name;
 
438
 
 
439
#
 
440
# perform a query on KEY_COLUMN_USAGE
 
441
#
 
442
SELECT *
 
443
FROM information_schema.key_column_usage;
 
444
 
 
445
#
 
446
# perform a query on REFERENTIAL_CONSTRAINTS
 
447
#
 
448
SELECT * 
 
449
FROM information_schema.referential_constraints;
 
450
 
 
451
#
 
452
# query the SCHEMATA table
 
453
#
 
454
SELECT catalog_name, schema_name
 
455
FROM information_schema.schemata
 
456
ORDER BY schema_name;
 
457
 
 
458
#
 
459
# Query the STATUS and VARIABLES related
 
460
# I_S related tables. 
 
461
#
 
462
--replace_column 1 # 2 #
 
463
SELECT *
 
464
FROM information_schema.session_status
 
465
ORDER BY variable_name;
 
466
 
 
467
--replace_column 1 # 2 #
 
468
SHOW STATUS;
 
469
 
 
470
#--replace_column 1 # 2 #
 
471
#SELECT *
 
472
#FROM information_schema.session_variables
 
473
#ORDER BY variable_name;
 
474
 
 
475
#--replace_column 1 # 2 #
 
476
#SHOW VARIABLES;
 
477
 
 
478
--replace_column 1 # 2 #
 
479
SELECT *
 
480
FROM information_schema.global_status
 
481
ORDER BY variable_name;
 
482
 
 
483
#--replace_column 1 # 2 #
 
484
#SELECT *
 
485
#FROM information_schema.global_variables
 
486
#ORDER BY variable_name;
 
487
 
 
488
#
 
489
# query TABLE_CONSTRAINTS table
 
490
#
 
491
SELECT *
 
492
FROM information_schema.table_constraints;
 
493
 
 
494
#
 
495
# query TABLES
 
496
#
 
497
SELECT table_schema, table_name
 
498
FROM information_schema.tables
 
499
ORDER BY table_name;
 
500
 
 
501
 
502
# do a query on the PLUGINS table in I_S to ensure it works correctly
 
503
# how do we test for this if the contents of this table can change
 
504
# depend on what plugins are configured for use?
 
505
#
 
506
#SELECT *
 
507
#FROM plugins;