Mar
31
2015
--

MySQL shell prompt vs MongoDB shell prompt

Recently Todd Farmer shared an interesting story about the mysql command line prompt in MySQL 5.7: how it was changed to provide more context and why the change was finally reverted. This made me think that after using the command line client for MongoDB for awhile, I would love seeing a much more modern mysql shell prompt. Here are a few examples of what a modern command line client can do.

Add dynamic information to the prompt

If you use replication with MongoDB, you have probably noticed a nice feature of the prompt: it is replication aware. What I mean is that for a standalone instance, the prompt is simply:

>

When you configure this instance to be the primary of a replica set named RS, the prompt automatically becomes:

RS:PRIMARY>

and for secondaries, you will see:

RS:SECONDARY>

And of course if an election is triggered and roles are switched, the prompt is updated accordingly to reflect the change.

Such a feature may not be easily transposed to MySQL as the allowed replication topologies are more flexible: for instance with master-master replication or for chained replication, some servers may be both a master and a slave.

However if you look a bit deeper how the MongoDB shell prompt can be customized, it is very flexible as you can set the prompt variable to the result of any Javascript function. So for instance if you write this:

var prompt=function() {
    return db.getName()+"/"+ISODate().toLocaleTimeString()+"> ";
}

Your prompt will be changed to something like:

test/11:37:51>

And the change can be persisted by defining the prompt variable in a ~/.mongorc.js file.

If I could do something similar with MySQL, I would for instance be able to know the replication lag of a slave or the uptime of MySQL and so on and so forth. That would be incredibly useful in some situations.

Better help system

Let’s assume I want to manually fail over to a secondary in a MongoDB replica set. I can simply instruct the master that it should no longer be the master. But what is the exact command?

I know that it is rs.xxx because all replica sets functions have this format, so let’s simply open the shell and type rs. and all the available options show up:

