Bug #1016 Add an AUTO_USER attribute. With Patch
Submitted: 9 Aug 2003 5:21 Modified: 15 Oct 2003 5:56
Reporter: Allen Morris Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:mysql-4.1.0-alpha OS:Linux (linux redhat 8ish)
Assigned to: Assigned Account CPU Architecture:Any

[9 Aug 2003 5:21] Allen Morris
Description:
Add an AUTO_USER attribute.  This attribute is simular to the TIMESTAMP field type.  When ever a row is updated or inserted the first AUTO_USER field will have the current user placed in it.  The semantics are (should be) exactly the same as TIMESTAMP.

Current only myisam and inodb are supported, but adding to ha_(...) files is easy.

The CREATE TABLE x (u USERSTAMP) syntax is support, but
CREATE TABLE x (u CHAR(16) NOT NULL AUTO_USER will work as well.

Error checking needs to be improved for the second case.

SHOW CREATE TABLE will generate correct text.

How to repeat:
a Test script is include in the patch.
[9 Aug 2003 5:22] Allen Morris
This patch adds an AUTO_USER / USERSTAMP field attribute

Attachment: patch (application/octet-stream, text), 27.84 KiB.

[9 Aug 2003 7:37] Sergei Golubchik
thank you for the patch,
[10 Aug 2003 20:16] Allen Morris
This patch does not seem to work if a slave is running.
[26 Oct 2006 15:31] Orfa Castillo
how install the patch