| Showing entries 1 to 30 of 30 |
drizzle> select libtcc("#include <string.h>\n#include <stdlib.h>\nint foo(char* s) { char *a= malloc(1000); return snprintf(s, 100, \"%p\", a); }") as RESULT;
+-----------+ | RESULT | +-----------+ | 0x199c610 | +-----------+ 1 row in set (0 sec)
drizzle> select libtcc("#include <string.h>\n#include <stdlib.h>\nint foo(char* s) { char *a= 0x199c610; strcpy(a, \"Hello World!\"); strcpy(s,\"done\"); return strlen(s); }") as result;
+--------+ | result | +--------+ | done | +--------+ 1 row in set (0.01 sec)
drizzle> select libtcc("#include <string.h>\n#include <stdlib.h>\nint foo(char* s) { char *a= 0x199c610; strcpy(s, a); return strlen(s); }") as result;
+--------------+ | result |[Read more...]
So, just in case that wasn’t evil enough for you… perhaps you have something you want to know the MD5 checksum of. So, you could just do this:
drizzle> select md5('Hello World!');
+----------------------------------+
| md5('Hello World!') |
+----------------------------------+
| ed076287532e86365e841e92bfc50d8c |
+----------------------------------+
1 row in set (0 sec)
But that is soooo boring.
Since we have the SSL libs already loaded into Drizzle, and using my very evil libtcc plugin… we could just implement it in C. We can even use malloc!
[Read more...]Previously, in “Thoughts on Thoughts on Drizzle” I theorized that one of the major reasons why we did not see lots of people jumping at stored procedures in MySQL (http://www.mysql.com) was that it wasn’t in their native language (for lack of a better term). We’ve seen External Language Stored Procedures for MySQL that let you write stored procedures in some other languages…. but I felt something was missing.
Firstly, I wanted a language I was really familiar with and comfortable writing complex things in.
Secondly, it should be compiled so that it runs as fast as possible.
Thirdly, it shouldn’t just be linking to a pre-compiled
[Read more...]
I’ve started work on a c++ version of the Kontrollbase client script but am not as experienced in c++ as I’d like to be and don’t have the time to learn more c++ at the moment. The idea being that the client script written in perl has a lot of module dependencies and that complicates rolling out the client to large server farms. A compiled C++ script will be a drop-in solution.
So, if someone that is talented with c++ on Linux wants to help out the project and write a quick script involving a connection to mysql to run queries, and then connect to SNMP to gather system information, then export all of that to stdout as XML… let me know! I already have the MySQL part outputting XML so we just need the SNMP part and some error checking. Email me at themattreid at gmail dot com or commetnt on this post if interested. You’ll get credit on the project as a contributor.
StackOverflow is an amazing site for coding questions. It was created by Joel Spolsky of joelonsoftware.com, Jeff Atwood of codinghorror.com, and some other incredibly smart guys who truly care about user experience. I have been a total fan of SO since it went mainstream and it's now a borderline addiction (you can see my StackOverflow badge on the right sidebar).
Update 6/21/09: This server is currently under very heavy load (10-200), even with caching plugins enabled. Please bear with me as I try to
[Read more...]This Wednesday (May 20, 2009) Andrey Hristov and Ulf Wendel from the MySQL Connector development team are going to talk about the MySQL Connector for C++ at 10:00 AM PT. Andrey and Ulf are planning to talk about the architecture, API, portability, support for: buffered/unbuffered result sets, prepared statements, stored procedures; and the planned features for Connector/C++ 1.0.6 GA.
Plan to attend if you are a C++ developer working [or planning to work] on MySQL database applications. Anyone can attend this webinar for free, and it may last for about 45 minutes. Register at the following location to receive further instructions on how to join the web conference:
[Read more...]This Wednesday (May 20, 2009) Andrey Hristov and Ulf Wendel from the MySQL Connector development team are going to talk about the MySQL Connector for C++ at 10:00 AM PT. Andrey and Ulf are planning to talk about the architecture, API, portability, support for: buffered/unbuffered result sets, prepared statements, stored procedures; and the planned features for Connector/C++ 1.0.6 GA.
Plan to attend if you are a C++ developer working [or planning to work] on MySQL database applications. Anyone can attend this webinar for free, and it may last for about 45 minutes. Register at the following location to receive further instructions on how to join the web conference:
[Read more...]This Wednesday (May 20, 2009) Andrey Hristov and Ulf Wendel from the MySQL Connector development team are going to talk about the MySQL Connector for C++ at 10:00 AM PT. Andrey and Ulf are planning to talk about the architecture, API, portability, support for: buffered/unbuffered result sets, prepared statements, stored procedures; and the planned features for Connector/C++ 1.0.6 GA.
Plan to attend if you are a C++ developer working [or planning to work] on MySQL database applications. Anyone can attend this webinar for free, and it may last for about 45 minutes. Register at the following location to receive further instructions on how to join the web conference:
[Read more...]With the introduction of MySQL Connector/C++, now C++ application developers have one additional option to choose from, to connect to MySQL Server 5.1 or later from a C++ application. Admittedly, as of today, there isn't enough documentation with examples to show the capabilities [and gotchas] of MySQL Connector/C++. I tried to fill that gap with the technical article, Developing Database Applications Using MySQL Connector/C++. Hopefully it serves as a starting point for the C++ developers while waiting for the MySQL Connectors documentation team to publish the official documentation on MySQL Developer Zone.
While you are at it, don't forget to check the supplement document, Installing MySQL
[Read more...]With the introduction of MySQL Connector/C++, now C++ application developers have one additional option to choose from, to connect to MySQL Server 5.1 or later from a C++ application. Admittedly, as of today, there isn't enough documentation with examples to show the capabilities [and gotchas] of MySQL Connector/C++. I tried to fill that gap with the technical article, Developing Database Applications Using MySQL Connector/C++. Hopefully it serves as a starting point for the C++ developers while waiting for the MySQL Connectors documentation team to publish the official documentation on MySQL Developer Zone.
While you are at it, don't forget to check the supplement document, Installing MySQL
[Read more...]With the introduction of MySQL Connector/C++, now C++ application developers have one additional option to choose from, to connect to MySQL Server 5.1 or later from a C++ application. Admittedly, as of today, there isn't enough documentation with examples to show the capabilities [and gotchas] of MySQL Connector/C++. I tried to fill that gap with the technical article, Developing Database Applications Using MySQL Connector/C++. Hopefully it serves as a starting point for the C++ developers while waiting for the MySQL Connectors documentation team to publish the official documentation on MySQL Developer Zone.
While you are at it, don't forget to check the supplement document, Installing MySQL
[Read more...]Three great beta deliveries in one week!
MySQL Connector/.Net 6.0.2 beta, a new version of the all-managed .NET driver for MySQL.
MySQL Connector/C++ 1.0.4 beta, a new release providing C++ API for connecting client applications to the MySQL Server. If you know JDBC, this should be familiar to you.
MySQL Connector/C 6.0.0 beta, a new version of the C API for accessing MySQL database servers
Use them and let us know what you think.
Learn more about Connector/C++
[Read more...]Three great beta deliveries in one week!
MySQL Connector/.Net 6.0.2 beta, a new version of the all-managed .NET driver for MySQL.
MySQL Connector/C++ 1.0.4 beta, a new release providing C++ API for connecting client applications to the MySQL Server. If you know JDBC, this should be familiar to you.
MySQL Connector/C 6.0.0 beta, a new version of the C API for accessing MySQL database servers
Use them and let us know what you think.
Learn more about Connector/C++
[Read more...]Three great beta deliveries in one week!
MySQL Connector/.Net 6.0.2 beta, a new version of the all-managed .NET driver for MySQL.
MySQL Connector/C++ 1.0.4 beta, a new release providing C++ API for connecting client applications to the MySQL Server. If you know JDBC, this should be familiar to you.
MySQL Connector/C 6.0.0 beta, a new version of the C API for accessing MySQL database servers
Use them and let us know what you think.
Learn more about Connector/C++
[Read more...]
Being a serious Perl addict since 20 years, I of course start missing a lot of nice functions for manipulating strings, and the most immediate one is join, so I wrote a C++ IOStream manipulator to join the elements of an arbitrary sequence and output them to an std::ostream.
In this case, since the I/O Manipulator takes arguments, it has to be written as a
[Read more...]Excited with the release of the MySQL Connector/C++, I thought I’d get it going on Mac OS X.
You’ll first hit the problem that Mac OS X doesn’t come with CMake. So you’ll have to download it from the site - there’s a warning there that the .dmg installer only works for Tiger, but I ran it on Leopard, and its just fine. Don’t forget to allow it to create links in /usr/bin for ease of use.
After that, you will need to install glib. But to get glib going, you need some dependencies:
[Read more...]I need to compile something and use the MySQL C++ library. I have mysql and mysql++ already compiled, I won’t go over how to do that now.
I added the following code to the top of my source:
#include <mysql++.h>
I got an error
/Users/jhaddad/dev/search_engine/main.cpp:4:21: error: mysql++.h: No such file or directory
Not cool.
How to fix:
In XCode, open up the project settings (under the project menu). Go down to search paths, and you can change your Header search paths to the correct locations where you installed whatever you’re looking for. In this case, mine was /usr/local/includes and /usr/local/mysql/
Next time you try to recompile, you’ll get a different error, this time it should be during Linking. Might look something like the
[Read more...]| Showing entries 1 to 30 of 30 |