Write a C/C++ program that connects to a MySQL server and
checks if the InnoDB plug-in is installed on it. If so, your
program should print the total number of disk writes by MySQL.
Answer / Vijay Prakash
Here's an example in C++ using the MySQL Connector library:nn```cppn#include <mysqlx/xdevapi/session.h>nusing namespace mysqlx;nint main() {nSession session = System::Create();nSchema schema = session.getSchema("information_schema");nTable table = schema.getTable("innodb_tablespaces");nRowResult result = table.select("engine").execute();nbool innodbInstalled = false;ndouble diskWrites = 0;nfor (const Row &row : result) {n if (row[0].getString() == "InnoDB") {n innodbInstalled = true;n table = schema.getTable("innodb_file_per_table_stats" + row[1].getString());nResult statsResult = table.select("index_size", "data_size", "os_file_size").execute();ndouble indexSize = statsResult[0][0].getDouble();ndouble dataSize = statsResult[0][1].getDouble();ndouble osFileSize = statsResult[0][2].getDouble();ndiskWrites = osFileSize - (indexSize + dataSize);n }n}nsession.close();nif (innodbInstalled) {n std::cout << "Total number of disk writes by MySQL: " << diskWrites << std::endl;n}nreturn 0;n}n```
| Is This Answer Correct ? | 0 Yes | 0 No |
A polynomials in mamory can be represented by____________
I need a last 3 years question paper for RRB exam,post of section engineer(computer science)
Write a test case plan for a typical banking application which involves functionalities like Balance enquiry, deposit, fund transfer etc. Make your assumptions and mention the same in your answer sheet.
Write a function that responds to a click anywhere on the page by displaying an alert dialog. Display the event name if the user held Shift during the mouse click. Display the element name that triggered the event if the user held Ctrl during the mouse click. (Answer in Java Language)
how to count 4 column with two "and" condition in oracle? e.g task_type and cust_type and service_type are 3 column and we hv to count where task_type="new"and cust_type="jdp" and resulting column name will be new cust with jdp..and also we hv to count where task_type="new"and service_type="fs" resulting column name will be new cust with fs..
can i get some win vista notes
hi friends i am b-tech in computer science having interview of State bank of india clerk day on 30 th april. I want to know the answer of question:"you r B.tech in C.S. why do u want to become a bank clerk?" please help.Its my humble request.
1 Answers State Bank Of India SBI,
Given two strings, find the sub-string of the first string having minimum length which is having all the characters in second string
what are the areas of improvement required in yourself to achieve your career goals? Describe what you are doing/plan to do to address the areas of improvement
i am astubent of BE3rd year currently in 6th semester branch information technology till now i have 73% near about in each semester the problem with me is that i have got only 58%in 12th class n 55%in 10th class bcoz of my health now i am ok i have got 2 year loss also bcoz i have not giveen the exam in class 12th rite now i am prep for GATE i am working hard pls tell will i get a good job in future in the good company bcoz my inter percent were not gud pls tell me help me pls
write a program to accept 25 characters and at the end display the largest and smallest among them.
what is the difference between composite key and primary key in sap abap
Civil Engineering (5086)
Mechanical Engineering (4453)
Electrical Engineering (16638)
Electronics Communications (3918)
Chemical Engineering (1095)
Aeronautical Engineering (239)
Bio Engineering (96)
Metallurgy (361)
Industrial Engineering (259)
Instrumentation (3014)
Automobile Engineering (332)
Mechatronics Engineering (97)
Marine Engineering (124)
Power Plant Engineering (172)
Textile Engineering (575)
Production Engineering (25)
Satellite Systems Engineering (106)
Engineering AllOther (1379)