Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 30 of 30

Displaying posts with tag: c++ (reset)

Separate docs for MySQL Connectors
+1 Vote Up -0Vote Down
The MySQL documentation section has always had this Topic Guides page containing links to the docs for the various MySQL Connectors -- the official database drivers for various languages and programming technologies. That is the most convenient way to get the information for each Connector in PDF form, rather than downloading the entire Ref Man PDF. For HTML, it was more of a shortcut, because
OQGRAPH at MySQL UC 2011
+2 Vote Up -0Vote Down
I had a good and lively audience at my presentation today. I was happy to give them a sneek preview of the Mk.III implementation of OQGRAPH. Oh yeah! I guess I'm announcing the availability of the source code of the MkIII implementation. Links are in my slides... http://goo.gl/UrybZ Btw, building the storage engine requires Boost libraries and libJudy installed. It's currently in a MariaDB
One last bit of evil….
+2 Vote Up -0Vote Down
You can store things for later! 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...]
A MD5 stored procedure for Drizzle… in C
+1 Vote Up -0Vote Down

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...]
Stored Procedures/Functions for Drizzle
+1 Vote Up -0Vote Down

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...]
A year in review; new direction.
+0 Vote Up -0Vote Down
It has been more than a year since my self-imposed hiatus from serious MySQL development started and I think it is about time that I get back into the saddle. I have a handful of working prototypes but I should get the code out there, back into the community.I learned a bunch of stuff during the past year at Google but in the end, working on JavaScript, HTML/CSS and Google proprietary languages
How GDB helped me fix a Drizzle Bug
Employee +1 Vote Up -0Vote Down

The other day I found a nice surprise on my inbox. Jay Pipes asked me if I'd like to try fixing a small bug on Drizzle. It looked pretty simple, and the bug report included a big part of the fix. I accepted without a doubt.
I decided to first change trans_prealloc_size from uint32_t to uint64_t. That was done on drizzled/session.h.Then, I went to

  [Read more...]
More Drizzle plug-ins
Employee +2 Vote Up -0Vote Down
Last weekend, I finally got some time to look around Drizzle. I had already compiled it on my laptop, but hadn't really looked at the code.Then, I thought that looking over some of the blueprints on Launchpad, would be a good way to get familiar with the code base.After a quick search, I found move function/time/ functions into plugin(s)

This blueprint is basically to create UDF plug-ins for the different time related functions.There was no priority assigned and it was on the low hanging fruit milestone. Which was perfect

  [Read more...]
