On Monday 17 November 2003 11:21, Bopolissimus Platypus wrote:
> is the software open source? can you go through the source code and
> just modify all references to the change table (and change.<column_name>
> if any) to some other table name? modifying the app is probably easier
> than modifying mysql (or mysql's parser or yacc files) to allow tables
> to be named "change".
hehe, just for fun, tried to do just that. edit sq/lex.h and modify the
"CHANGE" to something else (e.g., "CHANGE_XX" and rebuild mysql).
so yes, it *can* be done, and it's very easy. change only one line in one
file and rebuild. however, i have not tested extensively. the only test
i did was to see if i could create a table named change., and of course
whenever you need to do anything that uses the CHANGE keyword,
you need to use the alternate keyword instead (in the example, CHANGE_XX).
e.g.:
change:
{ "CHANGE", SYM(CHANGE),0,0},
to:
{ "CHANGE_XX", SYM(CHANGE),0,0},
anything that has CHANGE as part of the syntax will probably have to
be modified to use the new keyword, e.g.,
CHANGE MASTER TO...
http://www.mysql.com/doc/en/CHANGE_MASTER_TO.html#IDX851
ALTER TABLE has CHANGE clauses.
NOTE: i mention this only to show that it can be done and
because i thought it was funny. i don't recommend it since
you would be introducing a change into mysql behavior that
you probably shouldn't be. e.g., with every future version of
mysql (including security patches and such) you'd have to apply
the change before rebuilding. you'd have to build your own
versions of mysql instead of just downloading updates and
installing the packages (whatever your package system is).
it's probably better to just find all the occurrences of "change"
in SQL in that application and fix them. heh, if it's a binary
app, you could even just edit the binary directly, find all
occurrences of SQL strings with change in them and edit
the word to be, for instance, "delta9" or something else.
then you just modify your database schema to use delta9
instead of change. as long as the program doesn't do anything
weird (like calculate the table name from something binary,
e.g., i've seen strings might be encrypted or compressed to
save space in the binary) then even just editing the binary
will work.
but if you've got source, of course that's better (no need for
guessing whether a string is used for sending SQL to the
server or if it's just printed out to the log or something).
tiger
--
Gerald Timothy Quimpo gquimpo*hotmail.com tiger*sni*ph
http://bopolissimus.sni.ph
Public Key: "gpg --keyserver pgp.mit.edu --recv-keys 672F4C78"
This is a court of law, young man, not a court of justice.
Oliver Wendell Holmes.
--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie