question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add TreatTinyAsBoolean connection string option

See original GitHub issue

Implement the TreatTinyAsBoolean connection string option:

  • false - TINYINT(1) is a byte/sbyte
  • true (default) - TINYINT(1) is a bool

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
caleblloydcommented, Dec 9, 2016

I am about to start work on this, but I think it is worth discussing if TreatTinyAsBoolean=true is a sensible default. In my opinion, changing the data types based off length is unpredictable and therefore is not a sensible default, I would prefer to use TreatTinyAsBoolean=false as the default

I can see how it is confusing if somebody was using BOOL or BOOLEAN as their field types, however. MySql has created an alias of BOOL and BOOLEAN to map to TINYINT(1) (they should have made the alias map to BIT(1), but too late for that). In this case, I understand why somebody would expect TreatTinyAsBoolean=true as the default.

@bgrainger what is your opinion?

0reactions
bgraingercommented, Jun 20, 2019

@a-patel This issue is for tracking the implementation of the connection string option, which is done. If you have a bug report or question, please open a new issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Treat Tiny As Boolean" and Entity Framework 4
The trick is to add the 'Treat Tiny As Boolean=False' to the connection string and then to edit the edmx file in bot...
Read more >
MySQL .NET Connection String Options
A MySqlConnection is configured using a connection string. The connection string options are key/value pairs described on this page.
Read more >
4.5 Connector/NET Connection Options Reference
This chapter describes the full set of MySQL Connector/NET 8.0 connection options. The protocol you use to make a connection to the server...
Read more >
Connection Strings in the ADO.NET Entity Framework
A connection string contains initialization information that is passed as a parameter from a data provider to a data source.
Read more >
Changes in MySQL Connector/NET 5.2.0 (2008-02-11)
A new connection string option Treat Tiny As Boolean has been added with a default value of true . If set to false...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found