> rs.
rs.add(                   rs.constructor            rs.propertyIsEnumerable(  rs.syncFrom(
rs.addArb(                rs.debug                  rs.prototype              rs.toLocaleString(
rs.apply(                 rs.freeze(                rs.reconfig(              rs.toString(
rs.bind(                  rs.hasOwnProperty(        rs.remove(                rs.valueOf(
rs.call(                  rs.help(                  rs.slaveOk(
rs.conf(                  rs.initiate(              rs.status(
rs.config(                rs.isMaster(              rs.stepDown(

Here again, I’d love to see something similar with MySQL. For instance each time I need to convert a timestamp to a human readable date, I have to look at the documentation to find the exact function name.

Actually I could have used the built-in help system to find the name of the function, but it is much more convenient to look at the documentation.

Conclusion

What’s your opinion on which new features a modern mysql shell should provide? If many people agree on a set of features, it could be worth filing a feature request to get a better mysql command line client in a future version of MySQL.

The post MySQL shell prompt vs MongoDB shell prompt appeared first on MySQL Performance Blog.

Mar
31
2015
--

Microsoft Simplifies Visual Studio Lineup And Pricing For Enterprise Users

visual studio Microsoft today announced that it will consolidate its Visual Studio Premium and Ultimate offerings for enterprises into a single product once it launches Visual Studio 2015 later this year. Now called Visual Studio Enterprise With MSDN, this new version will include all of the features developers were getting with Visual Studio Ultimate (IntelliTrace in production, CodeLens support, etc.). Read More

Mar
31
2015
--

Sensai Raises $900K To Help Data Scientists Query Unstructured Data

11189803153_88f2af5302_o Data analysis often involves looking at a large set of pretty uniform, well-structured data. But as companies continue to gather more electronic documents in all kinds of forms (and formats), those traditional techniques don’t work anymore. Companies like Palantir and IBM (with Watson) are now making it easier for data scientists and technical users to query unstructured textual… Read More

Mar
31
2015
--

Google Drive For Work, Education Get New Data Security Features

Google (fisheye) Google is launching an update to Drive for Work and Drive for Education today that introduces a number of new tools for users who need to have greater control over how their data is shared both internally and with external customers. Over the next few weeks, both Google Drive for Work and Google Drive for Education users will get access to these new tool. Read More

Mar
31
2015
--

Percona XtraBackup 2.2.10 for MySQL hot backups is now available (free!)

Percona XtraBackup for MySQL Percona is glad to announce the release of Percona XtraBackup 2.2.10 on March 31, 2015. Downloads are available from our download site or Percona Software Repositories.

Percona XtraBackup enables MySQL backups without blocking user queries, making it ideal for companies with large data sets and mission-critical applications that cannot tolerate long periods of downtime. Offered free as an open source solution, Percona XtraBackup drives down backup costs while providing unique features for MySQL backups.

Bugs Fixed:

  • Decrypting backup with the wrong key would make the backup unusable and unrecoverable. innobackupex doesn’t automatically delete the *.qp and *.xbcrypt files anymore, after --decrypt and --decompress are used. Bug fixed #1413044.
  • XtraDB Changed Page Tracking wasn’t working with innobackupex. Bug fixed #1436793.
  • Fixed Percona XtraBackup assertion caused by dirty pages remaining in the buffer pool after the log was fully applied. Bug fixed #1368846.
  • Backup will not be prepared and innobackupex will stop with an error if the transaction log file is corrupted and it wasn’t applied to the intended LSN. Previously this was showing only as a warning. Bug fixed #1414221.
  • New status log-applied is introduced for backup prepared with --redo-only to avoid making the backup unusable by preparing full or incremental backup without --redo-only and then applying next incremental on top of it. Incremental backup now can be applied only to backup in log-applied state, but not to full-prepared as it was earlier. Bug fixed #1436790.

Release notes with all the bugfixes for Percona XtraBackup 2.2.10 are available in our online documentation. Bugs can be reported on the launchpad bug tracker. Percona XtraBackup is an open source, free MySQL hot backup software that performs non-blocking backups for InnoDB and XtraDB databases.

The post Percona XtraBackup 2.2.10 for MySQL hot backups is now available (free!) appeared first on MySQL Performance Blog.

Mar
31
2015
--

Frame.io Is Cloud-Based Collaboration For Everything

Surfers@1x Given the world’s shift toward video, both in terms of consumption and creation, it’s almost surprising how tedious and painstaking the process of post-production collaboration can be. Lots of services focus on pieces of the problem, like accelerated file sharing or review in-progress collaboration, but there isn’t really a service that covers everything, end-to-end.… Read More

Mar
31
2015
--

DroneDeploy Snags $9M As Its Drone Control Platform Soars Out Of Beta

DroneDeploy DroneDeploy is on a mission to make drones accessible to industrial users who have a business need for conducting outdoor landscape mapping and monitoring. So, in other words, it wants drones to be put to work by people other than enthusiastic dorks with a gadget habit — doing tasks like helping farmers spot crop damage and disease. Read More

Mar
31
2015
--

Snapdeal Acquires RupeePower, Will Add Loans, Other Financing To Its Marketplace

indian rupees India’s Snapdeal has been on an acquisition spree in the last several months, tapping into the $1.1 billion it has raised from the likes of Softbank to expand from being a marketplace for goods into a platform for all kinds of online transactions. The latest chapter in this story is today’s news that it has acquired a majority stake in RupeePower, a provider of loans and credit… Read More

Mar
30
2015
--

IBM Launches Major Internet Of Things Offensive

Conceptual image of platform with all of the industries in the world coming together on the Internet. IBM is wasting little time when it comes to the Internet of Things. The company outlined a major Internet of Things strategy tonight with a series of announcements that included a $3B investment to establish an Internet of Things unit inside of Big Blue along with a partnership with The Weather Company.
The Internet of Things refers to the growing network of sensors on everything from… Read More

Mar
30
2015
--

The Next Billion-Dollar Market Opportunity Is Mobile Enterprise

mobileenterprise Enterprise mobile applications – like enterprise cloud applications a decade before – are poised to become a $100 billion market opportunity. I’ve worked with enterprise technologies exclusively for more than a decade and have watched as cloud apps took the enterprise by storm, giving businesses more flexibility and power than ever before. Now, enterprise mobile is taking a… Read More

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com