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 36 Next 6 Older Entries

Displaying posts with tag: json (reset)

We’re Hiring! And Looking to Add More 9s to the Severalnines Team!
+1 Vote Up -0Vote Down
August 15, 2014 By Severalnines



We're looking for an energetic and talented web developer to join our small but agile web team. This position is full-time and pay is negotiable. The hours are flexible and work can be done remotely.


Severalnines is a self-funded startup with a dozen employees; headquartered in Stockholm, Sweden and with a globally distributed, home-office based team. We provide automation and

  [Read more...]
The range access method and why you should use EXPLAIN JSON
Employee +0 Vote Up -0Vote Down
I got an interesting question about EXPLAIN and the range access method recently. The person had a query that could be written either with a BETWEEN predicate or an IN predicate, something similar to this:
-> FROM orders WHERE customer_id BETWEEN 7 AND 10 AND value > 500;
| id | select_type | table | type | key | key_len | rows | Extra
| 1 | SIMPLE | orders | range | cust_val | 10 | 91 | ...

-> FROM orders WHERE customer_id IN (7,8,9,10) AND value >

  [Read more...]
JSON UDF functions version 0.3.1 have been released.
Employee_Team +1 Vote Up -0Vote Down

Today new version of JSON UDF functions: 0.3.1 was released. This is development release which contains new functionality. You can download functions from the MySQL Labs website.

What is new?

