Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniël van Eeden dveeden

View GitHub Profile
@dveeden
dveeden / mariadb_connector_j_testing.py
Created Sep 17, 2021
MariaDB Connector/J testing with TiDB v5.2.0 and Jython
View mariadb_connector_j_testing.py
#!/bin/jython
import sys
import java.util.Properties
import java.sql.SQLException
import org.mariadb.jdbc.Driver
# Test user setup:
#
# mysql-sql> create user 'test_native'@'%' identified with 'mysql_native_password' by 'test';
# Query OK, 0 rows affected (0.0778 sec)
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<div id="g1">g1</div>
<div id="g2">g2</div>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script>
var width = 960,
height = 300
View MySQL Bug Rate.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View insert_features.py
#!/bin/env python3
# Loads https://github.com/zemirco/sf-city-lots-json/blob/master/citylots.json into MySQL
# First wget the file (could have used requests.get...)
# This requires the MySQL 5.7 JSON support.
#
# Table layout:
# CREATE DATABASE json_test;
# USE json_test;
# CREATE TABLE `test_features` (
# `id` int(11) NOT NULL AUTO_INCREMENT,
View gist:d0da92da20452f118f41
diff --git a/client/mysql.cc b/client/mysql.cc
index bf54e1c..3b6f00e 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1102,12 +1102,12 @@ static const char *embedded_server_groups[]=
HIST_ENTRY is defined for libedit, but not for the real readline
Need to redefine it for real readline to find it
*/
-#if !defined(HAVE_HIST_ENTRY)
+/* #if !defined(HAVE_HIST_ENTRY)
View MySQL Connector Python Native TLS Performance.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View MySQL Connpy and ssl_ca.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View MySQL Connector Python versus MySQLdb.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dveeden
dveeden / cext world bug.ipynb
Created Dec 26, 2015
Loading the world database with cext fails (MySQL Bug #79780)
View cext world bug.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:e5fac8f206a5bf52b5d6
mysql> SELECT 'Café' COLLATE utf8mb4_unicode_ci = 'Cafe' COLLATE utf8mb4_unicode_ci AS test1;
+-------+
| test1 |
+-------+
| 1 |
+-------+
1 row in set (0.00 sec)
mysql> SELECT '🍣 ' COLLATE utf8mb4_unicode_ci = '🍺 ' COLLATE utf8mb4_unicode_ci AS test2;
+-------+