Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introspection fails instantly MariaDB #3708

Closed
Venefilyn opened this issue Sep 18, 2020 · 4 comments · Fixed by prisma/prisma-engines#1350
Closed

Introspection fails instantly MariaDB #3708

Venefilyn opened this issue Sep 18, 2020 · 4 comments · Fixed by prisma/prisma-engines#1350
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. tech/engines Issue for tech Engines. topic: introspection topic: mariadb

Comments

@Venefilyn
Copy link

Bug description

Report ID: 11391

I've installed Prisma in a repo and tried running introspect, but I'm being met with the following error

yarn run v1.22.5
$ cross-env DEBUG="*" yarn prisma introspect
$ G:\Code\Projects\NewValkyrja\Valkyrja.web\node_modules\.bin\prisma introspect
Environment variables loaded from prisma\.env

Introspecting based on datasource defined in prisma\schema.prisma …
  IntrospectionEngine:rpc starting introspection engine with binary: G:\Code\Projects\NewValkyrja\Valkyrja.web\node_modules\@prisma\cli\introspection-engine-windows.exe +0ms
  IntrospectionEngine:rpc SENDING RPC CALL {"id":1,"jsonrpc":"2.0","method":"introspect","params":[{"schema":"// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ndatasource db {\n  provider = \"mysql\"\n  url      = env(\"DATABASE_URL\")\n}\n\ngenerator client {\n  provider = \"prisma-client-js\"\n}\n"}]} +11ms
  IntrospectionEngine:stderr {"is_panic":true,"message":"[src\\libcore\\str\\mod.rs:2200:5] begin <= end (1 <= 0) when slicing `1`","backtrace":"   0: <unknown>\n   1: <unknown>\n   2: <unknown>\n   3: <unknown>\n   4: <unknown>\n   5: <unknown>\n   6: <unknown>\n   7: <unknown>\n   8: <unknown>\n   9: <unknown>\n  10: <unknown>\n  11: <unknown>\n  12: <unknown>\n  13: <unknown>\n  14: <unknown>\n  15: <unknown>\n  16: <unknown>\n  17: <unknown>\n  18: <unknown>\n  19: <unknown>\n  20: <unknown>\n  21: <unknown>\n  22: <unknown>\n  23: <unknown>\n  24: <unknown>\n  25: <unknown>\n  26: <unknown>\n  27: <unknown>\n  28: <unknown>\n  29: <unknown>\n  30: <unknown>\n  31: <unknown>\n  32: <unknown>\n  33: <unknown>\n  34: BaseThreadInitThunk\n  35: RtlUserThreadStart\n"} +0ms
Oops, an unexpected error occured!
[src\libcore\str\mod.rs:2200:5] begin <= end (1 <= 0) when slicing `1`

How to reproduce

  1. Run prisma introspect
  2. See error

Expected behavior

Introspection works

Prisma information

I've setup prisma.schema as follows

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
}

generator client {
  provider = "prisma-client-js"
}

with env

DATABASE_URL="mysql://root@localhost:3306/valkyrja"

Environment & setup

  • OS: Windows 10 Pro Version 10.0.19041 Build 19041
  • Database: MariaDB 10.5.5
  • Node.js version: v12.14.1
  • Prisma version:
$ prisma version
Environment variables loaded from prisma\.env
@prisma/cli          : 2.7.1
Current platform     : windows
Query Engine         : query-engine 5c2ad460cf4fe8c9330e6640b266c046542c8b6a (at node_modules\@prisma\cli\query-engine-windows.exe)
Migration Engine     : migration-engine-cli 5c2ad460cf4fe8c9330e6640b266c046542c8b6a (at node_modules\@prisma\cli\migration-engine-windows.exe)
Introspection Engine : introspection-core 5c2ad460cf4fe8c9330e6640b266c046542c8b6a (at node_modules\@prisma\cli\introspection-engine-windows.exe)
Format Binary        : prisma-fmt 5c2ad460cf4fe8c9330e6640b266c046542c8b6a (at node_modules\@prisma\cli\prisma-fmt-windows.exe)
Studio               : 0.288.0
Done in 1.10s.
@pantharshit00
Copy link
Contributor

Can you please share the database schema if possible?

This might be related to prisma/prisma-engines#950

@pantharshit00 pantharshit00 added bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. tech/engines/introspection engine Issue in the Introspection Engine kind/bug A reported bug. topic: introspection topic: mariadb labels Sep 21, 2020
@Venefilyn
Copy link
Author

