» tagged pages
» logout

(Feed found, click Add Page to syndicate.) Error finding feed, please try again » Find feed title

A Blog Page allows you to add entries, for news or other time sensitive postings

(Login required to save to your tagged pages.)
(or Cancel)

Make further edits, (or Cancel)

(Login required to save to your tagged pages.)
(or Cancel)

(Editing anonymously: to be credited for your changes, login or register a new account)

Change Page Permissions? Changing these permissions will adjust who can modify this page.

Anonymous (change)
(change)
(or Cancel)
Upload an image from your computer:
or Copy an image from a URL:
or Erase the current icon:
Icon Preview:

or Cancel

Erase Gotchas? The contents of Gotchas page and all pages directly attached to Gotchas will be erased.

or Cancel

(Editing anonymously: to be credited for your changes, login or register a new account)

other page actions:
Gotchas

Gotchas

Tags Applied to gotchas

No one has tagged this page.

Gotchas Wiki Pages

What is Gotchas? Edit this page and describe it here.

sorted by: recent | see : popular
Content Tagged Gotchas

Can't get courier daemon to login mysql? - Ubuntu Forums

Got it to work, whitespace at the end of the config lines....ergh

Postfix: del.icio.us/tag/postfix

SHOW VARIABLES Shows Variables MySQL Does Not Know About

The listing of Dynamic System Variables on the MySQL Reference Manual’s page is supposed to show those variables you can change on-the-fly. innodb_data_home_dir is listed there as a dynamic variable, but it is not one, and trying to change it on-the-fly doesn’t work: mysql> set global innodb_data_home_dir="/data/mysql/data"; ERROR 1193 (HY000): Unknown system variable 'innodb_data_home_dir' mysql> set session innodb_data_home_dir="/data/mysql/data"; ERROR [...]

MySQL: Planet MySQL

Multiple Threads : Phil Harman's Weblog

things to know before running UFS on a ZVOL

zfs: del.icio.us/tag/zfs

Views and Social Engineering

CREATE TABLE secretData (
	secretValue int COMMENT 'If this goes over 5, WWIII will start'
);

CREATE SQL SECURITY DEFINER VIEW censoredData AS
SELECT * FROM secretData WHERE secretValue 

<telephone> ring ring

<sysadmin> “Hello?”

<evilFiend> “I’d like to create an insertable view on some tables I already have rights to. I don’t know just yet what I’ll use for my select statement.”

<sysadmin> “Ok. I’ll set it up so you can do what you’d like.”

CREATE SQL SECURITY INVOKER VIEW evilFiendsView AS SELECT 1;
GRANT SELECT, INSERT, ALTER ON test.evilFiendsView TO 'evilFiend'@'%';

Evil Fiend

evilFiend connects to the server, while twiddling the end of his handlebar mustache.

ALTER VIEW evilFiendsView AS
SELECT * FROM censoredData WITH LOCAL CHECK OPTION;

INSERT INTO evilFiendsView VALUES (42);

Muhahaha!

MySQL: Planet MySQL

snoyes: Messing with LAST_INSERT_ID()

Time for another MySQL Community Quiz:

Everybody knows that LAST_INSERT_ID() returns the value most recently created in an auto_increment column. Fewer of us know that you can pass a value to LAST_INSERT_ID(), and that value will be returned for the next call to LAST_INSERT_ID(). For example,

INSERT INTO table (someNonAutoIncrementField) VALUES (LAST_INSERT_ID(42));
SELECT LAST_INSERT_ID();

The INSERT inserts ‘42′ into the table, and the SELECT returns 42.

So, here’s the question: What if we pass an expression to LAST_INSERT_ID and also use an auto_increment field in the same statement?

CREATE TABLE test (id int auto_increment primary key, field int);
INSERT INTO test (id, field) VALUES (NULL, LAST_INSERT_ID(42));
SELECT LAST_INSERT_ID();

Show Answer ▼

And for a follow up, does it matter if you swap the insertion around?

INSERT INTO test (field, id) VALUES (LAST_INSERT_ID(42), NULL);
SELECT LAST_INSERT_ID();

Show Answer ▼

The manual warns about mixing LAST_INSERT_ID() and LAST_INSERT_ID(expr). This may fall under that same caveat.

MySQL: Planet MySQL

snoyes: Views and Social Engineering

CREATE TABLE secretData (
	secretValue int COMMENT 'If this goes over 5, WWIII will start'
);

CREATE SQL SECURITY DEFINER VIEW censoredData AS
SELECT * FROM secretData WHERE secretValue 

<telephone> ring ring

<sysadmin> “Hello?”

<evilFiend> “I’d like to create an insertable view on some tables I already have rights to. I don’t know just yet what I’ll use for my select statement.”

<sysadmin> “Ok. I’ll set it up so you can do what you’d like.”

CREATE SQL SECURITY INVOKER VIEW evilFiendsView AS SELECT 1;
GRANT SELECT, INSERT, ALTER ON test.evilFiendsView TO 'evilFiend'@'%';

Evil Fiend

evilFiend connects to the server, while twiddling the end of his handlebar mustache.

ALTER VIEW evilFiendsView AS
SELECT * FROM censoredData WITH LOCAL CHECK OPTION;

INSERT INTO evilFiendsView VALUES (42);

Muhahaha!

MySQL: Planet MySQL

TracOnDreamhost

This posting helped me fixed issues i was having after i followed natmaster's guide to installing trac on Dreamhost. http://natmaster.com/articles/installing_trac_0.10.php

Trac: del.icio.us/tag/trac

Page 1 | Next >>
Username:
Password:
(or Cancel)