Giter Club home page Giter Club logo

mysql-protobuf's Introduction

This tree contains a work-in-progress version of MySQL that has support for Protocol Buffers.

The contributed code is licensed under GPLv2.

Getting started

  1. Install the following packages:

    • On Debian/Ubuntu/Linux Mint run:
      sudo apt-get install -y git g++ cmake bison libncurses5-dev
    • On Red Hat/Fedora/CentOS run:
      sudo yum install git g++ cmake bison ncurses-devel
  2. Clone this repo:
    git clone [email protected]:google/mysql-protobuf.git

  3. Go to mysql-protobuf folder and create a new bin folder:
    cd mysql-protobuf && mkdir bin && cd bin

  4. Compile the project. For that, you have to run cmake and then make:
    cmake .. -DDOWNLOAD_BOOST=1 -DWITH_BOOST=~/boost -DENABLE_DOWNLOADS=1 && make -j8

  5. Create a folder where you'll run mysqld:
    mkdir -p ~/mysql-run && cd ~/mysql-run

  6. Copy mysqld to this folder:
    cp /path/to/mysql-protobuf/bin/sql/mysqld .

  7. Copy errmsg.sys file to share folder:
    mkdir -p share && cp /path/to/mysql-protobuf/bin/sql/share/english/errmsg.sys share/

  8. Create a tmpdir folder:
    mkdir -p tmpdir

  9. Initialize mysqld:
    ./mysqld --initialize-insecure --pid-file=./mysql.pid --basedir=. --datadir=./datadir --tmpdir=$HOME/mysql-run/tmpdir --socket=$HOME/mysql-run/mysqld.sock

  10. Run mysqld:
    ./mysqld --pid-file=./mysql.pid --basedir=. --datadir=./datadir --tmpdir=$HOME/mysql-run/tmpdir --socket=$HOME/mysql-run/mysqld.sock

  11. Open another terminal and connect to mysqld:
    /path/to/mysql-protobuf/bin/client/mysql -u root -S ~/mysql-run/mysqld.sock

For examples of usage, please see our wiki.

mysql-protobuf's People

Contributors

agopi avatar alfranio avatar bjornmu avatar bkandasa avatar blaudden avatar dahlerlend avatar david-zhao avatar frazerclement avatar gkodinov avatar glebshchepa avatar gurusami avatar harinvadodaria avatar jdduncan avatar jhauglid avatar kboortz avatar marcalff avatar mithuncy avatar nacarvalho avatar nryeng avatar phulakun avatar pratikpatodi01 avatar roylyseng avatar satya461 avatar snarkedi avatar stewartsmith avatar thayumanavar77 avatar thirunarayanan avatar vaintroub avatar vasild avatar zmur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mysql-protobuf's Issues

Security Policy violation Binary Artifacts

This issue was automatically created by Allstar.

Security Policy Violation
Project is out of compliance with Binary Artifacts policy: binaries present in source code

Rule Description
Binary Artifacts are an increased security risk in your repository. Binary artifacts cannot be reviewed, allowing the introduction of possibly obsolete or maliciously subverted executables. For more information see the Security Scorecards Documentation for Binary Artifacts.

Remediation Steps
To remediate, remove the generated executable artifacts from the repository.

Artifacts Found

  • mysql-test/std_data/bug21542698.dat
  • mysql-test/std_data/parts/t1_blackhole.par
  • mysql-test/std_data/parts/t575.par

Additional Information
This policy is drawn from Security Scorecards, which is a tool that scores a project's adherence to security best practices. You may wish to run a Scorecards scan directly on this repository for more details.


Allstar has been installed on all Google managed GitHub orgs. Policies are gradually being rolled out and enforced by the GOSST and OSPO teams. Learn more at http://go/allstar

This issue will auto resolve when the policy is in compliance.

Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.

Crash when extracting repeated Message

The server crashes when doing the following:

CREATE TABLE t(i int,
           p PROTOBUF 'message M {  
                        optional int64 i = 1;
                        message P { repeated int64 iarr = 1; repeated string sarr = 2; }
                        repeated P inner = 2;
}');

INSERT INTO t VALUES(1, 'i: 1 inner { iarr: [1,2,3] } ');

SELECT p[inner.iarr] FROM t;

Error log:

[libprotobuf FATAL /home/fanton/test-protobuf/protobuf/src/google/protobuf/generated_message_reflection.cc:101] Protocol Buffer reflection usage error:
  Method      : google::protobuf::Reflection::GetMessage
  Message type: M
  Field       : M.inner
  Problem     : Field is repeated; the method requires a singular field.
terminate called after throwing an instance of 'google::protobuf::FatalException'
  what():  Protocol Buffer reflection usage error:
  Method      : google::protobuf::Reflection::GetMessage
  Message type: M
  Field       : M.inner
  Problem     : Field is repeated; the method requires a singular field.
[New Thread 0x7fffcedc6700 (LWP 8961)]
[New Thread 0x7fff85ffb700 (LWP 8958)]
[New Thread 0x7fffcee07700 (LWP 8957)]

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffcedc6700 (LWP 8961)]
0x00007ffff69b5267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55

Document the MySQL-protobuf usage on a wiki page

It would be nice to have a wiki page that shows you how to actually use the protobuf feature. For example how do you create a table with a protobuf column, how do you SELECT protobuf subfields etc.

Can't connect to local MySQL server through socket

Hi,
I did as the README file says:
After step 9:
Initialize mysqld:
./mysqld --initialize-insecure --pid-file=./mysql.pid --basedir=. --datadir=./datadir --tmpdir=$HOME/mysql-run/tmpdir --socket=$HOME/mysql-run/mysqld.sock
step 10:
Run mysqld:
./mysqld --pid-file=./mysql.pid --basedir=. --datadir=./datadir --tmpdir=$HOME/mysql-run/tmpdir --socket=$HOME/mysql-run/mysqld.sock

I got a problem here at step 11:
Open another terminal and connect to mysqld:
~/tools/mysql-protobuf/bin/client/mysql -u root -S ~/mysql-run/mysqld.sock
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/home/weiwu/mysql-run/mysqld.sock' (2)

There's no such thing called ~/mysql-run/mysqld.sock.

Port protobuf support into MariaDB tree

We use protobufs in blob columns without native support like this, we have a mariadb installation instead of mysql. Would love if this ported into MariaDB 10.* as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.