FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.26k stars 216 forks source link

Cannot restore Firebird 1.5.1 backup in Firebird 2.0.3 when database contains VARCHAR(250) indexed fields [CORE1471] #1888

Closed firebird-automations closed 15 years ago

firebird-automations commented 17 years ago

Submitted by: Pierre Yager (pierrey)

The user CUSTOMER has been created in the security databases of the two servers with the same password :

⁠ export ISC_USER=CUSTOMER

⁠ export ISC_PASSWORD=YouDontNeedToKnowIt

Server203#⁠ gbak -b Server151:/var/firebird/customer/database.fdb database.fbk Server203#⁠ gbak -c database.fbk database.fdb

gbak: ERROR:unsuccessful metadata update gbak: ERROR: key size exceeds implementation restriction for index "IDX_FIELD_TO_INDEX" gbak:Exiting before completion due to errors

Server151#⁠ isql-fb /var/firebird/customer/database.fdb Database: database.fdb, User: CUSTOMER SQL> show index; IDX_FIEDL_TO_INDEX INDEX ON THE_TABLE(FIELD_TO_INDEX)

SQL> show table THE_TABLE; THE_ID INTEGER Not Null FIELD_TO_INDEX VARCHAR(250) Nullable

...

I tried to copy the original database to Server203 then I tried to backup/restore with 2.03 gbak and restore failed with the same error.

When I drop the index from the original database (whatever the server is used to access the database), I can backup/restore it from 1.51->2.03 or from 2.03->2.03

When I create a database "from scratch" in 2.03 I can index VARCHAR(250) fields then backup/restore without problem.

firebird-automations commented 17 years ago

Commented by: Sean Leyne (seanleyne)

What is the page size of the v1.5 database?

What is the character set for the database?

Have you tried specifying a page size (4K) when restoring the database?

firebird-automations commented 17 years ago

Commented by: Pierre Yager (pierrey)

The 1.5 database page size is 1024, charset http://NONE.ls Restore works if -page_size 4096 argument is appended.

So... maybe 2.03 gbak could write a more useful error message. Or default database page to 4096 if small page sizes are prohibited ?

firebird-automations commented 17 years ago

Commented by: @hvlad

Nothing to fix i'd said.

firebird-automations commented 17 years ago
Modified by: @hvlad priority: Blocker \[ 1 \] =\> Trivial \[ 5 \]
firebird-automations commented 17 years ago

Commented by: @AlexPeshkoff

May be really make error message a bit better: key size exceeds implementation restriction for index "@1" - try to increase page size

I know we have a lot of "funny" messages, but we should begin somewhen to fix it too.

firebird-automations commented 17 years ago

Commented by: @dyemanov

This could be useful for restore, but I doubt it makes any sense for a regular database usage. If I use 16K page size and try to index a VARCHAR(32K) field, what should be my reaction after reading "try to increase page size"? :-)

firebird-automations commented 17 years ago

Commented by: @AlexPeshkoff

Yes, agreed. The best is to be able to adjust error message depending upon kind of attachment or directly in gbak, but this is far not burning task now. Suggest to close as won't fix.

firebird-automations commented 16 years ago
Modified by: @pcisar Workflow: jira \[ 13102 \] =\> Firebird \[ 13953 \]
firebird-automations commented 15 years ago
Modified by: @dyemanov status: Open \[ 1 \] =\> Resolved \[ 5 \] resolution: Won't Fix \[ 2 \]
firebird-automations commented 15 years ago
Modified by: @pcisar status: Resolved \[ 5 \] =\> Closed \[ 6 \]