stringstream is completely useless (and why C++ should have a snprintf)
+0 Vote Up -0Vote Down
  • It’s easy to screw up thread safety.
    If you’re trying to format something for output (e.g. leading zeros, only 1 decimal place or whatever… you know, format specifiers in printf) you are setting a property on the stream, not on what you’re converting. So if you have a thread running that sets a format, adds something to the stream, and then unsets the format, you cannot have another thread able to come in and do something to that stream. Look out for thread unsafe cout code.
  • You cannot use streams for any text that may need to be translated.
    gettext is what everybody uses. You cannot get a page into the manual before it tells you that translators may want to change the order of what

  •   [Read more...]
    Binary Literals
    +0 Vote Up -0Vote Down
    I was randomly browsing for some stuff and I stumbled across this post on binary literals. It proposed the following as an option for C++ which the article admits as being inefficient:unsigned long const mask = std::bitset<6>(std::string("111100")).to_ulong();I was thinking that C++ templates must be able to offer something more efficient...template <int N>struct Binary{ enum { value = Binary
    Seeking experienced C++ developer for a MySQL script
    +0 Vote Up -0Vote Down

    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.

    Hidden Features Of Perl, PHP, Javascript, C, C++, C#, Java, Ruby, Python, And Others [Collection Of Incredibly Useful Lists]
    +2 Vote Up -0Vote Down

    Introduction

    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).

    The Story

    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...]
    Invitation to a Free MySQL Connector /C++ Webinar
    Employee +0 Vote Up -0Vote Down

    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...]
    Invitation to a Free MySQL Connector /C++ Webinar
    Employee +0 Vote Up -0Vote Down

    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...]
    Invitation to a Free MySQL Connector /C++ Webinar
    Employee +0 Vote Up -0Vote Down

    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...]
    Exploring the Features of MySQL Connector/C++
    Employee +0 Vote Up -0Vote Down

    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...]
    Developing with MySQL Connector/C++
    Employee +0 Vote Up -0Vote Down
    Giri Mandalika has written an article showing how to develop C++ database applications for MySQL and another article showing how to install MySQL Connector/C++ from the source.
    Exploring the Features of MySQL Connector/C++
    Employee +0 Vote Up -0Vote Down

    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...]
    Exploring the Features of MySQL Connector/C++
    Employee +0 Vote Up -0Vote Down

    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...]
    Developing with MySQL Connector/C++
    Employee +0 Vote Up -0Vote Down
    Giri Mandalika has written an article showing how to develop C++ database applications for MySQL and another article showing how to install MySQL Connector/C++ from the source.
    Developing with MySQL Connector/C++
    Employee +0 Vote Up -0Vote Down
    Giri Mandalika has written an article showing how to develop C++ database applications for MySQL and another article showing how to install MySQL Connector/C++ from the source.
    Three Great Beta Deliveries in One Week
    Employee +0 Vote Up -0Vote Down

    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
    Employee +0 Vote Up -0Vote Down

    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
    Employee +0 Vote Up -0Vote Down

    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...]
    A join I/O manipulator for IOStream
    Employee +0 Vote Up -0Vote Down
    I started playing around with protobuf when doing some stuff in Drizzle (more about that later), and since the examples where using IOStream, the table reader and writer that Brian wrote is using IOStreams. Now, IOStreams is pretty powerful, but it can be a pain to use, so of course I start tossing together some utilities to make it easier to work with.

    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...]
    HOWTO: MySQL Connector/C++ on Mac OS X
    +0 Vote Up -0Vote Down

    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...]
    PBXT & DBT2: Dubugging C/C++ 101
    +0 Vote Up -0Vote Down
    Yesterday I starting testing PBXT using the DBT2 benchmark. Following the implementation of durability and SELECT FOR UPDATE for the engine I was more interested in the benchmark as a test for stability and concurrency than performance. I was not disappointed...

    Which bug first?

    Well I immediately ran into 3 bugs. Isn't it funny how bugs often come in batches, which leaves you thinking: "Oh sh.. where do I start?". Here's my advice: start with the bug that is most likely to disappear if you fix the others!

    A simple example, you have 2 bugs: an unexpected exception is occurring, and you're loosing memory. First look for the memory loss, because it may disappear when you fix the exception (because you may be loosing memory in the error handler).

    Take things one problem at time:

    Another thing: once you have decided for one of the bugs,









      [Read more...]
    External Libraries in XCode
    +0 Vote Up -0Vote Down

    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...]
    Reading: Computers
    +0 Vote Up -0Vote Down
    A few recent books:

    "Foundation for Future Database Systems. The Third Manifesto" by C.J. Date and Hugh Darwen.
    An interesting and controversial book. In many cases completely rejects some practical arguments for the sake of purity of the model. A funny book too, as according to it, SQL is not a true relational language, which is a good reference to use when fingers are pointed at MySQL not being a relational database. Also gave a valuable insight why Bug#5719 should not be fixed. Despite this high appraisal, I don't think the book matches its title.

    "C++ Coding Standards" by Herb Sutter and Andrei Alexandrescu.
    A must-have book for C++ programmers, 200 pages of best programming style practices: basically, a summary of well-known sources, but now from the





      [Read more...]
    Description of MaxDB code tree
    +0 Vote Up -0Vote Down
    I had a conversation with Daniel Dittmar, one of the developers on the SAP team today. I am trying to get familiar with the MaxDB codebase, and it's difficult to do without at least a bit of explanation. The inline English documentation is written by native German speakers, so it's often difficult to discern. Having this map will help me quite a bit. I hope it helps some others as well.

    Thanks very much to Daniel for putting an evening in to documenting this.





    12:56 DanielD: can you point me to some docs on the maxdb source code?
    12:56 why are the different parts named with such short and
    difficult-to-remember names? :)
    12:57 partly, because if you work with them day in, day out, you
    remember them anyway and they are easier to type
    12:57 :)
    12:58 what documentation












      [Read more...]
    Showing entries 1 to 30 of 30

    Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.