• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

skeema / skeema / 14583325066
92%

Build:
DEFAULT BRANCH: main
Ran 21 Apr 2025 11:34PM UTC
Jobs 1
Files 78
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Apr 2025 11:10PM UTC coverage: 93.145% (-0.07%) from 93.213%
14583325066

push

github

evanelias
diff/push: improve char vs text length comparison logic

When converting a column type between char/varchar and a text type, an
existing safety check compares the maximum string length that is storable
in the old and new column definitions, and flags the change as unsafe if the
new length is potentially insufficient to store all old values. However, the
logic failed to account for multibyte characters properly: the maximum storage
of text types is listed in the MySQL/MariaDB manuals in terms of *bytes*, not
characters. For example, tinytext can store 255 bytes, but with utf8mb4
this is insufficient to safely store a varchar(64) consisting of all 4-byte
chars, so an ALTER TABLE attempting such a conversion is now flagged as
unsafe.

The real-life effect of this logic change is relatively minor, which is why
the discrepancy was never caught previously. It largely just affects
conversions to/from tinytext, as the other text types are sufficiently large
to always store the maximum-allowed char/varchar regardless of charset. And
with strict sql_mode, overly-large values will be flagged by the server and
the ALTER TABLE won't proceed anyway.

This commit also introduces helper logic that makes it easier to work with
charsets in general, and tracks flavor-specific differences in them.

40 of 50 new or added lines in 3 files covered. (80.0%)

10395 of 11160 relevant lines covered (93.15%)

1.11 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
10
78.72
-21.28% internal/tengo/charsets.go
Jobs
ID Job ID Ran Files Coverage
1 14583325066.1 21 Apr 2025 11:34PM UTC 78
93.15
GitHub Action Run
Source Files on build 14583325066
  • Tree
  • List 78
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 6e605487 on github
  • Prev Build on main (#14504514475)
  • Next Build on main (#14586827537)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc