So as you can imagine by the title, I was recently tasked with working on a command line project for MySQL. I wanted to be able to reuse whatever I made, so that meant creating a down and dirty wrapper class for some of the MySQL C API functions. This is my start. Another requirement [...]
C++ Hit Counter, 1.0. Non-Object Oriented. Pretty light weight. // // HitCounter // @author Randy Melder // @version 1.0 // #include <iostream> #include <fstream> using namespace std; // file name const char *filename = “/tmp/hits.bin”; // quantity of hits struct Hits { long unsigned num_hits; }; void readHitsFile(const char *file_name, Hits *hits); void writeHitsFile(const char [...]
We ran into an interesting problem recently and wanted to share the research. MySQL partitioning is a great way to improve performance in some circumstances, but it has a behavior that’s not widely noted. That is specifically with the MyISAM storage engine. MySQL seems to open two (2) file pointers for each table or partition [...]