Here's the SQL file of the database. I can try to experiment with a smaller database when I get the time

-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               10.5.5-MariaDB - mariadb.org binary distribution
-- Server OS:                    Win64
-- HeidiSQL Version:             11.0.0.5919
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;


-- Dumping database structure for valkyrja
CREATE DATABASE IF NOT EXISTS `valkyrja` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `valkyrja`;

-- Dumping structure for table valkyrja.blacklist
CREATE TABLE IF NOT EXISTS `blacklist` (
  `id` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.channels
CREATE TABLE IF NOT EXISTS `channels` (
  `serverid` bigint(20) unsigned NOT NULL,
  `channelid` bigint(20) unsigned NOT NULL,
  `ignored` tinyint(1) NOT NULL DEFAULT 0,
  `temporary` tinyint(1) NOT NULL DEFAULT 0,
  `muted_until` datetime NOT NULL,
  `auto_announce` tinyint(4) NOT NULL DEFAULT 0,
  PRIMARY KEY (`channelid`),
  UNIQUE KEY `channelid` (`channelid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.command_channel_options
CREATE TABLE IF NOT EXISTS `command_channel_options` (
  `serverid` bigint(20) unsigned NOT NULL,
  `commandid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `channelid` bigint(20) unsigned NOT NULL,
  `blacklisted` tinyint(1) NOT NULL,
  `whitelisted` tinyint(1) NOT NULL,
  PRIMARY KEY (`serverid`,`commandid`,`channelid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.command_options
CREATE TABLE IF NOT EXISTS `command_options` (
  `serverid` bigint(20) unsigned NOT NULL,
  `commandid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `permission_overrides` tinyint(4) NOT NULL,
  `delete_request` tinyint(1) NOT NULL,
  `delete_reply` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`serverid`,`commandid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.custom_aliases
CREATE TABLE IF NOT EXISTS `custom_aliases` (
  `serverid` bigint(20) unsigned NOT NULL,
  `commandid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `alias` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`serverid`,`alias`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.custom_commands
CREATE TABLE IF NOT EXISTS `custom_commands` (
  `serverid` bigint(20) unsigned NOT NULL,
  `commandid` varchar(127) COLLATE utf8mb4_unicode_ci NOT NULL,
  `response` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mentions_enabled` tinyint(4) DEFAULT 0,
  PRIMARY KEY (`serverid`,`commandid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.events
CREATE TABLE IF NOT EXISTS `events` (
  `serverid` bigint(20) unsigned NOT NULL,
  `userid` bigint(20) unsigned NOT NULL,
  `checkedin` tinyint(1) NOT NULL,
  `score` float NOT NULL,
  PRIMARY KEY (`serverid`,`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.exceptions
CREATE TABLE IF NOT EXISTS `exceptions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `shardid` bigint(20) NOT NULL,
  `serverid` bigint(20) unsigned NOT NULL,
  `datetime` datetime NOT NULL,
  `message` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `stack` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `data` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27856 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.global_config
CREATE TABLE IF NOT EXISTS `global_config` (
  `configuration_name` varchar(255) NOT NULL,
  `discord_token` varchar(255) NOT NULL,
  `userid` bigint(20) unsigned NOT NULL DEFAULT 278834060053446666,
  `admin_userid` bigint(20) unsigned NOT NULL DEFAULT 89805412676681728,
  `enforce_requirements` tinyint(1) NOT NULL DEFAULT 0,
  `verification_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `timers_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `polls_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `events_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `giveaways_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `livestream_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `total_shards` bigint(20) NOT NULL DEFAULT 1,
  `initial_update_delay` bigint(20) NOT NULL DEFAULT 1,
  `command_prefix` varchar(255) NOT NULL DEFAULT '!',
  `main_serverid` bigint(20) unsigned NOT NULL DEFAULT 155821059960995840,
  `main_channelid` bigint(20) unsigned NOT NULL DEFAULT 170139120318808065,
  `vip_skip_queue` tinyint(1) NOT NULL DEFAULT 0,
  `vip_members_max` bigint(20) NOT NULL DEFAULT 0,
  `vip_trial_hours` bigint(20) NOT NULL DEFAULT 36,
  `vip_trial_joins` bigint(20) NOT NULL DEFAULT 5,
  `antispam_clear_interval` bigint(20) NOT NULL DEFAULT 10,
  `antispam_safety_limit` bigint(20) NOT NULL DEFAULT 30,
  `antispam_fastmessages_per_update` bigint(20) NOT NULL DEFAULT 5,
  `antispam_update_interval` bigint(20) NOT NULL DEFAULT 6,
  `antispam_message_cache_size` bigint(20) NOT NULL DEFAULT 6,
  `antispam_allowed_duplicates` bigint(20) NOT NULL DEFAULT 2,
  `target_fps` float NOT NULL DEFAULT 0.05,
  `operations_max` bigint(20) NOT NULL DEFAULT 2,
  `operations_extra` bigint(20) NOT NULL DEFAULT 1,
  `maintenance_memory_threshold` bigint(20) NOT NULL DEFAULT 3000,
  `maintenance_thread_threshold` bigint(20) NOT NULL DEFAULT 44,
  `maintenance_operations_threshold` bigint(20) NOT NULL DEFAULT 300,
  `maintenance_disconnect_threshold` bigint(20) NOT NULL DEFAULT 20,
  `log_debug` tinyint(1) NOT NULL DEFAULT 0,
  `log_exceptions` tinyint(1) NOT NULL DEFAULT 1,
  `log_commands` tinyint(1) NOT NULL DEFAULT 1,
  `log_responses` tinyint(1) NOT NULL DEFAULT 1,
  PRIMARY KEY (`configuration_name`),
  UNIQUE KEY `configuration_name` (`configuration_name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.livestream
CREATE TABLE IF NOT EXISTS `livestream` (
  `serverid` bigint(20) unsigned NOT NULL,
  `channelid` bigint(20) unsigned NOT NULL,
  `type` tinyint(4) NOT NULL,
  `channel` varchar(255) NOT NULL,
  `islive` tinyint(1) NOT NULL,
  PRIMARY KEY (`channelid`,`type`,`channel`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.localisation
CREATE TABLE IF NOT EXISTS `localisation` (
  `id` bigint(20) unsigned NOT NULL,
  `iso` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'test',
  `about` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ab1',
  `string1` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '*Silence!!  ò_ó\\n...\\nI keel u, {0}!!*  Ò_Ó',
  `string2` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'string2',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.logs
CREATE TABLE IF NOT EXISTS `logs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `messageid` bigint(20) unsigned NOT NULL,
  `serverid` bigint(20) unsigned NOT NULL,
  `channelid` bigint(20) unsigned NOT NULL,
  `userid` bigint(20) unsigned NOT NULL,
  `type` tinyint(4) NOT NULL,
  `datetime` datetime NOT NULL,
  `message` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `logtype_timestamp` (`type`,`datetime`)
) ENGINE=InnoDB AUTO_INCREMENT=4974902 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.migrations
CREATE TABLE IF NOT EXISTS `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.nicknames
CREATE TABLE IF NOT EXISTS `nicknames` (
  `serverid` bigint(20) unsigned NOT NULL,
  `userid` bigint(20) unsigned NOT NULL,
  `nickname` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`serverid`,`userid`,`nickname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.partners
CREATE TABLE IF NOT EXISTS `partners` (
  `serverid` bigint(20) unsigned NOT NULL,
  `premium` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`serverid`),
  UNIQUE KEY `serverid` (`serverid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.polls
CREATE TABLE IF NOT EXISTS `polls` (
  `serverid` bigint(20) unsigned NOT NULL,
  `title` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` tinyint(4) NOT NULL,
  PRIMARY KEY (`serverid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.poll_options
CREATE TABLE IF NOT EXISTS `poll_options` (
  `serverid` bigint(20) unsigned NOT NULL,
  `option` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`serverid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.profile_options
CREATE TABLE IF NOT EXISTS `profile_options` (
  `serverid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `property_order` bigint(20) NOT NULL DEFAULT 0,
  `option` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `option_alt` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `label` varchar(2048) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `inline` tinyint(4) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.quotes
CREATE TABLE IF NOT EXISTS `quotes` (
  `serverid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `id` bigint(20) NOT NULL DEFAULT 0,
  `created_time` datetime DEFAULT NULL,
  `username` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `value` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.reaction_roles
CREATE TABLE IF NOT EXISTS `reaction_roles` (
  `serverid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `roleid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `messageid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `emoji` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.roles
CREATE TABLE IF NOT EXISTS `roles` (
  `serverid` bigint(20) unsigned NOT NULL,
  `roleid` bigint(20) unsigned NOT NULL,
  `permission_level` tinyint(4) NOT NULL DEFAULT 0,
  `public_id` bigint(20) NOT NULL DEFAULT 0,
  `logging_ignored` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_ignored` tinyint(1) NOT NULL DEFAULT 0,
  `level` bigint(20) NOT NULL DEFAULT 0,
  `delete_at_time` datetime NOT NULL DEFAULT '2000-01-01 01:01:01',
  PRIMARY KEY (`roleid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.role_groups
CREATE TABLE IF NOT EXISTS `role_groups` (
  `serverid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `groupid` bigint(20) NOT NULL DEFAULT 0,
  `role_limit` bigint(20) NOT NULL DEFAULT 1,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.server_config
CREATE TABLE IF NOT EXISTS `server_config` (
  `serverid` bigint(20) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nicknames` tinytext COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 1,
  `notification_channelid` bigint(20) NOT NULL DEFAULT 1,
  `antispam_porn` bigint(20) NOT NULL DEFAULT 1,
  `antispam_duplicate_multiuser` bigint(20) NOT NULL DEFAULT 1,
  `antispam_tolerance_ban` bigint(20) NOT NULL DEFAULT 1,
  `alert_role_mention` bigint(20) NOT NULL DEFAULT 1,
  `alert_channelid` bigint(20) NOT NULL DEFAULT 1,
  `tempchannel_giveadmin` bigint(20) NOT NULL DEFAULT 1,
  `tempchannel_categoryid` bigint(20) NOT NULL DEFAULT 1,
  `log_alert_regex` bigint(20) DEFAULT 1,
  `stats` bigint(20) NOT NULL DEFAULT 1,
  `captcha` bigint(20) NOT NULL DEFAULT 1,
  `verify_accountage` bigint(20) NOT NULL DEFAULT 1,
  `verify_accountage_days` bigint(20) NOT NULL DEFAULT 1,
  `color_alertchannel` bigint(20) NOT NULL DEFAULT 1,
  `profile_channelid` bigint(20) NOT NULL DEFAULT 1,
  `last_touched` datetime NOT NULL,
  `log_antispam_kick` tinyint(4) NOT NULL DEFAULT 1,
  `antispam_norole` bigint(20) NOT NULL DEFAULT 1,
  `antispam_norole_recent` bigint(20) NOT NULL DEFAULT 1,
  `invite_url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `antispam_norole_minutes` bigint(20) NOT NULL DEFAULT 0,
  `localisation_id` bigint(20) unsigned NOT NULL DEFAULT 0,
  `timezone_utc_relative` bigint(20) NOT NULL DEFAULT 0,
  `use_database` tinyint(1) NOT NULL DEFAULT 1,
  `ignore_bots` tinyint(1) NOT NULL DEFAULT 1,
  `ignore_everyone` tinyint(1) NOT NULL DEFAULT 1,
  `command_prefix` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '!',
  `command_prefix_alt` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `execute_on_edit` tinyint(1) NOT NULL DEFAULT 1,
  `antispam_priority` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_invites` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_invites_ban` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_duplicate` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_duplicate_crossserver` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_duplicate_ban` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_mentions_max` bigint(20) NOT NULL DEFAULT 0,
  `antispam_mentions_ban` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_mute` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_mute_duration` bigint(20) NOT NULL DEFAULT 5,
  `antispam_links_extended` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_links_extended_ban` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_links_standard` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_links_standard_ban` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_links_youtube` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_links_youtube_ban` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_links_twitch` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_links_twitch_ban` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_links_hitbox` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_links_hitbox_ban` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_links_beam` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_links_beam_ban` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_links_imgur` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_links_imgur_ban` tinyint(1) NOT NULL DEFAULT 0,
  `antispam_tolerance` bigint(20) NOT NULL DEFAULT 4,
  `antispam_ignore_members` tinyint(1) NOT NULL DEFAULT 0,
  `operator_roleid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `quickban_duration` bigint(20) NOT NULL DEFAULT 0,
  `quickban_reason` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mute_roleid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `mute_ignore_channelid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `karma_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `karma_limit_mentions` bigint(20) NOT NULL DEFAULT 5,
  `karma_limit_minutes` bigint(20) NOT NULL DEFAULT 30,
  `karma_limit_response` tinyint(1) NOT NULL DEFAULT 1,
  `karma_currency` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'cookies',
  `karma_currency_singular` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'cookies',
  `karma_consume_command` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'nom',
  `karma_consume_verb` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'nommed',
  `log_channelid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `mod_channelid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `log_bans` tinyint(1) NOT NULL DEFAULT 0,
  `log_promotions` tinyint(1) NOT NULL DEFAULT 0,
  `log_deletedmessages` tinyint(1) NOT NULL DEFAULT 0,
  `log_editedmessages` tinyint(1) NOT NULL DEFAULT 0,
  `activity_channelid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `log_join` tinyint(1) NOT NULL DEFAULT 0,
  `log_leave` tinyint(1) NOT NULL DEFAULT 0,
  `log_message_join` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `log_message_leave` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `log_mention_join` tinyint(1) NOT NULL DEFAULT 0,
  `log_mention_leave` tinyint(1) NOT NULL DEFAULT 0,
  `log_timestamp_join` tinyint(1) NOT NULL DEFAULT 0,
  `log_timestamp_leave` tinyint(1) NOT NULL DEFAULT 0,
  `welcome_pm` tinyint(1) NOT NULL DEFAULT 0,
  `welcome_message` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `welcome_roleid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `verify` tinyint(1) NOT NULL DEFAULT 0,
  `verify_on_welcome` tinyint(1) NOT NULL DEFAULT 0,
  `verify_roleid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `verify_karma` bigint(20) NOT NULL DEFAULT 3,
  `verify_message` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `exp_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `base_exp_to_levelup` bigint(20) NOT NULL,
  `exp_announce_levelup` tinyint(1) NOT NULL,
  `exp_per_message` bigint(20) NOT NULL,
  `exp_per_attachment` bigint(20) NOT NULL,
  `exp_cumulative_roles` tinyint(1) NOT NULL DEFAULT 0,
  `voice_channelid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `antispam_voice_switching` tinyint(1) NOT NULL DEFAULT 0,
  `color_logmessages` int(10) unsigned NOT NULL DEFAULT 16776960,
  `color_modchannel` int(10) unsigned NOT NULL DEFAULT 16711680,
  `color_logchannel` int(10) unsigned NOT NULL DEFAULT 255,
  `color_activitychannel` int(10) unsigned NOT NULL DEFAULT 65535,
  `color_voicechannel` int(10) unsigned NOT NULL DEFAULT 65280,
  `embed_modchannel` tinyint(1) NOT NULL DEFAULT 0,
  `embed_logchannel` tinyint(1) NOT NULL DEFAULT 0,
  `embed_activitychannel` tinyint(1) NOT NULL DEFAULT 0,
  `embed_voicechannel` tinyint(1) NOT NULL DEFAULT 0,
  `karma_per_level` bigint(20) unsigned NOT NULL DEFAULT 3,
  `exp_max_level` bigint(20) unsigned NOT NULL DEFAULT 0,
  `ban_duration` bigint(20) unsigned DEFAULT 0,
  `mute_message` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '0',
  `exp_advance_users` tinyint(1) NOT NULL DEFAULT 0,
  `profile_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `memo_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `log_warnings` tinyint(1) NOT NULL DEFAULT 0,
  `color_logwarning` int(10) unsigned NOT NULL DEFAULT 16489984,
  `exp_member_messages` bigint(20) NOT NULL DEFAULT 0,
  `exp_member_roleid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `tos` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `antispam_username` tinyint(1) NOT NULL DEFAULT 0,
  `verify_channelid` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`serverid`),
  UNIQUE KEY `serverid` (`serverid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.server_stats
CREATE TABLE IF NOT EXISTS `server_stats` (
  `shardid` bigint(20) NOT NULL,
  `serverid` bigint(20) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `ownerid` bigint(20) unsigned NOT NULL,
  `owner_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `joined_first` datetime NOT NULL,
  `joined_last` datetime NOT NULL,
  `joined_count` bigint(20) NOT NULL DEFAULT 0,
  `user_count` bigint(20) NOT NULL DEFAULT 0,
  `vip` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`serverid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.shards
CREATE TABLE IF NOT EXISTS `shards` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `taken` tinyint(1) NOT NULL DEFAULT 0,
  `connecting` tinyint(1) NOT NULL DEFAULT 0,
  `time_started` datetime NOT NULL,
  `memory_used` bigint(20) NOT NULL DEFAULT 0,
  `threads_active` bigint(20) NOT NULL DEFAULT 0,
  `server_count` bigint(20) NOT NULL DEFAULT 0,
  `user_count` bigint(20) NOT NULL DEFAULT 0,
  `messages_total` bigint(20) NOT NULL DEFAULT 0,
  `messages_per_minute` bigint(20) NOT NULL DEFAULT 0,
  `operations_ran` bigint(20) NOT NULL DEFAULT 0,
  `operations_active` bigint(20) NOT NULL DEFAULT 0,
  `disconnects` bigint(20) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.subscribers
CREATE TABLE IF NOT EXISTS `subscribers` (
  `userid` bigint(20) unsigned NOT NULL,
  `has_bonus` tinyint(1) NOT NULL,
  `premium` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`userid`),
  UNIQUE KEY `userid` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.support_team
CREATE TABLE IF NOT EXISTS `support_team` (
  `userid` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`userid`),
  UNIQUE KEY `userid` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.timers
CREATE TABLE IF NOT EXISTS `timers` (
  `timerid` bigint(20) unsigned NOT NULL,
  `serverid` bigint(20) unsigned NOT NULL,
  `channelid` bigint(20) unsigned NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  `self_command` tinyint(1) NOT NULL,
  `last_triggered` datetime NOT NULL,
  `start_at` datetime NOT NULL,
  `expire_after` datetime NOT NULL,
  `repeat_interval` bigint(20) NOT NULL,
  PRIMARY KEY (`timerid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.timer_responses
CREATE TABLE IF NOT EXISTS `timer_responses` (
  `id` bigint(20) NOT NULL,
  `timerid` bigint(20) unsigned NOT NULL,
  `message` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.usernames
CREATE TABLE IF NOT EXISTS `usernames` (
  `serverid` bigint(20) unsigned NOT NULL,
  `userid` bigint(20) unsigned NOT NULL,
  `username` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`serverid`,`userid`,`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.users
CREATE TABLE IF NOT EXISTS `users` (
  `userid` bigint(20) unsigned NOT NULL,
  `serverid` bigint(20) unsigned NOT NULL,
  `verified` tinyint(1) NOT NULL DEFAULT 0,
  `karma_count` bigint(20) NOT NULL DEFAULT 1,
  `warning_count` bigint(20) NOT NULL DEFAULT 0,
  `notes` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_thanks_time` datetime NOT NULL,
  `banned_until` datetime NOT NULL,
  `muted_until` datetime NOT NULL,
  `ignored` tinyint(1) NOT NULL,
  `count_message` bigint(20) NOT NULL DEFAULT 0,
  `count_attachments` bigint(20) NOT NULL DEFAULT 0,
  `level_relative` bigint(20) NOT NULL DEFAULT 0,
  `exp_relative` bigint(20) NOT NULL,
  `memo` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `username` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`userid`,`serverid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.user_profile_options
CREATE TABLE IF NOT EXISTS `user_profile_options` (
  `serverid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `userid` bigint(20) unsigned NOT NULL DEFAULT 0,
  `option` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `value` varchar(2048) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table valkyrja.votes
CREATE TABLE IF NOT EXISTS `votes` (
  `serverid` bigint(20) unsigned NOT NULL,
  `userid` bigint(20) unsigned NOT NULL,
  `voted` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`serverid`,`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

@janpio janpio added tech/engines Issue for tech Engines. and removed tech/engines/introspection engine Issue in the Introspection Engine labels Sep 21, 2020
@pantharshit00
Copy link
Contributor

Thanks for the database schema, I can confirm I am able to reproduce this on windows with mariadb 10.5.5

(error report id: 11445)

image

Now someone from the team who works on the introspection part will look into this.

@pantharshit00 pantharshit00 added bug/2-confirmed Bug has been reproduced and confirmed. process/candidate and removed bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. labels Sep 23, 2020
@albertoperdomo albertoperdomo added this to the Backlog 2.9.0 milestone Sep 30, 2020
@MikaXII
Copy link

MikaXII commented Oct 25, 2020

Versions

I've the same error on arch, report id:11776

Name Version
Platform debian-openssl-1.1.x
Node v14.3.0
Prisma CLI 2.9.0
Binary 369b369
MariaDB 10.1

Error

Error: [/rustc/04488afe34512aa4c33566eb16d8c912a3ae04f9/src/libcore/str/mod.rs:1942:47] begin <= end (1 <= 0) when slicing `0`

Obviously the OS isn't the cause.

@pantharshit00 pantharshit00 changed the title Introspection fails instantly with Windows & MariaDB Introspection fails instantly MariaDB Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. tech/engines Issue for tech Engines. topic: introspection topic: mariadb
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants