On Sun, 25 Mar 2001, Mike Noyes wrote:

> [EMAIL PROTECTED], 2001-03-25 12:35 -0800

[...]

> >I am still concerned about the loss of author attribution information.
> >The "stories" table uses the "aid" variable.
> 
> Since users can create content, don't you have to worry about the uid 
> variable too?
> CREATE TABLE users
> line #1: uid int(11)
> line #7: pass varchar(20)
> PRIMARY KEY (uid)

Yes, because of table "queue".  I don't quite follow what "queue" is
for, since the name implies transitory content but there seems to be no
destination for these fields.

> 
> >I have since looked closer at MySQL, and they claim that if you want to
> >maintain relations, it is more efficient for the application programmer to 
> >do this than for them to put foreign key enforcement in the database. 
> >Regardless of whether this is right, you have broken this relationship.
> >
> >If the "pwd" field is the author password, then substituting a single
> >default password for each password would seem to be more appropriate.
> 
> I'm out of my depth here, but my last conversation with Eric lead me to 
> believe otherwise.  If we decide to substitute the password it should be 
> done for users and authors, correct?
> 
> >If there are no quoted single-quotes in the author fields, the following
> >should do it:
> >
> >sed -e
> >"/INSERT/s/\((\('[^']*',\)\{4\}\)'\([^']*\)',\([^)]*\)/\1'dummy',\4\)/g"
> 
> Why did you use a global when there are multiple INSERT strings in the 
> mysqldump? Wont this insert dummy in areas we don't want it?

The g indicates multiple substitutions within the selected lines. My
mistake wsa in the line selection.  I simplified things while testing the
command, and forgot to constrain it to the author table when I sent that
message.

This version also handles quoting, I think.

sed -e "/INSERT INTO
author/s/\((\('\([^'\]\|\\\.\)*',\)\{4\}\)'\([^']*\)',\([^)]*\)/\1'dummy',\5/g"

---------------------------------------------------------------------------
sed -e "/INSERT INTO author/s/\((\('\([^'\]\|\\\.\)*',\)\{4\}\)'\([^'\]\|\\
\.\)*',\([^)]*\)/\1'dummy',\5/g"
---------------------------------------------------------------------------

and the next one looks like it might work for users, but you should test
it out.

---------------------------------------------------------------------------
sed -e "/INSERT INTO user/s/(\(\('\([^'\]\|\\\.\)*',\)\{6\}\)'\([^'\]\|\\\.
\)*'\(,'\([^'\]\|\\\.\)*'\)\{11\}/\1'dummy',\5/g"
---------------------------------------------------------------------------

> 
> author
> ('aid','name','url','email','pwd','counter')
> 
> user
> ('uid','name','uname','email','femail','url','pass','storynum','umode',\
> 'uorder','thold','noscore','bio','ublockon','ublock','theme','commentmax\
> ','counter')

are you sure that the pwd field in the author table is password and not
present working directory?  Users have a "pass" field... which would
appear to be inconsistent naming.

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[EMAIL PROTECTED]>        Basics: ##.#.       ##.#.  Live Go...
Work:<[EMAIL PROTECTED]>              Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------



_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to