Default value for compile option `WITH_PCRE` now is `bundled` independently from the
platform (Bug #71265/18081332 Library name mismatch for PCRE on Ubuntu)

New values, passed to functions `JSON_APPEND`, `JSON_REPLACE`, `JSON_SET` as numbers, empty strings or `NULL`s are converted to JSON objects. Objects, passed as strings are not converted: you are still responsible to put quotes around string values. Also these functions check if element which needs to be inserted is valid JSON value. (

  [Read more...]
Why is important to be active at bugs.mysql.com?
Employee_Team +1 Vote Up -0Vote Down

When I presented JSON UDF functions at MySQL Connect last year attendees asked me to implement few features. I quickly wrote their wishes in my notepad. I also created feature requests at bugs.mysql.com  when I was home.

During following months I fixed bugs in the functions and implemented feature requests, including those which I got from MySQL Connect. I started from most important and affecting users, such as wrong results bugs of features for which I got more than one request.

But today all such requests finished and I am working on bug #70580  This feature request says: "Add function JSON_COUNT which will go through the JSON document and count number of childs of the root element." Well, I wrote it myself, but I don't

  [Read more...]
JSON UDF functions version 0.2.2 have been released.
Employee_Team +1 Vote Up -0Vote Down
New version of JSON UDF functions 0.2.2 have been just released. It is last maintenance release of 0.2 series. However it contains two new features:

JSON_VALID now accepts array as a root element of the JSON document (Bug#70567/17583282)

JSON functions can now be installed and uninstalled using a script (Bug#71263/18022788 Easy installation sql script).

This feature is Community contribution. Thank you, Daniel van Eeden!

This release also contains following bug fixes:

71050/17882710 json_extract returning same column twice if key names are not fully distinct. (Fixed for JSON_EXTRACT, JSON_CONTAINS_KEY, JSON_APPEND,

  [Read more...]
MySQL and PostgreSQL JSON functions: do they differ much?
Employee_Team +2 Vote Up -0Vote Down
As author of MySQL JSON functions I am also interested in how development goes in another parties. JSON functions and operators in PostgreSQL, indeed, have great features. Some of them, such as operators, I can not do using UDF functions only. But lets see how these functions are interchangeable.

Note: all PostgreSQL examples were taken from PostgreSQL documentation.

First topic is syntax sugar.

 PostgreSQL MySQL

Operator ->

postgres=# select '[1,2,3]'::json->2;

  [Read more...]
JSON UDF functions version 0.3.0 have been released.
Employee_Team +1 Vote Up -0Vote Down

Today new version of JSON UDF functions: 0.3.0 was released. This is major release which contains new functionality. You can download functions from the MySQL Labs website.

What was added?

Functions JSON_EXTRACT, JSON_CONTAINS_KEY, JSON_APPEND, JSON_REMOVE, JSON_REPLACE, JSON_SET now accept both string and integer arguments as array indexes. (Bug #70393/17491709)

Now syntax JSON_EXTRACT(doc, 'key', 1); is accepted.

New function JSON_SAFE_MERGE checks JSON documents for validity before merging them. In addition JSON_MERGE now merges valid documents, having array as root element. (Bug #70575/17583568)

JSON_VALID now accepts array as a root element of the JSON document (Bug #70567/17583282)

Also this release contains following

  [Read more...]
JSON UDFs: is it hard to type keys?
Employee_Team +4 Vote Up -0Vote Down

Currently, if you want to search a key using JSON UDFs you have to specify each its part as a separate argument to the function: JSON_CONTAINS_KEY(doc, 'root', 'child', 'child of child', 'child of child of child', etc.....). This way of working with parameters is easy for developer, less error-prone, but can be not very beautiful.

I was suggested by some of users to change it to '/parent/child/child-of-child/...' or to 'parent:child:child-of-child:...' There are, probably, can be other suggestions. What do you like the best? How do you feel about current style with separate argument for each key element? Should we change or extend this syntax?

New cmake options for JSON UDFs.
Employee_Team +1 Vote Up -0Vote Down

Two weeks ago I announced new maintenance release of JSON UDFs: 0.2.1. It not only contains bug fixes, how you can expect from a maintenance release, but also contains improvements in build and test scripts.

First improvement is the easier way to build JSON UDFs on Windows. In the first version building on Windows was a pane: you had to build PCRE library, copy four files to directories where Visual Studio can find them and only then build JSON functions themselves. Now you can build this way too, but only if you really wish.

By default cmake will create appropriate makefiles for bundled PCRE sources and for JSON functions. Only command you need to prepare sources is:

"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -G "Visual Studio 11 Win64" . -DMYSQL_DIR="/path/to/mysql/installation"   

  [Read more...]
Last element for JSON array: what do you think?
Employee_Team +2 Vote Up -0Vote Down

After I released maintenance release of JSON UDFs last week it is time to think about which features I should implement in upcoming major version.

Many users asked me about the possibility to explicitly specify if they want to append last element to a JSON array. This feature can be made for two functions: json_append and json_set.

I have four ideas of how to implement this. All have pros and contras.

  • Create new function called json_append_last which will work exactly like json_append, but it will add the element to the end of array. I.e., for JSON document {"colors": ["red", "green", "blue"]} json_append_last(doc, 'colors', 'orange') returns

  •   [Read more...]
    JSON UDF functions version 0.2.1 have been released.
    Employee_Team +4 Vote Up -0Vote Down

    Today new version of JSON UDF functions: 0.2.1 was released. This is maintenance release which added no new functionality and only contains bug fixes. However, it also includes improvements for build ans test procedures. As usual, you can download source and binary packages at MySQL Labs. Binary packages were build for MySQL server 5.6.14. If you want to use other version of the server, you need to recompile functions.

    What was changed? Let me quote the ChangeLog.

    Functionality added or changed:

    Added cmake option WITH_PCRE which alolows to specify if existent or bundled version of PCRE  should be used. Bundled is default on Windows. To compile with bundled version, run: "cmake . -DMYSQL_DIR=/path/to/mysql/dir -DWITH_PCRE=bundled",

      [Read more...]
    To be safe or to be fast?
    Employee_Team +0 Vote Up -0Vote Down

    When I designed first version of JSON UDFs which was reviewed only internally, I let all functions to validate input and output JSON. But my colleagues told me to remove this functionality, because it makes such functions, as json_search, json_replace or json_contains_key deadly slow if they find the occurrence in the beginning of the long document. And first published version of JSON UDFs: 0.2.0 has not this functionality. What we expected is that users would call json_valid if they want to be 100% sure the document is valid.

    But I was not surprised that some users expect JSON functions to work as it was in the first version: validate first, then process. For example, Ammon Sutherland writes: "json_set - according to the documentation a

      [Read more...]
    JSON UDFs have own bugs.mysql.com category
    Employee_Team +0 Vote Up -0Vote Down

    JSON UDFs got own category at MySQL Bugs Database: "Server: JSON UDF"

    Use this category to post new bug reports and vote for existent.

    MariaDB Dynamic Columns client API
    +0 Vote Up -0Vote Down
    I have blogged on using MariaDB Dynamic Columns already, and I hope this was useful and introduction. I have a few more things on this subject though, but one so far little known and used feature is the Client API for Dynamic Columns, see the MariaDB Knowledge Base for details. What this is all about is that Dynamic Columns were originally envisioned as a means of managing the "dynamic columns" used by Cassandra when using the MariaDB Cassandra Storage Engine. But as we realize, this is the server side of things (the Storage Engine) but there is a corresponding client library also, that is part of the MariaDB Client API.

    As you have seen if you have read my previous blog on

      [Read more...]
    JSON UDFs first feedback
    Employee_Team +1 Vote Up -0Vote Down

    Yesterday Ulf Wendel created great blog post with deep analysis of JSON UDF functions which I presented at MySQL Connect at September, 21.

    Ulf found few bugs in these functions, I reported them all at bugs.mysql.com. You can find numbers in my comment to his blog post. But he also raised concerns, which can not be considered pure bugs, rather feature requests, or even design especiallities.

    * First concern, of course, is the documentation. Ulf writes: "Here’s what the README, the only documentation available apart from the *.c[omment]/*.h[elp] files".

    I agree single README file is not enough, but this is still Labs project for which I can not abuse MySQL documentation team for making proper documentation for me. But you still can find more

      [Read more...]
    MariaDB Dynamic Columns
    +1 Vote Up -0Vote Down
    MariaDB has a feature called Dynamic Columns which is not in MySQL, and this feature requires some explanation. It is used for example by the Cassandra Storage Engine, which is also unique to MariaDB, and as this is a schema-less database, which means we need a way to handle the fact that one one end MariaDB has a fixed set of columns defined by the schema, and on the other end, Cassandra provides any kind of attribute that the developer feels he wants to have for a particular "row" (which is a row in MariaDB but is not called a row in Cassandra).

    But ignoring the Cassandra engine for a while, let's look at what us mere mortals, brought up on mothers milk, SQL and Relational Theory under the watching eyes of E.F. Codd, can use this for, and fact is that it can be quite useful. All in all, what Dynamic Columns provide here is a means of adding non-schema data

      [Read more...]
    JSON datatype in MariaDB prototype
    +2 Vote Up -0Vote Down
    I have patched up a MariaDB version with JSON support, just for the fun of it. This is not the best version of MariaDB around, as I am not a MariaDB developer by any means, and although I have played with the MySQL and MariaDB sources before, I have never attemped to look like I know it in detail. So although this works, it's probably full of memory leaks, errors and bad code (my additions, that is).

    That said, it actually works. Surprise! For a simple prototype, that is to show off a specific feature.

    So, this is what I have: I grabbed MariaDB 10.0.2 sources and worked from there. To support the JSON specifics, I included the Jansson C-library for JSON. So far so good, then I wanted a JSON datatype, that was the first step. Adding a new datatype to MariaDB / MySQL is a pretty major

      [Read more...]
    SQL and JSON, what do you think?
    +1 Vote Up -0Vote Down
    As you might know, I'm a big fan of JSON. One big reason is that I believe that JSON is closer to most developers view on data, whereas the Relational SQL based model is closer to what someone working with data itself or someone working with infrastructure. What I mean here is that neither view is wrong, but they are different.

    So, given that, can we merge the Object JSON world with the relational model? Well, not JSON, but Hibernate does it quite well. This is one of my objects to the NoSQL world, that the datamodel is closely linked to the application at hand, and less so to data itself and to other applications. Stuff such as accounts, privileges, accounting data, orders and many other things are global, and are not specifically connected a specific application, but in many NoSQL applications, this is what it ends up being.

    And there are not

      [Read more...]
    What's the deal with NoSQL?
    +0 Vote Up -0Vote Down
    Everybody seems to be looking at and debating NoSQL these days, and so am I and I thought I'd say a few words about it. Which is not to say I haven't said stuff before, bit them I was mainly targeting specific attributes of many NoSQL solutions (like "eventual consistency" or, as you might call it, "instant inconsistency", What I was opposing is that "eventual consistency" has anything to do with just that, consistency. Rather, what this means is that at any point in time the system is inconsistent, and even if it might be consistent, you cannot rely on it being so. Which is fine, but don't call it consistency, call it inconsistency. Allowing a database to be somewhat inconsistent doesn't necessarily mean that it's something wrong with it).

    All this said, what is going on here, why are we MySQL and MariaDB users seeing so many

      [Read more...]
    Version 1.6 of mysqljsonimport now available
    +0 Vote Up -0Vote Down
    Yes, finally! This took some time, but I have been so busy with other things, work-related as well as domestic, that I just haven't had the time for this. But finally version 1.6 is available for download from sourceforge. The downloads is as usual the autoconf enabled source code and PDF documentation in PDF.

    So, what is new you ask, well there is one big new feature which took a lot more effort than I expected. When this program was written at first, I still have the table/use use in mind. What this means is that I visioned JSON objects to be mapped to a table. This is not how programmers view JSON, but this is how data is viewed in many databases, even NoSQL ones such as MongoDB. So I wanted an import tool for simple row-structured JSON

      [Read more...]
    JSON with MariaDB and MySQL Slides available
    +0 Vote Up -0Vote Down
    As you may know, I'm a big fan of JSON and I am working on releasing a new version of my JSON tools real soon. Meanwhile on the SkySQL Solutions Day on April 26 I gave a talk on JSON with MySQL and MariaDB, and the slides are available on slideshare.

    In Santa Clara now. 2 talks coming up
    +0 Vote Up -0Vote Down
    I'm in Santa Clara for Percona Live now, and things are looking good! The announceent on the merger of Monto Program and SkySQL is a good one! If you are around, I'll be speaking on MySQL on AWS on Thursday at 1:50 PM in Ballroom F. On Friday at SkySQL Solutions day (if you are at Percona Live and don't know about this, registration is free! Come see us, the program is here: http://www.skysql.com/content/mysql-cloud-database-solutions-day-schedule) I'll be talking about MySQL and MariaDB with JSON at 11:15 AM in Grand Ballroom B!

    I'm also about to release a new version of my MySQL JSON tools real soon!

    Searching document stores in 2013: from 1983 to SQL:2003 in a blink?
    Employee +2 Vote Up -0Vote Down

    I love the new NoSQL systems: more choices! After years of RDBMS dominance there are hundrets of NoSQL systems offering a wide range of data models, data distribution strategies and interfaces. Polyglot persistence describes the market change. I am most fascinated by document stores: nested data and data distribution go hand-in-hand. Nested data, finally. And, for those who like it: schemaless or even schemafree. Maybe something to learn for MySQL? But their search capabilities… A word or two on SQL (SELECT … FROM … WHERE – SFW) and nested data.

    Learn from NoSQL document stores

    The classical relational data model requests all data to be in

      [Read more...]
    Two Cons against NoSQL. Part I.
    +1 Vote Up -1Vote Down
    Two cons against NoSQL data stores read like this: 1. It’s very hard to move data out from one NoSQL to some other system, even other NoSQL. There is a very hard lock in when it comes to NoSQL. If you ever have to move to another database, you have basically to re-implement a lot [...]
    Open World 2012
    +0 Vote Up -0Vote Down

    In prior years a daily update from Open World was possible, but this year my schedule was too full to support it. This is my compendium of thoughts about MySQL Connect, JavaOne, and Open World 2012.

    MySQL Connect was great – good sessions re-enforcing the positive investments Oracle is making in the product. I’ll leave to others to qualify changes in what elements of technology are opened or closed along the road to a better MySQL. The announcement of Connector/Python 1.0 GA on Saturday was great news and as a community we owe a lot to Greet Vanderkelen.

    NoSQL is a hot topic along with using JSON objects and it was interesting hearing of some unequal testing paradigms to position non-Oracle solutions to be

      [Read more...]
    MariaDB Directions
    +5 Vote Up -0Vote Down

    Infor announced this week, that they will provide open source database alternatives to some of their products. MariaDB has been chosen, tested, and certified by Infor to be the open source database of choice (together with MySQL) for the Infor LN and ION products. Infor LN is Infor’s flagship ERP and is sometimes better known by its former name, Baan. It has 25 years of manufacturing know-how built into it and is used by more than 5,000 companies worldwide in a wide range of industries. These include automotive, industrial equipment and machinery, high tech and electronics, and aerospace and defense. This is a big stamp of approval that even the most critical systems can be run on MariaDB.

    In other news, there are currently several really interesting paths coming together into some important

      [Read more...]
    MySQL JSON import tool version 1.4 is out
    +2 Vote Up -0Vote Down
    This is just a quick notice that there is a new version of the JSON import tool available now. The main thing in it is that it fixes an iddues with threadinig that caused a threaded load (and this is the default) to hang of there was an error or the import was interrupted. Also, there are some minor fixes and also a runtime status printing, available by sending a SIGUSR1 signal to the process, feature is available.

    Download from sourceforge.

    New MySQL JSON import and export tools
    +1 Vote Up -0Vote Down

        My idea for a JSON based SQL schema tool that I wrote about some time ago has been on the backburner as I wanted to finish two other projects:
    • A better JSON import tool to substitute the old mysqljsonload.
    • Fix up mysqljsonexport to align it with mysqljsonimport.

    These two projects are now done and the program are ready for download from Sourceforge, mysqljsonimport from here and mysqljsonexport from here. There is some serious changes to

      [Read more...]
    Tab Sweep - JSON, OSGi, GlassFish+NetBeans experience, JAXB and JodaTime, file uploads & more
    Employee_Team +0 Vote Up -1Vote Down

    Recent Tips and News on Java, Java EE 6, GlassFish & more :

    JSON to Java with JDK6 (Julien)
    What does the future hold for OSGi without leader Peter Kriens? (JAXenter)
    JavaCloudGuy: Glassfish (Java EE 6) is now available as option in #cumulogic (Twitter)
    JAXB and Joda-Time: Dates and Times (Blaise)

      [Read more...]
    Drizzle JSON interface merged
    +2 Vote Up -0Vote Down


    Currently a very early version of course, but it’s there in trunk if you want to play with it. Just have libcurl and libevent installed and you can submit queries via HTTP and JSON. Of course, the next steps are getting a true non-sql interface going and seeing how people go with it.

    Showing entries 1 to 30 of 36 Next 6 Older Entries

    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.