Add the linux distribution and the kernel version */
| 391 | Add the linux distribution and the kernel version |
| 392 | */ |
| 393 | int fill_linux_info(THD *thd, TABLE_LIST *tables) |
| 394 | { |
| 395 | #if defined(HAVE_SYS_UTSNAME_H) || defined(TARGET_OS_LINUX) |
| 396 | TABLE *table= tables->table; |
| 397 | CHARSET_INFO *cs= system_charset_info; |
| 398 | #endif |
| 399 | |
| 400 | #ifdef HAVE_SYS_UTSNAME_H |
| 401 | if (have_ubuf) |
| 402 | { |
| 403 | INSERT1("Uname_sysname", (ubuf.sysname, (uint) strlen(ubuf.sysname), cs)); |
| 404 | INSERT1("Uname_release", (ubuf.release, (uint) strlen(ubuf.release), cs)); |
| 405 | INSERT1("Uname_version", (ubuf.version, (uint) strlen(ubuf.version), cs)); |
| 406 | INSERT1("Uname_machine", (ubuf.machine, (uint) strlen(ubuf.machine), cs)); |
| 407 | } |
| 408 | #endif |
| 409 | |
| 410 | #ifdef TARGET_OS_LINUX |
| 411 | if (have_distribution) |
| 412 | INSERT1("Uname_distribution", (distribution, strlen(distribution), cs)); |
| 413 | #endif |
| 414 | |
| 415 | return 0; |
| 416 | } |
| 417 | |
| 418 | /** |
| 419 | Adds various bits of information to the I_S.FEEDBACK |