← Back to team overview

maria-developers team mailing list archive

Re: [Commits] Rev 3014: New table creation/renaming block added if old encoded table present. in file:///home/bell/maria/bzr/work-maria-5.1-CREATE/

 

Hi!

On 20.01.2011 16:04, Sergei Golubchik wrote:
Hi, sanja!

On Jan 13, sanja@xxxxxxxxxxxx wrote:
revno: 3014
revision-id: sanja@xxxxxxxxxxxx-20110113180607-e5hc8zuugxxjtn6k
parent: psergey@xxxxxxxxxxxx-20110112083018-90rw058f00uslvoz
committer: sanja@xxxxxxxxxxxx
branch nick: work-maria-5.1-CREATE
timestamp: Thu 2011-01-13 20:06:07 +0200
message:
   New table creation/renaming block added if old encoded table present.
First: there is no test case for the new (as compared with the previous
patch) change.
It just fail upgrade test which I had not noticed.

Second: I think "old_path" does not belong to the
check_table_file_presence() function. The function simply checks if the
file exists, there is no place for the concept of "old path" here.
You need to take care of the renaming for upgrade and old path outside
of check_table_file_presence().

I see 2 ways to do it:

1) Add a function for cases of renaming which will do the check (but it lead for double building old-style-path)

2) change check_table_file_presence() so that it will get old-style-path path as argument and build it for both checks with renaming in some super-function and separately for creation + separate function for old-style-path building to avoid the code copy.

3) Something better?

[skip]



References