Search found 211 matches
- 08.08.2022, 16:17
- Forum: User Patches
- Topic: Fix for MySQL GetIndexInfo listing all indexes as unique.
- Replies: 14
- Views: 638
Re: Fix for MySQL GetIndexInfo listing all indexes as unique.
The bug I mentioned above in StrToBoolEx() exists in two of the overloads and affects both the 'yes' check and the 'true' check I mentioned above (due to the buffer position not being incremented properly beyond +1) So the two overloads affected are: function StrToBoolEx(Buf, PEnd: PAnsiChar; const ...
- 08.08.2022, 13:07
- Forum: User Patches
- Topic: Fix for MySQL GetIndexInfo listing all indexes as unique.
- Replies: 14
- Views: 638
Re: Fix for MySQL GetIndexInfo listing all indexes as unique.
Note that if we just fix the bug in StrToBoolEx without fixing the logic of the GetIndexes call then the NONUNIQUE value will be reversed, so it's important to do both.
-Mark
-Mark
- 08.08.2022, 12:57
- Forum: User Patches
- Topic: Fix for MySQL GetIndexInfo listing all indexes as unique.
- Replies: 14
- Views: 638
Re: Fix for MySQL GetIndexInfo listing all indexes as unique.
That's odd. I've tested it quite a bit. What do you get if you put this code in that function (at that same line)? Note that the dataset's type for IndexInfoColNonUniqueIndex is a boolean and the existing code tries to set it as a string (and I think the logic of it is incorrect regardless.) Result....
- 07.08.2022, 04:14
- Forum: User Patches
- Topic: Fix for MySQL GetIndexInfo listing all indexes as unique.
- Replies: 14
- Views: 638
Fix for MySQL GetIndexInfo listing all indexes as unique.
In unit ZDbcMySqlMetadata, function TZMySQLDatabaseMetadata.UncachedGetIndexInfo replace the line: Result.UpdateString(IndexInfoColNonUniqueIndex, LowerCase(BoolStrs[GetInt(ColumnIndexes[2]) = 0])); with Result.UpdateBoolean(IndexInfoColNonUniqueIndex, (GetInt(ColumnIndexes[2]) = 1)); -Mark
- 06.08.2022, 14:40
- Forum: ZeosLib 7.3/8.0 Forum
- Topic: MySQL Metadata for keys
- Replies: 1
- Views: 112
MySQL Metadata for keys
It looks like the MySQL metadata calls: UncachedGetImportedKeys UncachedGetExportedKeys UncachedGetCrossReference All currently don't work on MySQL 5.7 and MySQL 8.0 (those are the only two versions I have access to.) They all seem to rely on the command: SHOW TABLE STATUS FROM %s LIKE ''%s'' which ...
- 05.08.2022, 11:57
- Forum: MySQL
- Topic: Connect to external MySql database with TLS
- Replies: 4
- Views: 712
Re: Connect to external MySql database with TLS
I'm no expert on MySQL or TLS however I was able to get an SSL connection (or at least connect) by using the database property: MYSQL_SSL=TRUE It also seemed that I had to use the mariadb client as the mysql one that I tried didn't appear to support ssl. More info: https://zeoslib.sourceforge.io/vie...
- 29.07.2022, 17:09
- Forum: ZeosLib 7.3/8.0 Forum
- Topic: Change Schema in ZConnection with PostgreSQL
- Replies: 8
- Views: 484
Re: Change Schema in ZConnection with PostgreSQL
I'm not sure setting catalog works for Pg. Pg's "current schema" handling is a bit different than other databases. I just run
set search_path = MySchema
after login.
-Mark
set search_path = MySchema
after login.
-Mark
- 26.04.2022, 16:17
- Forum: ZeosLib 7.3/8.0 Forum
- Topic: PostgreSQL bug with array field
- Replies: 22
- Views: 715
Re: PostgreSQL bug with array field
I wonder wether it makes sense to just tell people to use text mode result sets if one wants to use arrays. Otherwise we will have to document which array types we support and which array types we don't support. Rearding writing of arrays: I seem to remember that Egonhugeist told me PostgreSQL alwa...
- 26.04.2022, 12:47
- Forum: ZeosLib 7.3/8.0 Forum
- Topic: PostgreSQL bug with array field
- Replies: 22
- Views: 715
Re: PostgreSQL bug with array field
Good points by all and it's definitely a shame that pglib doesn't support mixed mode. I don't personally use the more esoteric types of the various databases (varray in Oracle is another one off the top of my head.) Note that I believe you can reset the pg driver to string mode using "BinaryWir...
- 24.04.2022, 13:30
- Forum: ZeosLib 7.3/8.0 Forum
- Topic: PostgreSQL bug with array field
- Replies: 22
- Views: 715
Re: PostgreSQL bug with array field
My proposal would be to keep the datatype used for arrays as an stStream and not use stArray for this. Doing so requires two changes: #1: if ColumnType is a stream in TZPostgreSQLResultSet.Open set its precision to zero. It will only be non-zero in cases where the array element is a varchar(#)[] typ...
- 21.04.2022, 14:09
- Forum: ZeosLib 7.3/8.0 Forum
- Topic: PostgreSQL bug with array field
- Replies: 22
- Views: 715
Re: PostgreSQL bug with array field
I wonder if this is an effect of changing the Pg driver mode to binary. In string mode, I believe it would return a csv-like representation of the array data. I have not tested that; it's just based on my reading up on the issue. In binary mode you'd have to construct that string using the structure...
- 28.03.2022, 18:31
- Forum: ZeosLib 7.3/8.0 Forum
- Topic: Firebird - Disconnect and inability to reconnect after AbortOperation.
- Replies: 1
- Views: 207
Firebird - Disconnect and inability to reconnect after AbortOperation.
Using FB3 server and running a cartesian product join on two large tables (just to have something lengthy to abort.) Calling ZConn.AbortOperation closes the connection and leaves it in a state where it seems that a reconnect doesn't work. Exiting the program is the only solution as far as I can tell...
- 18.12.2021, 14:20
- Forum: MS SQL Server
- Topic: TZQuery opens a temporary table, all fields are read-only?
- Replies: 29
- Views: 1906
Re: TZQuery opens a temporary table, all fields are read-only?
[Redacted thing I posted when I thought this was for MySQL and not SQLServer! Apologies!]
-Mark
-Mark
- 20.07.2021, 12:37
- Forum: ZeosLib 7.3/8.0 Forum
- Topic: Close before Open
- Replies: 42
- Views: 1458
Re: Close before Open
Safe wishes sent!
-Mark
-Mark
- 17.06.2021, 11:11
- Forum: ZeosLib 7.3/8.0 Forum
- Topic: Firebird and SupportsMixedCaseIdentifiers
- Replies: 5
- Views: 186
Re: Firebird and SupportsMixedCaseIdentifiers
Thanks!
-Mark
-Mark