information_schema_relations.inc.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Internal relations for information schema.
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. if (! defined('PHPMYADMIN')) {
  9. exit;
  10. }
  11. /**
  12. *
  13. */
  14. $GLOBALS['information_schema_relations'] = array(
  15. 'CHARACTER_SETS' => array(
  16. 'DEFAULT_COLLATE_NAME' => array(
  17. 'foreign_db' => 'information_schema',
  18. 'foreign_table' => 'COLLATIONS',
  19. 'foreign_field' => 'COLLATION_NAME'
  20. )
  21. ),
  22. 'COLLATIONS' => array(
  23. 'CHARACTER_SET_NAME' => array(
  24. 'foreign_db' => 'information_schema',
  25. 'foreign_table' => 'CHARACTER_SETS',
  26. 'foreign_field' => 'CHARACTER_SET_NAME'
  27. )
  28. ),
  29. 'COLLATION_CHARACTER_SET_APPLICABILITY' => array(
  30. 'CHARACTER_SET_NAME' => array(
  31. 'foreign_db' => 'information_schema',
  32. 'foreign_table' => 'CHARACTER_SETS',
  33. 'foreign_field' => 'CHARACTER_SET_NAME'
  34. ),
  35. 'COLLATION_NAME' => array(
  36. 'foreign_db' => 'information_schema',
  37. 'foreign_table' => 'COLLATIONS',
  38. 'foreign_field' => 'COLLATION_NAME'
  39. )
  40. ),
  41. 'COLUMNS' => array(
  42. 'TABLE_SCHEMA' => array(
  43. 'foreign_db' => 'information_schema',
  44. 'foreign_table' => 'SCHEMATA',
  45. 'foreign_field' => 'SCHEMA_NAME'
  46. ),
  47. 'CHARACTER_SET_NAME' => array(
  48. 'foreign_db' => 'information_schema',
  49. 'foreign_table' => 'CHARACTER_SETS',
  50. 'foreign_field' => 'CHARACTER_SET_NAME'
  51. ),
  52. 'COLLATION_NAME' => array(
  53. 'foreign_db' => 'information_schema',
  54. 'foreign_table' => 'COLLATIONS',
  55. 'foreign_field' => 'COLLATION_NAME'
  56. )
  57. ),
  58. 'COLUMN_PRIVILEGES' => array(
  59. 'TABLE_SCHEMA' => array(
  60. 'foreign_db' => 'information_schema',
  61. 'foreign_table' => 'SCHEMATA',
  62. 'foreign_field' => 'SCHEMA_NAME'
  63. )
  64. ),
  65. 'EVENTS' => array(
  66. 'EVENT_SCHEMA' => array(
  67. 'foreign_db' => 'information_schema',
  68. 'foreign_table' => 'SCHEMATA',
  69. 'foreign_field' => 'SCHEMA_NAME'
  70. ),
  71. 'CHARACTER_SET_CLIENT' => array(
  72. 'foreign_db' => 'information_schema',
  73. 'foreign_table' => 'CHARACTER_SETS',
  74. 'foreign_field' => 'CHARACTER_SET_NAME'
  75. ),
  76. 'COLLATION_CONNECTION' => array(
  77. 'foreign_db' => 'information_schema',
  78. 'foreign_table' => 'COLLATIONS',
  79. 'foreign_field' => 'COLLATION_NAME'
  80. ),
  81. 'DATABASE_COLLATION' => array(
  82. 'foreign_db' => 'information_schema',
  83. 'foreign_table' => 'COLLATIONS',
  84. 'foreign_field' => 'COLLATION_NAME'
  85. )
  86. ),
  87. 'FILES' => array(
  88. 'TABLESPACE_NAME' => array(
  89. 'foreign_db' => 'information_schema',
  90. 'foreign_table' => 'TABLESPACES',
  91. 'foreign_field' => 'TABLESPACE_NAME'
  92. ),
  93. 'TABLE_SCHEMA' => array(
  94. 'foreign_db' => 'information_schema',
  95. 'foreign_table' => 'SCHEMATA',
  96. 'foreign_field' => 'SCHEMA_NAME'
  97. ),
  98. 'COLLATION_CONNECTION' => array(
  99. 'foreign_db' => 'information_schema',
  100. 'foreign_table' => 'COLLATIONS',
  101. 'foreign_field' => 'COLLATION_NAME'
  102. ),
  103. 'ENGINE' => array(
  104. 'foreign_db' => 'information_schema',
  105. 'foreign_table' => 'ENGINES',
  106. 'foreign_field' => 'ENGINE'
  107. )
  108. ),
  109. 'KEY_COLUMN_USAGE' => array(
  110. 'CONSTRAINT_SCHEMA' => array(
  111. 'foreign_db' => 'information_schema',
  112. 'foreign_table' => 'SCHEMATA',
  113. 'foreign_field' => 'SCHEMA_NAME'
  114. ),
  115. 'TABLE_SCHEMA' => array(
  116. 'foreign_db' => 'information_schema',
  117. 'foreign_table' => 'SCHEMATA',
  118. 'foreign_field' => 'SCHEMA_NAME'
  119. ),
  120. 'REFERENCED_TABLE_SCHEMA' => array(
  121. 'foreign_db' => 'information_schema',
  122. 'foreign_table' => 'SCHEMATA',
  123. 'foreign_field' => 'SCHEMA_NAME'
  124. )
  125. ),
  126. 'PARAMETERS' => array(
  127. 'SPECIFIC_SCHEMA' => array(
  128. 'foreign_db' => 'information_schema',
  129. 'foreign_table' => 'SCHEMATA',
  130. 'foreign_field' => 'SCHEMA_NAME'
  131. ),
  132. 'CHARACTER_SET_NAME' => array(
  133. 'foreign_db' => 'information_schema',
  134. 'foreign_table' => 'CHARACTER_SETS',
  135. 'foreign_field' => 'CHARACTER_SET_NAME'
  136. ),
  137. 'COLLATION_NAME' => array(
  138. 'foreign_db' => 'information_schema',
  139. 'foreign_table' => 'COLLATIONS',
  140. 'foreign_field' => 'COLLATION_NAME'
  141. )
  142. ),
  143. 'PARTITIONS' => array(
  144. 'TABLE_SCHEMA' => array(
  145. 'foreign_db' => 'information_schema',
  146. 'foreign_table' => 'SCHEMATA',
  147. 'foreign_field' => 'SCHEMA_NAME'
  148. ),
  149. 'TABLESPACE_NAME' => array(
  150. 'foreign_db' => 'information_schema',
  151. 'foreign_table' => 'TABLESPACES',
  152. 'foreign_field' => 'TABLESPACE_NAME'
  153. )
  154. ),
  155. 'PROCESSLIST' => array(
  156. 'DB' => array(
  157. 'foreign_db' => 'information_schema',
  158. 'foreign_table' => 'SCHEMATA',
  159. 'foreign_field' => 'SCHEMA_NAME'
  160. )
  161. ),
  162. 'REFERENTIAL_CONSTRAINTS' => array(
  163. 'CONSTRAINT_SCHEMA' => array(
  164. 'foreign_db' => 'information_schema',
  165. 'foreign_table' => 'SCHEMATA',
  166. 'foreign_field' => 'SCHEMA_NAME'
  167. ),
  168. 'UNIQUE_CONSTRAINT_SCHEMA' => array(
  169. 'foreign_db' => 'information_schema',
  170. 'foreign_table' => 'SCHEMATA',
  171. 'foreign_field' => 'SCHEMA_NAME'
  172. )
  173. ),
  174. 'ROUTINES' => array(
  175. 'ROUTINE_SCHEMA' => array(
  176. 'foreign_db' => 'information_schema',
  177. 'foreign_table' => 'SCHEMATA',
  178. 'foreign_field' => 'SCHEMA_NAME'
  179. ),
  180. 'CHARACTER_SET_NAME' => array(
  181. 'foreign_db' => 'information_schema',
  182. 'foreign_table' => 'CHARACTER_SETS',
  183. 'foreign_field' => 'CHARACTER_SET_NAME'
  184. ),
  185. 'COLLATION_NAME' => array(
  186. 'foreign_db' => 'information_schema',
  187. 'foreign_table' => 'COLLATIONS',
  188. 'foreign_field' => 'COLLATION_NAME'
  189. ),
  190. 'CHARACTER_SET_CLIENT' => array(
  191. 'foreign_db' => 'information_schema',
  192. 'foreign_table' => 'CHARACTER_SETS',
  193. 'foreign_field' => 'CHARACTER_SET_NAME'
  194. ),
  195. 'COLLATION_CONNECTION' => array(
  196. 'foreign_db' => 'information_schema',
  197. 'foreign_table' => 'COLLATIONS',
  198. 'foreign_field' => 'COLLATION_NAME'
  199. ),
  200. 'DATABASE_COLLATION' => array(
  201. 'foreign_db' => 'information_schema',
  202. 'foreign_table' => 'COLLATIONS',
  203. 'foreign_field' => 'COLLATION_NAME'
  204. )
  205. ),
  206. 'SCHEMATA' => array(
  207. 'DEFAULT_CHARACTER_SET_NAME' => array(
  208. 'foreign_db' => 'information_schema',
  209. 'foreign_table' => 'CHARACTER_SETS',
  210. 'foreign_field' => 'CHARACTER_SET_NAME'
  211. ),
  212. 'DEFAULT_COLLATION_NAME' => array(
  213. 'foreign_db' => 'information_schema',
  214. 'foreign_table' => 'COLLATIONS',
  215. 'foreign_field' => 'COLLATION_NAME'
  216. )
  217. ),
  218. 'SCHEMA_PRIVILEGES' => array(
  219. 'TABLE_SCHEMA' => array(
  220. 'foreign_db' => 'information_schema',
  221. 'foreign_table' => 'SCHEMATA',
  222. 'foreign_field' => 'SCHEMA_NAME'
  223. )
  224. ),
  225. 'STATISTICS' => array(
  226. 'TABLE_SCHEMA' => array(
  227. 'foreign_db' => 'information_schema',
  228. 'foreign_table' => 'SCHEMATA',
  229. 'foreign_field' => 'SCHEMA_NAME'
  230. ),
  231. 'INDEX_SCHEMA' => array(
  232. 'foreign_db' => 'information_schema',
  233. 'foreign_table' => 'SCHEMATA',
  234. 'foreign_field' => 'SCHEMA_NAME'
  235. )
  236. ),
  237. 'TABLES' => array(
  238. 'TABLE_SCHEMA' => array(
  239. 'foreign_db' => 'information_schema',
  240. 'foreign_table' => 'SCHEMATA',
  241. 'foreign_field' => 'SCHEMA_NAME'
  242. ),
  243. 'TABLE_COLLATION' => array(
  244. 'foreign_db' => 'information_schema',
  245. 'foreign_table' => 'COLLATIONS',
  246. 'foreign_field' => 'COLLATION_NAME'
  247. ),
  248. 'ENGINE' => array(
  249. 'foreign_db' => 'information_schema',
  250. 'foreign_table' => 'ENGINES',
  251. 'foreign_field' => 'ENGINE'
  252. ),
  253. ),
  254. 'TABLESAPCES' => array(
  255. 'ENGINE' => array(
  256. 'foreign_db' => 'information_schema',
  257. 'foreign_table' => 'ENGINES',
  258. 'foreign_field' => 'ENGINE'
  259. )
  260. ),
  261. 'TABLE_CONSTRAINTS' => array(
  262. 'CONSTRAINT_SCHEMA' => array(
  263. 'foreign_db' => 'information_schema',
  264. 'foreign_table' => 'SCHEMATA',
  265. 'foreign_field' => 'SCHEMA_NAME'
  266. ),
  267. 'TABLE_SCHEMA' => array(
  268. 'foreign_db' => 'information_schema',
  269. 'foreign_table' => 'SCHEMATA',
  270. 'foreign_field' => 'SCHEMA_NAME'
  271. )
  272. ),
  273. 'TABLE_PRIVILEGES' => array(
  274. 'TABLE_SCHEMA' => array(
  275. 'foreign_db' => 'information_schema',
  276. 'foreign_table' => 'SCHEMATA',
  277. 'foreign_field' => 'SCHEMA_NAME'
  278. )
  279. ),
  280. 'TRIGGERS' => array(
  281. 'TRIGGER_SCHEMA' => array(
  282. 'foreign_db' => 'information_schema',
  283. 'foreign_table' => 'SCHEMATA',
  284. 'foreign_field' => 'SCHEMA_NAME'
  285. ),
  286. 'EVENT_OBJECT_SCHEMA' => array(
  287. 'foreign_db' => 'information_schema',
  288. 'foreign_table' => 'SCHEMATA',
  289. 'foreign_field' => 'SCHEMA_NAME'
  290. ),
  291. 'CHARACTER_SET_CLIENT' => array(
  292. 'foreign_db' => 'information_schema',
  293. 'foreign_table' => 'CHARACTER_SETS',
  294. 'foreign_field' => 'CHARACTER_SET_NAME'
  295. ),
  296. 'COLLATION_CONNECTION' => array(
  297. 'foreign_db' => 'information_schema',
  298. 'foreign_table' => 'COLLATIONS',
  299. 'foreign_field' => 'COLLATION_NAME'
  300. ),
  301. 'DATABASE_COLLATION' => array(
  302. 'foreign_db' => 'information_schema',
  303. 'foreign_table' => 'COLLATIONS',
  304. 'foreign_field' => 'COLLATION_NAME'
  305. )
  306. ),
  307. 'VIEWS' => array(
  308. 'TABLE_SCHEMA' => array(
  309. 'foreign_db' => 'information_schema',
  310. 'foreign_table' => 'SCHEMATA',
  311. 'foreign_field' => 'SCHEMA_NAME'
  312. ),
  313. 'CHARACTER_SET_CLIENT' => array(
  314. 'foreign_db' => 'information_schema',
  315. 'foreign_table' => 'CHARACTER_SETS',
  316. 'foreign_field' => 'CHARACTER_SET_NAME'
  317. ),
  318. 'COLLATION_CONNECTION' => array(
  319. 'foreign_db' => 'information_schema',
  320. 'foreign_table' => 'COLLATIONS',
  321. 'foreign_field' => 'COLLATION_NAME'
  322. )
  323. )
  324. );