[Firebird-devel] [FB-Tracker] Created: (CORE-5802) Field name length check wrongly on max bound if national characters specified

2018-04-19 Thread Karol Bieniaszewski (JIRA)
Field name length check wrongly on max bound if national characters specified
-

 Key: CORE-5802
 URL: http://tracker.firebirdsql.org/browse/CORE-5802
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 3.0.4
Reporter: Karol Bieniaszewski


Database WIN1250 (if matter)

-OK--

SELECT 1 AS "Suma wszystkich INSP_ID rosnącoo" FROM RDB$DATABASE

---
SQL error code = -104

Name longer than database column size. => 


---WRONG

SELECT 1 AS "Suma wszystkich INSP_ID rosnąco" FROM RDB$DATABASE

---

arithmetic exception, numeric overflow, or string truncation

string right truncation

expected length 31, actual 31.


---




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

   

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-5800) After backup/restore the indexes by expression on computed field are not working properly.

2018-04-19 Thread Polesov (JIRA)
After backup/restore the indexes by expression on computed field are not 
working properly.
--

 Key: CORE-5800
 URL: http://tracker.firebirdsql.org/browse/CORE-5800
 Project: Firebird Core
  Issue Type: Bug
Affects Versions: 2.5.8
Reporter: Polesov


Firebird version WI-V6.3.7.27050

Create the table:
create table T (
A  char(1),
B  char(1),
C  computed by (A || ' ' || B)
);

Create an index by expression on the calculated field:
create index IDX_T_C on T computed by (lower( C ));

Insert data into table:

insert into T ( A, B ) values ( 'A', 'B' );
insert into T ( A, B ) values ( 'C', 'D' );
insert into T ( A, B ) values ( 'E', 'F' );
commit;


Execute the query:
select * from T where lower( C ) = 'a b';

Result:
A  B  C
== == ==
A  B  A B
plan (T index (IDX_T_C))


After backup/restore, the query does not return data:
select * from T where lower( C ) = 'a b';

No have results:
plan (T index (IDX_T_C))

Change the query without using the index:
select * from T where lower( C ) || '' = 'a b';

Result:
A  B  C
== == ==
A  B  A B
plan (T natural)

After rebuilding the index, the indexes working properly:
alter index IDX_T_C active;


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel