matomo-org / matomo-org/plugin-CustomVariables

Should we limit key values to varchar(50)?

Open
#41 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
4
Forks
6
Avg merge
6h 18m
Merged PRs (30d)
6

Description

When running
core:convert-to-utf8mb4
I got for table log_visit:
[Zend_Db_Adapter_Exception] SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs

My setup has 20 custom variables and 15 custom dimensions in scope visit.
To fix this, I decided to convert some of the custom_var_k* columns to varchar(100) as 100 chars for the key still seem to be long enough.

I think this change would make sense for 99% of matomo users and would give an easier upgrade path for big Matomo 3.x setups

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the core:convert-to-utf8mb4 command and the log_visit schema, focusing on the custom_var_k* columns described in the report. Determine whether changing their key length avoids the row-size error while preserving existing upgrades, and verify the conversion succeeds for setups with many custom variables and dimensions.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.