Changeset 19126 for trunk/FACT++/src/root2sql.cc
- Timestamp:
- 08/03/18 13:46:37 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/root2sql.cc
r19125 r19126 74 74 ("no-insert", po_switch(), "Does not insert any data into the table") 75 75 ("dry-run", po_switch(), "Skip any query which changes the databse (might result in consecutive failures)") 76 ("print-connection", po_switch(), "Print database connection information") 76 77 ("print-branches", po_switch(), "Print the branches found in the tree") 77 78 ("print-leaves", po_switch(), "Print the leaves found in the tree (this is what is processed)") … … 316 317 const bool ignore_errors = conf.Get<bool>("ignore-errors"); 317 318 319 const bool print_connection = conf.Get<bool>("print-connection"); 318 320 const bool print_branches = conf.Get<bool>("print-branches"); 319 321 const bool print_leaves = conf.Get<bool>("print-leaves"); … … 478 480 cerr << "SQL connection failed: " << e.what() << '\n' << endl; 479 481 return 3; 482 } 483 484 if (print_connection) 485 { 486 try 487 { 488 const auto &res1 = connection.query("SHOW STATUS LIKE 'Compression'").store(); 489 cout << "Compression of databse connection is " << string(res1[0][1]) << endl; 490 491 const auto &res2 = connection.query("SHOW STATUS LIKE 'Ssl_cipher'").store(); 492 cout << "Connection to databases is " << (string(res2[0][1]).empty()?"UNENCRYPTED":"ENCRYPTED ("+string(res2[0][1])+")") << endl; 493 } 494 catch (const exception &e) 495 { 496 cerr << "\nSHOW STATUS LIKE COMPRESSION\n\n"; 497 cerr << "SQL query failed:\n" << e.what() << endl; 498 return 6; 499 } 480 500 } 481 501
Note:
See TracChangeset
for help on using the changeset viewer.