Closed Bug 414292 Opened 18 years ago Closed 18 years ago

[Oracle] Change query in table series back to MEDIUMTEXT

Categories

(Bugzilla :: Database, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.2

People

(Reporter: xiaoou.wu, Assigned: xiaoou.wu)

Details

Attachments

(1 file)

Oracle LOB can not be used in group by, and we change it from LONGTEXT back to MEDIUMTEXT. Add get_alter_column_ddl, _get_alter_type_sql, get_rename_column_ddl to Oracle.
Attached patch v1Splinter Review
Assignee: database → xiaoou.wu
Status: NEW → ASSIGNED
Attachment #299659 - Flags: review?(mkanat)
How long before checksetup.pl completely messes up the DB with all these changes being undone?
Comment on attachment 299659 [details] [diff] [review] v1 Let's split this into two different bugs. One for switching the column back to MEDIUMTEXT, and another that enables ALTER COLUMN for Oracle. >+ # 2008-01-18 xiaoou.wu@oracle.com - Bug 414292 >+ $dbh->bz_alter_column('series', 'query', >+ { TYPE => 'MEDIUMTEXT', NOTNULL => 1 }); >+ > [snip] >- return if $dbh->bz_column_info('series', 'query')->{TYPE} eq 'LONGTEXT'; >+ return if >+ $dbh->bz_column_info('namedqueries', 'query')->{TYPE} eq 'LONGTEXT'; Apparently, you are not thinking, here, about what happens when people run checksetup.pl twice, which they do all the time.
Attachment #299659 - Flags: review?(mkanat) → review-
Flags: blocking3.2+
Target Milestone: --- → Bugzilla 3.2
> >+ # 2008-01-18 xiaoou.wu@oracle.com - Bug 414292 > >+ $dbh->bz_alter_column('series', 'query', > >+ { TYPE => 'MEDIUMTEXT', NOTNULL => 1 }); This will do all the time, it changes series.query to MEDIUMTEXT. > >+ return if > >+ $dbh->bz_column_info('namedqueries', 'query')->{TYPE} eq 'LONGTEXT'; > Apparently, you are not thinking, here, about what happens when people run > checksetup.pl twice, which they do all the time. If people run checksetup.pl again, it will return directly because namedqueries.query is already LONGTEXT and types had been changed, and the following alter-table steps are not needed to do.
Did you try actually running it twice on a real database?
What will happen when running checksetup.pl again? it always passed on my side and nothing changed.
Comment on attachment 299659 [details] [diff] [review] v1 Okay, so apparently I should review this again.
Attachment #299659 - Flags: review- → review?(mkanat)
Comment on attachment 299659 [details] [diff] [review] v1 Okay, this is fine, but the DB::Schema::Oracle part is not a part of this patch and I won't be checking it in with this patch.
Attachment #299659 - Flags: review?(mkanat) → review+
Checking in Bugzilla/DB/Schema.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Schema.pm,v <-- Schema.pm new revision: 1.99; previous revision: 1.98 done Checking in Bugzilla/Install/DB.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Install/DB.pm,v <-- DB.pm new revision: 1.51; previous revision: 1.50 done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Flags: approval+
Resolution: --- → FIXED
Comment on attachment 299659 [details] [diff] [review] v1 > # 2007-11-29 xiaoou.wu@oracle.com - Bug 153129 > _change_text_types(); > >+ # 2008-01-18 xiaoou.wu@oracle.com - Bug 414292 >+ $dbh->bz_alter_column('series', 'query', >+ { TYPE => 'MEDIUMTEXT', NOTNULL => 1 }); >+ > # 2007-09-09 LpSolit@gmail.com - Bug 99215 > _fix_attachment_modification_date(); Why are dates out of order?
(In reply to comment #10) > Why are dates out of order? I fixed that on checkin.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: