Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
10 Newer Entries Showing entries 91 to 100 of 185 10 Older Entries

Displaying posts with tag: code (reset)

Shocked and Stunned (that code exists and does work)
+1 Vote Up -0Vote Down
#define READ_ALL           1       /* openfrm: Read all parameters */
#define EXTRA_RECORD            8       /* Reservera plats f|r extra record */

and later on….

  if (prgflag & (READ_ALL+EXTRA_RECORD))
    records++;

Feel free to think about that for a second.

(I have an urge to add this to questions asked in a job interview…)

sar-sql New Alpha Release
+2 Vote Up -0Vote Down

I just uploaded a new tarball for sar-sql containing a few bug fixes, overall code improvements. I also added options to get a partial snapshot of SHOW SLAVE STATUS and SHOW MASTER STATUS. I chose only a few columns to avoid over complicating the project.

I plan one more round of heavy code changes, but no new features until I can stabilize the code enough to release it as beta.


Feel free to visit the project page in Launchpad to comment on the Blueprints, report new bugs and …




  [Read more...]
MySQL Stored procedure – Split Delimited string into Rows
+0 Vote Up -0Vote Down

This procedure will split  a “;” separated column in to new fields preserving ids. This is very specific problem, lets check it with example. Consider a sample table test: And we want output as follows: So again I wrote a procedure. Procedure will read a data from “tmp” table and will split data by my_delimiter […]

MySQL Stored procedure – Execute query if table or Column exists
+0 Vote Up -0Vote Down

Well procedures mainly carried out working with information schema and it’s usage in stored procedure. Procedures are fairly simple and easy to understand. 1. Edit_table – following procedure executes queries to particular table if it exists. Basically I created it to satisfy a need of altering a table if column exists. Now it can be used […]

Stored procedure to Find database objects
+0 Vote Up -0Vote Down

This procedure lists available database objects under passed database name. It lists present Tables, Views, Stored Procedures, Functions and Triggers under particular database. It also lists storage engine of tables. It uses information schema database to gather information and storing in a temporary table. [ad#ad-2-300×250] Usage: call xplore(database-name); – Procedure will search through information schema […]

MySQL master master replication monitor with php code
+0 Vote Up -0Vote Down

For monitoring replication we know a lot of tools and codes – but this one is different because I wrote it Well this is fairly simple php code for monitoring a master master replication setup. It requires a single shared login id available on both MySQL servers. It will display in tabular format following details: […]

Calculate Mysql Memory Usage – Quick Stored Proc
+0 Vote Up -0Vote Down

While going through mysql doc and MySQL Server Memory Usage, I noted following quick points regarding how mysql uses memory. We have global buffers which are allocated irrespective of connections as and when mysql server is started. Along with that mysql server allocates memory to each thread to perform respective tasks. So the formula goes: Mysql […]

Discovr: a flickr experiment gone wrong
+0 Vote Up -0Vote Down

I need help with this. I had a dream… Well, not so much as a dream, maybe a “It’d be cool to…”

I thought it’d be nice to discover new photos on flickr using your favorite photos and the people who also favorited those photos, and the favorite photos of those who also favorited my pictures. Still with me?

It’s actually a quite simple code (about 500 lines, check it on github: discovr), but it’s terribly slow. Some possible reasons:

  • Way too much data. I’ve found …
  [Read more...]
Aspects and benefits of distributed version control systems (DVCS)
+2 Vote Up -0Vote Down

This blog post is a by-product of my preparation work for an upcoming talk titled "Why you should be using a distributed version control system (DVCS) for your project" at SAPO Codebits in Lisbon (December 3-5, 2009). Publishing these thoughts prior to the conference serves two purposes: getting some peer review on my findings and acting as a teaser for the actual talk. So please let me know — did I cover the relevant aspects or did I miss anything? What's your take on DVCS vs. the …

  [Read more...]
Replication slave lag monitoring using heartbeat and windows batch scripts
+0 Vote Up -0Vote Down

“Show Slave Status” command has a last column “Seconds_Behind_Master”, which gives us idea about how much time slave is lagging behind master. It is an important to be considered parameter in monitoring and maintaining replication. This article explains us a way to monitor replication slave lag time. It also includes a sample batch scripts to […]

10 Newer Entries Showing entries 91 to 100 of 185 10 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.