[firebird-support] Why this returns string truncate??
I have this situation: CREATE TABLE TESTE (TXT VARCHAR(100)); insert into TESTE(TXT) values ('MECNICA'); This simple select return Arithmetic overflow or division by zero has occurred. Arithmetic exception, numeric overflow, or string truncation. String right truncation. select UPPER(TXT) from TESTE Tested with FB 2.5.1 and 2.5.0. Why it occurs? [Non-text portions of this message have been removed] ++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [firebird-support] Why this returns string truncate??
Em 13/12/2011 09:32, Fabiano escreveu: > I have this situation: > > > > CREATE TABLE TESTE (TXT VARCHAR(100)); > > > > insert into TESTE(TXT) values ('MECƒNICA'); > > > > This simple select return “Arithmetic overflow or division by zero has > occurred. Arithmetic exception, numeric overflow, or string truncation. > String right truncation.” > > > > select UPPER(TXT) from TESTE > > > > Tested with FB 2.5.1 and 2.5.0. > > Why it occurs? > > > Try to use charset ISO8859_1 or Win_1252 ++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[firebird-support] Multi-Version Consistent Read Question
Hello, I am researching methods to achieve high throughput for a learning chat application I am designing as a self-led student. I came across the Multiversion Control method of ACID and have a theoretical question: though it seems remote that a reader of data wouldn't get an "old" read what has been the experience and when this occurs what methods are available to alert the read user that data has been updated? Thank you, Joey [Non-text portions of this message have been removed]
Re: [firebird-support] Multi-Version Consistent Read Question
Hello Joey, Can you please tell in what university you are studying? Why you have chosen Firebird - was it some recommendation? Regards, Alexey Kovyazin > Hello, > > I am researching methods to achieve high throughput for a learning chat > application I am designing as a self-led student. I came across the > Multiversion Control method of ACID and have a theoretical question: > though > it seems remote that a reader of data wouldn't get an "old" read what has > been the experience and when this occurs what methods are available to > alert the read user that data has been updated? > > Thank you, > Joey > > [Non-text portions of this message have been removed] > > [Non-text portions of this message have been removed]
RES: [firebird-support] Why this returns string truncate??
I use charset WIN_1252 for Portuguese characters. -Mensagem original- De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] Em nome de Alexandre Benson Smith Enviada em: terça-feira, 13 de dezembro de 2011 15:06 Para: firebird-support@yahoogroups.com Assunto: Re: [firebird-support] Why this returns string truncate?? Em 13/12/2011 09:32, Fabiano escreveu: > I have this situation: > > > > CREATE TABLE TESTE (TXT VARCHAR(100)); > > > > insert into TESTE(TXT) values ('MECƒNICA'); > > > > This simple select return “Arithmetic overflow or division by zero has > occurred. Arithmetic exception, numeric overflow, or string truncation. > String right truncation.” > > > > select UPPER(TXT) from TESTE > > > > Tested with FB 2.5.1 and 2.5.0. > > Why it occurs? > > > Try to use charset ISO8859_1 or Win_1252 ++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++ Yahoo! Groups Links ++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [firebird-support] Why this returns string truncate??
What's you connection charset ? You must use the same charset. see you Em 13/12/2011 15:33, Fabiano escreveu: > I use charset WIN_1252 for Portuguese characters. > > -Mensagem original- > De: firebird-support@yahoogroups.com > [mailto:firebird-support@yahoogroups.com] Em nome de Alexandre Benson Smith > Enviada em: terça-feira, 13 de dezembro de 2011 15:06 > Para: firebird-support@yahoogroups.com > Assunto: Re: [firebird-support] Why this returns string truncate?? > > Em 13/12/2011 09:32, Fabiano escreveu: >> I have this situation: >> >> >> >> CREATE TABLE TESTE (TXT VARCHAR(100)); >> >> >> >> insert into TESTE(TXT) values ('MECƒNICA'); >> >> >> >> This simple select return “Arithmetic overflow or division by zero has >> occurred. Arithmetic exception, numeric overflow, or string truncation. >> String right truncation.” >> >> >> >> select UPPER(TXT) from TESTE >> >> >> >> Tested with FB 2.5.1 and 2.5.0. >> >> Why it occurs? >> >> >> > > Try to use charset ISO8859_1 or Win_1252 > > > > > > ++ > > Visit http://www.firebirdsql.org and click the Resources item > on the main (top) menu. Try Knowledgebase and FAQ links ! > > Also search the knowledgebases at http://www.ibphoenix.com > > ++ > Yahoo! Groups Links > > > > > > > > ++ > > Visit http://www.firebirdsql.org and click the Resources item > on the main (top) menu. Try Knowledgebase and FAQ links ! > > Also search the knowledgebases at http://www.ibphoenix.com > > ++ > Yahoo! Groups Links > > > > ++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [firebird-support] Multi-Version Consistent Read Question
On Tue, Dec 13, 2011 at 9:39 AM, Joey S. wrote: > > I am researching methods to achieve high throughput for a learning chat > application I am designing as a self-led student. I came across the > Multiversion Control method of ACID and have a theoretical question: though > it seems remote that a reader of data wouldn't get an "old" read what has > been the experience and when this occurs what methods are available to > alert the read user that data has been updated? MVCC can be implemented in several ways. The method used by Firebird (and InterBase and PostgreSQL) guarantees that old versions of records will be available as long as there are transactions that can read them. All these systems store old records in the actual data files and use a garbage collector (or vacuum) to remove them when the last transaction that can possibly read them exits. The method used by Oracle (and MySQL's InnoDB) keeps old versions in log files which are purged periodically. A long running transaction can get inconsistent data if the log file that contained the record version appropriate for it has been purged. So, the experience is that using the Firebird/Postgres method, readers always get a consistent view of data. With Oracle and InnoDb, less so. Firebird keeps information about each running transaction, including the oldest transaction that was running when the transaction started. When choosing record versions to remove, Firebird compares the transaction identifier in the record version header with the "oldest of the oldest" - i.e. the oldest transaction that was running when the oldest transaction now running started - and keeps one version older than that. If the oldest transaction running is 200 and the oldest transaction running when it started was 175 and the chain of record versions goes 199, 176, 175, 174, 173, 140, 123, Firebird can remove the versions created by 173, 140, and 123. The newer versions will all stay until transaction 200 exits and the next "oldest of the oldest" is higher than 175. Does that help? Best regards, Ann
Re: [firebird-support] Multi-Version Consistent Read Question
At 03:39 AM 14/12/2011, Joey S. wrote: >Hello, > >I am researching methods to achieve high throughput for a learning chat >application I am designing as a self-led student. I came across the >Multiversion Control method of ACID and have a theoretical question: though >it seems remote that a reader of data wouldn't get an "old" read what has >been the experience and when this occurs what methods are available to >alert the read user that data has been updated? What the client can "see" depends on the isolation level of the transaction. At all levels, your client's transaction sees its own changes. Those will not be visible to any other transaction until your client's transaction commits. -- Read Committed allows a client to see any changes committed after his transaction started. It is the responsibility of the client application to re-query the database to bring the remote view up to date. -- Snapshot isolation (a.k.a. concurrency) keeps a persistent view of the database state as it was when your client's transaction started. Your client won't see changes committed by other transactions until his transaction commits. -- Snapshot Table Stability (a.k.a. consistency) is like concurrency, but it also prevents any other transactions from committing work on the tables it is reading. On the other side of the coin, it is difficult for the consistency transaction to get write access to the tables if other transactions already have it. You wouldn't use this level often, if ever. A transaction can *never* see pending writes for other transactions ("Dirty Read"). However, a pending write by one transaction will always cause a wait (if allowed by the lock resolution policy) or a lock conflict in any others that attempt to change the same rows. How you "alert the user" to changes is up to you. The methods available vary according to what you are using to wrap the API - some drivers have extreme "smarts" to detect changes. Commonly, any such methods are based on trapping lock conflict exceptions, the nature of which will depend on both the isolation level and the lock resolution policy (wait/no wait). Another approach is to use the Events mechanism in triggers, whereby an After Insert or Update or Delete trigger will issue a POST_EVENT when a state-changing operation is committed. Clients are set up to listen for these events and you write the application to respond in some appropriate way, e.g., re-query the tables (refresh) in Read Committed; or attempt to commit and refresh in Snapshot/concurrency. ./heLen
RE: [firebird-support] Re: Unable to insert data into Column - Email found in subject
> im going to act dumb, is it a bad idea to change struture etc with active > connections then? Generally, yes. We always put the database into single user mode when we perform schema updates on our Classic engine deployments. We have followed this practice for the last 9 years and we have never had a problem, so we never tested how the later FB versions might actually react. {If it ain't broke, don't mess with it} > "it seems likely > that you are modifying the table structure with active connections. Those > active connections are not aware of the table change..." > > Any ideas of a way to get them to pick up the changes without a Db engine > restart In theory, it is very simple, you need to simply close existing connections and open new connections. In practice, this may be problematic depending on how your application manages connections. Sean
Re: [firebird-support] Multi-Version Consistent Read Question
On Tue, Dec 13, 2011 at 1:53 PM, Helen Borrie wrote: > > What the client can "see" depends on the isolation level of the transaction. > At all levels, your client's transaction sees its own changes. Those will > not be visible to any other transaction until your client's transaction > commits. Helen is completely correct. The mechanism I described is the one used by Snapshot (concurrency) transactions. That's the mode that takes best advantage of MVCC for readers. Cheers, Ann
[firebird-support] <>
Greetings to all! May I have inquiry regarding firebird database. I need to replicate two database at a time without stopping the firebird services. Note: data in each database are synchronize. How can I do that? Is there a third party program need to install on my server in order to do this? Please share your idea about this. Thank you, Merry Christmas, Best regards, Richard Disclaimer: This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, received late or incomplete, or could contain viruses. The sender therefore does not accept liability for any error or omission in the contents of this message, which arises as a result of e-mail transmission. If verification is required, please request a hard-copy version from Toshiba Information Equipment (Phils.) Inc., 103 East Main Avenue Extension, Special Export Processing Zone, Laguna Technopark, Binan, Laguna, Philippines 4024 [Non-text portions of this message have been removed]