![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| MySQL DevZone RSS MySQL Developer Zone RSS |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Recover dropped database | Eastme | SuSE | 5 | 04-29-2009 10:01 PM |
| rearrange info of file in a "table" | csecnarf | Shell Programming and Scripting | 5 | 06-13-2008 11:59 AM |
| are dropped packets a sign of network problem? | progressdll | UNIX for Dummies Questions & Answers | 1 | 10-10-2007 02:51 PM |
| Converting tables of row data into columns of tables | justthisguy | Shell Programming and Scripting | 7 | 07-16-2007 04:42 PM |
| How do I find route table information | Docboyeee | UNIX for Dummies Questions & Answers | 1 | 01-27-2005 03:14 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Get Dropped table info : table_schema information from information_schema.tables
Hi,
I have created 4 tables in 'amit' database and then I deleted them. Still I able to get information about the table_schema for the table deleted. After drop table when I fire a query for table_schema from information_schema.tables it will give me result as 'amit'. I didn't understand why it is happnes. I am using Mysql 5.1.34essential version. See the below steps done. mysql> use amit; mysql> show tables; +----------------+ | Tables_in_amit | +----------------+ | clconf | | clmstr | | clmt14 | | clsync | +----------------+ 6 rows in set (0.00 sec) mysql> select table_name from information_schema.table +---------------------------------------+ | table_name | +---------------------------------------+ | CHARACTER_SETS | | COLLATIONS | | COLLATION_CHARACTER_SET_APPLICABILITY | | COLUMNS | | COLUMN_PRIVILEGES | | ENGINES | | EVENTS | | FILES | | GLOBAL_STATUS | | GLOBAL_VARIABLES | | KEY_COLUMN_USAGE | | PARTITIONS | | PLUGINS | | PROCESSLIST | | PROFILING | | REFERENTIAL_CONSTRAINTS | | ROUTINES | | SCHEMATA | | SCHEMA_PRIVILEGES | | SESSION_STATUS | | SESSION_VARIABLES | | STATISTICS | | TABLES | | TABLE_CONSTRAINTS | | TABLE_PRIVILEGES | | TRIGGERS | | USER_PRIVILEGES | | VIEWS | | account | | clconf | | clsync | | clmt14 | | clmstr | | columns_priv | | db | | event | | func | | general_log | | help_category | | help_keyword | | help_relation | | help_topic | | host | | ndb_binlog_index | | plugin | | proc | | procs_priv | | servers | | slow_log | | tables_priv | | time_zone | | time_zone_leap_second | | time_zone_name | | time_zone_transition | | time_zone_transition_type | | user | | temp | | tt | +---------------------------------------+ 58 rows in set (0.00 sec) ************************************************** ****************** Tables are present in information_schema.tables beforte delete ************************************************** ****************** mysql> select table_schema from information_schema.tables where table_name='CLSync'; +--------------+ | table_schema | +--------------+ | amit | +--------------+ 1 row in set (0.01 sec) mysql> DROP TABLE amit.CLMT14 ; Query OK, 0 rows affected (0.02 sec) mysql> DROP TABLE amit.CLSync ; Query OK, 0 rows affected (0.00 sec) mysql> DROP TABLE amit.CLMstr ; Query OK, 0 rows affected (0.00 sec) mysql> DROP TABLE amit.CLConf ; Query OK, 0 rows affected (0.01 sec) mysql> select table_schema from information_schema.tables where table_name='CLSync'; +--------------+ | table_schema | +--------------+ | amit | +--------------+ 1 row in set (0.00 sec) mysql> select table_schema from information_schema.tables where table_name='clsync'; Empty set (0.00 sec) mysql> select table_schema from information_schema.tables where table_name='CLCYNC'; Empty set (0.00 sec) ************************************************** *** I used using uppercase, lowercase letter and above u can see the difference in query. I have created table using names as - CLSync, CLConf, CLMT14, CLMstr ************************************************** *** mysql> select table_name from information_schema.table +---------------------------------------+ | table_name | +---------------------------------------+ | CHARACTER_SETS | | COLLATIONS | | COLLATION_CHARACTER_SET_APPLICABILITY | | COLUMNS | | COLUMN_PRIVILEGES | | ENGINES | | EVENTS | | FILES | | GLOBAL_STATUS | | GLOBAL_VARIABLES | | KEY_COLUMN_USAGE | | PARTITIONS | | PLUGINS | | PROCESSLIST | | PROFILING | | REFERENTIAL_CONSTRAINTS | | ROUTINES | | SCHEMATA | | SCHEMA_PRIVILEGES | | SESSION_STATUS | | SESSION_VARIABLES | | STATISTICS | | TABLES | | TABLE_CONSTRAINTS | | TABLE_PRIVILEGES | | TRIGGERS | | USER_PRIVILEGES | | VIEWS | | account | | columns_priv | | db | | event | | func | | general_log | | help_category | | help_keyword | | help_relation | | help_topic | | host | | ndb_binlog_index | | plugin | | proc | | procs_priv | | servers | | slow_log | | tables_priv | | time_zone | | time_zone_leap_second | | time_zone_name | | time_zone_transition | | time_zone_transition_type | | user | | temp | | tt | +---------------------------------------+ 54 rows in set (0.00 sec) ************************************************** ****************** Tables are not present in information_schema.tables after delete ************************************************** ****************** But still responding to query for table_schema. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|